From efed0b664d69e350172e8a46614ab39ff8701cfb Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Sat, 7 Jan 2023 01:05:27 +0000 Subject: [PATCH 01/74] Revert "out_datadog: fix/add error handling for all flb_sds calls (#5929)" This reverts commit 300206ae6a0263b322861b72c23fb92b69a1b1cf. --- plugins/out_datadog/datadog.c | 66 ++----------- plugins/out_datadog/datadog_conf.c | 21 +--- plugins/out_datadog/datadog_remap.c | 145 ++++++---------------------- plugins/out_datadog/datadog_remap.h | 4 +- 4 files changed, 46 insertions(+), 190 deletions(-) diff --git a/plugins/out_datadog/datadog.c b/plugins/out_datadog/datadog.c index 59689b18299..cd14f083602 100644 --- a/plugins/out_datadog/datadog.c +++ b/plugins/out_datadog/datadog.c @@ -92,11 +92,10 @@ static int datadog_format(struct flb_config *config, { int i; int ind; - int byte_cnt = 64; + int byte_cnt; int remap_cnt; - int ret; /* for msgpack global structs */ - size_t array_size = 0; + int array_size = 0; size_t off = 0; msgpack_unpacked result; msgpack_sbuffer mp_sbuf; @@ -111,23 +110,13 @@ static int datadog_format(struct flb_config *config, msgpack_object k; msgpack_object v; struct flb_out_datadog *ctx = plugin_context; - struct flb_event_chunk *event_chunk; /* output buffer */ flb_sds_t out_buf; flb_sds_t remapped_tags = NULL; - flb_sds_t tmp = NULL; - - /* in normal flush callback we have the event_chunk set as flush context - * so we don't need to calculate the event len. - * But in test mode the formatter won't get the event_chunk as flush_ctx - */ - if (flush_ctx != NULL) { - event_chunk = flush_ctx; - array_size = event_chunk->total_events; - } else { - array_size = flb_mp_count(data, bytes); - } + + /* Count number of records */ + array_size = flb_mp_count(data, bytes); /* Create temporary msgpack buffer */ msgpack_sbuffer_init(&mp_sbuf); @@ -172,22 +161,6 @@ static int datadog_format(struct flb_config *config, if (!remapped_tags) { remapped_tags = flb_sds_create_size(byte_cnt); - if (!remapped_tags) { - flb_errno(); - msgpack_sbuffer_destroy(&mp_sbuf); - msgpack_unpacked_destroy(&result); - return -1; - } - } else if (flb_sds_len(remapped_tags) < byte_cnt) { - tmp = flb_sds_increase(remapped_tags, flb_sds_len(remapped_tags) - byte_cnt); - if (!tmp) { - flb_errno(); - flb_sds_destroy(remapped_tags); - msgpack_sbuffer_destroy(&mp_sbuf); - msgpack_unpacked_destroy(&result); - return -1; - } - remapped_tags = tmp; } /* @@ -254,11 +227,8 @@ static int datadog_format(struct flb_config *config, * (so they won't be packed as attr) */ if (ctx->remap && (ind = dd_attr_need_remapping(k, v)) >=0 ) { - ret = remapping[ind].remap_to_tag(remapping[ind].remap_tag_name, v, - &remapped_tags); - if (ret < 0) { - flb_plg_error(ctx->ins, "Failed to remap tag: %s, skipping", remapping[ind].remap_tag_name); - } + remapping[ind].remap_to_tag(remapping[ind].remap_tag_name, v, + remapped_tags); continue; } @@ -280,25 +250,9 @@ static int datadog_format(struct flb_config *config, /* here we concatenate ctx->dd_tags and remapped_tags, depending on their presence */ if (remap_cnt) { if (ctx->dd_tags != NULL) { - tmp = flb_sds_cat(remapped_tags, FLB_DATADOG_TAG_SEPERATOR, - strlen(FLB_DATADOG_TAG_SEPERATOR)); - if (!tmp) { - flb_errno(); - flb_sds_destroy(remapped_tags); - msgpack_sbuffer_destroy(&mp_sbuf); - msgpack_unpacked_destroy(&result); - return -1; - } - remapped_tags = tmp; + flb_sds_cat(remapped_tags, FLB_DATADOG_TAG_SEPERATOR, + strlen(FLB_DATADOG_TAG_SEPERATOR)); flb_sds_cat(remapped_tags, ctx->dd_tags, strlen(ctx->dd_tags)); - if (!tmp) { - flb_errno(); - flb_sds_destroy(remapped_tags); - msgpack_sbuffer_destroy(&mp_sbuf); - msgpack_unpacked_destroy(&result); - return -1; - } - remapped_tags = tmp; } dd_msgpack_pack_key_value_str(&mp_pck, FLB_DATADOG_DD_TAGS_KEY, @@ -365,7 +319,7 @@ static void cb_datadog_flush(struct flb_event_chunk *event_chunk, /* Convert input data into a Datadog JSON payload */ ret = datadog_format(config, i_ins, - ctx, event_chunk, + ctx, NULL, event_chunk->tag, flb_sds_len(event_chunk->tag), event_chunk->data, event_chunk->size, &out_buf, &out_size); diff --git a/plugins/out_datadog/datadog_conf.c b/plugins/out_datadog/datadog_conf.c index 68377386c10..def064c48c5 100644 --- a/plugins/out_datadog/datadog_conf.c +++ b/plugins/out_datadog/datadog_conf.c @@ -33,7 +33,6 @@ struct flb_out_datadog *flb_datadog_conf_create(struct flb_output_instance *ins, struct flb_upstream *upstream; const char *api_key; const char *tmp; - flb_sds_t tmp_sds; int ret; char *protocol = NULL; @@ -76,18 +75,12 @@ struct flb_out_datadog *flb_datadog_conf_create(struct flb_output_instance *ins, /* use TLS ? */ if (ins->use_tls == FLB_TRUE) { io_flags = FLB_IO_TLS; - tmp_sds = flb_sds_create("https://"); + ctx->scheme = flb_sds_create("https://"); } else { io_flags = FLB_IO_TCP; - tmp_sds = flb_sds_create("http://"); + ctx->scheme = flb_sds_create("http://"); } - if (!tmp_sds) { - flb_errno(); - flb_datadog_conf_destroy(ctx); - return NULL; - } - ctx->scheme = tmp_sds; flb_plg_debug(ctx->ins, "scheme: %s", ctx->scheme); /* configure URI */ @@ -133,17 +126,11 @@ struct flb_out_datadog *flb_datadog_conf_create(struct flb_output_instance *ins, /* Get network configuration */ if (!ins->host.name) { - tmp_sds = flb_sds_create(FLB_DATADOG_DEFAULT_HOST); + ctx->host = flb_sds_create(FLB_DATADOG_DEFAULT_HOST); } else { - tmp_sds = flb_sds_create(ins->host.name); - } - if (!tmp_sds) { - flb_errno(); - flb_datadog_conf_destroy(ctx); - return NULL; + ctx->host = flb_sds_create(ins->host.name); } - ctx->host = tmp_sds; flb_plg_debug(ctx->ins, "host: %s", ctx->host); if (ins->host.port != 0) { diff --git a/plugins/out_datadog/datadog_remap.c b/plugins/out_datadog/datadog_remap.c index 7599a8f80a2..d524399589c 100644 --- a/plugins/out_datadog/datadog_remap.c +++ b/plugins/out_datadog/datadog_remap.c @@ -28,172 +28,98 @@ const char *ECS_ARN_PREFIX = "arn:aws:ecs:"; const char *ECS_CLUSTER_PREFIX = "cluster/"; const char *ECS_TASK_PREFIX = "task/"; -static int dd_remap_append_kv_to_ddtags(const char *key, - const char *val, size_t val_len, flb_sds_t *dd_tags_buf) +static void dd_remap_append_kv_to_ddtags(const char *key, + const char *val, size_t val_len, flb_sds_t dd_tags) { - flb_sds_t tmp; - - if (flb_sds_len(*dd_tags_buf) != 0) { - tmp = flb_sds_cat(*dd_tags_buf, FLB_DATADOG_TAG_SEPERATOR, strlen(FLB_DATADOG_TAG_SEPERATOR)); - if (!tmp) { - flb_errno(); - return -1; - } - *dd_tags_buf = tmp; + if (flb_sds_len(dd_tags) != 0) { + flb_sds_cat(dd_tags, FLB_DATADOG_TAG_SEPERATOR, strlen(FLB_DATADOG_TAG_SEPERATOR)); } - - tmp = flb_sds_cat(*dd_tags_buf, key, strlen(key)); - if (!tmp) { - flb_errno(); - return -1; - } - *dd_tags_buf = tmp; - - tmp = flb_sds_cat(*dd_tags_buf, ":", 1); - if (!tmp) { - flb_errno(); - return -1; - } - *dd_tags_buf = tmp; - - tmp = flb_sds_cat(*dd_tags_buf, val, val_len); - if (!tmp) { - flb_errno(); - return -1; - } - *dd_tags_buf = tmp; - - return 0; + flb_sds_cat(dd_tags, key, strlen(key)); + flb_sds_cat(dd_tags, ":", 1); + flb_sds_cat(dd_tags, val, val_len); } /* default remapping: just move the key/val pair under dd_tags */ -static int dd_remap_move_to_tags(const char *tag_name, - msgpack_object attr_value, flb_sds_t *dd_tags_buf) +static void dd_remap_move_to_tags(const char *tag_name, + msgpack_object attr_value, flb_sds_t dd_tags) { - return dd_remap_append_kv_to_ddtags(tag_name, attr_value.via.str.ptr, - attr_value.via.str.size, dd_tags_buf); + dd_remap_append_kv_to_ddtags(tag_name, attr_value.via.str.ptr, + attr_value.via.str.size, dd_tags); } /* remapping function for container_name */ -static int dd_remap_container_name(const char *tag_name, - msgpack_object attr_value, flb_sds_t *dd_tags_buf) +static void dd_remap_container_name(const char *tag_name, + msgpack_object attr_value, flb_sds_t dd_tags) { /* remove the first / if present */ unsigned int adjust; - flb_sds_t buf = NULL; - int ret; + flb_sds_t buf; adjust = attr_value.via.str.ptr[0] == '/' ? 1 : 0; buf = flb_sds_create_len(attr_value.via.str.ptr + adjust, attr_value.via.str.size - adjust); - if (!buf) { - flb_errno(); - return -1; - } - ret = dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags_buf); + dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags); flb_sds_destroy(buf); - if (ret < 0) { - return -1; - } - - return 0; } /* remapping function for ecs_cluster */ -static int dd_remap_ecs_cluster(const char *tag_name, - msgpack_object attr_value, flb_sds_t *dd_tags_buf) +static void dd_remap_ecs_cluster(const char *tag_name, + msgpack_object attr_value, flb_sds_t dd_tags) { - flb_sds_t buf = NULL; + flb_sds_t buf; char *cluster_name; - int ret; buf = flb_sds_create_len(attr_value.via.str.ptr, attr_value.via.str.size); - if (!buf) { - flb_errno(); - return -1; - } cluster_name = strstr(buf, ECS_CLUSTER_PREFIX); if (cluster_name != NULL) { cluster_name += strlen(ECS_CLUSTER_PREFIX); - ret = dd_remap_append_kv_to_ddtags(tag_name, cluster_name, strlen(cluster_name), dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } + dd_remap_append_kv_to_ddtags(tag_name, cluster_name, strlen(cluster_name), dd_tags); } else { /* * here the input is invalid: not in form of "XXXXXXcluster/"cluster-name * we preverse the original value under tag "cluster_name". */ - ret = dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } + dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags); } flb_sds_destroy(buf); - return 0; } /* remapping function for ecs_task_definition */ -static int dd_remap_ecs_task_definition(const char *tag_name, - msgpack_object attr_value, flb_sds_t *dd_tags_buf) +static void dd_remap_ecs_task_definition(const char *tag_name, + msgpack_object attr_value, flb_sds_t dd_tags) { - flb_sds_t buf = NULL; + flb_sds_t buf; char *split; - int ret; buf = flb_sds_create_len(attr_value.via.str.ptr, attr_value.via.str.size); - if (!buf) { - flb_errno(); - return -1; - } split = strchr(buf, ':'); if (split != NULL) { - ret = dd_remap_append_kv_to_ddtags("task_family", buf, split-buf, dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } - ret = dd_remap_append_kv_to_ddtags("task_version", split+1, strlen(split+1), dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } + dd_remap_append_kv_to_ddtags("task_family", buf, split-buf, dd_tags); + dd_remap_append_kv_to_ddtags("task_version", split+1, strlen(split+1), dd_tags); } else { /* * here the input is invalid: not in form of task_name:task_version * we preverse the original value under tag "ecs_task_definition". */ - ret = dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } + dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags); } flb_sds_destroy(buf); - return 0; } /* remapping function for ecs_task_arn */ -static int dd_remap_ecs_task_arn(const char *tag_name, - msgpack_object attr_value, flb_sds_t *dd_tags_buf) +static void dd_remap_ecs_task_arn(const char *tag_name, + msgpack_object attr_value, flb_sds_t dd_tags) { flb_sds_t buf; char *remain; char *split; char *task_arn; - int ret; buf = flb_sds_create_len(attr_value.via.str.ptr, attr_value.via.str.size); - if (!buf) { - flb_errno(); - return -1; - } /* * if the input is invalid, not in the form of "arn:aws:ecs:region:XXXX" @@ -206,11 +132,7 @@ static int dd_remap_ecs_task_arn(const char *tag_name, split = strchr(remain, ':'); if (split != NULL) { - ret = dd_remap_append_kv_to_ddtags("region", remain, split-remain, dd_tags_buf); - if (ret < 0) { - flb_sds_destroy(buf); - return -1; - } + dd_remap_append_kv_to_ddtags("region", remain, split-remain, dd_tags); } } @@ -218,21 +140,16 @@ static int dd_remap_ecs_task_arn(const char *tag_name, if (task_arn != NULL) { /* parse out the task_arn */ task_arn += strlen(ECS_TASK_PREFIX); - ret = dd_remap_append_kv_to_ddtags(tag_name, task_arn, strlen(task_arn), dd_tags_buf); + dd_remap_append_kv_to_ddtags(tag_name, task_arn, strlen(task_arn), dd_tags); } else { /* * if the input is invalid, not in the form of "XXXXXXXXtask/"task-arn * then we preverse the original value under tag "task_arn". */ - ret = dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags_buf); + dd_remap_append_kv_to_ddtags(tag_name, buf, strlen(buf), dd_tags); } flb_sds_destroy(buf); - if (ret < 0) { - return -1; - } - - return 0; } /* diff --git a/plugins/out_datadog/datadog_remap.h b/plugins/out_datadog/datadog_remap.h index f7061b0f2ac..910ee9780d8 100644 --- a/plugins/out_datadog/datadog_remap.h +++ b/plugins/out_datadog/datadog_remap.h @@ -22,12 +22,10 @@ #include "datadog.h" -typedef int (*dd_attr_remap_to_tag_fn)(const char*, msgpack_object, flb_sds_t*); - struct dd_attr_tag_remapping { char* origin_attr_name; /* original attribute name */ char* remap_tag_name; /* tag name to remap to */ - dd_attr_remap_to_tag_fn remap_to_tag; /* remapping function */ + void (*remap_to_tag) (const char*, msgpack_object, flb_sds_t); /* remapping function */ }; extern const struct dd_attr_tag_remapping remapping[]; From 71143a86535613b800492ef900e9f246f219dfcd Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Tue, 20 Dec 2022 04:52:33 +0000 Subject: [PATCH 02/74] aws: add excluded_headers option to signv4 function Signed-off-by: Matthew Fala --- include/fluent-bit/flb_signv4.h | 1 + plugins/out_bigquery/bigquery.c | 2 +- plugins/out_es/es.c | 2 +- plugins/out_http/http.c | 2 +- plugins/out_opensearch/opensearch.c | 2 +- src/aws/flb_aws_util.c | 2 +- src/flb_signv4.c | 35 ++++++++++++++++++++++++-- tests/internal/fuzzers/signv4_fuzzer.c | 2 +- tests/internal/signv4.c | 2 +- 9 files changed, 41 insertions(+), 9 deletions(-) diff --git a/include/fluent-bit/flb_signv4.h b/include/fluent-bit/flb_signv4.h index ef0d3116551..7b03953e1f7 100644 --- a/include/fluent-bit/flb_signv4.h +++ b/include/fluent-bit/flb_signv4.h @@ -40,6 +40,7 @@ flb_sds_t flb_signv4_do(struct flb_http_client *c, int normalize_uri, time_t t_now, char *region, char *service, int s3_mode, + struct mk_list *unsigned_headers, /* flb_slist */ struct flb_aws_provider *provider); #endif diff --git a/plugins/out_bigquery/bigquery.c b/plugins/out_bigquery/bigquery.c index c8f58298f74..aa67d95d540 100644 --- a/plugins/out_bigquery/bigquery.c +++ b/plugins/out_bigquery/bigquery.c @@ -260,7 +260,7 @@ static flb_sds_t add_aws_signature(struct flb_http_client *c, struct flb_bigquer signature = flb_signv4_do(c, FLB_TRUE, FLB_TRUE, time(NULL), ctx->aws_region, "sts", - 0, ctx->aws_provider); + 0, NULL, ctx->aws_provider); if (!signature) { flb_plg_error(ctx->ins, "Could not sign the request with AWS SigV4"); return NULL; diff --git a/plugins/out_es/es.c b/plugins/out_es/es.c index c3e8ef47fc1..a4d4b233f28 100644 --- a/plugins/out_es/es.c +++ b/plugins/out_es/es.c @@ -63,7 +63,7 @@ static flb_sds_t add_aws_auth(struct flb_http_client *c, signature = flb_signv4_do(c, FLB_TRUE, FLB_TRUE, time(NULL), ctx->aws_region, "es", - 0, + 0, NULL, ctx->aws_provider); if (!signature) { flb_plg_error(ctx->ins, "could not sign request with sigv4"); diff --git a/plugins/out_http/http.c b/plugins/out_http/http.c index e0f24d090a8..dd00ad83d69 100644 --- a/plugins/out_http/http.c +++ b/plugins/out_http/http.c @@ -232,7 +232,7 @@ static int http_post(struct flb_out_http *ctx, time(NULL), (char *) ctx->aws_region, (char *) ctx->aws_service, - 0, + 0, NULL, ctx->aws_provider); if (!signature) { diff --git a/plugins/out_opensearch/opensearch.c b/plugins/out_opensearch/opensearch.c index be327191966..2439c37203f 100644 --- a/plugins/out_opensearch/opensearch.c +++ b/plugins/out_opensearch/opensearch.c @@ -60,7 +60,7 @@ static flb_sds_t add_aws_auth(struct flb_http_client *c, signature = flb_signv4_do(c, FLB_TRUE, FLB_TRUE, time(NULL), ctx->aws_region, "es", - 0, + 0, NULL, ctx->aws_provider); if (!signature) { flb_plg_error(ctx->ins, "could not sign request with sigv4"); diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index 3ca93bd9a8f..ef84c7da193 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -455,7 +455,7 @@ struct flb_http_client *request_do(struct flb_aws_client *aws_client, } signature = flb_signv4_do(c, normalize_uri, FLB_TRUE, time(NULL), aws_client->region, aws_client->service, - aws_client->s3_mode, + aws_client->s3_mode, NULL, aws_client->provider); if (!signature) { if (aws_client->debug_only == FLB_TRUE) { diff --git a/src/flb_signv4.c b/src/flb_signv4.c index 750764c81d6..49c952f8b69 100644 --- a/src/flb_signv4.c +++ b/src/flb_signv4.c @@ -573,13 +573,17 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, char *amzdate, char *security_token, int s3_mode, + struct mk_list *excluded_headers, flb_sds_t *signed_headers) { int i; int len; int items; + int all_items; + int excluded_items; int post_params = FLB_FALSE; size_t size; + int skip_header; char *val; struct flb_kv **arr; flb_sds_t cr; @@ -590,6 +594,8 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, struct flb_kv *kv; struct mk_list list_tmp; struct mk_list *head; + struct mk_list *head_2; + struct flb_slist_entry *sle; unsigned char sha256_buf[64] = {0}; mbedtls_sha256_context sha256_ctx; @@ -806,8 +812,9 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, * For every header registered, append it to the temporal array so we can sort them * later. */ - items = mk_list_size(&list_tmp); - size = (sizeof(struct flb_kv *) * items); + all_items = mk_list_size(&list_tmp); + excluded_items = 0; + size = (sizeof(struct flb_kv *) * (all_items)); arr = flb_malloc(size); if (!arr) { flb_errno(); @@ -821,10 +828,32 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, i = 0; mk_list_foreach(head, &list_tmp) { kv = mk_list_entry(head, struct flb_kv, _head); + + /* Skip excluded headers */ + if (excluded_headers) { + skip_header = FLB_FALSE; + mk_list_foreach(head_2, excluded_headers) { + sle = mk_list_entry(head_2, struct flb_slist_entry, _head); + if (flb_sds_casecmp(kv->key, sle->str, flb_sds_len(sle->str)) == 0) { + + /* Skip header */ + excluded_items++; + skip_header = FLB_TRUE; + break; + } + } + if (skip_header) { + continue; + } + } + arr[i] = kv; i++; } + /* Count items */ + items = all_items - excluded_items; + /* Sort the headers from the temporal array */ qsort(arr, items, sizeof(struct flb_kv *), kv_key_cmp); @@ -1100,6 +1129,7 @@ flb_sds_t flb_signv4_do(struct flb_http_client *c, int normalize_uri, time_t t_now, char *region, char *service, int s3_mode, + struct mk_list *unsigned_headers, struct flb_aws_provider *provider) { char amzdate[32]; @@ -1148,6 +1178,7 @@ flb_sds_t flb_signv4_do(struct flb_http_client *c, int normalize_uri, cr = flb_signv4_canonical_request(c, normalize_uri, amz_date_header, amzdate, creds->session_token, s3_mode, + unsigned_headers, &signed_headers); if (!cr) { flb_error("[signv4] failed canonical request"); diff --git a/tests/internal/fuzzers/signv4_fuzzer.c b/tests/internal/fuzzers/signv4_fuzzer.c index e5089e663be..051870e6f7a 100644 --- a/tests/internal/fuzzers/signv4_fuzzer.c +++ b/tests/internal/fuzzers/signv4_fuzzer.c @@ -79,7 +79,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ret = setenv(AWS_SECRET_ACCESS_KEY, secret_key, 1); if (ret >= 0) { flb_sds_t signature = flb_signv4_do(http_c, FLB_TRUE, FLB_FALSE, t, - region, service, s3_mode, provider); + region, service, s3_mode, NULL, provider); if (signature) { flb_sds_destroy(signature); } diff --git a/tests/internal/signv4.c b/tests/internal/signv4.c index 2656e7fec5d..6ce4b977eb3 100644 --- a/tests/internal/signv4.c +++ b/tests/internal/signv4.c @@ -604,7 +604,7 @@ static void aws_test_suite() FLB_TRUE, /* normalize URI ? */ FLB_FALSE, /* add x-amz-date header ? */ t, region, service, - 0, + 0, NULL, provider); TEST_CHECK(signature != NULL); if (signature) { From 3de95b34a6a5fa4b90b7ee4b85ab5139f3a4d9c5 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Tue, 20 Dec 2022 04:57:29 +0000 Subject: [PATCH 03/74] out_es: aoss authentication support Signed-off-by: Matthew Fala --- plugins/out_es/es.c | 9 +++++++-- plugins/out_es/es.h | 2 ++ plugins/out_es/es_conf.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/plugins/out_es/es.c b/plugins/out_es/es.c index a4d4b233f28..6d67243f702 100644 --- a/plugins/out_es/es.c +++ b/plugins/out_es/es.c @@ -62,8 +62,8 @@ static flb_sds_t add_aws_auth(struct flb_http_client *c, flb_http_add_header(c, "User-Agent", 10, "aws-fluent-bit-plugin", 21); signature = flb_signv4_do(c, FLB_TRUE, FLB_TRUE, time(NULL), - ctx->aws_region, "es", - 0, NULL, + ctx->aws_region, ctx->aws_service_name, + S3_MODE_SIGNED_PAYLOAD, ctx->aws_unsigned_headers, ctx->aws_provider); if (!signature) { flb_plg_error(ctx->ins, "could not sign request with sigv4"); @@ -1011,6 +1011,11 @@ static struct flb_config_map config_map[] = { 0, FLB_FALSE, 0, "External ID for the AWS IAM Role specified with `aws_role_arn`" }, + { + FLB_CONFIG_MAP_STR, "aws_service_name", "es", + 0, FLB_TRUE, offsetof(struct flb_elasticsearch, aws_service_name), + "AWS Service Name" + }, #endif /* Logstash compatibility */ diff --git a/plugins/out_es/es.h b/plugins/out_es/es.h index acf0e1ba2a8..20f71d8eaaf 100644 --- a/plugins/out_es/es.h +++ b/plugins/out_es/es.h @@ -61,6 +61,8 @@ struct flb_elasticsearch { /* one for the standard chain provider, one for sts assume role */ struct flb_tls *aws_sts_tls; char *aws_session_name; + char *aws_service_name; + struct mk_list *aws_unsigned_headers; #endif /* HTTP Client Setup */ diff --git a/plugins/out_es/es_conf.c b/plugins/out_es/es_conf.c index 15d09e2915e..253e31aa457 100644 --- a/plugins/out_es/es_conf.c +++ b/plugins/out_es/es_conf.c @@ -294,6 +294,18 @@ struct flb_elasticsearch *flb_es_conf_create(struct flb_output_instance *ins, } #ifdef FLB_HAVE_AWS + /* AWS Auth Unsigned Headers */ + ctx->aws_unsigned_headers = flb_malloc(sizeof(struct mk_list)); + if (ret != 0) { + flb_es_conf_destroy(ctx); + } + flb_slist_create(ctx->aws_unsigned_headers); + ret = flb_slist_add(ctx->aws_unsigned_headers, "Content-Length"); + if (ret != 0) { + flb_es_conf_destroy(ctx); + return NULL; + } + /* AWS Auth */ ctx->has_aws_auth = FLB_FALSE; tmp = flb_output_get_property("aws_auth", ins); @@ -444,6 +456,11 @@ int flb_es_conf_destroy(struct flb_elasticsearch *ctx) if (ctx->aws_sts_tls) { flb_tls_destroy(ctx->aws_sts_tls); } + + if (ctx->aws_unsigned_headers) { + flb_slist_destroy(ctx->aws_unsigned_headers); + flb_free(ctx->aws_unsigned_headers); + } #endif if (ctx->ra_prefix_key) { From 947b13ebefb2692389086a91d3734c658c2d5c11 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Tue, 20 Dec 2022 04:57:47 +0000 Subject: [PATCH 04/74] out_opensearch: aoss authentication support Signed-off-by: Matthew Fala --- plugins/out_opensearch/opensearch.c | 9 +++++++-- plugins/out_opensearch/opensearch.h | 2 ++ plugins/out_opensearch/os_conf.c | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/plugins/out_opensearch/opensearch.c b/plugins/out_opensearch/opensearch.c index 2439c37203f..5d9a1194abd 100644 --- a/plugins/out_opensearch/opensearch.c +++ b/plugins/out_opensearch/opensearch.c @@ -59,8 +59,8 @@ static flb_sds_t add_aws_auth(struct flb_http_client *c, flb_http_add_header(c, "User-Agent", 10, "aws-fluent-bit-plugin", 21); signature = flb_signv4_do(c, FLB_TRUE, FLB_TRUE, time(NULL), - ctx->aws_region, "es", - 0, NULL, + ctx->aws_region, ctx->aws_service_name, + S3_MODE_SIGNED_PAYLOAD, ctx->aws_unsigned_headers, ctx->aws_provider); if (!signature) { flb_plg_error(ctx->ins, "could not sign request with sigv4"); @@ -1016,6 +1016,11 @@ static struct flb_config_map config_map[] = { 0, FLB_FALSE, 0, "External ID for the AWS IAM Role specified with `aws_role_arn`" }, + { + FLB_CONFIG_MAP_STR, "aws_service_name", "es", + 0, FLB_TRUE, offsetof(struct flb_opensearch, aws_service_name), + "AWS Service Name" + }, #endif /* Logstash compatibility */ diff --git a/plugins/out_opensearch/opensearch.h b/plugins/out_opensearch/opensearch.h index 8959d83c335..d9c3be89b04 100644 --- a/plugins/out_opensearch/opensearch.h +++ b/plugins/out_opensearch/opensearch.h @@ -73,6 +73,8 @@ struct flb_opensearch { /* one for the standard chain provider, one for sts assume role */ struct flb_tls *aws_sts_tls; char *aws_session_name; + char *aws_service_name; + struct mk_list *aws_unsigned_headers; #endif /* HTTP Client Setup */ diff --git a/plugins/out_opensearch/os_conf.c b/plugins/out_opensearch/os_conf.c index fcaf78ec3a4..7a3d9ede017 100644 --- a/plugins/out_opensearch/os_conf.c +++ b/plugins/out_opensearch/os_conf.c @@ -201,6 +201,19 @@ struct flb_opensearch *flb_os_conf_create(struct flb_output_instance *ins, } #ifdef FLB_HAVE_AWS + /* AWS Auth Unsigned Headers */ + ctx->aws_unsigned_headers = flb_malloc(sizeof(struct mk_list)); + if (!ctx->aws_unsigned_headers) { + flb_os_conf_destroy(ctx); + return NULL; + } + flb_slist_create(ctx->aws_unsigned_headers); + ret = flb_slist_add(ctx->aws_unsigned_headers, "Content-Length"); + if (ret != 0) { + flb_os_conf_destroy(ctx); + return NULL; + } + /* AWS Auth */ ctx->has_aws_auth = FLB_FALSE; tmp = flb_output_get_property("aws_auth", ins); @@ -348,6 +361,11 @@ int flb_os_conf_destroy(struct flb_opensearch *ctx) if (ctx->aws_sts_tls) { flb_tls_destroy(ctx->aws_sts_tls); } + + if (ctx->aws_unsigned_headers) { + flb_slist_destroy(ctx->aws_unsigned_headers); + flb_free(ctx->aws_unsigned_headers); + } #endif if (ctx->ra_prefix_key) { From 6a9be1b5161a50e266708d817f30ff23d08b2576 Mon Sep 17 00:00:00 2001 From: Clay Cheng Date: Mon, 28 Nov 2022 23:25:54 +0000 Subject: [PATCH 05/74] flb_aws_util: added function flb_aws_strftime_precision for time output. Signed-off-by: Clay Cheng --- include/fluent-bit/flb_aws_util.h | 9 +++ src/aws/flb_aws_util.c | 97 +++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/include/fluent-bit/flb_aws_util.h b/include/fluent-bit/flb_aws_util.h index bafe429c5ad..ce38864e136 100644 --- a/include/fluent-bit/flb_aws_util.h +++ b/include/fluent-bit/flb_aws_util.h @@ -22,6 +22,7 @@ #ifndef FLB_AWS_UTIL_H #include +#include #define FLB_AWS_UTIL_H @@ -177,5 +178,13 @@ int flb_read_file(const char *path, char **out_buf, size_t *out_size); flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char *tag_delimiter, uint64_t seq_index); +/* + * This function is an extension to strftime which can support milliseconds with %3N, + * support nanoseconds with %9N or %L. The return value is the length of formatted + * time string. + */ +size_t flb_aws_strftime_precision(char **out_buf, const char *time_format, + struct flb_time *tms); + #endif #endif /* FLB_HAVE_AWS */ diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index ef84c7da193..df269d2637c 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -57,6 +57,12 @@ #define FLB_AWS_BASE_USER_AGENT_LEN 21 #endif +#define FLB_AWS_MILLISECOND_FORMATTER_LENGTH 3 +#define FLB_AWS_NANOSECOND_FORMATTER_LENGTH 9 +#define FLB_AWS_MILLISECOND_FORMATTER "%3N" +#define FLB_AWS_NANOSECOND_FORMATTER_N "%9N" +#define FLB_AWS_NANOSECOND_FORMATTER_L "%L" + struct flb_http_client *request_do(struct flb_aws_client *aws_client, int method, const char *uri, const char *body, size_t body_len, @@ -942,3 +948,94 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, } return NULL; } + +/* + * This function is an extension to strftime which can support milliseconds with %3N, + * support nanoseconds with %9N or %L. The return value is the length of formatted + * time string. + */ +size_t flb_aws_strftime_precision(char **out_buf, const char *time_format, + struct flb_time *tms) +{ + char millisecond_str[FLB_AWS_MILLISECOND_FORMATTER_LENGTH+1]; + char nanosecond_str[FLB_AWS_NANOSECOND_FORMATTER_LENGTH+1]; + char *tmp_parsed_time_str; + char *buf; + size_t out_size; + size_t tmp_parsed_time_str_len; + size_t time_format_len; + struct tm timestamp; + struct tm *tmp; + int i; + + /* + * Guess the max length needed for tmp_parsed_time_str and tmp_out_buf. The + * upper bound is 12*strlen(time_format) because the worst scenario will be only + * %c in time_format, and %c will be transfer to 24 chars long by function strftime(). + */ + time_format_len = strlen(time_format); + tmp_parsed_time_str_len = 12*time_format_len; + + /* + * Use tmp_parsed_time_str to buffer when replace %3N with milliseconds, replace + * %9N and %L with nanoseconds in time_format. + */ + tmp_parsed_time_str = (char *)flb_calloc(1, tmp_parsed_time_str_len*sizeof(char)); + if (!tmp_parsed_time_str) { + flb_errno(); + return 0; + } + + buf = (char *)flb_calloc(1, tmp_parsed_time_str_len*sizeof(char)); + if (!buf) { + flb_errno(); + flb_free(tmp_parsed_time_str); + return 0; + } + + /* Replace %3N to millisecond, %9N and %L to nanosecond in time_format. */ + snprintf(millisecond_str, FLB_AWS_MILLISECOND_FORMATTER_LENGTH+1, + "%" PRIu64, (uint64_t) tms->tm.tv_nsec / 1000000); + snprintf(nanosecond_str, FLB_AWS_NANOSECOND_FORMATTER_LENGTH+1, + "%" PRIu64, (uint64_t) tms->tm.tv_nsec); + for (i = 0; i < time_format_len; i++) { + if (strncmp(time_format+i, FLB_AWS_MILLISECOND_FORMATTER, 3) == 0) { + strncat(tmp_parsed_time_str, millisecond_str, + FLB_AWS_MILLISECOND_FORMATTER_LENGTH+1); + i += 2; + } + else if (strncmp(time_format+i, FLB_AWS_NANOSECOND_FORMATTER_N, 3) == 0) { + strncat(tmp_parsed_time_str, nanosecond_str, + FLB_AWS_NANOSECOND_FORMATTER_LENGTH+1); + i += 2; + } + else if (strncmp(time_format+i, FLB_AWS_NANOSECOND_FORMATTER_L, 2) == 0) { + strncat(tmp_parsed_time_str, nanosecond_str, + FLB_AWS_NANOSECOND_FORMATTER_LENGTH+1); + i += 1; + } + else { + strncat(tmp_parsed_time_str,time_format+i,1); + } + } + + tmp = gmtime_r(&tms->tm.tv_sec, ×tamp); + if (!tmp) { + return 0; + } + + out_size = strftime(buf, tmp_parsed_time_str_len, + tmp_parsed_time_str, ×tamp); + + /* Check whether tmp_parsed_time_str_len is enough for tmp_out_buff */ + if (out_size == 0) { + flb_free(tmp_parsed_time_str); + flb_free(buf); + return 0; + } + + *out_buf = buf; + flb_free(tmp_parsed_time_str); + + return out_size; +} From 6e8e3351d17bb9dab178fe56770f9b48d6192cdb Mon Sep 17 00:00:00 2001 From: Clay Cheng Date: Wed, 28 Dec 2022 01:01:54 +0000 Subject: [PATCH 06/74] out_kinesis_streams: used function flb_aws_strftime_precision for time output. Signed-off-by: Clay Cheng --- plugins/out_kinesis_streams/kinesis_api.c | 59 ++++++++++++++--------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/plugins/out_kinesis_streams/kinesis_api.c b/plugins/out_kinesis_streams/kinesis_api.c index b7e29030383..73434187a4d 100644 --- a/plugins/out_kinesis_streams/kinesis_api.c +++ b/plugins/out_kinesis_streams/kinesis_api.c @@ -225,6 +225,7 @@ static int process_event(struct flb_kinesis *ctx, struct flush *buf, struct tm *tmp; size_t len; size_t tmp_size; + char *out_buf; tmp_buf_ptr = buf->tmp_buf + buf->tmp_buf_offset; ret = flb_msgpack_to_json(tmp_buf_ptr, @@ -276,34 +277,48 @@ static int process_event(struct flb_kinesis *ctx, struct flush *buf, ctx->stream_name); return 2; } - /* guess space needed to write time_key */ - len = 6 + strlen(ctx->time_key) + 6 * strlen(ctx->time_key_format); + + /* format time output and return the length */ + len = flb_aws_strftime_precision(&out_buf, ctx->time_key_format, tms); + /* how much space do we have left */ tmp_size = (buf->tmp_buf_size - buf->tmp_buf_offset) - written; if (len > tmp_size) { - /* not enough space- tell caller to retry */ + /* not enough space - tell caller to retry */ + flb_free(out_buf); return 1; } - time_key_ptr = tmp_buf_ptr + written - 1; - memcpy(time_key_ptr, ",", 1); - time_key_ptr++; - memcpy(time_key_ptr, "\"", 1); - time_key_ptr++; - memcpy(time_key_ptr, ctx->time_key, strlen(ctx->time_key)); - time_key_ptr += strlen(ctx->time_key); - memcpy(time_key_ptr, "\":\"", 3); - time_key_ptr += 3; - tmp_size = buf->tmp_buf_size - buf->tmp_buf_offset; - tmp_size -= (time_key_ptr - tmp_buf_ptr); - len = strftime(time_key_ptr, tmp_size, ctx->time_key_format, &time_stamp); - if (len <= 0) { - /* ran out of space - should not happen because of check above */ - return 1; + + if (len == 0) { + /* + * when the length of out_buf is not enough for time_key_format, + * time_key will not be added to record. + */ + flb_plg_error(ctx->ins, "Failed to add time_key %s to record, %s", + ctx->time_key, ctx->stream_name); + flb_free(out_buf); + } + else { + time_key_ptr = tmp_buf_ptr + written - 1; + memcpy(time_key_ptr, ",", 1); + time_key_ptr++; + memcpy(time_key_ptr, "\"", 1); + time_key_ptr++; + memcpy(time_key_ptr, ctx->time_key, strlen(ctx->time_key)); + time_key_ptr += strlen(ctx->time_key); + memcpy(time_key_ptr, "\":\"", 3); + time_key_ptr += 3; + tmp_size = buf->tmp_buf_size - buf->tmp_buf_offset; + tmp_size -= (time_key_ptr - tmp_buf_ptr); + + /* merge out_buf to time_key_ptr */ + memcpy(time_key_ptr, out_buf, len); + flb_free(out_buf); + time_key_ptr += len; + memcpy(time_key_ptr, "\"}", 2); + time_key_ptr += 2; + written = (time_key_ptr - tmp_buf_ptr); } - time_key_ptr += len; - memcpy(time_key_ptr, "\"}", 2); - time_key_ptr += 2; - written = (time_key_ptr - tmp_buf_ptr); } /* is (written + 1) because we still have to append newline */ From fefa130804de6b2b717365b265cd17e927e92a2c Mon Sep 17 00:00:00 2001 From: Clay Cheng Date: Wed, 28 Dec 2022 01:03:22 +0000 Subject: [PATCH 07/74] out_kinesis_firehose: used function flb_aws_strftime_precision for time output. Signed-off-by: Clay Cheng --- plugins/out_kinesis_firehose/firehose_api.c | 59 +++++++++++++-------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/plugins/out_kinesis_firehose/firehose_api.c b/plugins/out_kinesis_firehose/firehose_api.c index b9529408d6b..0516578c4f3 100644 --- a/plugins/out_kinesis_firehose/firehose_api.c +++ b/plugins/out_kinesis_firehose/firehose_api.c @@ -165,6 +165,7 @@ static int process_event(struct flb_firehose *ctx, struct flush *buf, size_t len; size_t tmp_size; void *compressed_tmp_buf; + char *out_buf; tmp_buf_ptr = buf->tmp_buf + buf->tmp_buf_offset; ret = flb_msgpack_to_json(tmp_buf_ptr, @@ -216,34 +217,48 @@ static int process_event(struct flb_firehose *ctx, struct flush *buf, ctx->delivery_stream); return 2; } - /* guess space needed to write time_key */ - len = 6 + strlen(ctx->time_key) + 6 * strlen(ctx->time_key_format); + + /* format time output and return the length */ + len = flb_aws_strftime_precision(&out_buf, ctx->time_key_format, tms); + /* how much space do we have left */ tmp_size = (buf->tmp_buf_size - buf->tmp_buf_offset) - written; if (len > tmp_size) { - /* not enough space- tell caller to retry */ + /* not enough space - tell caller to retry */ + flb_free(out_buf); return 1; } - time_key_ptr = tmp_buf_ptr + written - 1; - memcpy(time_key_ptr, ",", 1); - time_key_ptr++; - memcpy(time_key_ptr, "\"", 1); - time_key_ptr++; - memcpy(time_key_ptr, ctx->time_key, strlen(ctx->time_key)); - time_key_ptr += strlen(ctx->time_key); - memcpy(time_key_ptr, "\":\"", 3); - time_key_ptr += 3; - tmp_size = buf->tmp_buf_size - buf->tmp_buf_offset; - tmp_size -= (time_key_ptr - tmp_buf_ptr); - len = strftime(time_key_ptr, tmp_size, ctx->time_key_format, &time_stamp); - if (len <= 0) { - /* ran out of space - should not happen because of check above */ - return 1; + + if (len == 0) { + /* + * when the length of out_buf is not enough for time_key_format, + * time_key will not be added to record. + */ + flb_plg_error(ctx->ins, "Failed to add time_key %s to record, %s", + ctx->time_key, ctx->delivery_stream); + flb_free(out_buf); + } + else { + time_key_ptr = tmp_buf_ptr + written - 1; + memcpy(time_key_ptr, ",", 1); + time_key_ptr++; + memcpy(time_key_ptr, "\"", 1); + time_key_ptr++; + memcpy(time_key_ptr, ctx->time_key, strlen(ctx->time_key)); + time_key_ptr += strlen(ctx->time_key); + memcpy(time_key_ptr, "\":\"", 3); + time_key_ptr += 3; + tmp_size = buf->tmp_buf_size - buf->tmp_buf_offset; + tmp_size -= (time_key_ptr - tmp_buf_ptr); + + /* merge out_buf to time_key_ptr */ + memcpy(time_key_ptr, out_buf, len); + flb_free(out_buf); + time_key_ptr += len; + memcpy(time_key_ptr, "\"}", 2); + time_key_ptr += 2; + written = (time_key_ptr - tmp_buf_ptr); } - time_key_ptr += len; - memcpy(time_key_ptr, "\"}", 2); - time_key_ptr += 2; - written = (time_key_ptr - tmp_buf_ptr); } /* is (written + 1) because we still have to append newline */ From 2ceb7ad422b322c395d40a4839552403aa232227 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Wed, 14 Dec 2022 14:55:58 -0800 Subject: [PATCH 08/74] out_s3: fix logic in log_key warn message Signed-off-by: Wesley Pettit --- plugins/out_s3/s3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index 5f4c1027852..b486a435b4d 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -1989,7 +1989,7 @@ static flb_sds_t flb_pack_msgpack_extract_log_key(void *out_context, const char } /* Throw error once per chunk if at least one log key was not found */ - if (log_key_missing == FLB_TRUE) { + if (log_key_missing > 0) { flb_plg_error(ctx->ins, "Could not find log_key '%s' in %d records", ctx->log_key, log_key_missing); } From 88f495211fd95808e07ea9a08ebb53bd67337ca4 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Tue, 3 Jan 2023 17:55:19 -0800 Subject: [PATCH 09/74] filter_ecs: all fixes from December 2022 in these PRs: https://github.com/fluent/fluent-bit/pull/6614 1.9 based branch Signed-off-by: Wesley Pettit --- plugins/filter_ecs/ecs.c | 191 +++++++++++++++++++++++++++---------- plugins/filter_ecs/ecs.h | 22 +++-- tests/runtime/filter_ecs.c | 168 +++++++++++++++++++++++++++++++- 3 files changed, 321 insertions(+), 60 deletions(-) diff --git a/plugins/filter_ecs/ecs.c b/plugins/filter_ecs/ecs.c index ff7874cba05..19438dbfa54 100644 --- a/plugins/filter_ecs/ecs.c +++ b/plugins/filter_ecs/ecs.c @@ -315,7 +315,8 @@ static flb_sds_t parse_id_from_arn(const char *arn, int len) /* * This deserializes the msgpack metadata buf to msgpack_object - * which can be used with flb_ra_translate in the main filter callback + * and then uses that msgpack_object to construct a list of key value pairs + * ready to attach to log records */ static int flb_ecs_metadata_buffer_init(struct flb_filter_ecs *ctx, struct flb_ecs_metadata_buffer *meta) @@ -324,6 +325,11 @@ static int flb_ecs_metadata_buffer_init(struct flb_filter_ecs *ctx, msgpack_object root; size_t off = 0; int ret; + struct flb_ecs_metadata_key *metadata_key = NULL; + flb_sds_t val = NULL; + struct mk_list *tmp; + struct mk_list *head; + struct flb_ecs_metadata_keypair *keypair = NULL; msgpack_unpacked_init(&result); ret = msgpack_unpack_next(&result, meta->buf, meta->size, &off); @@ -341,24 +347,73 @@ static int flb_ecs_metadata_buffer_init(struct flb_filter_ecs *ctx, return -1; } - meta->unpacked = result; - meta->obj = root; + /* create list of metadata key value pairs */ + mk_list_init(&meta->metadata_keypairs); + meta->keypairs_len = 0; + meta->last_used_time = time(NULL); - meta->free_packer = FLB_TRUE; + + mk_list_foreach_safe(head, tmp, &ctx->metadata_keys) { + metadata_key = mk_list_entry(head, struct flb_ecs_metadata_key, _head); + val = flb_ra_translate(metadata_key->ra, NULL, 0, + root, NULL); + if (!val) { + flb_plg_info(ctx->ins, "Translation failed for %s : %s for container ID: %s", + metadata_key->key, metadata_key->template, meta->id); + /* keep trying other keys*/ + continue; + } + + if (flb_sds_len(val) == 0) { + flb_plg_info(ctx->ins, "Translation failed for %s : %s for container ID: %s", + metadata_key->key, metadata_key->template, meta->id); + flb_sds_destroy(val); + /* keep trying other keys*/ + continue; + } + + keypair = flb_calloc(1, sizeof(struct flb_ecs_metadata_keypair)); + if (!keypair) { + flb_errno(); + msgpack_unpacked_destroy(&result); + flb_sds_destroy(val); + return -1; + } + + keypair->key = metadata_key->key; + keypair->val = val; + + mk_list_add(&keypair->_head, &meta->metadata_keypairs); + meta->keypairs_len += 1; + } + + msgpack_unpacked_destroy(&result); return 0; } static void flb_ecs_metadata_buffer_destroy(struct flb_ecs_metadata_buffer *meta) { + struct flb_ecs_metadata_keypair *keypair = NULL; + struct mk_list *tmp; + struct mk_list *head; + if (meta) { flb_free(meta->buf); - if (meta->free_packer == FLB_TRUE) { - msgpack_unpacked_destroy(&meta->unpacked); - } if (meta->id) { flb_sds_destroy(meta->id); } + if (mk_list_is_set( &meta->metadata_keypairs) == 0) { + mk_list_foreach_safe(head, tmp, &meta->metadata_keypairs) { + keypair = mk_list_entry(head, struct flb_ecs_metadata_keypair, _head); + /* only need to free val. key is ref to flb_ecs_metadata_key.key*/ + if (keypair->val) { + flb_sds_destroy(keypair->val); + } + mk_list_del(&keypair->_head); + flb_free(keypair); + } + } flb_free(meta); } } @@ -1325,7 +1380,7 @@ static int get_metadata_by_id(struct flb_filter_ecs *ctx, /* get metadata for this container */ ret = flb_hash_get(ctx->container_hash_table, container_short_id, flb_sds_len(container_short_id), - (void *) metadata_buffer, &size); + (void **) metadata_buffer, &size); if (ret == -1) { /* try fetch metadata */ @@ -1339,7 +1394,7 @@ static int get_metadata_by_id(struct flb_filter_ecs *ctx, /* get from hash table */ ret = flb_hash_get(ctx->container_hash_table, container_short_id, flb_sds_len(container_short_id), - (void *) metadata_buffer, &size); + (void **) metadata_buffer, &size); } flb_sds_destroy(container_short_id); @@ -1369,14 +1424,14 @@ static int is_tag_marked_failed(struct flb_filter_ecs *ctx, const char *tag, int tag_len) { int ret; - int val = 0; + int *val = NULL; size_t val_size; ret = flb_hash_get(ctx->failed_metadata_request_tags, tag, tag_len, - (void *) &val, &val_size); + (void **) &val, &val_size); if (ret != -1) { - if (val >= FLB_ECS_FILTER_METADATA_RETRIES) { + if (*val > ctx->agent_endpoint_retries) { return FLB_TRUE; } } @@ -1389,11 +1444,12 @@ static void mark_tag_failed(struct flb_filter_ecs *ctx, { int ret; int *val = NULL; + int *new_val = NULL; size_t val_size; ret = flb_hash_get(ctx->failed_metadata_request_tags, tag, tag_len, - (void *) val, &val_size); + (void **) &val, &val_size); if (ret == -1) { /* hash table copies memory to new heap block */ @@ -1409,16 +1465,29 @@ static void mark_tag_failed(struct flb_filter_ecs *ctx, /* hash table will contain a copy */ flb_free(val); } else { + /* + * val is memory returned from hash table + * if we simply update the value here and call flb_hash_add + * it first frees the old memory (which is what we passed it) + * then tries to copy over the memory we passed in to a new location + * flb_hash stores all entries as if they were strings, so we also + * can't simply increment the value returned by flb_hash_get + */ + new_val = flb_malloc(sizeof(int)); + if (!new_val) { + flb_errno(); + return; + } /* increment number of failed metadata requests for this tag */ - *val = *val + 1; + *new_val = *val + 1; flb_hash_add(ctx->failed_metadata_request_tags, tag, tag_len, - val, sizeof(int)); + new_val, sizeof(int)); flb_plg_info(ctx->ins, "Failed to get ECS Metadata for tag %s %d times. " "This might be because the logs for this tag do not come from an ECS Task Container. " "This plugin will retry metadata requests at most %d times total for this tag.", - tag, *val, FLB_ECS_FILTER_METADATA_RETRIES); - + tag, *new_val, ctx->agent_endpoint_retries); + flb_free(new_val); } } @@ -1448,9 +1517,8 @@ static int cb_ecs_filter(const void *data, size_t bytes, msgpack_object_kv *kv; struct mk_list *tmp; struct mk_list *head; - struct flb_ecs_metadata_key *metadata_key; - struct flb_ecs_metadata_buffer *metadata_buffer; - flb_sds_t val; + struct flb_ecs_metadata_keypair *keypair = NULL; + struct flb_ecs_metadata_buffer *metadata_buffer = NULL; /* First check that the static cluster metadata has been retrieved */ if (ctx->has_cluster_metadata == FLB_FALSE) { @@ -1467,7 +1535,7 @@ static int cb_ecs_filter(const void *data, size_t bytes, if (check == FLB_TRUE) { flb_plg_debug(ctx->ins, "Failed to get ECS Metadata for tag %s %d times. " "Will not attempt to retry the metadata request. Will attach cluster metadata only.", - tag, FLB_ECS_FILTER_METADATA_RETRIES); + tag, ctx->agent_endpoint_retries); } if (check == FLB_FALSE && ctx->cluster_metadata_only == FLB_FALSE) { @@ -1521,7 +1589,7 @@ static int cb_ecs_filter(const void *data, size_t bytes, flb_time_append_to_msgpack(&tm, &tmp_pck, 0); /* new record map size is old size + the new keys we will add */ - total_records = obj->via.map.size + ctx->metadata_keys_len; + total_records = obj->via.map.size + metadata_buffer->keypairs_len; msgpack_pack_map(&tmp_pck, total_records); /* iterate through the old record map and add it to the new buffer */ @@ -1532,28 +1600,21 @@ static int cb_ecs_filter(const void *data, size_t bytes, } /* append new keys */ - mk_list_foreach_safe(head, tmp, &ctx->metadata_keys) { - metadata_key = mk_list_entry(head, struct flb_ecs_metadata_key, _head); - val = flb_ra_translate(metadata_key->ra, NULL, 0, - metadata_buffer->obj, NULL); - if (!val) { - flb_plg_info(ctx->ins, "Translation failed for %s : %s", - metadata_key->key, metadata_key->template); - msgpack_unpacked_destroy(&result); - msgpack_sbuffer_destroy(&tmp_sbuf); - return FLB_FILTER_NOTOUCH; + if (metadata_buffer->keypairs_len > 0) { + mk_list_foreach_safe(head, tmp, &metadata_buffer->metadata_keypairs) { + keypair = mk_list_entry(head, struct flb_ecs_metadata_keypair, _head); + + len = flb_sds_len(keypair->key); + msgpack_pack_str(&tmp_pck, len); + msgpack_pack_str_body(&tmp_pck, + keypair->key, + len); + len = flb_sds_len(keypair->val); + msgpack_pack_str(&tmp_pck, len); + msgpack_pack_str_body(&tmp_pck, + keypair->val, + len); } - len = flb_sds_len(metadata_key->key); - msgpack_pack_str(&tmp_pck, len); - msgpack_pack_str_body(&tmp_pck, - metadata_key->key, - len); - len = flb_sds_len(val); - msgpack_pack_str(&tmp_pck, len); - msgpack_pack_str_body(&tmp_pck, - val, - len); - flb_sds_destroy(val); } } msgpack_unpacked_destroy(&result); @@ -1590,6 +1651,7 @@ static void flb_filter_ecs_destroy(struct flb_filter_ecs *ctx) struct mk_list *head; struct flb_ecs_metadata_key *metadata_key; struct flb_ecs_metadata_buffer *buf; + struct flb_ecs_metadata_keypair *keypair = NULL; if (ctx) { if (ctx->ecs_upstream) { @@ -1609,18 +1671,32 @@ static void flb_filter_ecs_destroy(struct flb_filter_ecs *ctx) } if (ctx->cluster_meta_buf.buf) { flb_free(ctx->cluster_meta_buf.buf); - msgpack_unpacked_destroy(&ctx->cluster_meta_buf.unpacked); + if (mk_list_is_set(&ctx->cluster_meta_buf.metadata_keypairs) == 0) { + mk_list_foreach_safe(head, tmp, &ctx->cluster_meta_buf.metadata_keypairs) { + keypair = mk_list_entry(head, struct flb_ecs_metadata_keypair, _head); + /* only need to free val. key is ref to flb_ecs_metadata_key.key*/ + if (keypair->val) { + flb_sds_destroy(keypair->val); + } + mk_list_del(&keypair->_head); + flb_free(keypair); + } + } } - mk_list_foreach_safe(head, tmp, &ctx->metadata_keys) { - metadata_key = mk_list_entry(head, struct flb_ecs_metadata_key, _head); - mk_list_del(&metadata_key->_head); - flb_ecs_metadata_key_destroy(metadata_key); + if (mk_list_is_set(&ctx->metadata_keys) == 0) { + mk_list_foreach_safe(head, tmp, &ctx->metadata_keys) { + metadata_key = mk_list_entry(head, struct flb_ecs_metadata_key, _head); + mk_list_del(&metadata_key->_head); + flb_ecs_metadata_key_destroy(metadata_key); + } } - mk_list_foreach_safe(head, tmp, &ctx->metadata_buffers) { - buf = mk_list_entry(head, struct flb_ecs_metadata_buffer, _head); - mk_list_del(&buf->_head); - flb_hash_del(ctx->container_hash_table, buf->id); - flb_ecs_metadata_buffer_destroy(buf); + if (mk_list_is_set(&ctx->metadata_buffers) == 0) { + mk_list_foreach_safe(head, tmp, &ctx->metadata_buffers) { + buf = mk_list_entry(head, struct flb_ecs_metadata_buffer, _head); + mk_list_del(&buf->_head); + flb_hash_del(ctx->container_hash_table, buf->id); + flb_ecs_metadata_buffer_destroy(buf); + } } if (ctx->container_hash_table) { flb_hash_destroy(ctx->container_hash_table); @@ -1694,6 +1770,15 @@ static struct flb_config_map config_map[] = { "Defaults to 51678" }, + { + FLB_CONFIG_MAP_INT, "agent_endpoint_retries", FLB_ECS_FILTER_METADATA_RETRIES, + 0, FLB_TRUE, offsetof(struct flb_filter_ecs, agent_endpoint_retries), + "Number of retries for failed metadata requests to ECS Agent Introspection " + "endpoint. The most common cause of failed metadata requests is that the " + "container the metadata request was made for is not part of an ECS Task. " + "Check if you have non-task containers and docker dual logging enabled." + }, + {0} }; diff --git a/plugins/filter_ecs/ecs.h b/plugins/filter_ecs/ecs.h index e6bc0eba796..52438a0853c 100644 --- a/plugins/filter_ecs/ecs.h +++ b/plugins/filter_ecs/ecs.h @@ -30,7 +30,7 @@ #define FLB_ECS_FILTER_PORT "51678" #define FLB_ECS_FILTER_CLUSTER_PATH "/v1/metadata" #define FLB_ECS_FILTER_TASK_PATH_FORMAT "/v1/tasks?dockerid=%s" -#define FLB_ECS_FILTER_METADATA_RETRIES 2 +#define FLB_ECS_FILTER_METADATA_RETRIES "3" /* * Kubernetes recommends not running more than 110 pods per node @@ -49,21 +49,29 @@ struct flb_ecs_metadata_key { struct mk_list _head; }; +/* metadata processed into KV pair ready to add to log record */ +struct flb_ecs_metadata_keypair { + /* key is just a reference to the flb_ecs_metadata_key.key */ + flb_sds_t key; + flb_sds_t val; + + struct mk_list _head; +}; + struct flb_ecs_metadata_buffer { /* msgpack_sbuffer */ char *buf; size_t size; - /* unpacked object to use with flb_ra_translate */ - msgpack_unpacked unpacked; - msgpack_object obj; - int free_packer; - /* the hash table only stores a pointer- we need the list to track and free these */ struct mk_list _head; /* we clean up the memory for these once ecs_meta_cache_ttl has expired */ time_t last_used_time; + /* List of processed metadata keys and values */ + struct mk_list metadata_keypairs; + int keypairs_len; + /* * To remove from the hash table on TTL expiration, we need the ID * While we use a TTL hash, it won't clean up the memory, so we have a separate routine for that @@ -109,6 +117,8 @@ struct flb_filter_ecs { flb_sds_t ecs_host; int ecs_port; + int agent_endpoint_retries; + /* * This field is used when we build new container metadata objects */ diff --git a/tests/runtime/filter_ecs.c b/tests/runtime/filter_ecs.c index e0ba33a30b2..15c95d3b44a 100644 --- a/tests/runtime/filter_ecs.c +++ b/tests/runtime/filter_ecs.c @@ -15,6 +15,7 @@ struct filter_test { struct filter_test_result { char *expected_pattern; /* string that must occur in output */ + char *fail_pattern; /* if this pattern is found in the result, fail test */ int expected_pattern_index; /* which record to check for the pattern */ int expected_records; /* expected number of outputted records */ int actual_records; /* actual number of outputted records */ @@ -47,6 +48,15 @@ static int cb_check_result(void *record, size_t size, void *data) expected->actual_records++; + if (expected->fail_pattern != NULL) { + p = strstr(result, expected->fail_pattern); + TEST_CHECK(p == NULL); + if (p) { + flb_error("Should not find: '%s' in result '%s'", + expected->fail_pattern, result); + } + } + flb_free(record); return 0; } @@ -158,6 +168,85 @@ static void flb_test_ecs_filter() sleep(2); TEST_CHECK(expected.actual_records == expected.expected_records); filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); +} + +/* + * First release of ECS filter could crash + * when saving that it faild to get metadata for a tag + */ +static void flb_test_ecs_filter_mark_tag_failed() +{ + int len; + int ret; + int bytes; + char *p; + struct flb_lib_out_cb cb_data; + struct filter_test *ctx; + struct filter_test_result expected = { 0 }; + + /* mocks calls- signals that we are in test mode */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "true", 1); + setenv("TEST_TASK_ERROR", ERROR_RESPONSE, 1); + + /* Create test context */ + ctx = filter_test_create((void *) &cb_data, "testprefix-79c796ed2a7f"); + if (!ctx) { + exit(EXIT_FAILURE); + } + + /* Configure filter */ + ret = flb_filter_set(ctx->flb, ctx->f_ffd, + "ecs_tag_prefix", "testprefix-", + "ADD", "resource $ClusterName.$TaskID.$ECSContainerName", + NULL); + TEST_CHECK(ret == 0); + + /* Prepare output callback with expected result */ + expected.expected_records = 4; /* 4 records with no metadata */ + expected.expected_pattern = ""; + expected.expected_pattern_index = 0; + cb_data.cb = cb_check_result; + cb_data.data = (void *) &expected; + + /* Start the engine */ + ret = flb_start(ctx->flb); + TEST_CHECK(ret == 0); + + /* Ingest data samples */ + p = "[0, {\"log\":\"error: my error\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + sleep(1); + + p = "[0, {\"log\":\"error: my error\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + sleep(1); + + p = "[0, {\"log\":\"error: my error\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + sleep(1); + + p = "[0, {\"log\":\"error: my error\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + sleep(2); + + /* check number of outputted records */ + TEST_CHECK(expected.actual_records == expected.expected_records); + filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); + setenv("TEST_TASK_ERROR", "", 1); } static void flb_test_ecs_filter_no_prefix() @@ -207,6 +296,9 @@ static void flb_test_ecs_filter_no_prefix() sleep(2); TEST_CHECK(expected.actual_records == expected.expected_records); filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); } static void flb_test_ecs_filter_cluster_metadata_only() @@ -258,6 +350,9 @@ static void flb_test_ecs_filter_cluster_metadata_only() sleep(2); TEST_CHECK(expected.actual_records == expected.expected_records); filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); } static void flb_test_ecs_filter_cluster_error() @@ -308,6 +403,10 @@ static void flb_test_ecs_filter_cluster_error() sleep(2); TEST_CHECK(expected.actual_records == expected.expected_records); filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); + setenv("TEST_CLUSTER_ERROR", "", 1); } static void flb_test_ecs_filter_task_error() @@ -358,10 +457,77 @@ static void flb_test_ecs_filter_task_error() sleep(2); TEST_CHECK(expected.actual_records == expected.expected_records); filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); + setenv("TEST_TASK_ERROR", "", 1); } -TEST_LIST = { +/* + * First release of ECS filter would attach empty values for metadata which could not be fetched + * This checks the case where task metadata fails to fetch and that the filter thus + * does not attach the configured `task` key. + */ +static void flb_test_ecs_filter_cluster_meta_nonempty() +{ + int len; + int ret; + int bytes; + char *p; + struct flb_lib_out_cb cb_data; + struct filter_test *ctx; + struct filter_test_result expected = { 0 }; + + /* mocks calls- signals that we are in test mode */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "true", 1); + setenv("TEST_TASK_ERROR", ERROR_RESPONSE, 1); + + /* Create test context */ + ctx = filter_test_create((void *) &cb_data, "79c796ed2a7f"); + if (!ctx) { + exit(EXIT_FAILURE); + } + + /* Configure filter */ + ret = flb_filter_set(ctx->flb, ctx->f_ffd, + "ecs_tag_prefix", "", + "ADD", "cluster $ClusterName", + "ADD", "task $TaskID", + "ADD", "container $ECSContainerName", + NULL); + TEST_CHECK(ret == 0); + + /* this test is mainly for leak checking on error, not for checking result record */ + expected.expected_records = 1; /* 1 record */ + expected.expected_pattern = "cluster"; /* cluster key should be added */ + expected.expected_pattern_index = 0; + expected.fail_pattern = "task"; /* task key should not be attached */ + cb_data.cb = cb_check_result; + cb_data.data = (void *) &expected; + + /* Start the engine */ + ret = flb_start(ctx->flb); + TEST_CHECK(ret == 0); + + /* Ingest data samples */ + p = "[0, {\"log\":\"error: my error\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + /* check number of outputted records */ + sleep(2); + TEST_CHECK(expected.actual_records == expected.expected_records); + filter_test_destroy(ctx); + + /* unset env */ + setenv("FLB_ECS_PLUGIN_UNDER_TEST", "", 1); + setenv("TEST_TASK_ERROR", "", 1); +} + +TEST_LIST = { + {"flb_test_ecs_filter_cluster_meta_nonempty" , flb_test_ecs_filter_cluster_meta_nonempty }, + {"flb_test_ecs_filter_mark_tag_failed" , flb_test_ecs_filter_mark_tag_failed }, {"flb_test_ecs_filter" , flb_test_ecs_filter }, {"flb_test_ecs_filter_no_prefix" , flb_test_ecs_filter_no_prefix }, {"flb_test_ecs_filter_cluster_metadata_only" , flb_test_ecs_filter_cluster_metadata_only }, From c2b00bdefdcdab0c14cebd0bbc15a40d2e24961a Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Sat, 7 Jan 2023 01:11:32 +0000 Subject: [PATCH 10/74] edr-chunk-length-scraper --- plugins/out_datadog/datadog.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/out_datadog/datadog.c b/plugins/out_datadog/datadog.c index cd14f083602..47e0fd384a7 100644 --- a/plugins/out_datadog/datadog.c +++ b/plugins/out_datadog/datadog.c @@ -92,10 +92,11 @@ static int datadog_format(struct flb_config *config, { int i; int ind; - int byte_cnt; + int byte_cnt = 64; int remap_cnt; + int ret; /* for msgpack global structs */ - int array_size = 0; + size_t array_size = 0; size_t off = 0; msgpack_unpacked result; msgpack_sbuffer mp_sbuf; @@ -110,13 +111,23 @@ static int datadog_format(struct flb_config *config, msgpack_object k; msgpack_object v; struct flb_out_datadog *ctx = plugin_context; + struct flb_event_chunk *event_chunk; /* output buffer */ flb_sds_t out_buf; flb_sds_t remapped_tags = NULL; - - /* Count number of records */ - array_size = flb_mp_count(data, bytes); + flb_sds_t tmp = NULL; + + /* in normal flush callback we have the event_chunk set as flush context + * so we don't need to calculate the event len. + * But in test mode the formatter won't get the event_chunk as flush_ctx + */ + if (flush_ctx != NULL) { + event_chunk = flush_ctx; + array_size = event_chunk->total_events; + } else { + array_size = flb_mp_count(data, bytes); + } /* Create temporary msgpack buffer */ msgpack_sbuffer_init(&mp_sbuf); @@ -319,7 +330,7 @@ static void cb_datadog_flush(struct flb_event_chunk *event_chunk, /* Convert input data into a Datadog JSON payload */ ret = datadog_format(config, i_ins, - ctx, NULL, + ctx, event_chunk, event_chunk->tag, flb_sds_len(event_chunk->tag), event_chunk->data, event_chunk->size, &out_buf, &out_size); From 7f76a49f46828483985f47663ea1e2c930f8a531 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Sat, 7 Jan 2023 01:14:23 +0000 Subject: [PATCH 11/74] edr-buffer-resize-logic --- plugins/out_datadog/datadog.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/out_datadog/datadog.c b/plugins/out_datadog/datadog.c index 47e0fd384a7..e7fa906c94c 100644 --- a/plugins/out_datadog/datadog.c +++ b/plugins/out_datadog/datadog.c @@ -172,6 +172,22 @@ static int datadog_format(struct flb_config *config, if (!remapped_tags) { remapped_tags = flb_sds_create_size(byte_cnt); + if (!remapped_tags) { + flb_errno(); + msgpack_sbuffer_destroy(&mp_sbuf); + msgpack_unpacked_destroy(&result); + return -1; + } + } else if (flb_sds_len(remapped_tags) < byte_cnt) { + tmp = flb_sds_increase(remapped_tags, flb_sds_len(remapped_tags) - byte_cnt); + if (!tmp) { + flb_errno(); + flb_sds_destroy(remapped_tags); + msgpack_sbuffer_destroy(&mp_sbuf); + msgpack_unpacked_destroy(&result); + return -1; + } + remapped_tags = tmp; } /* From ba4b5a20570a797068f134b7fb70317a2125d89e Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Fri, 16 Dec 2022 19:25:11 +0000 Subject: [PATCH 12/74] datadog: resolve tag buffer resize bug Signed-off-by: Matthew Fala --- plugins/out_datadog/datadog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/out_datadog/datadog.c b/plugins/out_datadog/datadog.c index e7fa906c94c..00b01cd7bea 100644 --- a/plugins/out_datadog/datadog.c +++ b/plugins/out_datadog/datadog.c @@ -179,7 +179,7 @@ static int datadog_format(struct flb_config *config, return -1; } } else if (flb_sds_len(remapped_tags) < byte_cnt) { - tmp = flb_sds_increase(remapped_tags, flb_sds_len(remapped_tags) - byte_cnt); + tmp = flb_sds_increase(remapped_tags, byte_cnt - flb_sds_len(remapped_tags)); if (!tmp) { flb_errno(); flb_sds_destroy(remapped_tags); From 8510a9455bab7f1bb46273f9c44dd91f82552d0d Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Thu, 9 Feb 2023 21:08:27 +0000 Subject: [PATCH 13/74] core: sync scheduler resolve multi task user issue Signed-off-by: Matthew Fala --- src/flb_output.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/flb_output.c b/src/flb_output.c index d3ff51cb6dd..07be1bf3314 100644 --- a/src/flb_output.c +++ b/src/flb_output.c @@ -221,6 +221,12 @@ static int flb_output_task_queue_flush_one(struct flb_task_queue *queue) queued_task = mk_list_entry_first(&queue->pending, struct flb_task_enqueued, _head); mk_list_del(&queued_task->_head); mk_list_add(&queued_task->_head, &queue->in_progress); + + /* + * Remove temporary user now that task is out of singleplex queue. + * Flush will add back the user representing queued_task->out_instance if it succeeds. + */ + flb_task_users_dec(queued_task->task, FLB_FALSE); ret = flb_output_task_flush(queued_task->task, queued_task->out_instance, queued_task->config); @@ -251,6 +257,16 @@ int flb_output_task_singleplex_enqueue(struct flb_task_queue *queue, int ret; int is_empty; + /* + * Add temporary user to preserve task while in singleplex queue. + * Temporary user will be removed when task is removed from queue. + * + * Note: if we fail to increment now, then the task may be prematurely + * deleted if the task's users go to 0 while we are waiting in the + * queue. + */ + flb_task_users_inc(task); + /* Enqueue task */ ret = flb_output_task_queue_enqueue(queue, retry, task, out_ins, config); if (ret == -1) { From cf65f13aa4be3d43c8cbff6b1366118219ef82c3 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 19 Dec 2022 15:57:24 -0800 Subject: [PATCH 14/74] aws: util: extra_user_agent is always type flb_sds_t Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_aws_util.h | 2 +- src/aws/flb_aws_util.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fluent-bit/flb_aws_util.h b/include/fluent-bit/flb_aws_util.h index ce38864e136..c7ad2a4c3c3 100644 --- a/include/fluent-bit/flb_aws_util.h +++ b/include/fluent-bit/flb_aws_util.h @@ -80,7 +80,7 @@ struct flb_aws_client { int port; char *proxy; int flags; - flb_sds_t *extra_user_agent; + flb_sds_t extra_user_agent; int free_user_agent; /* diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index df269d2637c..61d09bf5a13 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -245,8 +245,7 @@ void flb_aws_client_destroy(struct flb_aws_client *aws_client) if (aws_client->upstream) { flb_upstream_destroy(aws_client->upstream); } - if (aws_client->free_user_agent) { - /* if user agent was auto-set by code its an SDS string */ + if (aws_client->extra_user_agent) { flb_sds_destroy(aws_client->extra_user_agent); } flb_free(aws_client); @@ -378,7 +377,6 @@ struct flb_http_client *request_do(struct flb_aws_client *aws_client, goto error; } aws_client->extra_user_agent = tmp; - aws_client->free_user_agent = FLB_TRUE; tmp = NULL; } From 65c4e321dbaf5fec19a5b62456d8f7671c8ce31e Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 19 Dec 2022 15:57:47 -0800 Subject: [PATCH 15/74] out_cloudwatch_logs: aws client extra_user_agent is always flb_sds_t Signed-off-by: Wesley Pettit --- plugins/out_cloudwatch_logs/cloudwatch_logs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 73af4739771..7677d1edec8 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -58,6 +58,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, struct flb_cloudwatch *ctx = NULL; struct cw_flush *buf = NULL; int ret; + flb_sds_t tmp_sds = NULL; (void) config; (void) data; @@ -333,7 +334,12 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, ctx->cw_client->proxy = NULL; ctx->cw_client->static_headers = &content_type_header; ctx->cw_client->static_headers_len = 1; - ctx->cw_client->extra_user_agent = (char *) ctx->extra_user_agent; + tmp_sds = flb_sds_create(ctx->extra_user_agent); + if (!tmp_sds) { + flb_errno(); + goto error; + } + ctx->cw_client->extra_user_agent = tmp_sds; ctx->cw_client->retry_requests = ctx->retry_requests; struct flb_upstream *upstream = flb_upstream_create(config, ctx->endpoint, From d872675f47c06d1e6c8235ec42f5bbb3b7a11813 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 19 Dec 2022 16:17:49 -0800 Subject: [PATCH 16/74] include: aws: remove unneeeded free_user_agent Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_aws_util.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/fluent-bit/flb_aws_util.h b/include/fluent-bit/flb_aws_util.h index c7ad2a4c3c3..96b6d3aedf9 100644 --- a/include/fluent-bit/flb_aws_util.h +++ b/include/fluent-bit/flb_aws_util.h @@ -81,7 +81,6 @@ struct flb_aws_client { char *proxy; int flags; flb_sds_t extra_user_agent; - int free_user_agent; /* * Additional headers which will be added to all requests. From 2c763cfa8b98fae8359e029486ac4e1b85615e2d Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 13 Feb 2023 12:04:16 -0800 Subject: [PATCH 17/74] upstream_conn: clean up keepalive event in sync case Resolves this issue: https://github.com/fluent/fluent-bit/issues/6821 Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_upstream_conn.h | 3 +++ src/flb_upstream.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/fluent-bit/flb_upstream_conn.h b/include/fluent-bit/flb_upstream_conn.h index e93e8e51b18..08e2741cef7 100644 --- a/include/fluent-bit/flb_upstream_conn.h +++ b/include/fluent-bit/flb_upstream_conn.h @@ -46,6 +46,9 @@ struct flb_upstream_conn { /* Keepalive */ int ka_count; /* how many times this connection has been used */ + /* do we need to mk_event_del the keepalive event on clean up*/ + int ka_dropped_event_added; + /* * Custom 'error' for the connection file descriptor. Commonly used to * specify a reason for an exception that was generated locally: consider diff --git a/src/flb_upstream.c b/src/flb_upstream.c index df0f2c32042..3fc700e98fc 100644 --- a/src/flb_upstream.c +++ b/src/flb_upstream.c @@ -429,7 +429,7 @@ static int prepare_destroy_conn(struct flb_upstream_conn *u_conn) flb_trace("[upstream] destroy connection #%i to %s:%i", u_conn->fd, u->tcp_host, u->tcp_port); - if (u->flags & FLB_IO_ASYNC) { + if (u->flags & FLB_IO_ASYNC || u_conn->ka_dropped_event_added == FLB_TRUE) { mk_event_del(u_conn->evl, &u_conn->event); } @@ -514,6 +514,8 @@ static struct flb_upstream_conn *create_conn(struct flb_upstream *u) conn->net_error = -1; conn->busy_flag = FLB_TRUE; + conn->ka_dropped_event_added = FLB_FALSE; + /* retrieve the event loop */ evl = flb_engine_evl_get(); conn->evl = evl; @@ -769,6 +771,7 @@ int flb_upstream_conn_release(struct flb_upstream_conn *conn) conn->fd, conn->u->tcp_host, conn->u->tcp_port); return prepare_destroy_conn_safe(conn); } + conn->ka_dropped_event_added = FLB_TRUE; flb_debug("[upstream] KA connection #%i to %s:%i is now available", conn->fd, conn->u->tcp_host, conn->u->tcp_port); From 52658cb426b80ce6c48048913ba716d86c2cc016 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 13 Feb 2023 10:55:08 -0800 Subject: [PATCH 18/74] upstream_conn: fix ordering of mk_event_inject and prepare_conn_destroy prepare_destroy_conn calls mk_list_del on the event in the priority bucket queue, so for safety, we inject it after this covers us against the case where the event was triggered and waiting, but we also reached the timeout. Signed-off-by: Wesley Pettit --- src/flb_upstream.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/flb_upstream.c b/src/flb_upstream.c index 3fc700e98fc..9f0672bb74c 100644 --- a/src/flb_upstream.c +++ b/src/flb_upstream.c @@ -797,6 +797,7 @@ int flb_upstream_conn_timeouts(struct mk_list *list) { time_t now; int drop; + int inject; struct mk_list *head; struct mk_list *u_head; struct mk_list *tmp; @@ -845,13 +846,21 @@ int flb_upstream_conn_timeouts(struct mk_list *list) } if (drop == FLB_TRUE) { + inject = FLB_FALSE; if (u_conn->event.status != MK_EVENT_NONE) { + inject = FLB_TRUE; + } + u_conn->net_error = ETIMEDOUT; + prepare_destroy_conn(u_conn); + /* + * prepare_destroy_conn calls mk_list_del on the event in the + * priority bucket queue, so for safety, we inject it afterwards + */ + if (inject == FLB_TRUE) { mk_event_inject(u_conn->evl, &u_conn->event, MK_EVENT_READ | MK_EVENT_WRITE, FLB_TRUE); } - u_conn->net_error = ETIMEDOUT; - prepare_destroy_conn(u_conn); } } From b9d990f502d271c9a67cdc73bf97ee8b381226c8 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 13 Feb 2023 16:53:13 -0800 Subject: [PATCH 19/74] mk_event: fix bucket queue corruption in mk_event_add and init events everywhere with MK_EVENT_ZERO Signed-off-by: Wesley Pettit --- lib/monkey/include/monkey/mk_core/mk_event.h | 2 ++ lib/monkey/mk_core/mk_event_epoll.c | 9 +++++++-- plugins/in_forward/fw_conn.c | 2 +- plugins/in_http/http_conn.c | 2 +- plugins/in_mqtt/mqtt_conn.c | 1 + plugins/in_opentelemetry/http_conn.c | 2 +- plugins/in_syslog/syslog_conn.c | 2 +- plugins/in_tcp/tcp_conn.c | 2 +- src/flb_network.c | 4 +--- src/flb_upstream.c | 1 + 10 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/monkey/include/monkey/mk_core/mk_event.h b/lib/monkey/include/monkey/mk_core/mk_event.h index 137c40cb9ef..9067c044be2 100644 --- a/lib/monkey/include/monkey/mk_core/mk_event.h +++ b/lib/monkey/include/monkey/mk_core/mk_event.h @@ -119,6 +119,8 @@ static inline void MK_EVENT_INIT(struct mk_event *ev, int fd, void *data, static inline void MK_EVENT_ZERO(struct mk_event *e) { MK_EVENT_INIT(e, -1, NULL, NULL); + e->_priority_head.next = NULL; + e->_priority_head.prev = NULL; } static inline void MK_EVENT_NEW(struct mk_event *e) diff --git a/lib/monkey/mk_core/mk_event_epoll.c b/lib/monkey/mk_core/mk_event_epoll.c index 37996f4209c..04e0db9de39 100644 --- a/lib/monkey/mk_core/mk_event_epoll.c +++ b/lib/monkey/mk_core/mk_event_epoll.c @@ -139,8 +139,13 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, event->mask = events; event->priority = MK_EVENT_PRIORITY_DEFAULT; - event->_priority_head.next = NULL; - event->_priority_head.prev = NULL; + + /* Remove from priority queue */ + if (event->_priority_head.next != NULL && + event->_priority_head.prev != NULL) { + mk_list_del(&event->_priority_head); + } + return ret; } diff --git a/plugins/in_forward/fw_conn.c b/plugins/in_forward/fw_conn.c index 9805debc5c0..2b7364abf87 100644 --- a/plugins/in_forward/fw_conn.c +++ b/plugins/in_forward/fw_conn.c @@ -115,7 +115,7 @@ struct fw_conn *fw_conn_add(int fd, struct flb_in_fw_config *ctx) /* Set data for the event-loop */ event = &conn->event; - MK_EVENT_NEW(event); + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->handler = fw_conn_event; diff --git a/plugins/in_http/http_conn.c b/plugins/in_http/http_conn.c index a322432c87f..fc83721ff16 100644 --- a/plugins/in_http/http_conn.c +++ b/plugins/in_http/http_conn.c @@ -212,7 +212,7 @@ struct http_conn *http_conn_add(int fd, struct flb_http *ctx) /* Set data for the event-loop */ event = &conn->event; - MK_EVENT_NEW(event); + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->handler = http_conn_event; diff --git a/plugins/in_mqtt/mqtt_conn.c b/plugins/in_mqtt/mqtt_conn.c index d0e74336223..1071d2b2f2e 100644 --- a/plugins/in_mqtt/mqtt_conn.c +++ b/plugins/in_mqtt/mqtt_conn.c @@ -81,6 +81,7 @@ struct mqtt_conn *mqtt_conn_add(int fd, struct flb_in_mqtt_config *ctx) /* Set data for the event-loop */ event = &conn->event; + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->mask = MK_EVENT_EMPTY; diff --git a/plugins/in_opentelemetry/http_conn.c b/plugins/in_opentelemetry/http_conn.c index acf722bf9f7..147f515d8cc 100644 --- a/plugins/in_opentelemetry/http_conn.c +++ b/plugins/in_opentelemetry/http_conn.c @@ -212,7 +212,7 @@ struct http_conn *opentelemetry_conn_add(int fd, struct flb_opentelemetry *ctx) /* Set data for the event-loop */ event = &conn->event; - MK_EVENT_NEW(event); + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->handler = opentelemetry_conn_event; diff --git a/plugins/in_syslog/syslog_conn.c b/plugins/in_syslog/syslog_conn.c index d8155e99967..ca12568913c 100644 --- a/plugins/in_syslog/syslog_conn.c +++ b/plugins/in_syslog/syslog_conn.c @@ -107,7 +107,7 @@ struct syslog_conn *syslog_conn_add(int fd, struct flb_syslog *ctx) /* Set data for the event-loop */ event = &conn->event; - MK_EVENT_NEW(event); + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->handler = syslog_conn_event; diff --git a/plugins/in_tcp/tcp_conn.c b/plugins/in_tcp/tcp_conn.c index 3e36abf2575..ae5cbd8c046 100644 --- a/plugins/in_tcp/tcp_conn.c +++ b/plugins/in_tcp/tcp_conn.c @@ -284,7 +284,7 @@ struct tcp_conn *tcp_conn_add(int fd, struct flb_in_tcp_config *ctx) /* Set data for the event-loop */ event = &conn->event; - MK_EVENT_NEW(event); + MK_EVENT_ZERO(event); event->fd = fd; event->type = FLB_ENGINE_EV_CUSTOM; event->handler = tcp_conn_event; diff --git a/src/flb_network.c b/src/flb_network.c index 992eb1db0e0..f8cc7068dc6 100644 --- a/src/flb_network.c +++ b/src/flb_network.c @@ -438,7 +438,6 @@ static int net_connect_async(int fd, fd, host, port); /* Register the connection socket into the main event loop */ - MK_EVENT_ZERO(&u_conn->event); ret = mk_event_add(u_conn->evl, fd, FLB_ENGINE_EV_THREAD, @@ -841,8 +840,7 @@ static ares_socket_t flb_dns_ares_socket(int af, int type, int protocol, void *u lookup_context->ares_socket_type = type; lookup_context->ares_socket_created = FLB_TRUE; - lookup_context->response_event.mask = MK_EVENT_EMPTY; - lookup_context->response_event.status = MK_EVENT_NONE; + MK_EVENT_ZERO(&lookup_context->response_event); lookup_context->response_event.data = &lookup_context->response_event; lookup_context->response_event.handler = flb_net_getaddrinfo_event_handler; lookup_context->response_event.fd = sockfd; diff --git a/src/flb_upstream.c b/src/flb_upstream.c index 9f0672bb74c..72f93c4a671 100644 --- a/src/flb_upstream.c +++ b/src/flb_upstream.c @@ -513,6 +513,7 @@ static struct flb_upstream_conn *create_conn(struct flb_upstream *u) conn->fd = -1; conn->net_error = -1; conn->busy_flag = FLB_TRUE; + MK_EVENT_ZERO(&conn->event); conn->ka_dropped_event_added = FLB_FALSE; From 88f2778724e144b4cee3e1ebdbd0ffbafaf9672b Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Tue, 31 Jan 2023 15:15:52 -0800 Subject: [PATCH 20/74] input_chunk: add context for chunk append debug message this message is very useful in debugging Fluent Bit log loss or frozen. But it needs context on which input the append happened for. Signed-off-by: Wesley Pettit --- src/flb_input_chunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flb_input_chunk.c b/src/flb_input_chunk.c index 8bed9df185a..04ce915642a 100644 --- a/src/flb_input_chunk.c +++ b/src/flb_input_chunk.c @@ -1679,8 +1679,8 @@ static int input_chunk_append_raw(struct flb_input_instance *in, real_size = flb_input_chunk_get_real_size(ic); real_diff = real_size - pre_real_size; if (real_diff != 0) { - flb_debug("[input chunk] update output instances with new chunk size diff=%d", - real_diff); + flb_debug("[input chunk] update output instances with new chunk size diff=%d, records=%zu, input=%s", + real_diff, n_records, flb_input_name(in)); flb_input_chunk_update_output_instances(ic, real_diff); } From 29996cbf5a5bc16a764c808cd9a5ba5357b4bf34 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Tue, 31 Jan 2023 15:31:37 -0800 Subject: [PATCH 21/74] in_tail: add file name context to inotify debug event mask These messages are useful for debugging except with only the inode, it you have to do work to match this with specific files. Signed-off-by: Wesley Pettit --- plugins/in_tail/tail_fs_inotify.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/in_tail/tail_fs_inotify.c b/plugins/in_tail/tail_fs_inotify.c index a33a813bf66..1676ed83564 100644 --- a/plugins/in_tail/tail_fs_inotify.c +++ b/plugins/in_tail/tail_fs_inotify.c @@ -43,21 +43,30 @@ static int debug_event_mask(struct flb_tail_config *ctx, uint32_t mask) { flb_sds_t buf; + int buf_size = 256; /* Only enter this function if debug mode is allowed */ if (flb_log_check(FLB_LOG_DEBUG) == 0) { return 0; } + if (file) { + buf_size = file->name_len + 128; + } + + if (buf_size < 256) { + buf_size = 256; + } + /* Create buffer */ - buf = flb_sds_create_size(256); + buf = flb_sds_create_size(buf_size); if (!buf) { return -1; } /* Print info into sds */ if (file) { - flb_sds_printf(&buf, "inode=%"PRIu64" events: ", file->inode); + flb_sds_printf(&buf, "inode=%"PRIu64", %s, events: ", file->name, file->inode); } else { flb_sds_printf(&buf, "events: "); From cf37e738a5e1687388382c64b8a03d22b7f49dbe Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Tue, 18 Apr 2023 10:31:37 -0700 Subject: [PATCH 22/74] in_tail: fix ordering of args in tail debug message Signed-off-by: Wesley Pettit --- plugins/in_tail/tail_fs_inotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/in_tail/tail_fs_inotify.c b/plugins/in_tail/tail_fs_inotify.c index 1676ed83564..7b3696fef37 100644 --- a/plugins/in_tail/tail_fs_inotify.c +++ b/plugins/in_tail/tail_fs_inotify.c @@ -66,7 +66,7 @@ static int debug_event_mask(struct flb_tail_config *ctx, /* Print info into sds */ if (file) { - flb_sds_printf(&buf, "inode=%"PRIu64", %s, events: ", file->name, file->inode); + flb_sds_printf(&buf, "inode=%"PRIu64", %s, events: ", file->inode, file->name); } else { flb_sds_printf(&buf, "events: "); From 3ceaeff61060322017042360d3ce2a794c4fc9d6 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Thu, 9 Mar 2023 14:21:18 -0800 Subject: [PATCH 23/74] out_s3: fix s3 key tag bug by using sds string Signed-off-by: Wesley Pettit --- plugins/out_s3/s3.c | 13 ++++++------- plugins/out_s3/s3.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index b486a435b4d..36db7a4a4ec 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -1564,7 +1564,7 @@ static int add_to_queue(struct flb_s3 *ctx, struct s3_file *upload_file, struct multipart_upload *m_upload_file, const char *tag, int tag_len) { struct upload_queue *upload_contents; - char *tag_cpy; + flb_sds_t tag_cpy; /* Create upload contents object and add to upload queue */ upload_contents = flb_malloc(sizeof(struct upload_queue)); @@ -1580,16 +1580,15 @@ static int add_to_queue(struct flb_s3 *ctx, struct s3_file *upload_file, upload_contents->upload_time = -1; /* Necessary to create separate string for tag to prevent corruption */ - tag_cpy = flb_malloc(tag_len); - if (tag_cpy == NULL) { - flb_free(upload_contents); - flb_plg_error(ctx->ins, "Error allocating memory for tag in add_to_queue"); + tag_cpy = flb_sds_create_len(tag, tag_len); + if (!tag_cpy) { flb_errno(); + flb_free(upload_contents); return -1; } - strncpy(tag_cpy, tag, tag_len); upload_contents->tag = tag_cpy; + /* Add entry to upload queue */ mk_list_add(&upload_contents->_head, &ctx->upload_queue); return 0; @@ -1599,7 +1598,7 @@ static int add_to_queue(struct flb_s3 *ctx, struct s3_file *upload_file, void remove_from_queue(struct upload_queue *entry) { mk_list_del(&entry->_head); - flb_free(entry->tag); + flb_sds_destroy(entry->tag); flb_free(entry); return; } diff --git a/plugins/out_s3/s3.h b/plugins/out_s3/s3.h index 3be84823eee..0f60aa90f0e 100644 --- a/plugins/out_s3/s3.h +++ b/plugins/out_s3/s3.h @@ -61,7 +61,7 @@ struct upload_queue { struct s3_file *upload_file; struct multipart_upload *m_upload_file; - char *tag; + flb_sds_t tag; int tag_len; int retry_counter; From af46799bc062c0185d3fc9ffb296512d6a1b8ac0 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 27 Jan 2023 16:54:33 -0800 Subject: [PATCH 24/74] input_chunk: info level instead of debug for chunk removal msg (#6719) Signed-off-by: Wesley Pettit --- src/flb_input_chunk.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/flb_input_chunk.c b/src/flb_input_chunk.c index 04ce915642a..b22e02ae5c1 100644 --- a/src/flb_input_chunk.c +++ b/src/flb_input_chunk.c @@ -584,9 +584,9 @@ int flb_input_chunk_find_space_new_data(struct flb_input_chunk *ic, FS_CHUNK_SIZE_DEBUG_MOD(o_ins, old_ic, -old_ic_bytes); o_ins->fs_chunks_size -= old_ic_bytes; - flb_debug("[input chunk] remove route of chunk %s with size %ld bytes to output plugin %s " - "to place the incoming data with size %ld bytes", flb_input_chunk_get_name(old_ic), - old_ic_bytes, o_ins->name, chunk_size); + flb_debug("[input chunk] consider route removal for chunk %s with size %zd bytes from input plugin %s to output plugin %s " + "to place the incoming data with size %zu bytes, total_limit_size=%zu", flb_input_chunk_get_name(old_ic), + old_ic_bytes, ic->in->name, o_ins->name, chunk_size, o_ins->total_limit_size); if (flb_routes_mask_is_empty(old_ic->routes_mask)) { if (old_ic->task != NULL) { @@ -597,12 +597,18 @@ int flb_input_chunk_find_space_new_data(struct flb_input_chunk *ic, if (old_ic->task->users == 0) { flb_debug("[task] drop task_id %d with no active route from input plugin %s", old_ic->task->id, ic->in->name); + /* end-user friendly message */ + flb_info("[input chunk] remove chunk %s with size %zd bytes from input plugin %s to output plugin %s " + "to place the incoming data with size %zu bytes, total_limit_size=%zu, task_id=%d", + flb_input_chunk_get_name(old_ic), old_ic_bytes, ic->in->name, o_ins->name, chunk_size, + o_ins->total_limit_size, old_ic->task->id); flb_task_destroy(old_ic->task, FLB_TRUE); } } else { - flb_debug("[input chunk] drop chunk %s with no output route from input plugin %s", - flb_input_chunk_get_name(old_ic), ic->in->name); + flb_info("[input chunk] remove chunk %s with size %zd bytes from input plugin %s to output plugin %s " + "to place the incoming data with size %zu bytes, total_limit_size=%zu", flb_input_chunk_get_name(old_ic), + old_ic_bytes, ic->in->name, o_ins->name, chunk_size, o_ins->total_limit_size); flb_input_chunk_destroy(old_ic, FLB_TRUE); } } From 33e5c8618409682a30cb52c339e60380b13322d8 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 27 Jan 2023 16:51:47 -0800 Subject: [PATCH 25/74] input_chunk: use total_chunks_up in overlimit warn message (#6714) Signed-off-by: Wesley Pettit --- src/flb_input_chunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flb_input_chunk.c b/src/flb_input_chunk.c index b22e02ae5c1..bbd2a753303 100644 --- a/src/flb_input_chunk.c +++ b/src/flb_input_chunk.c @@ -1250,7 +1250,7 @@ size_t flb_input_chunk_set_limits(struct flb_input_instance *in) in->p->cb_resume(in->context, in->config); flb_info("[input] %s resume (storage buf overlimit %d/%d)", in->name, - ((struct flb_storage_input *)in->storage)->cio->total_chunks, + ((struct flb_storage_input *)in->storage)->cio->total_chunks_up, ((struct flb_storage_input *)in->storage)->cio->max_chunks_up); } } @@ -1269,7 +1269,7 @@ static inline int flb_input_chunk_protect(struct flb_input_instance *i) if (flb_input_chunk_is_storage_overlimit(i) == FLB_TRUE) { flb_warn("[input] %s paused (storage buf overlimit %d/%d)", i->name, - storage->cio->total_chunks, + storage->cio->total_chunks_up, storage->cio->max_chunks_up); if (!flb_input_buf_paused(i)) { From 6343e985dc780d1e47ca8cfdd4c9f118950a84c2 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Wed, 15 Mar 2023 00:21:06 +0000 Subject: [PATCH 26/74] out_cloudwatch_logs: support tls verify and port options Signed-off-by: Matthew Fala --- plugins/out_cloudwatch_logs/cloudwatch_logs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 7677d1edec8..63c6c1dbb93 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -238,7 +238,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, goto error; } - ctx->client_tls = flb_tls_create(FLB_TRUE, + ctx->client_tls = flb_tls_create(ins->tls_verify, ins->tls_debug, ins->tls_vhost, ins->tls_ca_path, @@ -329,8 +329,8 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, ctx->cw_client->provider = ctx->aws_provider; ctx->cw_client->region = (char *) ctx->region; ctx->cw_client->service = "logs"; - ctx->cw_client->port = 443; - ctx->cw_client->flags = 0; + ctx->cw_client->port = (ins->host.port != 0) ? ins->host.port : 443; + ctx->cw_client->flags = (ins->use_tls) ? FLB_IO_TLS : FLB_IO_TCP; ctx->cw_client->proxy = NULL; ctx->cw_client->static_headers = &content_type_header; ctx->cw_client->static_headers_len = 1; @@ -343,7 +343,8 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, ctx->cw_client->retry_requests = ctx->retry_requests; struct flb_upstream *upstream = flb_upstream_create(config, ctx->endpoint, - 443, FLB_IO_TLS, + ctx->cw_client->port, + ctx->cw_client->flags, ctx->client_tls); if (!upstream) { flb_plg_error(ctx->ins, "Connection initialization error"); From c8ea7f229651d6a82fb66ace829be622e8e844b2 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Tue, 4 Apr 2023 15:35:19 -0700 Subject: [PATCH 27/74] go plugins: separate exit and deregister into separate functions Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_plugin_proxy.h | 2 ++ include/fluent-bit/flb_plugins.h.in | 4 ++++ src/flb_engine.c | 3 +++ src/flb_plugin_proxy.c | 11 ++++++++++- src/proxy/go/go.c | 12 +++++++++++- src/proxy/go/go.h | 3 ++- 6 files changed, 32 insertions(+), 3 deletions(-) diff --git a/include/fluent-bit/flb_plugin_proxy.h b/include/fluent-bit/flb_plugin_proxy.h index 008552c8dc7..fa771d99720 100644 --- a/include/fluent-bit/flb_plugin_proxy.h +++ b/include/fluent-bit/flb_plugin_proxy.h @@ -71,6 +71,8 @@ int flb_plugin_proxy_init(struct flb_plugin_proxy *proxy, int flb_plugin_proxy_register(struct flb_plugin_proxy *proxy, struct flb_config *config); +void flb_plugin_proxy_unregister(struct flb_output_plugin *out); + struct flb_plugin_proxy *flb_plugin_proxy_create(const char *dso_path, int type, struct flb_config *config); int flb_plugin_proxy_load_all(struct flb_config *config); diff --git a/include/fluent-bit/flb_plugins.h.in b/include/fluent-bit/flb_plugins.h.in index 37880f113d5..16c29b8b605 100644 --- a/include/fluent-bit/flb_plugins.h.in +++ b/include/fluent-bit/flb_plugins.h.in @@ -26,6 +26,7 @@ #include #include #include +#include #include @FLB_IN_PLUGINS_DECL@ @@ -70,6 +71,9 @@ void flb_plugins_unregister(struct flb_config *config) mk_list_foreach_safe(head, tmp, &config->out_plugins) { out = mk_list_entry(head, struct flb_output_plugin, _head); + if (out->proxy) { + flb_plugin_proxy_unregister(out); + } mk_list_del(&out->_head); flb_free(out); } diff --git a/src/flb_engine.c b/src/flb_engine.c index c9a9f8d7b09..20548798bb4 100644 --- a/src/flb_engine.c +++ b/src/flb_engine.c @@ -940,6 +940,9 @@ int flb_engine_shutdown(struct flb_config *config) } #endif + /* free/destroy plugins */ + flb_plugins_unregister(config); + return 0; } diff --git a/src/flb_plugin_proxy.c b/src/flb_plugin_proxy.c index a1cdd32490b..f681860b0ee 100644 --- a/src/flb_plugin_proxy.c +++ b/src/flb_plugin_proxy.c @@ -74,11 +74,20 @@ static int flb_proxy_cb_exit(void *data, struct flb_config *config) struct flb_output_plugin *instance = data; struct flb_plugin_proxy *proxy = (instance->proxy); + if (proxy->def->proxy == FLB_PROXY_GOLANG) { + proxy_go_exit(proxy->data); + } + return 0; +} + +void flb_plugin_proxy_unregister(struct flb_output_plugin *out) +{ + struct flb_plugin_proxy *proxy = (out->proxy); + if (proxy->def->proxy == FLB_PROXY_GOLANG) { proxy_go_destroy(proxy->data); } flb_plugin_proxy_destroy(proxy); - return 0; } static int flb_proxy_register_output(struct flb_plugin_proxy *proxy, diff --git a/src/proxy/go/go.c b/src/proxy/go/go.c index 0e71f59b54c..a268dcfa6f4 100644 --- a/src/proxy/go/go.c +++ b/src/proxy/go/go.c @@ -145,7 +145,7 @@ int proxy_go_flush(struct flb_plugin_proxy_context *ctx, return ret; } -int proxy_go_destroy(void *data) +int proxy_go_exit(void *data) { int ret = 0; struct flbgo_output_plugin *plugin; @@ -159,6 +159,16 @@ int proxy_go_destroy(void *data) else if (plugin->cb_exit) { ret = plugin->cb_exit(); } + + return ret; +} + +void proxy_go_destroy(void *data) +{ + int ret = 0; + struct flbgo_output_plugin *plugin; + + plugin = (struct flbgo_output_plugin *) data; flb_free(plugin->name); flb_free(plugin); return ret; diff --git a/src/proxy/go/go.h b/src/proxy/go/go.h index 882184a7f6a..fda3d255e91 100644 --- a/src/proxy/go/go.h +++ b/src/proxy/go/go.h @@ -44,5 +44,6 @@ int proxy_go_init(struct flb_plugin_proxy *proxy); int proxy_go_flush(struct flb_plugin_proxy_context *ctx, const void *data, size_t size, const char *tag, int tag_len); -int proxy_go_destroy(void *data); +void proxy_go_destroy(void *data); +int proxy_go_exit(void *data); #endif From 1c4c8a0710b6b137889c645adf12757ea11a63d0 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Wed, 12 Apr 2023 20:55:15 -0700 Subject: [PATCH 28/74] proxy: go: fix build by removing return value for void proxy_go_destroy Signed-off-by: Wesley Pettit --- src/proxy/go/go.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/proxy/go/go.c b/src/proxy/go/go.c index a268dcfa6f4..cfa90c84eb3 100644 --- a/src/proxy/go/go.c +++ b/src/proxy/go/go.c @@ -165,11 +165,9 @@ int proxy_go_exit(void *data) void proxy_go_destroy(void *data) { - int ret = 0; struct flbgo_output_plugin *plugin; plugin = (struct flbgo_output_plugin *) data; flb_free(plugin->name); flb_free(plugin); - return ret; } From eb4ccc8ba1b94ed1f9b8f599cdf0237f16966b9f Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 7 Apr 2023 16:56:42 -0700 Subject: [PATCH 29/74] sds: fix off by 1 bug in flb_sds_printf Signed-off-by: Wesley Pettit --- src/flb_sds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flb_sds.c b/src/flb_sds.c index 8fe0caecbf4..982bac30319 100644 --- a/src/flb_sds.c +++ b/src/flb_sds.c @@ -434,8 +434,8 @@ flb_sds_t flb_sds_printf(flb_sds_t *sds, const char *fmt, ...) } va_end(ap); - if (size > flb_sds_avail(s)) { - tmp = flb_sds_increase(s, size); + if (size >= flb_sds_avail(s)) { + tmp = flb_sds_increase(s, size + 1); if (!tmp) { return NULL; } From 1d7c0f61ceff9e0fa60d239d5577728c677f041d Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 10 Apr 2023 10:33:44 -0700 Subject: [PATCH 30/74] sds: flb_sds_printf: flb_sds_increase increases by not to Signed-off-by: Wesley Pettit --- src/flb_sds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flb_sds.c b/src/flb_sds.c index 982bac30319..2cb562c868f 100644 --- a/src/flb_sds.c +++ b/src/flb_sds.c @@ -417,8 +417,8 @@ flb_sds_t flb_sds_printf(flb_sds_t *sds, const char *fmt, ...) if (len < 64) len = 64; s = *sds; - if (flb_sds_avail(s)< len) { - tmp = flb_sds_increase(s, len); + if (flb_sds_avail(s) < len) { + tmp = flb_sds_increase(s, len - flb_sds_avail(s)); if (!tmp) { return NULL; } @@ -435,7 +435,7 @@ flb_sds_t flb_sds_printf(flb_sds_t *sds, const char *fmt, ...) va_end(ap); if (size >= flb_sds_avail(s)) { - tmp = flb_sds_increase(s, size + 1); + tmp = flb_sds_increase(s, size - flb_sds_avail(s) + 1); if (!tmp) { return NULL; } From 2d939a03b182f364cf428bc678d9bb491d8e4273 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 10 Apr 2023 10:53:54 -0700 Subject: [PATCH 31/74] tests: internal: sds: add test for #7143 off by 1 bug Signed-off-by: Wesley Pettit --- tests/internal/sds.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/internal/sds.c b/tests/internal/sds.c index aa72291f6be..30dc166ddb1 100644 --- a/tests/internal/sds.c +++ b/tests/internal/sds.c @@ -37,6 +37,36 @@ static void test_sds_printf() flb_sds_destroy(s); } +/* https://github.com/fluent/fluent-bit/issues/7143 */ +static void test_sds_printf_7143_off_by_1() +{ + flb_sds_t tmp; + flb_sds_t test; + flb_sds_t test2; + int len; + + /* 66 char final string, not impacted by bug */ + test = flb_sds_create_size(64); + TEST_CHECK(test != NULL); + tmp = flb_sds_printf(&test, "A0123456789 %s", "this-is-54-chars-1234567890-abcdefghijklmnopqrstuvwxyz"); + TEST_CHECK(tmp != NULL); + len = flb_sds_len(test); + TEST_CHECK(len == 66); + TEST_CHECK(test[len -1] == 'z'); + flb_sds_destroy(test); + + /* 65 char final string, impacted by bug */ + test2 = flb_sds_create_size(64); + TEST_CHECK(test2 != NULL); + tmp = flb_sds_printf(&test2, "0123456789 %s", "this-is-54-chars-1234567890-abcdefghijklmnopqrstuvwxyz"); + TEST_CHECK(tmp != NULL); + len = flb_sds_len(test2); + TEST_CHECK(len == 65); + TEST_CHECK(test2[len -1] == 'z'); + flb_sds_destroy(test2); + +} + static void test_sds_cat_utf8() { flb_sds_t s; @@ -53,5 +83,6 @@ TEST_LIST = { { "sds_usage" , test_sds_usage}, { "sds_printf", test_sds_printf}, { "sds_cat_utf8", test_sds_cat_utf8}, + { "test_sds_printf_7143_off_by_1", test_sds_printf_7143_off_by_1}, { 0 } }; From 7e070159d2be1c66c4d4da6683ed8364974482a6 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 10 Apr 2023 20:23:56 -0700 Subject: [PATCH 32/74] out_cloudwatch_logs: fix logic in free-ing log streams on shutdown Signed-off-by: Wesley Pettit --- plugins/out_cloudwatch_logs/cloudwatch_logs.c | 27 +++---------------- plugins/out_cloudwatch_logs/cloudwatch_logs.h | 5 +--- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 63c6c1dbb93..94c675edcb1 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -213,16 +213,6 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, ctx->sts_endpoint = (char *) tmp; } - /* init log streams */ - if (ctx->log_stream_name) { - ctx->stream.name = flb_sds_create(ctx->log_stream_name); - if (!ctx->stream.name) { - flb_errno(); - goto error; - } - ctx->stream_created = FLB_FALSE; - } - /* one tls instance for provider, one for cw client */ ctx->cred_tls = flb_tls_create(FLB_TRUE, ins->tls_debug, @@ -480,19 +470,10 @@ void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx) flb_sds_destroy(ctx->stream_name); } - if (ctx->log_stream_name) { - if (ctx->stream.name) { - flb_sds_destroy(ctx->stream.name); - } - if (ctx->stream.sequence_token) { - flb_sds_destroy(ctx->stream.sequence_token); - } - } else { - mk_list_foreach_safe(head, tmp, &ctx->streams) { - stream = mk_list_entry(head, struct log_stream, _head); - mk_list_del(&stream->_head); - log_stream_destroy(stream); - } + mk_list_foreach_safe(head, tmp, &ctx->streams) { + stream = mk_list_entry(head, struct log_stream, _head); + mk_list_del(&stream->_head); + log_stream_destroy(stream); } flb_free(ctx); } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.h b/plugins/out_cloudwatch_logs/cloudwatch_logs.h index 86669dfa393..376d690db29 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.h @@ -134,10 +134,7 @@ struct flb_cloudwatch { struct flb_record_accessor *ra_group; struct flb_record_accessor *ra_stream; - /* if we're writing to a static log stream, we'll use this */ - struct log_stream stream; - int stream_created; - /* if the log stream is dynamic, we'll use this */ + /* stores log streams we're putting to */ struct mk_list streams; /* buffers for data processing and request payload */ From fac3e8f72eebd6b598d67c00c236cabbfb2af76f Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Tue, 25 Apr 2023 11:46:47 +0200 Subject: [PATCH 33/74] time: fixed printf format string in flb_time_pop_from_mpack Signed-off-by: Leonardo Alminana --- src/flb_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flb_time.c b/src/flb_time.c index 978e79de1cf..51c5a9dd1ce 100644 --- a/src/flb_time.c +++ b/src/flb_time.c @@ -346,7 +346,7 @@ int flb_time_pop_from_mpack(struct flb_time *time, mpack_reader_t *reader) time->tm.tv_nsec = (uint32_t) ntohl(tmp); break; default: - flb_warn("unknown time format %s", tag.type); + flb_warn("unknown time format %d", tag.type); return -1; } From 341febf3b6c6fd190208bc2d0d5858c24375eba9 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Wed, 3 May 2023 16:11:51 -0700 Subject: [PATCH 34/74] aws: sts_credentials: make STS response parsing less brittle by checking for the full XML end node Signed-off-by: Wesley Pettit --- src/aws/flb_aws_credentials_sts.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/aws/flb_aws_credentials_sts.c b/src/aws/flb_aws_credentials_sts.c index 0cf732ec565..5ff3d84347b 100644 --- a/src/aws/flb_aws_credentials_sts.c +++ b/src/aws/flb_aws_credentials_sts.c @@ -34,16 +34,30 @@ &RoleSessionName=%s&RoleArn=%s" #define STS_ASSUME_ROLE_URI_BASE_LEN 54 +/* + * The STS APIs return an XML document with credentials. + * The part of the document we care about looks like this: + * + * akid + * skid + * token + * 2019-11-09T13:34:41Z + * + */ #define CREDENTIALS_NODE "" #define CREDENTIALS_NODE_LEN 13 #define ACCESS_KEY_NODE "" #define ACCESS_KEY_NODE_LEN 13 +#define ACCESS_KEY_NODE_END "" #define SECRET_KEY_NODE "" #define SECRET_KEY_NODE_LEN 17 +#define SECRET_KEY_NODE_END "" #define SESSION_TOKEN_NODE "" #define SESSION_TOKEN_NODE_LEN 14 +#define SESSION_TOKEN_NODE_END "" #define EXPIRATION_NODE "" #define EXPIRATION_NODE_LEN 12 +#define EXPIRATION_NODE_END "" #define TOKEN_FILE_ENV_VAR "AWS_WEB_IDENTITY_TOKEN_FILE" #define ROLE_ARN_ENV_VAR "AWS_ROLE_ARN" @@ -59,7 +73,7 @@ static int sts_assume_role_request(struct flb_aws_client *sts_client, struct flb_aws_credentials **creds, char *uri, time_t *next_refresh); -static flb_sds_t get_node(char *cred_node, char* node_name, int node_len); +static flb_sds_t get_node(char *cred_node, char* node_name, int node_name_len, char* node_end); /* @@ -864,24 +878,24 @@ struct flb_aws_credentials *flb_parse_sts_resp(char *response, } creds->access_key_id = get_node(cred_node, ACCESS_KEY_NODE, - ACCESS_KEY_NODE_LEN); + ACCESS_KEY_NODE_LEN, ACCESS_KEY_NODE_END); if (!creds->access_key_id) { goto error; } creds->secret_access_key = get_node(cred_node, SECRET_KEY_NODE, - SECRET_KEY_NODE_LEN); + SECRET_KEY_NODE_LEN, SECRET_KEY_NODE_END); if (!creds->secret_access_key) { goto error; } creds->session_token = get_node(cred_node, SESSION_TOKEN_NODE, - SESSION_TOKEN_NODE_LEN); + SESSION_TOKEN_NODE_LEN, SESSION_TOKEN_NODE_END); if (!creds->session_token) { goto error; } - tmp = get_node(cred_node, EXPIRATION_NODE, EXPIRATION_NODE_LEN); + tmp = get_node(cred_node, EXPIRATION_NODE, EXPIRATION_NODE_LEN, EXPIRATION_NODE_END); if (!tmp) { goto error; } @@ -948,7 +962,7 @@ flb_sds_t flb_sts_uri(char *action, char *role_arn, char *session_name, return uri; } -static flb_sds_t get_node(char *cred_node, char* node_name, int node_len) +static flb_sds_t get_node(char *cred_node, char* node_name, int node_name_len, char* node_end) { char *node = NULL; char *end = NULL; @@ -961,8 +975,8 @@ static flb_sds_t get_node(char *cred_node, char* node_name, int node_len) node_name); return NULL; } - node += node_len; - end = strchr(node, '<'); + node += node_name_len; + end = strstr(node, node_end); if (!end) { flb_error("[aws_credentials] Could not find end of '%s' node in " "sts response", node_name); From 9c3cfe129b7a32d57666add4ec6e862ba88ac669 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Fri, 17 Feb 2023 14:30:06 +0100 Subject: [PATCH 35/74] config_map: fix possible NULL-deref This is a backport of PR 6859 which fixes a potential NULL dereference that could be triggered by flb_sds_create returning NULL in flb_config_map_create. Signed-off-by: Leonardo Alminana --- src/flb_config_map.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/flb_config_map.c b/src/flb_config_map.c index 9f7855885c4..67a9a236b06 100644 --- a/src/flb_config_map.c +++ b/src/flb_config_map.c @@ -285,6 +285,12 @@ struct mk_list *flb_config_map_create(struct flb_config *config, new->type = m->type; new->name = flb_sds_create(m->name); + if (new->name == NULL) { + flb_free(new); + flb_config_map_destroy(list); + return NULL; + } + /* Translate default value */ if (m->def_value) { /* From 4704ce900bdd8c85639b59a20aafa13b0170d165 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Tue, 14 Feb 2023 15:23:25 +0100 Subject: [PATCH 36/74] engine: added retry cleanup when a task cannot be retried Due to how flb_task_users_release determines if it can drop the involved chunk and how entries in the retries list are handled by flb_task_retry_create we need to explicitly remove the retry entries related to the failed task and plugin instance before calling flb_task_users_dec to ensure that chunks linked to tasks that had at least one retry but are deemed not retriable afterwards can be properly disposed of. Signed-off-by: Leonardo Alminana --- src/flb_engine.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/flb_engine.c b/src/flb_engine.c index 20548798bb4..ceb933dfca3 100644 --- a/src/flb_engine.c +++ b/src/flb_engine.c @@ -269,6 +269,7 @@ static inline int handle_output_event(flb_pipefd_t fd, uint64_t ts, flb_input_name(task->i_ins), flb_output_name(ins), out_id); } + flb_task_retry_clean(task, ins); flb_task_users_dec(task, FLB_TRUE); } @@ -288,7 +289,10 @@ static inline int handle_output_event(flb_pipefd_t fd, uint64_t ts, task_id, flb_input_name(task->i_ins), flb_output_name(ins), out_id); + + flb_task_retry_clean(task, ins); flb_task_users_dec(task, FLB_TRUE); + return 0; } @@ -320,7 +324,9 @@ static inline int handle_output_event(flb_pipefd_t fd, uint64_t ts, flb_input_name(task->i_ins), flb_output_name(ins)); + flb_task_retry_clean(task, ins); flb_task_users_dec(task, FLB_TRUE); + return 0; } @@ -379,6 +385,8 @@ static inline int handle_output_event(flb_pipefd_t fd, uint64_t ts, flb_metrics_sum(FLB_METRIC_OUT_ERROR, 1, ins->metrics); flb_metrics_sum(FLB_METRIC_OUT_DROPPED_RECORDS, task->records, ins->metrics); #endif + + flb_task_retry_clean(task, ins); flb_task_users_dec(task, FLB_TRUE); } From e0e6bcc85e57cfbc4259e836ca51ae8a91d9fd3b Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 15 May 2023 18:08:45 -0700 Subject: [PATCH 37/74] out_s3: fix incorrect decrementing of after UploadPart failure Signed-off-by: Wesley Pettit --- plugins/out_s3/s3.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index 36db7a4a4ec..8840f82821e 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -1120,15 +1120,6 @@ static int upload_data(struct flb_s3 *ctx, struct s3_file *chunk, s3_store_file_unlock(chunk); chunk->failures += 1; } - if (ctx->key_fmt_has_seq_index) { - ctx->seq_index--; - - ret = write_seq_index(ctx->seq_index_file, ctx->seq_index); - if (ret < 0) { - flb_plg_error(ctx->ins, "Failed to decrement index after request error"); - return -1; - } - } return FLB_RETRY; } m_upload->part_number += 1; From f227ec9894bb2fa57041a4d5547732f77de69782 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Thu, 1 Jun 2023 14:58:28 -0700 Subject: [PATCH 38/74] lib: monkey: upgrade to 13a4ccd3 for AWS Distro Signed-off-by: Wesley Pettit --- lib/monkey/.gitignore | 2 + lib/monkey/CMakeLists.txt | 8 +- lib/monkey/include/monkey/mk_api.h | 47 +++++++---- lib/monkey/include/monkey/mk_cache_tls.h | 15 +++- lib/monkey/include/monkey/mk_clock.h | 17 +++- lib/monkey/include/monkey/mk_config.h | 18 +++- lib/monkey/include/monkey/mk_core.h | 2 +- lib/monkey/include/monkey/mk_core/mk_event.h | 5 ++ lib/monkey/include/monkey/mk_core/mk_list.h | 80 ++++++++++++++++-- lib/monkey/include/monkey/mk_core/mk_utils.h | 17 ++-- lib/monkey/include/monkey/mk_plugin.h | 14 ++-- lib/monkey/include/monkey/mk_plugin_net.h | 12 +-- lib/monkey/include/monkey/mk_scheduler.h | 6 +- lib/monkey/include/monkey/mk_scheduler_tls.h | 12 ++- lib/monkey/include/monkey/mk_server_tls.h | 9 +- .../include/monkey/mk_static_plugins.h.in | 32 ++++++++ lib/monkey/include/monkey/mk_tls.h | 24 +++--- lib/monkey/include/monkey/mk_vhost_tls.h | 10 ++- lib/monkey/mk_core/CMakeLists.txt | 3 +- lib/monkey/mk_core/external/winpthreads.c | 7 +- lib/monkey/mk_core/mk_event.c | 14 +++- lib/monkey/mk_core/mk_event_epoll.c | 48 +++++++++-- lib/monkey/mk_core/mk_event_kqueue.c | 66 ++++++++++++--- lib/monkey/mk_core/mk_event_libevent.c | 82 ++++++++++++++++--- lib/monkey/mk_core/mk_event_select.c | 47 +++++++++-- lib/monkey/mk_core/mk_rconf.c | 28 ++++++- lib/monkey/mk_core/mk_string.c | 69 +++++++--------- lib/monkey/mk_server/mk_clock.c | 67 +++++++-------- lib/monkey/mk_server/mk_fifo.c | 6 +- lib/monkey/mk_server/mk_header.c | 4 +- lib/monkey/mk_server/mk_http.c | 2 +- lib/monkey/mk_server/mk_lib.c | 59 +++++++++---- lib/monkey/mk_server/mk_mimetype.c | 27 +++++- lib/monkey/mk_server/mk_net.c | 2 +- lib/monkey/mk_server/mk_plugin.c | 40 ++++++--- lib/monkey/mk_server/mk_scheduler.c | 10 +-- lib/monkey/mk_server/mk_server.c | 17 ++-- lib/monkey/mk_server/mk_stream.c | 3 + lib/monkey/mk_server/monkey.c | 27 +++++- lib/monkey/plugins/CMakeLists.txt | 2 +- lib/monkey/plugins/dirlisting/dirlisting.c | 15 ++-- lib/monkey/plugins/liana/liana.c | 31 +++++-- lib/monkey/plugins/logger/logger.c | 2 +- lib/monkey/plugins/mandril/mandril.c | 79 +++++++++--------- 44 files changed, 791 insertions(+), 296 deletions(-) diff --git a/lib/monkey/.gitignore b/lib/monkey/.gitignore index 6198362fa49..6708c67e177 100644 --- a/lib/monkey/.gitignore +++ b/lib/monkey/.gitignore @@ -26,3 +26,5 @@ src/include/ build/ include/monkey/mk_static_plugins.h include/monkey/mk_core/mk_core_info.h +.vscode +monkey.service diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt index 15e62e81da9..198251d8e8e 100644 --- a/lib/monkey/CMakeLists.txt +++ b/lib/monkey/CMakeLists.txt @@ -50,6 +50,7 @@ option(MK_MBEDTLS_SHARED "Use mbedtls shared lib" No) option(MK_VALGRIND "Enable Valgrind support" No) option(MK_FUZZ_MODE "Enable HonggFuzz mode" No) option(MK_HTTP2 "Enable HTTP Support (dev)" No) +option(MK_TESTS "Enable Tests" No) # Plugins: what should be build ?, these options # will be processed later on the plugins/CMakeLists.txt file @@ -275,7 +276,8 @@ include_directories(deps/flb_libco) include_directories(deps/regex) include_directories(include) include_directories(include/monkey/) -include_directories(${PROJECT_BINARY_DIR}/include/) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/monkey/) if (CMAKE_SYSTEM_NAME MATCHES "Windows") include_directories(mk_core/deps/libevent/include) @@ -323,3 +325,7 @@ add_subdirectory(api) if(MK_FUZZ_MODE) add_subdirectory(fuzz) endif() + +if(MK_TESTS) + add_subdirectory(test) +endif() diff --git a/lib/monkey/include/monkey/mk_api.h b/lib/monkey/include/monkey/mk_api.h index ea8452e5e3a..fa5489cfe20 100644 --- a/lib/monkey/include/monkey/mk_api.h +++ b/lib/monkey/include/monkey/mk_api.h @@ -51,13 +51,13 @@ pthread_key_t MK_EXPORT _mkp_data; #ifdef TRACE -#define MK_TRACE(...) \ - mk_api->trace("pl", \ - MK_TRACE_PLUGIN, \ - __FUNCTION__, \ - __FILENAME__, \ - __LINE__, \ - __VA_ARGS__) +#define MK_TRACE(api, ...) \ + api->trace("pl", \ + MK_TRACE_PLUGIN, \ + __FUNCTION__, \ + __FILENAME__, \ + __LINE__, \ + __VA_ARGS__) #define PLUGIN_TRACE MK_TRACE #else #define MK_TRACE(...) do {} while(0) @@ -68,22 +68,35 @@ pthread_key_t MK_EXPORT _mkp_data; * Redefine messages macros */ -#undef mk_info -#define mk_info(...) mk_api->_error(MK_INFO, __VA_ARGS__) +#undef mk_info_ex +#define mk_info_ex(api, ...) api->_error(MK_INFO, __VA_ARGS__) -#undef mk_err -#define mk_err(...) mk_api->_error(MK_ERR, __VA_ARGS__) +#undef mk_err_ex +#define mk_err_ex(api, ...) api->_error(MK_ERR, __VA_ARGS__) -#undef mk_warn -#define mk_warn(...) mk_api->_error(MK_WARN, __VA_ARGS__) +#undef mk_warn_ex +#define mk_warn_ex(api, ...) api->_error(MK_WARN, __VA_ARGS__) -#undef mk_bug -#define mk_bug(condition) do { \ +#undef mk_bug_ex +#define mk_bug_ex(api, condition) do { \ if (mk_unlikely((condition)!=0)) { \ - mk_api->_error(MK_BUG, "[%s] Bug found in %s() at %s:%d", \ - _plugin_info.shortname, __FUNCTION__, __FILE__, __LINE__); \ + api->_error(MK_BUG, "[%s] Bug found in %s() at %s:%d", \ + _plugin_info.shortname, __FUNCTION__, __FILE__, __LINE__); \ abort(); \ } \ } while(0) +#undef mk_info +#define mk_info(...) mk_info_ex(mk_api, __VA_ARGS__) + +#undef mk_err +#define mk_err(...) mk_error_ex(mk_api, __VA_ARGS__) + +#undef mk_warn +#define mk_warn(...) mk_error_ex(mk_api, __VA_ARGS__) + +#undef mk_bug +#define mk_bug(condition) mk_bug_ex(mk_api, condition) + #endif + diff --git a/lib/monkey/include/monkey/mk_cache_tls.h b/lib/monkey/include/monkey/mk_cache_tls.h index 30ae43deaf9..be3cbf98afb 100644 --- a/lib/monkey/include/monkey/mk_cache_tls.h +++ b/lib/monkey/include/monkey/mk_cache_tls.h @@ -17,15 +17,24 @@ * limitations under the License. */ -#ifdef MK_HAVE_C_TLS - #ifndef MK_CACHE_TLS_H #define MK_CACHE_TLS_H +#ifdef MK_HAVE_C_TLS /* Use Compiler Thread Local Storage (TLS) */ + __thread mk_ptr_t *mk_tls_cache_header_cl; __thread mk_ptr_t *mk_tls_cache_header_lm; __thread struct tm *mk_tls_cache_gmtime; __thread struct mk_gmt_cache *mk_tls_cache_gmtext; -#endif +#else + +pthread_key_t mk_tls_cache_iov_header; +pthread_key_t mk_tls_cache_header_cl; +pthread_key_t mk_tls_cache_header_lm; +pthread_key_t mk_tls_cache_gmtime; +pthread_key_t mk_tls_cache_gmtext; + #endif /* MK_HACE_C_TLS */ + +#endif diff --git a/lib/monkey/include/monkey/mk_clock.h b/lib/monkey/include/monkey/mk_clock.h index 94c2f06606d..814f39651d3 100644 --- a/lib/monkey/include/monkey/mk_clock.h +++ b/lib/monkey/include/monkey/mk_clock.h @@ -36,9 +36,24 @@ extern mk_ptr_t headers_preset; #define HEADER_TIME_BUFFER_SIZE 64 #define LOG_TIME_BUFFER_SIZE 30 +struct mk_server; + +struct mk_clock_context { + pthread_t mk_clock_tid; + + time_t log_current_utime; + time_t monkey_init_time; + + mk_ptr_t log_current_time; + mk_ptr_t headers_preset; + + char *log_time_buffers[2]; + char *header_time_buffers[2]; +}; + void *mk_clock_worker_init(void *args); void mk_clock_set_time(void); void mk_clock_sequential_init(struct mk_server *server); -void mk_clock_exit(); +void mk_clock_exit(struct mk_server *server); #endif diff --git a/lib/monkey/include/monkey/mk_config.h b/lib/monkey/include/monkey/mk_config.h index f650f4242e6..349743de9cc 100644 --- a/lib/monkey/include/monkey/mk_config.h +++ b/lib/monkey/include/monkey/mk_config.h @@ -56,6 +56,9 @@ typedef uint32_t gid_t; #define MK_CAP_SOCK_PLAIN 4 #define MK_CAP_SOCK_TLS 8 +struct plugin_api; +struct mk_clock_context; + struct mk_config_listener { char *address; /* address to bind */ @@ -151,10 +154,14 @@ struct mk_server int server_signature_header_len; /* Library mode */ - int lib_mode; /* is running in Library mode ? */ - int lib_ch_manager[2]; /* lib channel manager */ - struct mk_event_loop *lib_evl; /* lib event loop */ - struct mk_event lib_ch_event; /* lib channel manager event ? */ + int lib_mode; /* is running in Library mode ? */ + + int lib_ch_manager[2]; /* lib channel manager */ + struct mk_event_loop *lib_evl; /* lib event loop */ + struct mk_event lib_ch_event; /* lib channel manager event ? */ + int lib_ch_start[2]; /* lib start signal channel */ + struct mk_event_loop *lib_evl_start; /* lib start event loop */ + struct mk_event lib_ch_start_event; /* lib start event */ /* Scheduler context (struct mk_sched_ctx) */ void *sched_ctx; @@ -185,6 +192,9 @@ struct mk_server */ int worker_id; + struct plugin_api *api; + struct mk_clock_context *clock_context; + /* Direct map to Stage plugins */ struct mk_list stage10_handler; struct mk_list stage20_handler; diff --git a/lib/monkey/include/monkey/mk_core.h b/lib/monkey/include/monkey/mk_core.h index 01a11418530..b8068739d65 100644 --- a/lib/monkey/include/monkey/mk_core.h +++ b/lib/monkey/include/monkey/mk_core.h @@ -30,7 +30,7 @@ extern "C" { #include -#include "mk_core/mk_core_info.h" +#include #include "mk_core/mk_pthread.h" #include "mk_core/mk_iov.h" #include "mk_core/mk_uio.h" diff --git a/lib/monkey/include/monkey/mk_core/mk_event.h b/lib/monkey/include/monkey/mk_core/mk_event.h index 9067c044be2..87a9c064499 100644 --- a/lib/monkey/include/monkey/mk_core/mk_event.h +++ b/lib/monkey/include/monkey/mk_core/mk_event.h @@ -67,6 +67,9 @@ #define MK_EP_SOCKET_DONE 3 /* ---- end ---- */ + +#define MK_EVENT_IS_REGISTERED(event) ((event->status & MK_EVENT_REGISTERED) != 0) + #if defined(_WIN32) #include "mk_event_libevent.h" #elif defined(MK_HAVE_EVENT_SELECT) @@ -144,6 +147,8 @@ int mk_event_timeout_disable(struct mk_event_loop *loop, void *data); int mk_event_timeout_destroy(struct mk_event_loop *loop, void *data); int mk_event_channel_create(struct mk_event_loop *loop, int *r_fd, int *w_fd, void *data); +int mk_event_channel_destroy(struct mk_event_loop *loop, + int r_fd, int w_fd, void *data); int mk_event_wait(struct mk_event_loop *loop); int mk_event_wait_2(struct mk_event_loop *loop, int timeout); int mk_event_translate(struct mk_event_loop *loop); diff --git a/lib/monkey/include/monkey/mk_core/mk_list.h b/lib/monkey/include/monkey/mk_core/mk_list.h index 7c1ea97b99f..0a87381a8cd 100644 --- a/lib/monkey/include/monkey/mk_core/mk_list.h +++ b/lib/monkey/include/monkey/mk_core/mk_list.h @@ -18,10 +18,11 @@ * limitations under the License. */ -#ifndef MK_LIST_H_ -#define MK_LIST_H_ +#ifndef MK_LIST_H_ +#define MK_LIST_H_ #include +#include "mk_macros.h" #ifdef _WIN32 /* Windows */ @@ -82,6 +83,59 @@ static inline void mk_list_add_after(struct mk_list *_new, next->prev = _new; } +static inline int mk_list_is_empty(struct mk_list *head) +{ + if (head->next == head) return 0; + else return -1; +} + +static inline void mk_list_add_before(struct mk_list *_new, + struct mk_list *next, + struct mk_list *head) +{ + struct mk_list *prev; + + if (_new == NULL || next == NULL || head == NULL) { + return; + } + + if (mk_list_is_empty(head) == 0 /*empty*/|| + next == head) { + mk_list_add(_new, head); + return; + } + + prev = next->prev; + _new->next = next; + _new->prev = prev; + prev->next = _new; + next->prev = _new; +} + +static inline void mk_list_append(struct mk_list *_new, struct mk_list *head) +{ + if (mk_list_is_empty(head) == 0) { + __mk_list_add(_new, head->prev, head); + } + else { + mk_list_add_after(_new, + head->prev, + head); + } +} + +static inline void mk_list_prepend(struct mk_list *_new, struct mk_list *head) +{ + if (mk_list_is_empty(head) == 0) { + __mk_list_add(_new, head->prev, head); + } + else { + mk_list_add_before(_new, + head->next, + head); + } +} + static inline void __mk_list_del(struct mk_list *prev, struct mk_list *next) { prev->next = next; @@ -95,12 +149,6 @@ static inline void mk_list_del(struct mk_list *entry) entry->next = NULL; } -static inline int mk_list_is_empty(struct mk_list *head) -{ - if (head->next == head) return 0; - else return -1; -} - static inline int mk_list_is_set(struct mk_list *head) { if (head->next && head->prev) { @@ -118,6 +166,22 @@ static inline int mk_list_size(struct mk_list *head) return ret; } +static inline void mk_list_entry_init(struct mk_list *list) +{ + list->next = NULL; + list->prev = NULL; +} + +static inline int mk_list_entry_is_orphan(struct mk_list *head) +{ + if (head->next != NULL && + head->prev != NULL) { + return MK_FALSE; + } + + return MK_TRUE; +} + static inline int mk_list_entry_orphan(struct mk_list *head) { if (head->next && head->prev) { diff --git a/lib/monkey/include/monkey/mk_core/mk_utils.h b/lib/monkey/include/monkey/mk_core/mk_utils.h index 3118593048f..2a91af65bd6 100644 --- a/lib/monkey/include/monkey/mk_core/mk_utils.h +++ b/lib/monkey/include/monkey/mk_core/mk_utils.h @@ -79,17 +79,14 @@ extern pthread_key_t mk_utils_error_key; #endif /* - * Helpers to format and print out common errno errors, we use thread - * keys to hold a buffer per thread so strerror_r(2) can be used without - * a memory allocation. + * Helpers to format and print out common errno errors. */ -#define MK_UTILS_LIBC_ERRNO_BUFFER() \ - int _err = errno; \ - char bufs[256]; \ - char *buf = (char *) pthread_getspecific(mk_utils_error_key); \ - if (!buf) buf = bufs; \ - if (strerror_r(_err, buf, MK_UTILS_ERROR_SIZE) != 0) { \ - mk_err("strerror_r() failed"); \ +#define MK_UTILS_LIBC_ERRNO_BUFFER() \ + char buf[MK_UTILS_ERROR_SIZE]; \ + int _err; \ + _err = errno; \ + if (strerror_r(_err, buf, MK_UTILS_ERROR_SIZE) != 0) { \ + mk_err("strerror_r() failed"); \ } static inline void mk_utils_libc_error(char *caller, char *file, int line) diff --git a/lib/monkey/include/monkey/mk_plugin.h b/lib/monkey/include/monkey/mk_plugin.h index f32db2f1ed2..76d54025d99 100644 --- a/lib/monkey/include/monkey/mk_plugin.h +++ b/lib/monkey/include/monkey/mk_plugin.h @@ -265,9 +265,11 @@ struct mk_plugin { unsigned int hooks; char capabilities; + struct plugin_api *api; + /* Init / Exit */ - int (*init_plugin) (struct plugin_api **, char *); - int (*exit_plugin) (); + int (*init_plugin) (struct mk_plugin *, char *); + int (*exit_plugin) (struct mk_plugin *); /* Init Levels */ int (*master_init) (struct mk_server *); @@ -313,8 +315,8 @@ struct mk_plugin_stage { }; -void mk_plugin_api_init(); -void mk_plugin_load_all(); +void mk_plugin_api_init(struct mk_server *server); +void mk_plugin_load_all(struct mk_server *server); void mk_plugin_exit_all(struct mk_server *server); void mk_plugin_exit_worker(); @@ -356,8 +358,8 @@ void mk_plugin_unregister(struct mk_plugin *p); struct plugin *mk_plugin_alloc(void *handler, const char *path); void mk_plugin_free(struct mk_plugin *p); -int mk_plugin_time_now_unix(); -mk_ptr_t *mk_plugin_time_now_human(); +int mk_plugin_time_now_unix(struct mk_server *server); +mk_ptr_t *mk_plugin_time_now_human(struct mk_server *server); int mk_plugin_sched_remove_client(int socket, struct mk_server *server); diff --git a/lib/monkey/include/monkey/mk_plugin_net.h b/lib/monkey/include/monkey/mk_plugin_net.h index df4a874f459..e60c74cf73b 100644 --- a/lib/monkey/include/monkey/mk_plugin_net.h +++ b/lib/monkey/include/monkey/mk_plugin_net.h @@ -26,13 +26,15 @@ * Network plugin: a plugin that provides a network layer, eg: plain * sockets or SSL. */ +struct mk_plugin; struct mk_plugin_network { - int (*read) (int, void *, int); - int (*write) (int, const void *, size_t); - int (*writev) (int, struct mk_iov *); - int (*close) (int); - int (*send_file) (int, int, off_t *, size_t); + int (*read) (struct mk_plugin *, int, void *, int); + int (*write) (struct mk_plugin *, int, const void *, size_t); + int (*writev) (struct mk_plugin *, int, struct mk_iov *); + int (*close) (struct mk_plugin *, int); + int (*send_file) (struct mk_plugin *, int, int, off_t *, size_t); int buffer_size; + struct mk_plugin *plugin; }; #endif diff --git a/lib/monkey/include/monkey/mk_scheduler.h b/lib/monkey/include/monkey/mk_scheduler.h index b28a9332384..f749cba5420 100644 --- a/lib/monkey/include/monkey/mk_scheduler.h +++ b/lib/monkey/include/monkey/mk_scheduler.h @@ -326,13 +326,13 @@ static inline void mk_sched_conn_timeout_del(struct mk_sched_conn *conn) #define mk_sched_conn_read(conn, buf, s) \ - conn->net->read(conn->event.fd, buf, s) + conn->net->read(conn->net->plugin, conn->event.fd, buf, s) #define mk_sched_conn_write(ch, buf, s) \ mk_net_conn_write(ch, buf, s) #define mk_sched_conn_writev(ch, iov) \ - ch->io->writev(ch->fd, iov) + ch->io->writev(ch->io->plugin, ch->fd, iov) #define mk_sched_conn_sendfile(ch, f_fd, f_offs, f_count) \ - ch->io->send_file(ch->fd, f_fd, f_offs, f_count) + ch->io->send_file(ch->io->plugin, ch->fd, f_fd, f_offs, f_count) #define mk_sched_switch_protocol(conn, cap) \ conn->protocol = mk_sched_handler_cap(cap) diff --git a/lib/monkey/include/monkey/mk_scheduler_tls.h b/lib/monkey/include/monkey/mk_scheduler_tls.h index 6e5717c8dbc..e645684bd66 100644 --- a/lib/monkey/include/monkey/mk_scheduler_tls.h +++ b/lib/monkey/include/monkey/mk_scheduler_tls.h @@ -17,15 +17,23 @@ * limitations under the License. */ -#ifdef MK_HAVE_C_TLS - #ifndef MK_SCHEDULER_TLS_H #define MK_SCHEDULER_TLS_H +#ifdef MK_HAVE_C_TLS /* Use Compiler Thread Local Storage (TLS) */ + __thread struct rb_root *mk_tls_sched_cs; __thread struct mk_list *mk_tls_sched_cs_incomplete; __thread struct mk_sched_notif *mk_tls_sched_worker_notif; __thread struct mk_sched_worker *mk_tls_sched_worker_node; +#else + +pthread_key_t mk_tls_sched_cs; +pthread_key_t mk_tls_sched_cs_incomplete; +pthread_key_t mk_tls_sched_worker_notif; +pthread_key_t mk_tls_sched_worker_node; + #endif + #endif diff --git a/lib/monkey/include/monkey/mk_server_tls.h b/lib/monkey/include/monkey/mk_server_tls.h index f0209dbff1c..1e47ee1b108 100644 --- a/lib/monkey/include/monkey/mk_server_tls.h +++ b/lib/monkey/include/monkey/mk_server_tls.h @@ -17,13 +17,18 @@ * limitations under the License. */ -#ifdef MK_HAVE_C_TLS - #ifndef MK_SERVER_TLS_H #define MK_SERVER_TLS_H +#ifdef MK_HAVE_C_TLS /* Use Compiler Thread Local Storage (TLS) */ + __thread struct mk_list *mk_tls_server_listen; __thread struct mk_server_timeout *mk_tls_server_timeout; +#else + +pthread_key_t mk_tls_server_listen; +pthread_key_t mk_tls_server_timeout; + #endif #endif diff --git a/lib/monkey/include/monkey/mk_static_plugins.h.in b/lib/monkey/include/monkey/mk_static_plugins.h.in index 6b666058a11..33e3447bcf4 100644 --- a/lib/monkey/include/monkey/mk_static_plugins.h.in +++ b/lib/monkey/include/monkey/mk_static_plugins.h.in @@ -22,9 +22,41 @@ #include #include +#include @STATIC_PLUGINS_DECL@ +static int mk_static_plugin_attach(struct mk_list *plugins, + struct mk_plugin *plugin) +{ + struct mk_plugin *instance; + struct mk_plugin_network *network; + + instance = mk_mem_alloc_z(sizeof(struct mk_plugin)); + + if (instance == NULL) { + return MK_FALSE; + } + + memcpy(instance, plugin, sizeof(struct mk_plugin)); + + network = mk_mem_alloc(sizeof(struct mk_plugin_network)); + + if (network == NULL) { + mk_mem_free(instance); + + return MK_FALSE; + } + + memcpy(network, plugin->network, sizeof(struct mk_plugin_network)); + + instance->network = network; + + mk_list_add(&instance->_head, plugins); + + return MK_TRUE; +} + static void mk_static_plugins(struct mk_list *plugins) { struct mk_plugin *p; diff --git a/lib/monkey/include/monkey/mk_tls.h b/lib/monkey/include/monkey/mk_tls.h index bf9e56818fd..fe80e31310e 100644 --- a/lib/monkey/include/monkey/mk_tls.h +++ b/lib/monkey/include/monkey/mk_tls.h @@ -61,24 +61,24 @@ extern __thread struct mk_server_timeout *mk_tls_server_timeout; #else /* Use Posix Thread Keys */ /* mk_cache.c */ -pthread_key_t mk_tls_cache_iov_header; -pthread_key_t mk_tls_cache_header_cl; -pthread_key_t mk_tls_cache_header_lm; -pthread_key_t mk_tls_cache_gmtime; -pthread_key_t mk_tls_cache_gmtext; +extern pthread_key_t mk_tls_cache_iov_header; +extern pthread_key_t mk_tls_cache_header_cl; +extern pthread_key_t mk_tls_cache_header_lm; +extern pthread_key_t mk_tls_cache_gmtime; +extern pthread_key_t mk_tls_cache_gmtext; /* mk_vhost.c */ -pthread_key_t mk_tls_vhost_fdt; +extern pthread_key_t mk_tls_vhost_fdt; /* mk_scheduler.c */ -pthread_key_t mk_tls_sched_cs; -pthread_key_t mk_tls_sched_cs_incomplete; -pthread_key_t mk_tls_sched_worker_notif; -pthread_key_t mk_tls_sched_worker_node; +extern pthread_key_t mk_tls_sched_cs; +extern pthread_key_t mk_tls_sched_cs_incomplete; +extern pthread_key_t mk_tls_sched_worker_notif; +extern pthread_key_t mk_tls_sched_worker_node; /* mk_server.c */ -pthread_key_t mk_tls_server_listen; -pthread_key_t mk_tls_server_timeout; +extern pthread_key_t mk_tls_server_listen; +extern pthread_key_t mk_tls_server_timeout; #define MK_TLS_SET(key, val) pthread_setspecific(key, (void *) val) #define MK_TLS_GET(key) pthread_getspecific(key) diff --git a/lib/monkey/include/monkey/mk_vhost_tls.h b/lib/monkey/include/monkey/mk_vhost_tls.h index c18a30e0437..19dee4346cf 100644 --- a/lib/monkey/include/monkey/mk_vhost_tls.h +++ b/lib/monkey/include/monkey/mk_vhost_tls.h @@ -19,14 +19,20 @@ #include -#ifdef MK_HAVE_C_TLS #ifndef MK_VHOST_TLS_H #define MK_VHOST_TLS_H #include +#ifdef MK_HAVE_C_TLS /* Use Compiler Thread Local Storage (TLS) */ + __thread struct mk_list *mk_tls_vhost_fdt; -#endif /* MK_VHOST_TLS_H */ +#else + +pthread_key_t mk_tls_vhost_fdt; + #endif /* MK_HAVE_C_TLS */ + +#endif /* MK_VHOST_TLS_H */ diff --git a/lib/monkey/mk_core/CMakeLists.txt b/lib/monkey/mk_core/CMakeLists.txt index 0e74f8d4587..86cc7fcb4e6 100644 --- a/lib/monkey/mk_core/CMakeLists.txt +++ b/lib/monkey/mk_core/CMakeLists.txt @@ -10,7 +10,6 @@ set(src # Headers include_directories(../include/monkey/) -include_directories(${PROJECT_BINARY_DIR}/include/monkey) # It set's a definition and register into the mk_core_info.h file */ macro(MK_DEFINITION var) @@ -146,7 +145,7 @@ endif() configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/../include/monkey/mk_core/mk_core_info.h.in" - "${PROJECT_BINARY_DIR}/include/monkey/mk_core/mk_core_info.h" + "${PROJECT_BINARY_DIR}/include/monkey/mk_core/mk_core_info.h" ) add_library(mk_core STATIC ${src}) diff --git a/lib/monkey/mk_core/external/winpthreads.c b/lib/monkey/mk_core/external/winpthreads.c index a2b63310e1c..abf55006727 100644 --- a/lib/monkey/mk_core/external/winpthreads.c +++ b/lib/monkey/mk_core/external/winpthreads.c @@ -495,9 +495,12 @@ int pthread_cancel(pthread_t t) SuspendThread(t->h); GetThreadContext(t->h, &ctxt); -#ifdef _M_X64 +#if defined(_M_X64) ctxt.Rip = (uintptr_t) _pthread_invoke_cancel; -#else +#elif defined(_M_ARM64) + ctxt.Pc = (uintptr_t) _pthread_invoke_cancel; + #else + ctxt.Eip = (uintptr_t) _pthread_invoke_cancel; #endif SetThreadContext(t->h, &ctxt); diff --git a/lib/monkey/mk_core/mk_event.c b/lib/monkey/mk_core/mk_event.c index 242079f1753..5eaa8b00eb0 100644 --- a/lib/monkey/mk_core/mk_event.c +++ b/lib/monkey/mk_core/mk_event.c @@ -106,8 +106,6 @@ int mk_event_add(struct mk_event_loop *loop, int fd, int mk_event_inject(struct mk_event_loop *loop, struct mk_event *event, int flags, int prevent_duplication) { - int result; - if (loop->n_events + 1 >= loop->size) { return -1; } @@ -178,6 +176,18 @@ int mk_event_channel_create(struct mk_event_loop *loop, return _mk_event_channel_create(ctx, r_fd, w_fd, data); } +/* Destroy channel created to distribute signals */ +int mk_event_channel_destroy(struct mk_event_loop *loop, + int r_fd, int w_fd, + void *data) +{ + struct mk_event_ctx *ctx; + + mk_bug(!data); + ctx = loop->data; + return _mk_event_channel_destroy(ctx, r_fd, w_fd, data); +} + /* Poll events */ int mk_event_wait(struct mk_event_loop *loop) { diff --git a/lib/monkey/mk_core/mk_event_epoll.c b/lib/monkey/mk_core/mk_event_epoll.c index 04e0db9de39..4e475cd4ca7 100644 --- a/lib/monkey/mk_core/mk_event_epoll.c +++ b/lib/monkey/mk_core/mk_event_epoll.c @@ -105,6 +105,10 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, int ret; struct mk_event *event; struct epoll_event ep_event; + memset(&ep_event, 0, sizeof(ep_event)); + + mk_bug(ctx == NULL); + mk_bug(data == NULL); /* Verify the FD status and desired operation */ event = (struct mk_event *) data; @@ -154,13 +158,18 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event { int ret; - if ((event->status & MK_EVENT_REGISTERED) == 0) { + mk_bug(ctx == NULL); + mk_bug(event == NULL); + + if (!MK_EVENT_IS_REGISTERED(event)) { return 0; } ret = epoll_ctl(ctx->efd, EPOLL_CTL_DEL, event->fd, NULL); + MK_TRACE("[FD %i] Epoll, remove from QUEUE_FD=%i, ret=%i", event->fd, ctx->efd, ret); + if (ret < 0) { #ifdef MK_HAVE_TRACE mk_libc_warn("epoll_ctl"); @@ -168,8 +177,7 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event } /* Remove from priority queue */ - if (event->_priority_head.next != NULL && - event->_priority_head.prev != NULL) { + if (!mk_list_entry_is_orphan(&event->_priority_head)) { mk_list_del(&event->_priority_head); } @@ -189,7 +197,8 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, struct timespec now; struct mk_event *event; - mk_bug(!data); + mk_bug(data == NULL); + memset(&its, '\0', sizeof(struct itimerspec)); if (clock_gettime(CLOCK_MONOTONIC, &now) != 0) { @@ -289,6 +298,8 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, struct fd_timer *timer; pthread_t tid; + mk_bug(data == NULL); + timer = mk_mem_alloc(sizeof(struct fd_timer)); if (!timer) { return -1; @@ -331,7 +342,7 @@ static inline int _mk_event_timeout_destroy(struct mk_event_ctx *ctx, void *data { struct mk_event *event; - if (!data) { + if (data == NULL) { return 0; } @@ -348,6 +359,8 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, int fd[2]; struct mk_event *event; + mk_bug(data == NULL); + ret = pipe(fd); if (ret < 0) { mk_libc_error("pipe"); @@ -373,12 +386,35 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, return 0; } +static inline int _mk_event_channel_destroy(struct mk_event_ctx *ctx, + int r_fd, int w_fd, void *data) +{ + struct mk_event *event; + int ret; + + + event = (struct mk_event *)data; + if (event->fd != r_fd) { + return -1; + } + + ret = _mk_event_del(ctx, event); + if (ret != 0) { + return ret; + } + + close(r_fd); + close(w_fd); + + return 0; +} + static inline int _mk_event_inject(struct mk_event_loop *loop, struct mk_event *event, int mask, int prevent_duplication) { - size_t index; + int index; struct mk_event_ctx *ctx; ctx = loop->data; diff --git a/lib/monkey/mk_core/mk_event_kqueue.c b/lib/monkey/mk_core/mk_event_kqueue.c index f60a0a11b88..46b4f3524cc 100644 --- a/lib/monkey/mk_core/mk_event_kqueue.c +++ b/lib/monkey/mk_core/mk_event_kqueue.c @@ -76,6 +76,9 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, struct mk_event *event; struct kevent ke = {0, 0, 0, 0, 0, 0}; + mk_bug(ctx == NULL); + mk_bug(data == NULL); + event = (struct mk_event *) data; if (event->mask == MK_EVENT_EMPTY) { event->fd = fd; @@ -96,7 +99,6 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, else if ((event->mask & MK_EVENT_READ) && (events ^ MK_EVENT_READ)) { EV_SET(&ke, fd, EVFILT_READ, EV_DELETE, 0, 0, event); set = MK_TRUE; - //printf("[DEL] fd=%i READ\n", fd); } if (set == MK_TRUE) { @@ -112,12 +114,10 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, if ((event->mask ^ MK_EVENT_WRITE) && (events & MK_EVENT_WRITE)) { EV_SET(&ke, fd, EVFILT_WRITE, EV_ADD, 0, 0, event); set = MK_TRUE; - //printf("[ADD] fd=%i WRITE\n", fd); } else if ((event->mask & MK_EVENT_WRITE) && (events ^ MK_EVENT_WRITE)) { EV_SET(&ke, fd, EVFILT_WRITE, EV_DELETE, 0, 0, event); set = MK_TRUE; - //printf("[DEL] fd=%i WRITE\n", fd); } if (set == MK_TRUE) { @@ -130,8 +130,12 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, event->mask = events; event->priority = MK_EVENT_PRIORITY_DEFAULT; - event->_priority_head.next = NULL; - event->_priority_head.prev = NULL; + + /* Remove from priority queue */ + if (!mk_list_entry_is_orphan(&event->_priority_head)) { + mk_list_del(&event->_priority_head); + } + return 0; } @@ -140,7 +144,10 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event int ret; struct kevent ke = {0, 0, 0, 0, 0, 0}; - if ((event->status & MK_EVENT_REGISTERED) == 0) { + mk_bug(ctx == NULL); + mk_bug(event == NULL); + + if (!MK_EVENT_IS_REGISTERED(event)) { return 0; } @@ -163,8 +170,7 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event } /* Remove from priority queue */ - if (event->_priority_head.next != NULL && - event->_priority_head.prev != NULL) { + if (!mk_list_entry_is_orphan(&event->_priority_head)) { mk_list_del(&event->_priority_head); } @@ -181,6 +187,8 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, struct mk_event *event; struct kevent ke; + mk_bug(data == NULL); + /* * We just need a file descriptor number, we don't care from where it * comes from. @@ -198,8 +206,7 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, event->mask = MK_EVENT_EMPTY; event->priority = MK_EVENT_PRIORITY_DEFAULT; - event->_priority_head.next = NULL; - event->_priority_head.prev = NULL; + mk_list_entry_init(&event->_priority_head); #if defined(NOTE_SECONDS) && !defined(__APPLE__) /* FreeBSD or LINUX_KQUEUE defined */ @@ -211,6 +218,7 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, * performance degradation. */ EV_SET(&ke, fd, EVFILT_TIMER, EV_ADD, 0, (sec * 1000) + (nsec / 1000000) , event); #endif + ret = kevent(ctx->kfd, &ke, 1, NULL, 0, NULL); if (ret < 0) { close(fd); @@ -223,6 +231,7 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, * to confirm how it behave on native OSX. */ event->mask = MK_EVENT_READ; + return fd; } @@ -232,7 +241,14 @@ static inline int _mk_event_timeout_destroy(struct mk_event_ctx *ctx, void *data struct mk_event *event; struct kevent ke = {0, 0, 0, 0, 0, 0}; + if (data == NULL) { + return 0; + } + event = (struct mk_event *) data; + if (!MK_EVENT_IS_REGISTERED(event)) { + return 0; + } EV_SET(&ke, event->fd, EVFILT_TIMER, EV_DELETE, 0,0, NULL); ret = kevent(ctx->kfd, &ke, 1, NULL, 0, NULL); @@ -242,11 +258,12 @@ static inline int _mk_event_timeout_destroy(struct mk_event_ctx *ctx, void *data } /* Remove from priority queue */ - if (event->_priority_head.next != NULL && - event->_priority_head.prev != NULL) { + if (!mk_list_entry_is_orphan(&event->_priority_head)) { mk_list_del(&event->_priority_head); } + close(event->fd); + MK_EVENT_NEW(event); return 0; @@ -259,6 +276,8 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, int fd[2]; struct mk_event *event; + mk_bug(data == NULL); + ret = pipe(fd); if (ret < 0) { mk_libc_error("pipe"); @@ -284,6 +303,29 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, return 0; } +static inline int _mk_event_channel_destroy(struct mk_event_ctx *ctx, + int r_fd, int w_fd, void *data) +{ + struct mk_event *event; + int ret; + + + event = (struct mk_event *)data; + if (event->fd != r_fd) { + return -1; + } + + ret = _mk_event_del(ctx, event); + if (ret != 0) { + return ret; + } + + close(r_fd); + close(w_fd); + + return 0; +} + static inline int _mk_event_inject(struct mk_event_loop *loop, struct mk_event *event, int mask, diff --git a/lib/monkey/mk_core/mk_event_libevent.c b/lib/monkey/mk_core/mk_event_libevent.c index c9f6c3b1ccc..b155159ef02 100644 --- a/lib/monkey/mk_core/mk_event_libevent.c +++ b/lib/monkey/mk_core/mk_event_libevent.c @@ -166,7 +166,11 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, evutil_socket_t fd, struct mk_event *event; struct ev_map *ev_map; + mk_bug(ctx == NULL); + mk_bug(data == NULL); + event = (struct mk_event *) data; + if (event->mask != MK_EVENT_EMPTY) { return _mk_event_update(ctx, fd, type, events, data); } @@ -188,12 +192,16 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, evutil_socket_t fd, event->fd = fd; event->type = type; event->mask = events; - event->priority = MK_EVENT_PRIORITY_DEFAULT; - event->_priority_head.next = NULL; - event->_priority_head.prev = NULL; event->status = MK_EVENT_REGISTERED; event->data = ev_map; + event->priority = MK_EVENT_PRIORITY_DEFAULT; + + /* Remove from priority queue */ + if (!mk_list_entry_is_orphan(&event->_priority_head)) { + mk_list_del(&event->_priority_head); + } + /* Register into libevent */ flags |= EV_PERSIST; libev = event_new(ctx->base, fd, flags, cb_event, event); @@ -215,25 +223,34 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event int ret; struct ev_map *ev_map; - if ((event->status & MK_EVENT_REGISTERED) == 0) { + mk_bug(ctx == NULL); + mk_bug(event == NULL); + + if (!MK_EVENT_IS_REGISTERED(event)) { return 0; } ev_map = event->data; + + mk_bug(ev_map == NULL); + if (ev_map->pipe[0] > 0) { evutil_closesocket(ev_map->pipe[0]); + ev_map->pipe[0] = -1; } if (ev_map->pipe[1] > 0) { evutil_closesocket(ev_map->pipe[1]); + ev_map->pipe[1] = -1; } ret = event_del(ev_map->event); event_free(ev_map->event); mk_mem_free(ev_map); + event->data = NULL; + /* Remove from priority queue */ - if (event->_priority_head.next != NULL && - event->_priority_head.prev != NULL) { + if (!mk_list_entry_is_orphan(&event->_priority_head)) { mk_list_del(&event->_priority_head); } @@ -281,6 +298,8 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, struct timeval timev = {sec, nsec / 1000}; /* (tv_sec, tv_usec} */ struct ev_map *ev_map; + mk_bug(data == NULL); + if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) == -1) { perror("socketpair"); return -1; @@ -318,19 +337,36 @@ static inline int _mk_event_timeout_create(struct mk_event_ctx *ctx, static inline int _mk_event_timeout_destroy(struct mk_event_ctx *ctx, void *data) { struct mk_event *event; - event = (struct mk_event *) data; - evutil_closesocket(event->fd); + + if (data == NULL) { + return 0; + } + + /* In the case that the timeout is being destroyed manually, we need to close the + * read end of the socket to ensure that cb_timeout will eventually fail to send + * data and clean itself up (including the write end of the socket and the event's + * data). + */ + event = (struct mk_event*)data; + if (event->fd > 0) { + evutil_closesocket(event->fd); + } + return _mk_event_del(ctx, data); } static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, int *r_fd, int *w_fd, void *data) { - int ret; - evutil_socket_t fd[2]; struct mk_event *event; + evutil_socket_t fd[2]; + int ret; - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, fd) == -1) { + mk_bug(data == NULL); + + ret = evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, fd); + + if (ret == -1) { perror("socketpair"); return -1; } @@ -355,6 +391,29 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, return 0; } +static inline int _mk_event_channel_destroy(struct mk_event_ctx *ctx, + int r_fd, int w_fd, void *data) +{ + struct mk_event *event; + int ret; + + + event = (struct mk_event *)data; + if (event->fd != r_fd) { + return -1; + } + + ret = _mk_event_del(ctx, event); + if (ret != 0) { + return ret; + } + + evutil_closesocket(r_fd); + evutil_closesocket(w_fd); + + return 0; +} + static inline int _mk_event_inject(struct mk_event_loop *loop, struct mk_event *event, int mask, @@ -431,6 +490,7 @@ static inline int _mk_event_wait_2(struct mk_event_loop *loop, int timeout) timeout_event = event_new(ctx->base, -1, EV_TIMEOUT, cb_wait_2_timeout, &timedout_flag); + event_add(timeout_event, &timev); /* Blocking wait */ diff --git a/lib/monkey/mk_core/mk_event_select.c b/lib/monkey/mk_core/mk_event_select.c index be118ae3bd3..e326ba85b0b 100644 --- a/lib/monkey/mk_core/mk_event_select.c +++ b/lib/monkey/mk_core/mk_event_select.c @@ -100,6 +100,9 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, { struct mk_event *event; + mk_bug(ctx == NULL); + mk_bug(data == NULL); + if (fd > FD_SETSIZE) { return -1; } @@ -114,10 +117,15 @@ static inline int _mk_event_add(struct mk_event_ctx *ctx, int fd, event = (struct mk_event *) data; event->fd = fd; event->mask = events; - event->priority = MK_EVENT_PRIORITY_DEFAULT; - event->_priority_head.next = NULL; - event->_priority_head.prev = NULL; event->status = MK_EVENT_REGISTERED; + + event->priority = MK_EVENT_PRIORITY_DEFAULT; + + /* Remove from priority queue */ + if (!mk_list_entry_is_orphan(&event->_priority_head)) { + mk_list_del(&event->_priority_head); + } + if (type != MK_EVENT_UNMODIFIED) { event->type = type; } @@ -137,7 +145,10 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event int fd; struct mk_event *s_event; - if ((event->status & MK_EVENT_REGISTERED) == 0) { + mk_bug(ctx == NULL); + mk_bug(event == NULL); + + if (!MK_EVENT_IS_REGISTERED(event)) { return 0; } @@ -169,8 +180,7 @@ static inline int _mk_event_del(struct mk_event_ctx *ctx, struct mk_event *event ctx->events[fd] = NULL; /* Remove from priority queue */ - if (event->_priority_head.next != NULL && - event->_priority_head.prev != NULL) { + if (!mk_list_entry_is_orphan(&event->_priority_head)) { mk_list_del(&event->_priority_head); } @@ -294,6 +304,8 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, int fd[2]; struct mk_event *event; + mk_bug(data == NULL); + ret = pipe(fd); if (ret < 0) { mk_libc_error("pipe"); @@ -320,6 +332,29 @@ static inline int _mk_event_channel_create(struct mk_event_ctx *ctx, return 0; } +static inline int _mk_event_channel_destroy(struct mk_event_ctx *ctx, + int r_fd, int w_fd, void *data) +{ + struct mk_event *event; + int ret; + + + event = (struct mk_event *)data; + if (event->fd != r_fd) { + return -1; + } + + ret = _mk_event_del(ctx, event); + if (ret != 0) { + return ret; + } + + close(r_fd); + close(w_fd); + + return 0; +} + static inline int _mk_event_inject(struct mk_event_loop *loop, struct mk_event *event, int mask, diff --git a/lib/monkey/mk_core/mk_rconf.c b/lib/monkey/mk_core/mk_rconf.c index c6487800bae..bf169d0e804 100644 --- a/lib/monkey/mk_core/mk_rconf.c +++ b/lib/monkey/mk_core/mk_rconf.c @@ -102,6 +102,10 @@ struct mk_rconf *mk_rconf_create(const char *name) /* Alloc configuration node */ conf = mk_mem_alloc_z(sizeof(struct mk_rconf)); + if (!conf) { + perror("malloc"); + return NULL; + } conf->created = time(NULL); conf->file = mk_string_dup(name); mk_list_init(&conf->sections); @@ -152,7 +156,6 @@ static int mk_rconf_meta_add(struct mk_rconf *conf, char *buf, int len) meta = mk_mem_alloc(sizeof(struct mk_rconf_entry)); if (!meta) { - perror("malloc"); return -1; } @@ -250,6 +253,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) /* Allocate temporal buffer to read file content */ buf = mk_mem_alloc(MK_RCONF_KV_SIZE); if (!buf) { + fclose(f); perror("malloc"); return -1; } @@ -271,6 +275,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) */ if (!feof(f)) { mk_config_error(path, line, "Length of content has exceeded limit"); + fclose(f); mk_mem_free(buf); return -1; } @@ -335,12 +340,22 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) /* Create new section */ section = mk_string_copy_substr(buf, 1, end); current = mk_rconf_section_add(conf, section); + if (!current) { + fclose(f); + if (indent) { + mk_mem_free(indent); + } + mk_mem_free(buf); + mk_mem_free(section); + return -1; + } mk_mem_free(section); n_keys = 0; continue; } else { mk_config_error(path, line, "Bad header definition"); + fclose(f); mk_mem_free(buf); return -1; } @@ -364,6 +379,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) /* Validate indentation level */ if (check_indent(buf, indent) < 0) { mk_config_error(path, line, "Invalid indentation level"); + fclose(f); return -1; } @@ -382,6 +398,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) if (!key || !val || i < 0) { mk_config_error(path, line, "Each key must have a value"); + fclose(f); mk_mem_free(key); mk_mem_free(val); return -1; @@ -393,6 +410,7 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) if (strlen(val) == 0) { mk_config_error(path, line, "Key has an empty value"); + fclose(f); mk_mem_free(key); mk_mem_free(val); return -1; @@ -437,7 +455,6 @@ static int mk_rconf_read(struct mk_rconf *conf, const char *path) /* Append this file to the list */ file = mk_mem_alloc(sizeof(struct mk_rconf_file)); if (!file) { - perror("malloc"); conf->level--; return -1; } @@ -621,6 +638,10 @@ struct mk_rconf *mk_rconf_open(const char *path) /* Alloc configuration node */ conf = mk_mem_alloc_z(sizeof(struct mk_rconf)); + if (!conf) { + perror("malloc"); + return NULL; + } conf->created = time(NULL); conf->file = mk_string_dup(path); conf->level = -1; @@ -709,6 +730,9 @@ struct mk_rconf_section *mk_rconf_section_add(struct mk_rconf *conf, /* Alloc section node */ new = mk_mem_alloc(sizeof(struct mk_rconf_section)); + if (!new) { + return NULL; + } new->name = mk_string_dup(name); mk_list_init(&new->entries); mk_list_add(&new->_head, &conf->sections); diff --git a/lib/monkey/mk_core/mk_string.c b/lib/monkey/mk_core/mk_string.c index 43096659b37..b2fdc5714b1 100644 --- a/lib/monkey/mk_core/mk_string.c +++ b/lib/monkey/mk_core/mk_string.c @@ -53,56 +53,37 @@ void *memrchr(const void *s, int c, size_t n) void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) { - uint8_t *null_terminated_haystack_buffer; - uint8_t *null_terminated_needle_buffer; - uint8_t free_haystack_buffer; - uint8_t free_needle_buffer; - void *result; + char *null_terminated_haystack_buffer; + char *null_terminated_needle_buffer; + void *result; result = NULL; - free_haystack_buffer = 0; - free_needle_buffer = 0; - - if(1024 > haystacklen){ - null_terminated_haystack_buffer = (uint8_t *)_alloca(haystacklen + 1); - } - else - { - null_terminated_haystack_buffer = (uint8_t*)malloc(haystacklen + 1); - free_haystack_buffer = 1; - } + null_terminated_haystack_buffer = (char *) calloc(haystacklen + 1, + sizeof(char)); if(NULL != null_terminated_haystack_buffer){ - if(1024 > needlelen){ - null_terminated_needle_buffer = (uint8_t*)_alloca(needlelen + 1); - } - else - { - null_terminated_needle_buffer = (uint8_t*)malloc(needlelen + 1); - free_needle_buffer = 1; - } + null_terminated_needle_buffer = (char *) calloc(needlelen + 1, + sizeof(char)); if(NULL != null_terminated_needle_buffer){ - memset(null_terminated_haystack_buffer, 0, haystacklen + 1); - - memcpy(null_terminated_haystack_buffer, haystack, haystacklen); - - memset(null_terminated_needle_buffer, 0, needlelen + 1); - - memcpy(null_terminated_needle_buffer, needle, needlelen); + strncpy(null_terminated_haystack_buffer, haystack, haystacklen); + strncpy(null_terminated_needle_buffer, needle, needlelen); result = strstr(null_terminated_haystack_buffer, null_terminated_needle_buffer); - if(free_needle_buffer){ - free(null_terminated_needle_buffer); + if (result != NULL) { + result = (void *) + ((((uintptr_t) null_terminated_haystack_buffer) - \ + ((uintptr_t) result)) + + ((uintptr_t) haystack)); } - } - if(free_haystack_buffer){ - free(null_terminated_haystack_buffer); + free(null_terminated_needle_buffer); } + + free(null_terminated_haystack_buffer); } return result; @@ -340,11 +321,15 @@ char *mk_string_dup(const char *s) size_t len; char *p; - if (!s) + if (!s) { return NULL; + } len = strlen(s); p = mk_mem_alloc(len + 1); + if (!p) { + return NULL; + } memcpy(p, s, len); p[len] = '\0'; @@ -364,6 +349,9 @@ struct mk_list *mk_string_split_line(const char *line) } list = mk_mem_alloc(sizeof(struct mk_list)); + if (!list) { + return NULL; + } mk_list_init(list); len = strlen(line); @@ -590,8 +578,9 @@ char *mk_string_copy_substr(const char *string, int pos_init, int pos_end) } size = (unsigned int) (pos_end - pos_init) + 1; - if (size <= 2) + if (size <= 2) { size = 4; + } buffer = mk_mem_alloc(size); @@ -612,6 +601,10 @@ char *mk_string_tolower(const char *in) const char *ip = in; char *op = out; + if (!out) { + return NULL; + } + while (*ip) { *op = tolower(*ip); ip++, op++; diff --git a/lib/monkey/mk_server/mk_clock.c b/lib/monkey/mk_server/mk_clock.c index 5dd04f34f3a..3a45512f2f0 100644 --- a/lib/monkey/mk_server/mk_clock.c +++ b/lib/monkey/mk_server/mk_clock.c @@ -28,17 +28,7 @@ #include #include #include - -pthread_t mk_clock_tid; - -time_t log_current_utime; -time_t monkey_init_time; - -mk_ptr_t log_current_time = { NULL, LOG_TIME_BUFFER_SIZE - 2 }; -mk_ptr_t headers_preset = { NULL, HEADER_PRESET_SIZE - 1 }; - -static char *log_time_buffers[2]; -static char *header_time_buffers[2]; +#include #ifdef _WIN32 static struct tm* localtime_r(const time_t* timep, struct tm* result) @@ -72,18 +62,18 @@ static inline char *_next_buffer(mk_ptr_t *pointer, char **buffers) } } -static void mk_clock_log_set_time(time_t utime) +static void mk_clock_log_set_time(time_t utime, struct mk_server *server) { char *time_string; struct tm result; - time_string = _next_buffer(&log_current_time, log_time_buffers); - log_current_utime = utime; + time_string = _next_buffer(&server->clock_context->log_current_time, server->clock_context->log_time_buffers); + server->clock_context->log_current_utime = utime; strftime(time_string, LOG_TIME_BUFFER_SIZE, "[%d/%b/%G %T %z]", localtime_r(&utime, &result)); - log_current_time.data = time_string; + server->clock_context->log_current_time.data = time_string; } static void mk_clock_headers_preset(time_t utime, struct mk_server *server) @@ -94,7 +84,8 @@ static void mk_clock_headers_preset(time_t utime, struct mk_server *server) struct tm result; char *buffer; - buffer = _next_buffer(&headers_preset, header_time_buffers); + buffer = _next_buffer(&server->clock_context->headers_preset, + server->clock_context->header_time_buffers); gmt_tm = gmtime_r(&utime, &result); @@ -108,8 +99,8 @@ static void mk_clock_headers_preset(time_t utime, struct mk_server *server) MK_CLOCK_GMT_DATEFORMAT, gmt_tm); - headers_preset.data = buffer; - headers_preset.len = len1 + len2; + server->clock_context->headers_preset.data = buffer; + server->clock_context->headers_preset.len = len1 + len2; } void *mk_clock_worker_init(void *data) @@ -121,13 +112,13 @@ void *mk_clock_worker_init(void *data) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - mk_clock_tid = pthread_self(); + server->clock_context->mk_clock_tid = pthread_self(); while (1) { cur_time = time(NULL); if(cur_time != ((time_t)-1)) { - mk_clock_log_set_time(cur_time); + mk_clock_log_set_time(cur_time, server); mk_clock_headers_preset(cur_time, server); } sleep(1); @@ -136,35 +127,45 @@ void *mk_clock_worker_init(void *data) return NULL; } -void mk_clock_exit() +void mk_clock_exit(struct mk_server *server) { - pthread_cancel(mk_clock_tid); - pthread_join(mk_clock_tid, NULL); + pthread_cancel(server->clock_context->mk_clock_tid); + pthread_join(server->clock_context->mk_clock_tid, NULL); - mk_mem_free(header_time_buffers[0]); - mk_mem_free(header_time_buffers[1]); - mk_mem_free(log_time_buffers[0]); - mk_mem_free(log_time_buffers[1]); + mk_mem_free(server->clock_context->header_time_buffers[0]); + mk_mem_free(server->clock_context->header_time_buffers[1]); + mk_mem_free(server->clock_context->log_time_buffers[0]); + mk_mem_free(server->clock_context->log_time_buffers[1]); + + mk_mem_free(server->clock_context); } /* This function must be called before any threads are created */ void mk_clock_sequential_init(struct mk_server *server) { + server->clock_context = mk_mem_alloc_z(sizeof(struct mk_clock_context)); + + if (server->clock_context == NULL) { + return; + } + /* Time when monkey was started */ - monkey_init_time = time(NULL); + server->clock_context->monkey_init_time = time(NULL); - header_time_buffers[0] = mk_mem_alloc_z(HEADER_PRESET_SIZE); - header_time_buffers[1] = mk_mem_alloc_z(HEADER_PRESET_SIZE); + server->clock_context->log_current_time.len = LOG_TIME_BUFFER_SIZE - 2; + server->clock_context->headers_preset.len = HEADER_PRESET_SIZE - 1; - log_time_buffers[0] = mk_mem_alloc_z(LOG_TIME_BUFFER_SIZE); - log_time_buffers[1] = mk_mem_alloc_z(LOG_TIME_BUFFER_SIZE); + server->clock_context->header_time_buffers[0] = mk_mem_alloc_z(HEADER_PRESET_SIZE); + server->clock_context->header_time_buffers[1] = mk_mem_alloc_z(HEADER_PRESET_SIZE); + server->clock_context->log_time_buffers[0] = mk_mem_alloc_z(LOG_TIME_BUFFER_SIZE); + server->clock_context->log_time_buffers[1] = mk_mem_alloc_z(LOG_TIME_BUFFER_SIZE); /* Set the time once */ time_t cur_time = time(NULL); if (cur_time != ((time_t)-1)) { - mk_clock_log_set_time(cur_time); + mk_clock_log_set_time(cur_time, server); mk_clock_headers_preset(cur_time, server); } } diff --git a/lib/monkey/mk_server/mk_fifo.c b/lib/monkey/mk_server/mk_fifo.c index b237bb126a1..fd148db7b4f 100644 --- a/lib/monkey/mk_server/mk_fifo.c +++ b/lib/monkey/mk_server/mk_fifo.c @@ -34,7 +34,7 @@ static struct mk_fifo_worker *mk_fifo_worker_create(struct mk_fifo *ctx, /* Get an ID */ id = mk_list_size(&ctx->workers); - fw = mk_mem_alloc(sizeof(struct mk_fifo_worker)); + fw = mk_mem_alloc_z(sizeof(struct mk_fifo_worker)); if (!fw) { perror("malloc"); return NULL; @@ -152,8 +152,8 @@ int mk_fifo_queue_create(struct mk_fifo *ctx, char *name, /* queue name might need to be truncated if is too long */ len = strlen(name); - if (len > (int) sizeof(name) - 1) { - len = sizeof(name) - 1; + if (len > (int) sizeof(q->name) - 1) { + len = sizeof(q->name) - 1; } /* Validate that name is not a duplicated */ diff --git a/lib/monkey/mk_server/mk_header.c b/lib/monkey/mk_server/mk_header.c index 9e77911269e..cd8f77bdea9 100644 --- a/lib/monkey/mk_server/mk_header.c +++ b/lib/monkey/mk_server/mk_header.c @@ -203,8 +203,8 @@ int mk_header_prepare(struct mk_http_session *cs, struct mk_http_request *sr, * - Date */ mk_iov_add(iov, - headers_preset.data, - headers_preset.len, + server->clock_context->headers_preset.data, + server->clock_context->headers_preset.len, MK_FALSE); /* Last-Modified */ diff --git a/lib/monkey/mk_server/mk_http.c b/lib/monkey/mk_server/mk_http.c index df1a4935f7e..1e2d219ded5 100644 --- a/lib/monkey/mk_server/mk_http.c +++ b/lib/monkey/mk_server/mk_http.c @@ -1113,7 +1113,7 @@ static inline void mk_http_request_ka_next(struct mk_http_session *cs) cs->counter_connections++; /* Update data for scheduler */ - cs->init_time = log_current_utime; + cs->init_time = cs->server->clock_context->log_current_utime; cs->status = MK_REQUEST_STATUS_INCOMPLETE; /* Initialize parser */ diff --git a/lib/monkey/mk_server/mk_lib.c b/lib/monkey/mk_server/mk_lib.c index 4da0b111571..c2940086483 100644 --- a/lib/monkey/mk_server/mk_lib.c +++ b/lib/monkey/mk_server/mk_lib.c @@ -196,8 +196,8 @@ int mk_start(mk_ctx_t *ctx) ctx->worker_tid = tid; /* Wait for the started signal so we can return to the caller */ - mk_event_wait(server->lib_evl); - mk_event_foreach(event, server->lib_evl) { + mk_event_wait(server->lib_evl_start); + mk_event_foreach(event, server->lib_evl_start) { fd = event->fd; /* When using libevent _mk_event_channel_create creates a unix socket @@ -211,29 +211,50 @@ int mk_start(mk_ctx_t *ctx) #endif if (bytes <= 0) { - return -1; + ret = -1; + break; } if (val == MK_SERVER_SIGNAL_START) { - return 0; + ret = 0; + break; } else { - mk_stop(ctx); - return -1; + ret = -1; + break; } } - return 0; + mk_event_loop_destroy(server->lib_evl_start); + if (ret == -1) { + mk_stop(ctx); + } + + return ret; } int mk_stop(mk_ctx_t *ctx) { int n; uint64_t val; + int8_t scheduler_mode ; struct mk_server *server = ctx->server; - /* Send a signal for mk_server_loop_balancer to abort */ + /* Keep track of the scheduler mode on stack, since the + * the worker may free the server before we need the info. + */ + scheduler_mode = server->scheduler_mode; + val = MK_SERVER_SIGNAL_STOP; + + /* Send a stop signal to the main lib channel to abort. + * + * MK_SCHEDULER_FAIR_BALANCING: this signal will be + * consumed by mk_server_loop_balancer. + * + * MK_SCHEDULER_REUSEPORT: this signal will be consumed + * by mk_lib_worker. + */ #ifdef _WIN32 n = send(server->lib_ch_manager[1], &val, sizeof(val), 0); #else @@ -244,18 +265,23 @@ int mk_stop(mk_ctx_t *ctx) return -1; } - sleep(1); + /* In MK_SCHEDULER_FAIR_BALANCING mode, we need one more + * stop signal to abort mk_lib_worker. + */ + if (scheduler_mode == MK_SCHEDULER_FAIR_BALANCING) { + /* Give mk_server_loop_balancer time to clean up. */ + sleep(1); - /* Send a signal for mk_lib_worker to abort */ - val = MK_SERVER_SIGNAL_STOP; + /* Send a signal for mk_lib_worker to abort */ #ifdef _WIN32 - n = send(server->lib_ch_manager[1], &val, sizeof(val), 0); + n = send(server->lib_ch_manager[1], &val, sizeof(val), 0); #else - n = write(server->lib_ch_manager[1], &val, sizeof(val)); + n = write(server->lib_ch_manager[1], &val, sizeof(val)); #endif - if (n <= 0) { - perror("write"); - return -1; + if (n <= 0) { + perror("write"); + return -1; + } } /* Wait for the child thread to exit */ @@ -388,6 +414,7 @@ int mk_config_set(mk_ctx_t *ctx, ...) value = va_arg(va, char *); if (!value) { /* Wrong parameter */ + va_end(va); return -1; } diff --git a/lib/monkey/mk_server/mk_mimetype.c b/lib/monkey/mk_server/mk_mimetype.c index b00fe3143fb..b86b4ef1a05 100644 --- a/lib/monkey/mk_server/mk_mimetype.c +++ b/lib/monkey/mk_server/mk_mimetype.c @@ -72,10 +72,28 @@ int mk_mimetype_add(struct mk_server *server, char *name, const char *type) for ( ; *p; ++p) *p = tolower(*p); new_mime = mk_mem_alloc_z(sizeof(struct mk_mimetype)); + if (!new_mime) { + return -1; + } new_mime->name = mk_string_dup(name); + if (!new_mime->name) { + mk_mem_free(new_mime); + return -1; + } new_mime->type.data = mk_mem_alloc(len); + if (!new_mime->type.data) { + mk_mem_free(new_mime->name); + mk_mem_free(new_mime); + return -1; + } new_mime->type.len = len - 1; new_mime->header_type.data = mk_mem_alloc(len + 32); + if (!new_mime->header_type.data) { + mk_mem_free(new_mime->name); + mk_mem_free(new_mime->type.data); + mk_mem_free(new_mime); + return -1; + } new_mime->header_type.len = snprintf(new_mime->header_type.data, len + 32, "Content-Type: %s\r\n", @@ -97,6 +115,7 @@ int mk_mimetype_add(struct mk_server *server, char *name, const char *type) int mk_mimetype_init(struct mk_server *server) { char *name; + int ret; /* Initialize the heads */ mk_list_init(&server->mimetype_list); @@ -104,10 +123,14 @@ int mk_mimetype_init(struct mk_server *server) name = mk_string_dup(MIMETYPE_DEFAULT_NAME); if (server->mimetype_default_str) { - mk_mimetype_add(server, name, server->mimetype_default_str); + ret = mk_mimetype_add(server, name, server->mimetype_default_str); } else { - mk_mimetype_add(server, name, MIMETYPE_DEFAULT_TYPE); + ret = mk_mimetype_add(server, name, MIMETYPE_DEFAULT_TYPE); + } + if (ret < 0) { + mk_mem_free(name); + return -1; } server->mimetype_default = mk_list_entry_first(&server->mimetype_list, struct mk_mimetype, diff --git a/lib/monkey/mk_server/mk_net.c b/lib/monkey/mk_server/mk_net.c index ff6c1355d59..de183de4870 100644 --- a/lib/monkey/mk_server/mk_net.c +++ b/lib/monkey/mk_server/mk_net.c @@ -201,7 +201,7 @@ int mk_net_conn_write(struct mk_channel *channel, } send = len - total; - bytes = channel->io->write(channel->fd, (uint8_t *)data + total, send); + bytes = channel->io->write(channel->io->plugin, channel->fd, (uint8_t *)data + total, send); if (bytes == -1) { if (errno == EAGAIN) { MK_EVENT_NEW(channel->event); diff --git a/lib/monkey/mk_server/mk_plugin.c b/lib/monkey/mk_server/mk_plugin.c index 862cc2deb9e..50e2886b760 100644 --- a/lib/monkey/mk_server/mk_plugin.c +++ b/lib/monkey/mk_server/mk_plugin.c @@ -40,7 +40,6 @@ enum { static struct plugin_stagemap *plg_stagemap; struct plugin_network_io *plg_netiomap; -struct plugin_api *api; struct mk_plugin *mk_plugin_lookup(char *shortname, struct mk_server *server) { @@ -92,7 +91,8 @@ void *mk_plugin_load_symbol(void *handler, const char *symbol) } /* Initialize a plugin, trigger the init_plugin callback */ -static int mk_plugin_init(struct plugin_api *api, struct mk_plugin *plugin, +static int mk_plugin_init(struct plugin_api *api, + struct mk_plugin *plugin, struct mk_server *server) { int ret; @@ -117,8 +117,14 @@ static int mk_plugin_init(struct plugin_api *api, struct mk_plugin *plugin, path, plugin->shortname); /* Init plugin */ + plugin->api = api; plugin->server_ctx = server; - ret = plugin->init_plugin(&api, conf_dir); + + if (plugin->network != NULL) { + plugin->network->plugin = plugin; + } + + ret = plugin->init_plugin(plugin, conf_dir); mk_mem_free(conf_dir); return ret; @@ -269,6 +275,8 @@ void mk_plugin_unregister(struct mk_plugin *p) void mk_plugin_api_init(struct mk_server *server) { + struct plugin_api *api; + /* Create an instance of the API */ api = mk_mem_alloc_z(sizeof(struct plugin_api)); @@ -392,6 +400,8 @@ void mk_plugin_api_init(struct mk_server *server) /* handler */ api->handler_param_get = mk_handler_param_get; + + server->api = api; } void mk_plugin_load_static(struct mk_server *server) @@ -427,7 +437,7 @@ void mk_plugin_load_all(struct mk_server *server) if (!p) { continue; } - ret = mk_plugin_init(api, p, server); + ret = mk_plugin_init(server->api, p, server); if (ret == -1) { /* Free plugin, do not register, error initializing */ mk_warn("Plugin initialization failed: %s", p->shortname); @@ -489,7 +499,7 @@ void mk_plugin_load_all(struct mk_server *server) continue; } - ret = mk_plugin_init(api, p, server); + ret = mk_plugin_init(server->api, p, server); if (ret < 0) { /* Free plugin, do not register */ MK_TRACE("Unregister plugin '%s'", p->shortname); @@ -533,7 +543,7 @@ void mk_plugin_exit_all(struct mk_server *server) /* Plugins */ mk_list_foreach(head, &server->plugins) { plugin = mk_list_entry(head, struct mk_plugin, _head); - plugin->exit_plugin(); + plugin->exit_plugin(plugin); } /* Plugin interface it self */ @@ -550,8 +560,16 @@ void mk_plugin_exit_all(struct mk_server *server) dlclose(plugin ->handler); #endif } + else if (plugin->load_type == MK_PLUGIN_STATIC) { + if (plugin->network != NULL) { + mk_mem_free(plugin->network); + } + + mk_mem_free(plugin); + } } - mk_mem_free(api); + + mk_mem_free(server->api); mk_mem_free(plg_stagemap); } @@ -691,14 +709,14 @@ void mk_plugin_event_bad_return(const char *hook, int ret) mk_err("[%s] Not allowed return value %i", hook, ret); } -int mk_plugin_time_now_unix() +int mk_plugin_time_now_unix(struct mk_server *server) { - return log_current_utime; + return server->clock_context->log_current_utime; } -mk_ptr_t *mk_plugin_time_now_human() +mk_ptr_t *mk_plugin_time_now_human(struct mk_server *server) { - return &log_current_time; + return &server->clock_context->log_current_time; } int mk_plugin_sched_remove_client(int socket, struct mk_server *server) diff --git a/lib/monkey/mk_server/mk_scheduler.c b/lib/monkey/mk_server/mk_scheduler.c index f7c2ee2e0cd..a680d3cdfe2 100644 --- a/lib/monkey/mk_server/mk_scheduler.c +++ b/lib/monkey/mk_server/mk_scheduler.c @@ -188,7 +188,7 @@ struct mk_sched_conn *mk_sched_add_connection(int remote_fd, /* Close connection, otherwise continue */ if (ret == MK_PLUGIN_RET_CLOSE_CONX) { - listener->network->network->close(remote_fd); + listener->network->network->close(listener->network, remote_fd); MK_LT_SCHED(remote_fd, "PLUGIN_CLOSE"); return NULL; } @@ -214,7 +214,7 @@ struct mk_sched_conn *mk_sched_add_connection(int remote_fd, event->type = MK_EVENT_CONNECTION; event->mask = MK_EVENT_EMPTY; event->status = MK_EVENT_NONE; - conn->arrive_time = log_current_utime; + conn->arrive_time = server->clock_context->log_current_utime; conn->protocol = handler; conn->net = listener->network->network; conn->is_timeout_on = MK_FALSE; @@ -357,7 +357,7 @@ void *mk_sched_launch_worker_loop(void *data) * Create the notification instance and link it to the worker * thread-scope list. */ - notif = mk_mem_alloc(sizeof(struct mk_sched_notif)); + notif = mk_mem_alloc_z(sizeof(struct mk_sched_notif)); MK_TLS_SET(mk_tls_sched_worker_notif, notif); /* Register the scheduler channel to signal active workers */ @@ -543,7 +543,7 @@ int mk_sched_remove_client(struct mk_sched_conn *conn, mk_sched_conn_timeout_del(conn); /* Close at network layer level */ - conn->net->close(event->fd); + conn->net->close(conn->net->plugin, event->fd); /* Release and return */ mk_channel_clean(&conn->channel); @@ -594,7 +594,7 @@ int mk_sched_check_timeouts(struct mk_sched_worker *sched, client_timeout = conn->arrive_time + server->timeout; /* Check timeout */ - if (client_timeout <= log_current_utime) { + if (client_timeout <= server->clock_context->log_current_utime) { MK_TRACE("Scheduler, closing fd %i due TIMEOUT", conn->event.fd); MK_LT_SCHED(conn->event.fd, "TIMEOUT_CONN_PENDING"); diff --git a/lib/monkey/mk_server/mk_server.c b/lib/monkey/mk_server/mk_server.c index 658af12231c..557fe8faf24 100644 --- a/lib/monkey/mk_server/mk_server.c +++ b/lib/monkey/mk_server/mk_server.c @@ -124,7 +124,7 @@ struct mk_sched_conn *mk_server_listen_handler(struct mk_sched_worker *sched, error: if (client_fd != -1) { - listener->network->network->close(client_fd); + listener->network->network->close(listener->network, client_fd); } return NULL; @@ -157,7 +157,7 @@ void mk_server_listen_exit(struct mk_list *list) mk_list_foreach_safe(head, tmp, list) { listen = mk_list_entry(head, struct mk_server_listen, _head); - close(listen->server_fd); + mk_event_closesocket(listen->server_fd); mk_list_del(&listen->_head); mk_mem_free(listen); } @@ -203,7 +203,7 @@ struct mk_list *mk_server_listen_init(struct mk_server *server) #endif } - listener = mk_mem_alloc(sizeof(struct mk_server_listen)); + listener = mk_mem_alloc_z(sizeof(struct mk_server_listen)); /* configure the internal event_state */ event = &listener->event; @@ -420,6 +420,8 @@ void mk_server_loop_balancer(struct mk_server *server) } } } + mk_event_loop_destroy(evl); + mk_server_listen_exit(listeners); } /* @@ -498,7 +500,7 @@ void mk_server_worker_loop(struct mk_server *server) } /* create a new timeout file descriptor */ - server_timeout = mk_mem_alloc(sizeof(struct mk_server_timeout)); + server_timeout = mk_mem_alloc_z(sizeof(struct mk_server_timeout)); MK_TLS_SET(mk_tls_server_timeout, server_timeout); timeout_fd = mk_event_timeout_create(evl, server->timeout, 0, server_timeout); @@ -634,20 +636,19 @@ static int mk_server_lib_notify_started(struct mk_server *server) uint64_t val; /* Check the channel is valid (enabled by library mode) */ - if (server->lib_ch_manager[1] <= 0) { + if (server->lib_ch_start[1] <= 0) { return -1; } val = MK_SERVER_SIGNAL_START; #ifdef _WIN32 - return send(server->lib_ch_manager[1], &val, sizeof(uint64_t), 0); + return send(server->lib_ch_start[1], &val, sizeof(uint64_t), 0); #else - return write(server->lib_ch_manager[1], &val, sizeof(uint64_t)); + return write(server->lib_ch_start[1], &val, sizeof(uint64_t)); #endif } - void mk_server_loop(struct mk_server *server) { uint64_t val; diff --git a/lib/monkey/mk_server/mk_stream.c b/lib/monkey/mk_server/mk_stream.c index 00dec24b671..df0f1b0b81b 100644 --- a/lib/monkey/mk_server/mk_stream.c +++ b/lib/monkey/mk_server/mk_stream.c @@ -27,6 +27,9 @@ struct mk_channel *mk_channel_new(int type, int fd) struct mk_channel *channel; channel = mk_mem_alloc(sizeof(struct mk_channel)); + if (!channel) { + return NULL; + } channel->type = type; channel->fd = fd; channel->status = MK_CHANNEL_OK; diff --git a/lib/monkey/mk_server/monkey.c b/lib/monkey/mk_server/monkey.c index 6a7e0c3fab7..a3e79ede13b 100644 --- a/lib/monkey/mk_server/monkey.c +++ b/lib/monkey/mk_server/monkey.c @@ -122,6 +122,28 @@ struct mk_server *mk_server_create() return NULL; } + /* Library mode: start event loop */ + server->lib_evl_start = mk_event_loop_create(1); + if (!server->lib_evl_start) { + mk_event_loop_destroy(server->lib_evl); + mk_mem_free(server); + return NULL; + } + + memset(&server->lib_ch_start_event, 0, sizeof(struct mk_event)); + + ret = mk_event_channel_create(server->lib_evl_start, + &server->lib_ch_start[0], + &server->lib_ch_start[1], + &server->lib_ch_start_event); + + if (ret != 0) { + mk_event_loop_destroy(server->lib_evl); + mk_event_loop_destroy(server->lib_evl_start); + mk_mem_free(server); + return NULL; + } + /* Initialize linked list heads */ mk_list_init(&server->plugins); mk_list_init(&server->sched_worker_callbacks); @@ -177,8 +199,9 @@ int mk_server_setup(struct mk_server *server) /* Clock init that must happen before starting threads */ mk_clock_sequential_init(server); +printf("MK SERVER SETUP CALLED\n"); /* Load plugins */ - mk_plugin_api_init(); + mk_plugin_api_init(server); mk_plugin_load_all(server); /* Workers: logger and clock */ @@ -212,7 +235,7 @@ void mk_exit_all(struct mk_server *server) /* Continue exiting */ mk_plugin_exit_all(server); - mk_clock_exit(); + mk_clock_exit(server); mk_sched_exit(server); mk_config_free_all(server); diff --git a/lib/monkey/plugins/CMakeLists.txt b/lib/monkey/plugins/CMakeLists.txt index 0217f815d27..a78d836953f 100644 --- a/lib/monkey/plugins/CMakeLists.txt +++ b/lib/monkey/plugins/CMakeLists.txt @@ -56,7 +56,7 @@ macro(MK_BUILD_PLUGIN name) # requires a different handling: link the object and register the plugin # struct reference on mk_static_plugins.h set(static_plugins "${static_plugins}monkey-${name}-static;") - set(STATIC_PLUGINS_INIT "${STATIC_PLUGINS_INIT}\n p = &mk_plugin_${name};\n mk_list_add(&p->_head, plugins);\n") + set(STATIC_PLUGINS_INIT "${STATIC_PLUGINS_INIT}\n mk_static_plugin_attach(plugins, &mk_plugin_${name});\n") set(STATIC_PLUGINS_DECL "${STATIC_PLUGINS_DECL}extern struct mk_plugin mk_plugin_${name};\n") # append message to stdout diff --git a/lib/monkey/plugins/dirlisting/dirlisting.c b/lib/monkey/plugins/dirlisting/dirlisting.c index ff593016219..1ffd3fac465 100644 --- a/lib/monkey/plugins/dirlisting/dirlisting.c +++ b/lib/monkey/plugins/dirlisting/dirlisting.c @@ -185,7 +185,7 @@ int mk_dirhtml_read_config(char *path) section = mk_api->config_section_get(conf, "DIRLISTING"); if (!section) { - mk_err("Could not find DIRLISTING tag in configuration file"); + mk_err_ex(mk_api, "Could not find DIRLISTING tag in configuration file"); exit(EXIT_FAILURE); } @@ -201,8 +201,8 @@ int mk_dirhtml_read_config(char *path) if (mk_api->file_get_info(dirhtml_conf->theme_path, &finfo, MK_FILE_READ) != 0) { - mk_warn("Dirlisting: cannot load theme from '%s'", dirhtml_conf->theme_path); - mk_warn("Dirlisting: unloading plugin"); + mk_warn_ex(mk_api, "Dirlisting: cannot load theme from '%s'", dirhtml_conf->theme_path); + mk_warn_ex(mk_api, "Dirlisting: unloading plugin"); return -1; } @@ -860,18 +860,21 @@ static int mk_dirhtml_init(struct mk_plugin *plugin, return 0; } -int mk_dirlisting_plugin_init(struct plugin_api **api, char *confdir) +int mk_dirlisting_plugin_init(struct mk_plugin *plugin, char *confdir) { - mk_api = *api; + mk_api = plugin->api; return mk_dirhtml_conf(confdir); } -int mk_dirlisting_plugin_exit() +int mk_dirlisting_plugin_exit(struct mk_plugin *plugin) { + (void) plugin; + mk_api->mem_free(dirhtml_conf->theme); mk_api->mem_free(dirhtml_conf->theme_path); mk_api->mem_free(dirhtml_conf); + return 0; } diff --git a/lib/monkey/plugins/liana/liana.c b/lib/monkey/plugins/liana/liana.c index bde6b6ede1b..3bfe288b82c 100644 --- a/lib/monkey/plugins/liana/liana.c +++ b/lib/monkey/plugins/liana/liana.c @@ -39,43 +39,54 @@ #include -int mk_liana_plugin_init(struct plugin_api **api, char *confdir) +int mk_liana_plugin_init(struct mk_plugin *plugin, char *confdir) { (void) confdir; - mk_api = *api; + (void) plugin; + return 0; } -int mk_liana_plugin_exit() +int mk_liana_plugin_exit(struct mk_plugin *plugin) { + (void) plugin; + return 0; } -int mk_liana_read(int socket_fd, void *buf, int count) +int mk_liana_read(struct mk_plugin *plugin, int socket_fd, void *buf, int count) { + (void) plugin; + return recv(socket_fd, (void*)buf, count, 0); } -int mk_liana_write(int socket_fd, const void *buf, size_t count ) +int mk_liana_write(struct mk_plugin *plugin, int socket_fd, const void *buf, size_t count ) { ssize_t bytes_sent = -1; + (void) plugin; + bytes_sent = send(socket_fd, buf, count, 0); return bytes_sent; } -int mk_liana_writev(int socket_fd, struct mk_iov *mk_io) +int mk_liana_writev(struct mk_plugin *plugin, int socket_fd, struct mk_iov *mk_io) { ssize_t bytes_sent = -1; - bytes_sent = mk_api->iov_send(socket_fd, mk_io); + (void) plugin; + + bytes_sent = plugin->api->iov_send(socket_fd, mk_io); return bytes_sent; } -int mk_liana_close(int socket_fd) +int mk_liana_close(struct mk_plugin *plugin, int socket_fd) { + (void) plugin; + #ifdef _WIN32 return closesocket(socket_fd); #else @@ -83,11 +94,13 @@ int mk_liana_close(int socket_fd) #endif } -int mk_liana_send_file(int socket_fd, int file_fd, off_t *file_offset, +int mk_liana_send_file(struct mk_plugin *plugin, int socket_fd, int file_fd, off_t *file_offset, size_t file_count) { ssize_t ret = -1; + (void) plugin; + #if defined (__linux__) ret = sendfile(socket_fd, file_fd, file_offset, file_count); if (ret == -1 && errno != EAGAIN) { diff --git a/lib/monkey/plugins/logger/logger.c b/lib/monkey/plugins/logger/logger.c index fe53143202f..4dfcfb00192 100644 --- a/lib/monkey/plugins/logger/logger.c +++ b/lib/monkey/plugins/logger/logger.c @@ -548,7 +548,7 @@ int mk_logger_stage40(struct mk_http_session *cs, struct mk_http_request *sr) MK_FALSE); /* Date/time when object was requested */ - date = mk_api->time_human(); + date = mk_api->time_human(cs->server); mk_api->iov_add(iov, date->data, date->len, MK_FALSE); diff --git a/lib/monkey/plugins/mandril/mandril.c b/lib/monkey/plugins/mandril/mandril.c index 9b066d7a3a5..e8a988d088b 100644 --- a/lib/monkey/plugins/mandril/mandril.c +++ b/lib/monkey/plugins/mandril/mandril.c @@ -33,7 +33,7 @@ static struct mk_rconf *conf; /* Read database configuration parameters */ -static int mk_security_conf(char *confdir) +static int mk_security_conf(struct mk_plugin *plugin, char *confdir) { int n; int ret = 0; @@ -50,13 +50,13 @@ static int mk_security_conf(char *confdir) struct mk_list *head; /* Read configuration */ - mk_api->str_build(&conf_path, &len, "%s/mandril.conf", confdir); - conf = mk_api->config_open(conf_path); + plugin->api->str_build(&conf_path, &len, "%s/mandril.conf", confdir); + conf = plugin->api->config_open(conf_path); if (!conf) { return -1; } - section = mk_api->config_section_get(conf, "RULES"); + section = plugin->api->config_section_get(conf, "RULES"); if (!section) { return -1; } @@ -66,36 +66,39 @@ static int mk_security_conf(char *confdir) /* Passing to internal struct */ if (strcasecmp(entry->key, "IP") == 0) { - new_ip = mk_api->mem_alloc(sizeof(struct mk_secure_ip_t)); - n = mk_api->str_search(entry->val, "/", 1); + new_ip = plugin->api->mem_alloc(sizeof(struct mk_secure_ip_t)); + n = plugin->api->str_search(entry->val, "/", 1); /* subnet */ if (n > 0) { /* split network addr and netmask */ - _net = mk_api->str_copy_substr(entry->val, 0, n); - _mask = mk_api->str_copy_substr(entry->val, - n + 1, - strlen(entry->val)); + _net = plugin->api->str_copy_substr(entry->val, 0, n); + _mask = plugin->api->str_copy_substr(entry->val, + n + 1, + strlen(entry->val)); /* validations... */ if (!_net || !_mask) { - mk_warn("Mandril: cannot parse entry '%s' in RULES section", - entry->val); + mk_warn_ex(plugin->api, + "Mandril: cannot parse entry '%s' in RULES section", + entry->val); goto ip_next; } /* convert ip string to network address */ if (inet_aton(_net, &new_ip->ip) == 0) { - mk_warn("Mandril: invalid ip address '%s' in RULES section", - entry->val); + mk_warn_ex(plugin->api, + "Mandril: invalid ip address '%s' in RULES section", + entry->val); goto ip_next; } /* parse mask */ new_ip->netmask = strtol(_mask, (char **) NULL, 10); if (new_ip->netmask <= 0 || new_ip->netmask >= 32) { - mk_warn("Mandril: invalid mask value '%s' in RULES section", - entry->val); + mk_warn_ex(plugin->api, + "Mandril: invalid mask value '%s' in RULES section", + entry->val); goto ip_next; } @@ -114,18 +117,19 @@ static int mk_security_conf(char *confdir) */ ip_next: if (_net) { - mk_api->mem_free(_net); + plugin->api->mem_free(_net); } if (_mask) { - mk_api->mem_free(_mask); + plugin->api->mem_free(_mask); } } else { /* normal IP address */ /* convert ip string to network address */ if (inet_aton(entry->val, &new_ip->ip) == 0) { - mk_warn("Mandril: invalid ip address '%s' in RULES section", - entry->val); + mk_warn_ex(plugin->api, + "Mandril: invalid ip address '%s' in RULES section", + entry->val); } else { new_ip->is_subnet = MK_FALSE; @@ -135,21 +139,22 @@ static int mk_security_conf(char *confdir) } else if (strcasecmp(entry->key, "URL") == 0) { /* simple allcotion and data association */ - new_url = mk_api->mem_alloc(sizeof(struct mk_secure_url_t)); + new_url = plugin->api->mem_alloc(sizeof(struct mk_secure_url_t)); new_url->criteria = entry->val; /* link node with main list */ mk_list_add(&new_url->_head, &mk_secure_url); } else if (strcasecmp(entry->key, "deny_hotlink") == 0) { - new_deny_hotlink = mk_api->mem_alloc(sizeof(*new_deny_hotlink)); + new_deny_hotlink = plugin->api->mem_alloc(sizeof(*new_deny_hotlink)); new_deny_hotlink->criteria = entry->val; mk_list_add(&new_deny_hotlink->_head, &mk_secure_deny_hotlink); } } - mk_api->mem_free(conf_path); + plugin->api->mem_free(conf_path); + return ret; } @@ -196,7 +201,7 @@ static int mk_security_check_ip(int socket) } /* Check if the incoming URL is restricted for some rule */ -static int mk_security_check_url(mk_ptr_t url) +static int mk_security_check_url(struct mk_plugin *plugin, mk_ptr_t url) { int n; struct mk_list *head; @@ -204,7 +209,7 @@ static int mk_security_check_url(mk_ptr_t url) mk_list_foreach(head, &mk_secure_url) { entry = mk_list_entry(head, struct mk_secure_url_t, _head); - n = mk_api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.len); + n = plugin->api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.len); if (n >= 0) { return -1; } @@ -247,7 +252,8 @@ mk_ptr_t parse_referer_host(struct mk_http_header *header) return host; } -static int mk_security_check_hotlink(mk_ptr_t url, mk_ptr_t host, +static int mk_security_check_hotlink(struct mk_plugin *plugin, + mk_ptr_t url, mk_ptr_t host, struct mk_http_header *referer) { mk_ptr_t ref_host = parse_referer_host(referer); @@ -261,13 +267,13 @@ static int mk_security_check_hotlink(mk_ptr_t url, mk_ptr_t host, return 0; } else if (host.data == NULL) { - mk_err("No host data."); + mk_err_ex(plugin->api, "No host data."); return -1; } mk_list_foreach(head, &mk_secure_url) { entry = mk_list_entry(head, struct mk_secure_deny_hotlink_t, _head); - i = mk_api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.len); + i = plugin->api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.len); if (i >= 0) { break; } @@ -310,17 +316,16 @@ static int mk_security_check_hotlink(mk_ptr_t url, mk_ptr_t host, return domains_matched >= 2 ? 0 : -1; } -int mk_mandril_plugin_init(struct plugin_api **api, char *confdir) +int mk_mandril_plugin_init(struct mk_plugin *plugin, char *confdir) { - mk_api = *api; - /* Init security lists */ mk_list_init(&mk_secure_ip); mk_list_init(&mk_secure_url); mk_list_init(&mk_secure_deny_hotlink); /* Read configuration */ - mk_security_conf(confdir); + mk_security_conf(plugin, confdir); + return 0; } @@ -355,18 +360,18 @@ int mk_mandril_stage30(struct mk_plugin *p, PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket); - if (mk_security_check_url(sr->uri_processed) < 0) { + if (mk_security_check_url(p, sr->uri_processed) < 0) { PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket); - mk_api->header_set_http_status(sr, MK_CLIENT_FORBIDDEN); + p->api->header_set_http_status(sr, MK_CLIENT_FORBIDDEN); return MK_PLUGIN_RET_CLOSE_CONX; } PLUGIN_TRACE("[FD %d] Mandril validating hotlinking", cs->socket); - header = mk_api->header_get(MK_HEADER_REFERER, sr, NULL, 0); - if (mk_security_check_hotlink(sr->uri_processed, sr->host, header) < 0) { + header = p->api->header_get(MK_HEADER_REFERER, sr, NULL, 0); + if (mk_security_check_hotlink(p, sr->uri_processed, sr->host, header) < 0) { PLUGIN_TRACE("[FD %i] Close connection, deny hotlinking.", cs->socket); - mk_api->header_set_http_status(sr, MK_CLIENT_FORBIDDEN); + p->api->header_set_http_status(sr, MK_CLIENT_FORBIDDEN); return MK_PLUGIN_RET_CLOSE_CONX; } From 9112100763b83fe16af3ae8fcfa7233141f14bf0 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Tue, 20 Dec 2022 12:15:09 -0600 Subject: [PATCH 39/74] lib: chunkio: upgrade to v1.4.0 Signed-off-by: Eduardo Silva --- lib/chunkio/CMakeLists.txt | 2 +- lib/chunkio/include/chunkio/chunkio.h | 17 +++++--- lib/chunkio/include/chunkio/cio_chunk.h | 1 + lib/chunkio/include/chunkio/cio_error.h | 7 ++-- lib/chunkio/include/chunkio/cio_file.h | 1 + lib/chunkio/include/chunkio/cio_file_native.h | 1 + lib/chunkio/src/cio_chunk.c | 40 +++++++++++++++++++ lib/chunkio/src/cio_error.c | 4 ++ lib/chunkio/src/cio_file.c | 34 +++++++++++++++- lib/chunkio/src/cio_file_unix.c | 15 +++++++ lib/chunkio/src/cio_file_win32.c | 15 +++++++ lib/chunkio/src/cio_scan.c | 15 +++++++ 12 files changed, 141 insertions(+), 11 deletions(-) diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt index e71c224bc92..233bce35c10 100644 --- a/lib/chunkio/CMakeLists.txt +++ b/lib/chunkio/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(chunk-io) set(CIO_VERSION_MAJOR 1) -set(CIO_VERSION_MINOR 3) +set(CIO_VERSION_MINOR 4) set(CIO_VERSION_PATCH 0) set(CIO_VERSION_STR "${CIO_VERSION_MAJOR}.${CIO_VERSION_MINOR}.${CIO_VERSION_PATCH}") diff --git a/lib/chunkio/include/chunkio/chunkio.h b/lib/chunkio/include/chunkio/chunkio.h index 6d5182ada0c..6dff9edb08d 100644 --- a/lib/chunkio/include/chunkio/chunkio.h +++ b/lib/chunkio/include/chunkio/chunkio.h @@ -38,11 +38,12 @@ #define CIO_STORE_MEM 1 /* flags */ -#define CIO_OPEN 1 /* open/create file reference */ -#define CIO_OPEN_RW CIO_OPEN /* new name for read/write mode */ -#define CIO_OPEN_RD 2 /* open and read/mmap content if exists */ -#define CIO_CHECKSUM 4 /* enable checksum verification (crc32) */ -#define CIO_FULL_SYNC 8 /* force sync to fs through MAP_SYNC */ +#define CIO_OPEN 1 /* open/create file reference */ +#define CIO_OPEN_RW CIO_OPEN /* new name for read/write mode */ +#define CIO_OPEN_RD 2 /* open and read/mmap content if exists */ +#define CIO_CHECKSUM 4 /* enable checksum verification (crc32) */ +#define CIO_FULL_SYNC 8 /* force sync to fs through MAP_SYNC */ +#define CIO_DELETE_IRRECOVERABLE 16 /* delete irrecoverable chunks from disk */ /* Return status */ #define CIO_CORRUPTED -3 /* Indicate that a chunk is corrupted */ @@ -92,6 +93,12 @@ struct cio_ctx { /* streams */ struct mk_list streams; + + /* errors */ + int last_chunk_error; /* this field is necessary to discard irrecoverable + * chunks in cio_scan_stream_files, it's not the + * best approach but the only at the moment. + */ }; #include diff --git a/lib/chunkio/include/chunkio/cio_chunk.h b/lib/chunkio/include/chunkio/cio_chunk.h index 4a1b9283925..369401bf8f8 100644 --- a/lib/chunkio/include/chunkio/cio_chunk.h +++ b/lib/chunkio/include/chunkio/cio_chunk.h @@ -54,6 +54,7 @@ struct cio_chunk *cio_chunk_open(struct cio_ctx *ctx, struct cio_stream *st, const char *name, int flags, size_t size, int *err); void cio_chunk_close(struct cio_chunk *ch, int delete); +int cio_chunk_delete(struct cio_ctx *ctx, struct cio_stream *st, const char *name); int cio_chunk_write(struct cio_chunk *ch, const void *buf, size_t count); int cio_chunk_write_at(struct cio_chunk *ch, off_t offset, const void *buf, size_t count); diff --git a/lib/chunkio/include/chunkio/cio_error.h b/lib/chunkio/include/chunkio/cio_error.h index 327c23826c0..faec5407329 100644 --- a/lib/chunkio/include/chunkio/cio_error.h +++ b/lib/chunkio/include/chunkio/cio_error.h @@ -26,9 +26,10 @@ /* * Error status (do not confuse with return statuses!) */ -#define CIO_ERR_BAD_CHECKSUM -10 /* Chunk has a bad checksum */ -#define CIO_ERR_BAD_LAYOUT -11 /* Bad magic bytes or general layout */ -#define CIO_ERR_PERMISSION -12 /* Permission error */ +#define CIO_ERR_BAD_CHECKSUM -10 /* Chunk has a bad checksum */ +#define CIO_ERR_BAD_LAYOUT -11 /* Bad magic bytes or general layout */ +#define CIO_ERR_PERMISSION -12 /* Permission error */ +#define CIO_ERR_BAD_FILE_SIZE -13 /* Chunk has a bad file size */ char *cio_error_get_str(struct cio_chunk *ch); int cio_error_get(struct cio_chunk *ch); diff --git a/lib/chunkio/include/chunkio/cio_file.h b/lib/chunkio/include/chunkio/cio_file.h index 8820ff68030..d75b14c3a30 100644 --- a/lib/chunkio/include/chunkio/cio_file.h +++ b/lib/chunkio/include/chunkio/cio_file.h @@ -57,6 +57,7 @@ struct cio_file *cio_file_open(struct cio_ctx *ctx, size_t size, int *err); void cio_file_close(struct cio_chunk *ch, int delete); +int cio_file_delete(struct cio_ctx *ctx, struct cio_stream *st, const char *name); int cio_file_write(struct cio_chunk *ch, const void *buf, size_t count); int cio_file_write_metadata(struct cio_chunk *ch, char *buf, size_t size); int cio_file_sync(struct cio_chunk *ch); diff --git a/lib/chunkio/include/chunkio/cio_file_native.h b/lib/chunkio/include/chunkio/cio_file_native.h index f5dcd7338d0..1658495fdb9 100644 --- a/lib/chunkio/include/chunkio/cio_file_native.h +++ b/lib/chunkio/include/chunkio/cio_file_native.h @@ -49,6 +49,7 @@ int cio_file_native_filename_check(char *name); int cio_file_native_open(struct cio_file *cf); int cio_file_native_close(struct cio_file *cf); int cio_file_native_delete(struct cio_file *cf); +int cio_file_native_delete_by_path(const char *path); int cio_file_native_sync(struct cio_file *cf, int sync_mode); int cio_file_native_resize(struct cio_file *cf, size_t new_size); diff --git a/lib/chunkio/src/cio_chunk.c b/lib/chunkio/src/cio_chunk.c index 8916a725798..7917cd2a8dc 100644 --- a/lib/chunkio/src/cio_chunk.c +++ b/lib/chunkio/src/cio_chunk.c @@ -137,6 +137,46 @@ void cio_chunk_close(struct cio_chunk *ch, int delete) cio_chunk_counter_total_sub(ctx); } +int cio_chunk_delete(struct cio_ctx *ctx, struct cio_stream *st, const char *name) +{ + int result; + + if (st == NULL) { + cio_log_error(ctx, "[cio chunk] invalid stream"); + + return CIO_ERROR; + } + + if (name == NULL) { + cio_log_error(ctx, "[cio chunk] invalid file name"); + + return CIO_ERROR; + } + + if (strlen(name) == 0) { + cio_log_error(ctx, "[cio chunk] invalid file name"); + + return CIO_ERROR; + } + +#ifndef CIO_HAVE_BACKEND_FILESYSTEM + if (st->type == CIO_STORE_FS) { + cio_log_error(ctx, "[cio chunk] file system backend not supported"); + + return CIO_ERROR; + } +#endif + + if (st->type == CIO_STORE_FS) { + result = cio_file_delete(ctx, st, name); + } + else { + result = CIO_ERROR; + } + + return result; +} + /* * Write at a specific offset of the content area. Offset must be >= 0 and * less than current data length. diff --git a/lib/chunkio/src/cio_error.c b/lib/chunkio/src/cio_error.c index 2e6b507e8d2..9049b0a3fd3 100644 --- a/lib/chunkio/src/cio_error.c +++ b/lib/chunkio/src/cio_error.c @@ -46,6 +46,10 @@ int cio_error_get(struct cio_chunk *ch) void cio_error_set(struct cio_chunk *ch, int status) { ch->error_n = status; + + if (ch->ctx != NULL) { + ch->ctx->last_chunk_error = status; + } } /* Reset the error number in a chunk */ diff --git a/lib/chunkio/src/cio_file.c b/lib/chunkio/src/cio_file.c index 4737c9f7589..786a022e927 100644 --- a/lib/chunkio/src/cio_file.c +++ b/lib/chunkio/src/cio_file.c @@ -209,7 +209,7 @@ static int cio_file_format_check(struct cio_chunk *ch, if (p[0] != CIO_FILE_ID_00 || p[1] != CIO_FILE_ID_01) { cio_log_debug(ch->ctx, "[cio file] invalid header at %s", ch->name); - cio_error_set(ch, CIO_ERR_PERMISSION); + cio_error_set(ch, CIO_ERR_BAD_LAYOUT); return -1; } @@ -330,6 +330,7 @@ static int mmap_file(struct cio_ctx *ctx, struct cio_chunk *ch, size_t size) /* We can only prepare a file if it has been opened in RW mode */ if ((cf->flags & CIO_OPEN_RW) == 0) { cio_error_set(ch, CIO_ERR_PERMISSION); + return CIO_CORRUPTED; } @@ -351,7 +352,6 @@ static int mmap_file(struct cio_ctx *ctx, struct cio_chunk *ch, size_t size) return CIO_ERROR; } - cio_log_debug(ctx, "%s:%s adjusting size OK", ch->st->name, ch->name); } @@ -371,6 +371,8 @@ static int mmap_file(struct cio_ctx *ctx, struct cio_chunk *ch, size_t size) content_size = cio_file_st_get_content_size(cf->map, fs_size); if (content_size == -1) { + cio_error_set(ch, CIO_ERR_BAD_FILE_SIZE); + cio_log_error(ctx, "invalid content size %s", cf->path); cio_file_native_unmap(cf); @@ -688,6 +690,34 @@ struct cio_file *cio_file_open(struct cio_ctx *ctx, return cf; } +/* This function is used to delete a chunk by name, its only purpose is to delete + * chunks that cannnot be loaded (otherwise we would set them down with the delete + * flag set to TRUE). + */ +int cio_file_delete(struct cio_ctx *ctx, struct cio_stream *st, const char *name) +{ + char *path; + int ret; + + ret = cio_file_native_filename_check(name); + if (ret != CIO_OK) { + cio_log_error(ctx, "[cio file] invalid file name"); + + return CIO_ERROR; + } + + path = cio_file_native_compose_path(ctx->options.root_path, st->name, name); + if (path == NULL) { + return CIO_ERROR; + } + + ret = cio_file_native_delete_by_path(path); + + free(path); + + return ret; +} + /* * Put a file content back into memory, only IF it has been set 'down' * before. diff --git a/lib/chunkio/src/cio_file_unix.c b/lib/chunkio/src/cio_file_unix.c index 100c0618fe7..a9ef6056fbe 100644 --- a/lib/chunkio/src/cio_file_unix.c +++ b/lib/chunkio/src/cio_file_unix.c @@ -438,6 +438,21 @@ int cio_file_native_close(struct cio_file *cf) return CIO_OK; } +int cio_file_native_delete_by_path(const char *path) +{ + int result; + + result = unlink(path); + + if (result == -1) { + cio_file_native_report_os_error(); + + return CIO_ERROR; + } + + return CIO_OK; +} + int cio_file_native_delete(struct cio_file *cf) { int result; diff --git a/lib/chunkio/src/cio_file_win32.c b/lib/chunkio/src/cio_file_win32.c index 5feb06c0e34..18044c40467 100644 --- a/lib/chunkio/src/cio_file_win32.c +++ b/lib/chunkio/src/cio_file_win32.c @@ -455,6 +455,21 @@ int cio_file_native_close(struct cio_file *cf) return CIO_OK; } +int cio_file_native_delete_by_path(const char *path) +{ + int result; + + result = DeleteFileA(path); + + if (result == 0) { + cio_file_native_report_os_error(); + + return CIO_ERROR; + } + + return CIO_OK; +} + int cio_file_native_delete(struct cio_file *cf) { int result; diff --git a/lib/chunkio/src/cio_scan.c b/lib/chunkio/src/cio_scan.c index 83d91f3187c..5c90641dfcf 100644 --- a/lib/chunkio/src/cio_scan.c +++ b/lib/chunkio/src/cio_scan.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #ifdef _WIN32 @@ -98,8 +99,22 @@ static int cio_scan_stream_files(struct cio_ctx *ctx, struct cio_stream *st, } } + ctx->last_chunk_error = 0; + /* register every directory as a stream */ cio_chunk_open(ctx, st, ent->d_name, ctx->options.flags, 0, &err); + + if (ctx->options.flags & CIO_DELETE_IRRECOVERABLE) { + if (err == CIO_CORRUPTED) { + if (ctx->last_chunk_error == CIO_ERR_BAD_FILE_SIZE || + ctx->last_chunk_error == CIO_ERR_BAD_LAYOUT) + { + cio_log_error(ctx, "[cio scan] discarding irrecoverable chunk"); + + cio_chunk_delete(ctx, st, ent->d_name); + } + } + } } closedir(dir); From 7b35f054b5669336273f29e4f06063ddb286262c Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Thu, 1 Jun 2023 15:24:59 -0700 Subject: [PATCH 40/74] aws distro lib upgrades: libbacktrace to 8602fda, cfl to v0.2.3, onigmo to 2bfee1eaf526ec2309822243a976cc792d99fbc3, lib: upgrade to 4bd9260 Signed-off-by: Wesley Pettit --- CMakeLists.txt | 4 +- cmake/libraries.cmake | 2 +- lib/c-ares-1.18.1/RELEASE-NOTES | 85 - lib/c-ares-1.18.1/config.sub | 1801 --- lib/c-ares-1.18.1/src/lib/ares_library_init.h | 43 - lib/c-ares-1.18.1/src/lib/ares_strsplit.c | 178 - lib/c-ares-1.18.1/test/config.sub | 1801 --- lib/{c-ares-1.18.1 => c-ares-1.19.0}/AUTHORS | 0 lib/{c-ares-1.18.1 => c-ares-1.19.0}/CHANGES | 607 +- .../CMakeLists.txt | 19 +- .../CONTRIBUTING.md | 0 .../INSTALL.md | 14 + .../LICENSE.md | 0 .../Makefile.Watcom | 0 .../Makefile.am | 0 .../Makefile.dj | 0 .../Makefile.in | 1 + .../Makefile.m32 | 0 .../Makefile.msvc | 0 .../Makefile.netware | 0 lib/{c-ares-1.18.1 => c-ares-1.19.0}/NEWS | 0 .../README.cares | 0 .../README.md | 2 +- .../README.msvc | 0 lib/c-ares-1.19.0/RELEASE-NOTES | 91 + .../SECURITY.md | 0 lib/{c-ares-1.18.1 => c-ares-1.19.0}/TODO | 0 .../acinclude.m4 | 0 .../aclocal.m4 | 0 .../aminclude_static.am | 2 +- .../buildconf | 0 .../buildconf.bat | 0 .../c-ares-config.cmake.in | 13 +- lib/{c-ares-1.18.1 => c-ares-1.19.0}/compile | 0 .../test => c-ares-1.19.0}/config.guess | 1500 +-- lib/c-ares-1.19.0/config.sub | 1890 ++++ .../configure | 474 +- .../configure.ac | 6 +- lib/{c-ares-1.18.1 => c-ares-1.19.0}/depcomp | 0 .../docs/CMakeLists.txt | 0 .../docs/Makefile.am | 0 .../docs/Makefile.in | 1 + .../docs/Makefile.inc | 0 .../docs/acountry.1 | 2 +- .../docs/adig.1 | 24 +- .../docs/ahost.1 | 2 +- .../docs/ares_cancel.3 | 0 .../docs/ares_create_query.3 | 0 .../docs/ares_destroy.3 | 0 .../docs/ares_destroy_options.3 | 6 +- .../docs/ares_dup.3 | 6 +- .../docs/ares_expand_name.3 | 10 +- .../docs/ares_expand_string.3 | 10 +- .../docs/ares_fds.3 | 0 .../docs/ares_free_data.3 | 8 +- .../docs/ares_free_hostent.3 | 6 +- .../docs/ares_free_string.3 | 6 +- .../docs/ares_freeaddrinfo.3 | 0 .../docs/ares_get_servers.3 | 11 +- .../docs/ares_get_servers_ports.3 | 0 .../docs/ares_getaddrinfo.3 | 18 +- .../docs/ares_gethostbyaddr.3 | 17 +- .../docs/ares_gethostbyname.3 | 16 +- .../docs/ares_gethostbyname_file.3 | 8 +- .../docs/ares_getnameinfo.3 | 17 +- .../docs/ares_getsock.3 | 8 +- .../docs/ares_inet_ntop.3 | 8 +- .../docs/ares_inet_pton.3 | 6 +- .../docs/ares_init.3 | 0 .../docs/ares_init_options.3 | 21 +- .../docs/ares_library_cleanup.3 | 0 .../docs/ares_library_init.3 | 3 +- .../docs/ares_library_init_android.3 | 0 .../docs/ares_library_initialized.3 | 0 .../docs/ares_mkquery.3 | 10 +- .../docs/ares_parse_a_reply.3 | 10 +- .../docs/ares_parse_aaaa_reply.3 | 10 +- .../docs/ares_parse_caa_reply.3 | 0 .../docs/ares_parse_mx_reply.3 | 9 +- .../docs/ares_parse_naptr_reply.3 | 8 +- .../docs/ares_parse_ns_reply.3 | 8 +- .../docs/ares_parse_ptr_reply.3 | 10 +- .../docs/ares_parse_soa_reply.3 | 8 +- .../docs/ares_parse_srv_reply.3 | 8 +- .../docs/ares_parse_txt_reply.3 | 14 +- .../docs/ares_parse_uri_reply.3 | 8 +- .../docs/ares_process.3 | 2 +- .../docs/ares_query.3 | 17 +- .../docs/ares_save_options.3 | 7 +- .../docs/ares_search.3 | 17 +- .../docs/ares_send.3 | 15 +- .../docs/ares_set_local_dev.3 | 6 +- .../docs/ares_set_local_ip4.3 | 6 +- .../docs/ares_set_local_ip6.3 | 14 +- .../docs/ares_set_servers.3 | 11 +- .../docs/ares_set_servers_csv.3 | 9 +- .../docs/ares_set_servers_ports.3 | 0 .../docs/ares_set_servers_ports_csv.3 | 0 .../docs/ares_set_socket_callback.3 | 14 +- .../docs/ares_set_socket_configure_callback.3 | 16 +- .../docs/ares_set_socket_functions.3 | 25 +- .../docs/ares_set_sortlist.3 | 6 +- .../docs/ares_strerror.3 | 6 +- .../docs/ares_timeout.3 | 0 .../docs/ares_version.3 | 0 .../get_ver.awk | 0 .../include/CMakeLists.txt | 0 .../include/Makefile.am | 0 .../include/Makefile.in | 1 + .../include/ares.h | 9 + .../include/ares_build.h | 0 .../include/ares_build.h.cmake | 0 .../include/ares_build.h.in | 0 .../include/ares_dns.h | 0 .../include/ares_nameser.h | 0 .../include/ares_rules.h | 0 .../include/ares_version.h | 6 +- .../install-sh | 0 .../libcares.pc.cmake | 7 +- .../libcares.pc.in | 0 .../ltmain.sh | 827 +- .../m4/ax_ac_append_to_file.m4 | 0 .../m4/ax_ac_print_to_file.m4 | 0 .../m4/ax_add_am_macro_static.m4 | 0 .../m4/ax_am_macros_static.m4 | 0 .../m4/ax_check_gnu_make.m4 | 0 .../m4/ax_check_user_namespace.m4 | 0 .../m4/ax_check_uts_namespace.m4 | 0 .../m4/ax_code_coverage.m4 | 0 .../m4/ax_cxx_compile_stdcxx_11.m4 | 0 .../m4/ax_file_escapes.m4 | 0 .../m4/ax_pthread.m4 | 0 .../m4/ax_require_defined.m4 | 0 .../m4/cares-compilers.m4 | 4 +- .../m4/cares-confopts.m4 | 0 .../m4/cares-functions.m4 | 0 .../m4/cares-reentrant.m4 | 0 .../m4/libtool.m4 | 229 +- .../m4/ltoptions.m4 | 4 +- .../m4/ltsugar.m4 | 2 +- .../m4/ltversion.m4 | 13 +- .../m4/lt~obsolete.m4 | 4 +- .../m4/xc-am-iface.m4 | 0 .../m4/xc-cc-check.m4 | 0 .../m4/xc-lt-iface.m4 | 0 .../m4/xc-translit.m4 | 0 .../m4/xc-val-flgs.m4 | 0 .../m4/zz40-xc-ovr.m4 | 0 lib/{c-ares-1.18.1 => c-ares-1.19.0}/maketgz | 0 lib/{c-ares-1.18.1 => c-ares-1.19.0}/missing | 0 .../msvc_ver.inc | 0 .../src/CMakeLists.txt | 0 .../src/Makefile.am | 0 .../src/Makefile.in | 1 + .../src/lib/CMakeLists.txt | 5 + .../src/lib/Makefile.am | 0 .../src/lib/Makefile.in | 4 +- .../src/lib/Makefile.inc | 1 - .../src/lib/ares__addrinfo2hostent.c | 0 .../src/lib/ares__addrinfo_localhost.c | 0 .../src/lib/ares__close_sockets.c | 0 .../src/lib/ares__get_hostent.c | 0 .../src/lib/ares__parse_into_addrinfo.c | 0 .../src/lib/ares__read_line.c | 0 .../src/lib/ares__readaddrinfo.c | 9 +- .../src/lib/ares__sortaddrinfo.c | 0 .../src/lib/ares__timeval.c | 0 .../src/lib/ares_android.c | 0 .../src/lib/ares_android.h | 0 .../src/lib/ares_cancel.c | 0 .../src/lib/ares_config.h.cmake | 0 .../src/lib/ares_config.h.in | 0 .../src/lib/ares_create_query.c | 0 .../src/lib/ares_data.c | 0 .../src/lib/ares_data.h | 5 + .../src/lib/ares_destroy.c | 5 + .../src/lib/ares_expand_name.c | 6 +- .../src/lib/ares_expand_string.c | 0 .../src/lib/ares_fds.c | 0 .../src/lib/ares_free_hostent.c | 0 .../src/lib/ares_free_string.c | 0 .../src/lib/ares_freeaddrinfo.c | 0 .../src/lib/ares_getaddrinfo.c | 60 +- .../src/lib/ares_getenv.c | 0 .../src/lib/ares_getenv.h | 0 .../src/lib/ares_gethostbyaddr.c | 0 .../src/lib/ares_gethostbyname.c | 0 .../src/lib/ares_getnameinfo.c | 0 .../src/lib/ares_getsock.c | 0 .../src/lib/ares_inet_net_pton.h | 0 .../src/lib/ares_init.c | 521 +- .../src/lib/ares_iphlpapi.h | 0 .../src/lib/ares_ipv6.h | 0 .../src/lib/ares_library_init.c | 91 +- .../src/lib/ares_llist.c | 0 .../src/lib/ares_llist.h | 0 .../src/lib/ares_mkquery.c | 0 .../src/lib/ares_nowarn.c | 0 .../src/lib/ares_nowarn.h | 0 .../src/lib/ares_options.c | 0 .../src/lib/ares_parse_a_reply.c | 0 .../src/lib/ares_parse_aaaa_reply.c | 0 .../src/lib/ares_parse_caa_reply.c | 0 .../src/lib/ares_parse_mx_reply.c | 0 .../src/lib/ares_parse_naptr_reply.c | 0 .../src/lib/ares_parse_ns_reply.c | 0 .../src/lib/ares_parse_ptr_reply.c | 0 .../src/lib/ares_parse_soa_reply.c | 0 .../src/lib/ares_parse_srv_reply.c | 0 .../src/lib/ares_parse_txt_reply.c | 0 .../src/lib/ares_parse_uri_reply.c | 0 .../src/lib/ares_platform.c | 0 .../src/lib/ares_platform.h | 0 .../src/lib/ares_private.h | 3 + .../src/lib/ares_process.c | 13 + .../src/lib/ares_query.c | 0 .../src/lib/ares_search.c | 0 .../src/lib/ares_send.c | 0 .../src/lib/ares_setup.h | 0 .../src/lib/ares_strcasecmp.c | 0 .../src/lib/ares_strcasecmp.h | 0 .../src/lib/ares_strdup.c | 0 .../src/lib/ares_strdup.h | 0 .../src/lib/ares_strerror.c | 0 lib/c-ares-1.19.0/src/lib/ares_strsplit.c | 100 + .../src/lib/ares_strsplit.h | 19 +- .../src/lib/ares_timeout.c | 0 .../src/lib/ares_version.c | 0 .../src/lib/ares_writev.c | 0 .../src/lib/ares_writev.h | 0 .../src/lib/bitncmp.c | 0 .../src/lib/bitncmp.h | 0 .../src/lib/cares.rc | 0 .../src/lib/config-dos.h | 0 .../src/lib/config-win32.h | 0 .../src/lib/inet_net_pton.c | 0 .../src/lib/inet_ntop.c | 0 .../src/lib/setup_once.h | 0 .../src/lib/windows_port.c | 0 .../src/tools/CMakeLists.txt | 0 .../src/tools/Makefile.am | 4 +- .../src/tools/Makefile.in | 16 +- .../src/tools/Makefile.inc | 0 .../src/tools/acountry.c | 11 +- .../src/tools/adig.c | 39 +- .../src/tools/ahost.c | 23 +- .../src/tools/ares_getopt.c | 0 .../src/tools/ares_getopt.h | 0 .../test/CMakeLists.txt | 0 .../test/Makefile.am | 10 +- .../test/Makefile.in | 30 +- .../test/Makefile.inc | 0 .../test/Makefile.m32 | 0 .../test/Makefile.msvc | 0 .../test/README.md | 0 .../test/aclocal.m4 | 0 .../test/aminclude_static.am | 2 +- .../test/ares-fuzz.c | 0 .../test/ares-test-ai.h | 0 .../test/ares-test-fuzz-name.c | 0 .../test/ares-test-fuzz.c | 0 .../test/ares-test-init.cc | 33 + .../test/ares-test-internal.cc | 42 + .../test/ares-test-live.cc | 29 + .../test/ares-test-main.cc | 0 .../test/ares-test-misc.cc | 0 .../test/ares-test-mock-ai.cc | 0 .../test/ares-test-mock.cc | 0 .../test/ares-test-ns.cc | 0 .../test/ares-test-parse-a.cc | 0 .../test/ares-test-parse-aaaa.cc | 0 .../test/ares-test-parse-caa.cc | 0 .../test/ares-test-parse-mx.cc | 0 .../test/ares-test-parse-naptr.cc | 0 .../test/ares-test-parse-ns.cc | 0 .../test/ares-test-parse-ptr.cc | 0 .../test/ares-test-parse-soa-any.cc | 0 .../test/ares-test-parse-soa.cc | 0 .../test/ares-test-parse-srv.cc | 0 .../test/ares-test-parse-txt.cc | 0 .../test/ares-test-parse-uri.cc | 0 .../test/ares-test-parse.cc | 0 .../test/ares-test.cc | 0 .../test/ares-test.h | 0 .../test/buildconf | 0 .../test/compile | 0 .../test}/config.guess | 1500 +-- .../test/config.h.in | 0 lib/c-ares-1.19.0/test/config.sub | 1890 ++++ .../test/configure | 362 +- .../test/configure.ac | 0 .../test/depcomp | 0 .../test/dns-dump.cc | 0 .../test/dns-proto-test.cc | 0 .../test/dns-proto.cc | 0 .../test/dns-proto.h | 0 .../test/fuzzcheck.sh | 0 .../004a216d3cff18b0c5c6b68b807f1529 | Bin .../00539467ca159b36aea95e61f9729115 | Bin .../00e846db8f43f2f507cd1666ed5a753e | Bin .../0177b7566f08c013699eaea9a77abeb3 | Bin .../020a4fa317715bfdb236ed13751e6b65 | Bin .../0310f2e81bea31f4fe3f330872a877dd | Bin .../0449be67df1730b2d0887d412a9b7cc4 | Bin .../0449dd14f7aa94bf0d716bfe09b287a8 | Bin .../04c93cdf7208979aa4df80a3a0d5a2d8 | Bin .../0567e7171e08e75f3f91c4ca74c17adc | Bin .../05ba948578a397e9cbc6a7b3e78622fa | Bin .../060afe5ed25f3e2e86167e545f27edca | Bin .../06d47d3681493f1b1d41236f460d896f | Bin .../0724a810b0e131c2fddb6de9003b9064 | Bin .../0b5279148826f5b962bcf1896bdb4ede | Bin .../114048c0f6b10bdc67ce9166405d195e | Bin .../11b8464a0ef8735d202955c34c36b0c7 | Bin .../11cb626f1668c7b41954ce7d768fe528 | Bin .../14b133bf18125b75a1976fa63a1df6b7 | Bin .../153c6b3afa8faa03c8bc28f936a6d4cf | Bin .../182cad2a342ed7317b7c21a5d17020d1 | Bin .../1c61a61bb7057b52c5b15188345a5238 | Bin .../1dbe2cf62ed2e4fa1c3cb473f08710b5 | Bin .../21199be504fcfece5c7096ee0dbba507 | Bin .../21891480074b5635dbbe7137bdcabccd | Bin .../233aea42e15aa73e131eefabf16088c9 | Bin .../24660d4e7ac7aa21d600ea7a3d198bbb | Bin .../25589deb55c08429345f289d1c9b0254 | Bin .../2573bd823e4da11f727a17f8e1f35c26 | Bin .../276f12da56866273e76059ad0e7be97e | Bin .../29198a2e380cb19babec9e02116d213e | Bin .../2c94ba9434b1a1b9396fc5364f101363 | Bin .../2d578c357dc2f5e02dc55cddb30641d1 | Bin .../2dff6cc5a223e67fde9e5e79af456992 | Bin .../2f103b1f9477f2d8934bd84328d51c75 | Bin .../31cd3a8413de13d9624adbb1613784bf | Bin .../36415bdf1d180098fe6234b4186e69f3 | Bin .../3a04a80f0242e8dff0cd732e7c4767da | Bin .../44d0f973b7b0fb3e4a07770c943dcd5a | Bin .../50bc00daa0ddcd6cfb2b5d9f62c81f47 | Bin .../51ed2d1fb77b3078b54e94e85606b7df | Bin .../5c5e0e899cf2e7d053a9e45fb76f6e5a | Bin .../70152ed033f139443fbfb1b858bb3b1b | Bin .../7030ca2b24e5a7f9dd8f62096a48eb33 | Bin .../71eec1a0ef2d25bb9e2ef17f23be7e9e | Bin .../7a6b0177210ea4ef40b254daf99393c5 | Bin .../7f1567733711ffb61839621af0cbfa33 | Bin .../850c6d57c5bb7be8205fc2438d14d7e5 | Bin .../a5c8cd2784a5792b9e91c2d7895b3b34 | Bin .../a9135cdc7151d023300ff194bad90af9 | Bin .../af2597e8ac7dec1e8b4a47518312912a | Bin .../test/fuzzinput/answer_a | Bin .../test/fuzzinput/answer_aaaa | Bin .../b3f53ef826b831bb09dd25c7f5960249 | Bin .../cda0f8751f5c4993974c2b549d29bcc8 | Bin .../ce6c26c0e469339873d0e7f616ab0945 | Bin .../fuzzinput/clusterfuzz-5637790584012800 | Bin .../fuzzinput/clusterfuzz-5650695891451904 | Bin .../fuzzinput/clusterfuzz-5651369832218624 | Bin .../fuzzinput/clusterfuzz-5674462260756480 | Bin .../fuzzinput/clusterfuzz-5680630672654336 | Bin .../fuzzinput/clusterfuzz-5683497160671232 | Bin .../fuzzinput/clusterfuzz-5687310655422464 | Bin .../fuzzinput/clusterfuzz-5695341573177344 | Bin .../fuzzinput/clusterfuzz-5697835103682560 | Bin .../fuzzinput/clusterfuzz-5728518081609728 | Bin .../fuzzinput/clusterfuzz-5732960017317888 | Bin .../e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 | Bin .../ed50ed8ee36230a5a69746ad830437e5 | Bin .../f1b900d50806021953321c3b604ee497 | Bin .../f6606f624be8c628328cea01d2cd07a9 | Bin .../f89f6c8176b564a7dd646f14305573ce | Bin .../f9ad508d2dbd08d3aaaabc7d1174677d | Bin .../test/fuzzinput/multi-indir | Bin .../test/fuzznames/name01 | 0 .../test/fuzznames/name02 | 0 .../test/fuzznames/name03 | 0 .../test/fuzznames/name04 | 0 .../test/fuzznames/name05 | 0 .../test/fuzznames/name06 | 0 .../test/fuzznames/name07 | 0 .../test/fuzznames/name08 | 0 .../test/fuzznames/name09 | 0 .../test/gmock-1.11.0/gmock-gtest-all.cc | 0 .../test/gmock-1.11.0/gmock/gmock.h | 0 .../test/gmock-1.11.0/gtest/gtest.h | 0 .../test/install-sh | 0 .../test/ltmain.sh | 827 +- .../test/missing | 0 .../test/test-driver | 0 lib/cfl/.github/actionlint-matcher.json | 17 + lib/cfl/.github/dependabot.yml | 12 + lib/cfl/.github/workflows/build.yaml | 168 + lib/cfl/.github/workflows/lint.yaml | 30 + lib/cfl/.github/workflows/packages.yaml | 102 + lib/cfl/.gitignore | 6 + lib/cfl/CMakeLists.txt | 270 + lib/cfl/LICENSE | 177 + lib/cfl/README.md | 23 + lib/cfl/appveyor.yml | 34 + lib/cfl/cmake/macros.cmake | 10 + lib/cfl/cpack/description | 1 + lib/cfl/cpack/macos/welcome.txt.cmakein | 6 + lib/cfl/include/CMakeLists.txt | 17 + lib/cfl/include/cfl/cfl.h | 42 + lib/cfl/include/cfl/cfl_array.h | 62 + lib/cfl/include/cfl/cfl_compat.h | 46 + lib/cfl/include/cfl/cfl_found.h | 47 + lib/cfl/include/cfl/cfl_hash.h | 37 + lib/cfl/include/cfl/cfl_info.h.in | 28 + lib/cfl/include/cfl/cfl_kv.h | 43 + lib/cfl/include/cfl/cfl_kvlist.h | 76 + lib/cfl/include/cfl/cfl_list.h | 195 + lib/cfl/include/cfl/cfl_log.h | 35 + lib/cfl/include/cfl/cfl_sds.h | 65 + lib/cfl/include/cfl/cfl_time.h | 27 + lib/cfl/include/cfl/cfl_variant.h | 65 + lib/cfl/include/cfl/cfl_version.h.in | 36 + lib/cfl/lib/xxhash/.gitattributes | 10 + lib/cfl/lib/xxhash/.github/workflows/ci.yml | 439 + lib/cfl/lib/xxhash/.gitignore | 47 + lib/cfl/lib/xxhash/.travis.yml | 142 + lib/cfl/lib/xxhash/CHANGELOG | 71 + lib/cfl/lib/xxhash/Doxyfile | 58 + lib/cfl/lib/xxhash/LICENSE | 26 + lib/cfl/lib/xxhash/README.md | 236 + lib/cfl/lib/xxhash/appveyor.yml | 115 + .../lib/xxhash/cmake_unofficial/.gitignore | 12 + .../xxhash/cmake_unofficial/CMakeLists.txt | 173 + lib/cfl/lib/xxhash/cmake_unofficial/README.md | 36 + .../cmake_unofficial/xxHashConfig.cmake.in | 4 + lib/cfl/lib/xxhash/doc/README.md | 9 + lib/cfl/lib/xxhash/doc/xxhash.cry | 206 + lib/cfl/lib/xxhash/doc/xxhash_spec.md | 351 + lib/cfl/lib/xxhash/libxxhash.pc.in | 15 + lib/cfl/lib/xxhash/xxh3.h | 55 + lib/cfl/lib/xxhash/xxh_x86dispatch.c | 770 ++ lib/cfl/lib/xxhash/xxh_x86dispatch.h | 86 + lib/cfl/lib/xxhash/xxhash.c | 43 + lib/cfl/lib/xxhash/xxhash.h | 5580 ++++++++++ lib/cfl/scripts/win_build.bat | 7 + lib/cfl/src/CMakeLists.txt | 28 + lib/cfl/src/cfl.c | 23 + lib/cfl/src/cfl_array.c | 375 + lib/cfl/src/cfl_kv.c | 147 + lib/cfl/src/cfl_kvlist.c | 390 + lib/cfl/src/cfl_log.c | 40 + lib/cfl/src/cfl_sds.c | 236 + lib/cfl/src/cfl_time.c | 62 + lib/cfl/src/cfl_variant.c | 234 + lib/cfl/tests/CMakeLists.txt | 31 + lib/cfl/tests/cfl_tests_internal.h.in | 25 + lib/cfl/tests/hash.c | 57 + lib/cfl/tests/kv.c | 82 + lib/cfl/tests/lib/acutest/.travis.yml | 34 + lib/cfl/tests/lib/acutest/CMakeLists.txt | 44 + lib/cfl/tests/lib/acutest/GIT | 1 + lib/cfl/tests/lib/acutest/LICENSE.md | 22 + lib/cfl/tests/lib/acutest/README.md | 4 + lib/cfl/tests/lib/acutest/appveyor.yml | 26 + lib/cfl/tests/lib/acutest/include/acutest.h | 864 ++ lib/cfl/tests/list.c | 50 + lib/cfl/tests/sds.c | 59 + lib/cfl/tests/variant.c | 470 + lib/flb_libco/CMakeLists.txt | 3 + lib/flb_libco/libco.c | 4 +- lib/flb_libco/ppc64le.c | 239 + .../.gitignore | 0 .../Isaac.Newton-Opticks.txt | 0 .../LICENSE | 0 .../Makefile.am | 27 +- .../Makefile.in | 15 +- .../README.md | 0 .../aclocal.m4 | 0 .../alloc.c | 0 .../allocfail.c | 0 .../allocfail.sh | 0 .../atomic.c | 0 .../backtrace-supported.h.in | 0 .../backtrace.c | 0 .../backtrace.h | 0 .../btest.c | 0 .../compile | 0 .../config.guess | 0 .../config.h.in | 3 + .../config.sub | 0 .../config/enable.m4 | 0 .../config/lead-dot.m4 | 0 .../config/libtool.m4 | 0 .../config/ltoptions.m4 | 0 .../config/ltsugar.m4 | 0 .../config/ltversion.m4 | 0 .../config/lt~obsolete.m4 | 0 .../config/multi.m4 | 0 .../config/override.m4 | 0 .../config/unwind_ipinfo.m4 | 0 .../config/warnings.m4 | 0 .../configure | 19 +- .../configure.ac | 12 +- .../dwarf.c | 0 .../edtest.c | 0 .../edtest2.c | 0 .../elf.c | 9 +- .../fileline.c | 0 .../filenames.h | 0 .../filetype.awk | 0 .../install-debuginfo-for-buildid.sh.in | 0 .../install-sh | 0 .../instrumented_alloc.c | 0 .../internal.h | 0 .../libtool.m4 | 0 .../ltmain.sh | 0 .../ltoptions.m4 | 0 .../ltsugar.m4 | 0 .../ltversion.m4 | 0 .../lt~obsolete.m4 | 0 .../macho.c | 2 +- .../missing | 0 .../mmap.c | 0 .../mmapio.c | 0 .../move-if-change | 0 .../mtest.c | 0 .../nounwind.c | 0 .../pecoff.c | 0 .../posix.c | 0 .../print.c | 0 .../read.c | 0 .../simple.c | 0 .../sort.c | 0 .../state.c | 0 .../stest.c | 0 .../test-driver | 0 .../test_format.c | 0 .../testlib.c | 0 .../testlib.h | 0 .../ttest.c | 0 .../unittest.c | 0 .../unknown.c | 0 .../xcoff.c | 0 .../xztest.c | 0 .../ztest.c | 0 lib/onigmo/doc/UnicodeProps.txt | 56 +- lib/onigmo/enc/unicode/casefold.h | 6181 ++++++----- lib/onigmo/enc/unicode/name2ctype.h | 9728 ++++++++++++----- lib/onigmo/onigmo.h | 5 +- lib/onigmo/regcomp.c | 2 - lib/onigmo/regenc.c | 15 + lib/onigmo/regenc.h | 1 + lib/onigmo/regexec.c | 20 +- lib/onigmo/regint.h | 9 +- lib/onigmo/regparse.c | 10 +- lib/onigmo/tool/Makefile | 4 +- lib/onigmo/tool/case-folding.rb | 2 +- lib/onigmo/tool/download-ucd.sh | 2 +- lib/onigmo/tool/update-doc.py | 4 +- 552 files changed, 32544 insertions(+), 13088 deletions(-) delete mode 100644 lib/c-ares-1.18.1/RELEASE-NOTES delete mode 100755 lib/c-ares-1.18.1/config.sub delete mode 100644 lib/c-ares-1.18.1/src/lib/ares_library_init.h delete mode 100644 lib/c-ares-1.18.1/src/lib/ares_strsplit.c delete mode 100755 lib/c-ares-1.18.1/test/config.sub rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/AUTHORS (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/CHANGES (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/CMakeLists.txt (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/CONTRIBUTING.md (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/INSTALL.md (95%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/LICENSE.md (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.Watcom (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.am (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.dj (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.m32 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.msvc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/Makefile.netware (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/NEWS (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/README.cares (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/README.md (95%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/README.msvc (100%) create mode 100644 lib/c-ares-1.19.0/RELEASE-NOTES rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/SECURITY.md (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/TODO (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/acinclude.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/aclocal.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/aminclude_static.am (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/buildconf (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/buildconf.bat (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/c-ares-config.cmake.in (50%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/compile (100%) rename lib/{c-ares-1.18.1/test => c-ares-1.19.0}/config.guess (54%) create mode 100755 lib/c-ares-1.19.0/config.sub rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/configure (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/configure.ac (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/depcomp (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/CMakeLists.txt (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/Makefile.am (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/Makefile.inc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/acountry.1 (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/adig.1 (80%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ahost.1 (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_cancel.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_create_query.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_destroy.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_destroy_options.3 (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_dup.3 (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_expand_name.3 (90%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_expand_string.3 (89%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_fds.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_free_data.3 (96%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_free_hostent.3 (95%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_free_string.3 (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_freeaddrinfo.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_get_servers.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_get_servers_ports.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_getaddrinfo.3 (90%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_gethostbyaddr.3 (86%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_gethostbyname.3 (87%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_gethostbyname_file.3 (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_getnameinfo.3 (89%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_getsock.3 (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_inet_ntop.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_inet_pton.3 (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_init.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_init_options.3 (95%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_library_cleanup.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_library_init.3 (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_library_init_android.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_library_initialized.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_mkquery.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_a_reply.3 (90%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_aaaa_reply.3 (89%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_caa_reply.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_mx_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_naptr_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_ns_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_ptr_reply.3 (89%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_soa_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_srv_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_txt_reply.3 (90%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_parse_uri_reply.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_process.3 (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_query.3 (91%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_save_options.3 (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_search.3 (91%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_send.3 (89%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_local_dev.3 (92%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_local_ip4.3 (91%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_local_ip6.3 (75%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_servers.3 (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_servers_csv.3 (91%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_servers_ports.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_servers_ports_csv.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_socket_callback.3 (73%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_socket_configure_callback.3 (73%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_socket_functions.3 (80%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_set_sortlist.3 (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_strerror.3 (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_timeout.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/docs/ares_version.3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/get_ver.awk (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/CMakeLists.txt (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/Makefile.am (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares.h (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_build.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_build.h.cmake (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_build.h.in (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_dns.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_nameser.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_rules.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/include/ares_version.h (85%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/install-sh (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/libcares.pc.cmake (76%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/libcares.pc.in (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/ltmain.sh (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_ac_append_to_file.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_ac_print_to_file.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_add_am_macro_static.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_am_macros_static.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_check_gnu_make.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_check_user_namespace.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_check_uts_namespace.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_code_coverage.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_cxx_compile_stdcxx_11.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_file_escapes.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_pthread.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ax_require_defined.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/cares-compilers.m4 (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/cares-confopts.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/cares-functions.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/cares-reentrant.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/libtool.m4 (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ltoptions.m4 (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ltsugar.m4 (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/ltversion.m4 (66%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/lt~obsolete.m4 (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/xc-am-iface.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/xc-cc-check.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/xc-lt-iface.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/xc-translit.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/xc-val-flgs.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/m4/zz40-xc-ovr.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/maketgz (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/missing (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/msvc_ver.inc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/CMakeLists.txt (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/Makefile.am (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/CMakeLists.txt (96%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/Makefile.am (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/Makefile.inc (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__addrinfo2hostent.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__addrinfo_localhost.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__close_sockets.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__get_hostent.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__parse_into_addrinfo.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__read_line.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__readaddrinfo.c (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__sortaddrinfo.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares__timeval.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_android.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_android.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_cancel.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_config.h.cmake (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_config.h.in (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_create_query.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_data.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_data.h (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_destroy.c (96%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_expand_name.c (97%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_expand_string.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_fds.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_free_hostent.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_free_string.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_freeaddrinfo.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_getaddrinfo.c (93%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_getenv.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_getenv.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_gethostbyaddr.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_gethostbyname.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_getnameinfo.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_getsock.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_inet_net_pton.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_init.c (84%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_iphlpapi.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_ipv6.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_library_init.c (56%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_llist.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_llist.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_mkquery.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_nowarn.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_nowarn.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_options.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_a_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_aaaa_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_caa_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_mx_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_naptr_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_ns_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_ptr_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_soa_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_srv_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_txt_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_parse_uri_reply.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_platform.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_platform.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_private.h (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_process.c (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_query.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_search.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_send.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_setup.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strcasecmp.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strcasecmp.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strdup.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strdup.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strerror.c (100%) create mode 100644 lib/c-ares-1.19.0/src/lib/ares_strsplit.c rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_strsplit.h (62%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_timeout.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_version.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_writev.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/ares_writev.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/bitncmp.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/bitncmp.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/cares.rc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/config-dos.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/config-win32.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/inet_net_pton.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/inet_ntop.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/setup_once.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/lib/windows_port.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/CMakeLists.txt (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/Makefile.am (83%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/Makefile.in (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/Makefile.inc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/acountry.c (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/adig.c (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/ahost.c (87%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/ares_getopt.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/src/tools/ares_getopt.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/CMakeLists.txt (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/Makefile.am (84%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/Makefile.in (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/Makefile.inc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/Makefile.m32 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/Makefile.msvc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/README.md (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/aclocal.m4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/aminclude_static.am (99%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-fuzz.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-ai.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-fuzz-name.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-fuzz.c (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-init.cc (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-internal.cc (95%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-live.cc (96%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-main.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-misc.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-mock-ai.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-mock.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-ns.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-a.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-aaaa.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-caa.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-mx.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-naptr.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-ns.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-ptr.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-soa-any.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-soa.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-srv.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-txt.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse-uri.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test-parse.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ares-test.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/buildconf (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/compile (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0/test}/config.guess (54%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/config.h.in (100%) create mode 100755 lib/c-ares-1.19.0/test/config.sub rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/configure (98%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/configure.ac (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/depcomp (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/dns-dump.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/dns-proto-test.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/dns-proto.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/dns-proto.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzcheck.sh (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/00539467ca159b36aea95e61f9729115 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/06d47d3681493f1b1d41236f460d896f (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/21891480074b5635dbbe7137bdcabccd (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/25589deb55c08429345f289d1c9b0254 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/276f12da56866273e76059ad0e7be97e (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/29198a2e380cb19babec9e02116d213e (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/answer_a (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/answer_aaaa (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5637790584012800 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5650695891451904 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5651369832218624 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5674462260756480 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5680630672654336 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5683497160671232 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5687310655422464 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5695341573177344 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5697835103682560 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5728518081609728 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/clusterfuzz-5732960017317888 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/f1b900d50806021953321c3b604ee497 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzzinput/multi-indir (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name01 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name02 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name03 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name04 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name05 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name06 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name07 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name08 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/fuzznames/name09 (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/gmock-1.11.0/gmock-gtest-all.cc (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/gmock-1.11.0/gmock/gmock.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/gmock-1.11.0/gtest/gtest.h (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/install-sh (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/ltmain.sh (94%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/missing (100%) rename lib/{c-ares-1.18.1 => c-ares-1.19.0}/test/test-driver (100%) create mode 100644 lib/cfl/.github/actionlint-matcher.json create mode 100644 lib/cfl/.github/dependabot.yml create mode 100644 lib/cfl/.github/workflows/build.yaml create mode 100644 lib/cfl/.github/workflows/lint.yaml create mode 100644 lib/cfl/.github/workflows/packages.yaml create mode 100644 lib/cfl/.gitignore create mode 100644 lib/cfl/CMakeLists.txt create mode 100644 lib/cfl/LICENSE create mode 100644 lib/cfl/README.md create mode 100644 lib/cfl/appveyor.yml create mode 100644 lib/cfl/cmake/macros.cmake create mode 100644 lib/cfl/cpack/description create mode 100644 lib/cfl/cpack/macos/welcome.txt.cmakein create mode 100644 lib/cfl/include/CMakeLists.txt create mode 100644 lib/cfl/include/cfl/cfl.h create mode 100644 lib/cfl/include/cfl/cfl_array.h create mode 100644 lib/cfl/include/cfl/cfl_compat.h create mode 100644 lib/cfl/include/cfl/cfl_found.h create mode 100644 lib/cfl/include/cfl/cfl_hash.h create mode 100644 lib/cfl/include/cfl/cfl_info.h.in create mode 100644 lib/cfl/include/cfl/cfl_kv.h create mode 100644 lib/cfl/include/cfl/cfl_kvlist.h create mode 100644 lib/cfl/include/cfl/cfl_list.h create mode 100644 lib/cfl/include/cfl/cfl_log.h create mode 100644 lib/cfl/include/cfl/cfl_sds.h create mode 100644 lib/cfl/include/cfl/cfl_time.h create mode 100644 lib/cfl/include/cfl/cfl_variant.h create mode 100644 lib/cfl/include/cfl/cfl_version.h.in create mode 100644 lib/cfl/lib/xxhash/.gitattributes create mode 100644 lib/cfl/lib/xxhash/.github/workflows/ci.yml create mode 100644 lib/cfl/lib/xxhash/.gitignore create mode 100644 lib/cfl/lib/xxhash/.travis.yml create mode 100644 lib/cfl/lib/xxhash/CHANGELOG create mode 100644 lib/cfl/lib/xxhash/Doxyfile create mode 100644 lib/cfl/lib/xxhash/LICENSE create mode 100644 lib/cfl/lib/xxhash/README.md create mode 100644 lib/cfl/lib/xxhash/appveyor.yml create mode 100644 lib/cfl/lib/xxhash/cmake_unofficial/.gitignore create mode 100644 lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt create mode 100644 lib/cfl/lib/xxhash/cmake_unofficial/README.md create mode 100644 lib/cfl/lib/xxhash/cmake_unofficial/xxHashConfig.cmake.in create mode 100644 lib/cfl/lib/xxhash/doc/README.md create mode 100644 lib/cfl/lib/xxhash/doc/xxhash.cry create mode 100644 lib/cfl/lib/xxhash/doc/xxhash_spec.md create mode 100644 lib/cfl/lib/xxhash/libxxhash.pc.in create mode 100644 lib/cfl/lib/xxhash/xxh3.h create mode 100644 lib/cfl/lib/xxhash/xxh_x86dispatch.c create mode 100644 lib/cfl/lib/xxhash/xxh_x86dispatch.h create mode 100644 lib/cfl/lib/xxhash/xxhash.c create mode 100644 lib/cfl/lib/xxhash/xxhash.h create mode 100755 lib/cfl/scripts/win_build.bat create mode 100644 lib/cfl/src/CMakeLists.txt create mode 100644 lib/cfl/src/cfl.c create mode 100644 lib/cfl/src/cfl_array.c create mode 100644 lib/cfl/src/cfl_kv.c create mode 100644 lib/cfl/src/cfl_kvlist.c create mode 100644 lib/cfl/src/cfl_log.c create mode 100644 lib/cfl/src/cfl_sds.c create mode 100644 lib/cfl/src/cfl_time.c create mode 100644 lib/cfl/src/cfl_variant.c create mode 100644 lib/cfl/tests/CMakeLists.txt create mode 100644 lib/cfl/tests/cfl_tests_internal.h.in create mode 100644 lib/cfl/tests/hash.c create mode 100644 lib/cfl/tests/kv.c create mode 100644 lib/cfl/tests/lib/acutest/.travis.yml create mode 100644 lib/cfl/tests/lib/acutest/CMakeLists.txt create mode 100644 lib/cfl/tests/lib/acutest/GIT create mode 100644 lib/cfl/tests/lib/acutest/LICENSE.md create mode 100644 lib/cfl/tests/lib/acutest/README.md create mode 100644 lib/cfl/tests/lib/acutest/appveyor.yml create mode 100644 lib/cfl/tests/lib/acutest/include/acutest.h create mode 100644 lib/cfl/tests/list.c create mode 100644 lib/cfl/tests/sds.c create mode 100644 lib/cfl/tests/variant.c create mode 100644 lib/flb_libco/ppc64le.c rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/.gitignore (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/Isaac.Newton-Opticks.txt (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/LICENSE (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/Makefile.am (96%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/Makefile.in (99%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/README.md (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/aclocal.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/alloc.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/allocfail.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/allocfail.sh (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/atomic.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/backtrace-supported.h.in (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/backtrace.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/backtrace.h (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/btest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/compile (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config.guess (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config.h.in (98%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config.sub (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/enable.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/lead-dot.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/libtool.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/ltoptions.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/ltsugar.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/ltversion.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/lt~obsolete.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/multi.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/override.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/unwind_ipinfo.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/config/warnings.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/configure (99%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/configure.ac (98%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/dwarf.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/edtest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/edtest2.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/elf.c (99%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/fileline.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/filenames.h (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/filetype.awk (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/install-debuginfo-for-buildid.sh.in (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/install-sh (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/instrumented_alloc.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/internal.h (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/libtool.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ltmain.sh (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ltoptions.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ltsugar.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ltversion.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/lt~obsolete.m4 (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/macho.c (99%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/missing (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/mmap.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/mmapio.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/move-if-change (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/mtest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/nounwind.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/pecoff.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/posix.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/print.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/read.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/simple.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/sort.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/state.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/stest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/test-driver (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/test_format.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/testlib.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/testlib.h (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ttest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/unittest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/unknown.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/xcoff.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/xztest.c (100%) rename lib/{libbacktrace-2446c66 => libbacktrace-8602fda}/ztest.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc39d4a77d8..4e16d7d87de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -813,8 +813,8 @@ if(FLB_BACKTRACE) set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}") endif() ExternalProject_Add(backtrace - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libbacktrace-2446c66/ - CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libbacktrace-2446c66/configure ${AUTOCONF_HOST_OPT} --prefix= --enable-shared=no --enable-static=yes + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/libbacktrace-8602fda/ + CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/libbacktrace-8602fda/configure ${AUTOCONF_HOST_OPT} --prefix= --enable-shared=no --enable-static=yes BUILD_COMMAND $(MAKE) INSTALL_COMMAND $(MAKE) DESTDIR= install ) diff --git a/cmake/libraries.cmake b/cmake/libraries.cmake index 0e812e384e2..3094a0fdb50 100644 --- a/cmake/libraries.cmake +++ b/cmake/libraries.cmake @@ -16,6 +16,6 @@ set(FLB_PATH_LIB_MINIZ "lib/miniz") set(FLB_PATH_LIB_TUTF8E "lib/tutf8e") set(FLB_PATH_LIB_XXHASH "lib/xxHash-0.8.1") set(FLB_PATH_LIB_CMETRICS "lib/cmetrics") -set(FLB_PATH_LIB_CARES "lib/c-ares-1.18.1") +set(FLB_PATH_LIB_CARES "lib/c-ares-1.19.0") set(FLB_PATH_LIB_SNAPPY "lib/snappy-fef67ac") set(FLB_PATH_LIB_RDKAFKA "lib/librdkafka-1.8.2") diff --git a/lib/c-ares-1.18.1/RELEASE-NOTES b/lib/c-ares-1.18.1/RELEASE-NOTES deleted file mode 100644 index d095749deab..00000000000 --- a/lib/c-ares-1.18.1/RELEASE-NOTES +++ /dev/null @@ -1,85 +0,0 @@ -c-ares version 1.18.1 - -This is an urgent bugfix release for a regression made in 1.18.0. - -Bug fixes: - o ares_getaddrinfo() would return ai_addrlen of 16 for ipv6 - adddresses rather than the sizeof(struct sockaddr_in6) - - - -c-ares version 1.18.0 - -This is a feature and bugfix release. It addresses a couple of new feature -requests as well as a couple of bug fixes. - -Changes: - o Add support for URI(Uniform Resource Identifier) records via - ares_parse_uri_reply() [1] - o Provide ares_nameser.h as a public interface as needed by NodeJS [5] - o Update URLs from c-ares.haxx.se to c-ares.org [9] - o During a domain search, treat ARES_ENODATA as ARES_NXDOMAIN so that the - search process will continue to the next domain in the search. [11] - o Turn ares_gethostbyname() into a wrapper for ares_getaddrinfo() as they - followed very similar code paths and ares_gethostbyaddr() has some more - desirable features such as priority sorting and parallel queries for - AF_UNSPEC. [12] - o ares_getaddrinfo() now contains a name element in the address info - structure as the last element. This is not an API or ABI break due to - the structure always being internally allocated and it being the last - element. [12] - o ares_parse_a_reply() and ares_parse_aaaa_reply() were nearly identical, those - now use the same helper functions for parsing rather than having their own - code. [12] - o RFC6761 Section 6.3 says "localhost" lookups need to be special cased to - return loopback addresses, and not forward queries to recursive dns servers. - On Windows this now returns all loopback addresses, on other systems it - returns 127.0.0.1 or ::1 always, and will never forward a request for - "localhost" to outside DNS servers. [13] - o Haiki: port [14] - -Bug fixes: - o add build to .gitignore [2] - o z/OS minor update, add missing semicolon in ares_init.c [3] - o Fix building when latest ax_code_coverage.m4 is imported [4] - o Work around autotools 'error: too many loops' and other newer autotools - import related bugs. - o MinGW cross builds need advapi32 link as lower case [6] - o Cygwin build fix due to containing both socket.h and winsock2.h [7] - o ares_expand_name should allow underscores (_) as SRV records legitimately use - them [8] - o Allow '/' as a valid character for a returned name for CNAME in-addr.arpa - delegation [10] - o ares_getaddrinfo() was not honoring HOSTALIASES [12] - o ares_getaddrinfo() had some test cases disabled due to a bug in the test - framework itself which has now been resolved [12] - o Due to Travis-CI becoming unfriendly to open-source, Cirrus-CI has now been - brought online for automated unit testing. - -Thanks go to these friendly people for their efforts and contributions: - Biswapriyo Nath (@Biswa96) - Brad House (@bradh352) - Daniel Bevenius (@danbev) - Daniel Stenberg (@bagder) - Dhrumil Rana (@dhrumilrana) - Felix Yan (@felixonmars) - Jérôme Duval (@korli) - Martin Holeš (@martin-256) - Sinan Kaya -(9 contributors) - -References to bug reports and discussions on issues: - [1] = https://github.com/c-ares/c-ares/pull/411 - [2] = https://github.com/c-ares/c-ares/pull/410 - [3] = https://github.com/c-ares/c-ares/pull/414 - [4] = https://github.com/c-ares/c-ares/pull/418 - [5] = https://github.com/c-ares/c-ares/pull/417 - [6] = https://github.com/c-ares/c-ares/pull/420 - [7] = https://github.com/c-ares/c-ares/pull/422 - [8] = https://github.com/c-ares/c-ares/issues/424 - [9] = https://github.com/c-ares/c-ares/issues/423 - [10] = https://github.com/c-ares/c-ares/issues/427 - [11] = https://github.com/c-ares/c-ares/issues/426 - [12] = https://github.com/c-ares/c-ares/pull/428 - [13] = https://github.com/c-ares/c-ares/pull/430 - [14] = https://github.com/c-ares/c-ares/pull/431 diff --git a/lib/c-ares-1.18.1/config.sub b/lib/c-ares-1.18.1/config.sub deleted file mode 100755 index 1d8e98bcee2..00000000000 --- a/lib/c-ares-1.18.1/config.sub +++ /dev/null @@ -1,1801 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. - -timestamp='2018-02-22' - -# This file 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 . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/lib/c-ares-1.18.1/src/lib/ares_library_init.h b/lib/c-ares-1.18.1/src/lib/ares_library_init.h deleted file mode 100644 index b3896d9f7bb..00000000000 --- a/lib/c-ares-1.18.1/src/lib/ares_library_init.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef HEADER_CARES_LIBRARY_INIT_H -#define HEADER_CARES_LIBRARY_INIT_H - - -/* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2004-2011 by Daniel Stenberg - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -#include "ares_setup.h" - -#ifdef USE_WINSOCK - -#include -#include "ares_iphlpapi.h" - -typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*); -typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG); -typedef ULONG (WINAPI *fpGetAdaptersAddresses_t) ( ULONG, ULONG, void*, IP_ADAPTER_ADDRESSES*, ULONG* ); -typedef NETIO_STATUS (WINAPI *fpGetBestRoute2_t) ( NET_LUID *, NET_IFINDEX, const SOCKADDR_INET *, const SOCKADDR_INET *, ULONG, PMIB_IPFORWARD_ROW2, SOCKADDR_INET * ); -/* Forward-declaration of variables defined in ares_library_init.c */ -/* that are global and unique instances for whole c-ares library. */ - -extern fpGetNetworkParams_t ares_fpGetNetworkParams; -extern fpSystemFunction036_t ares_fpSystemFunction036; -extern fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses; -extern fpGetBestRoute2_t ares_fpGetBestRoute2; - -#endif /* USE_WINSOCK */ - -#endif /* HEADER_CARES_LIBRARY_INIT_H */ - diff --git a/lib/c-ares-1.18.1/src/lib/ares_strsplit.c b/lib/c-ares-1.18.1/src/lib/ares_strsplit.c deleted file mode 100644 index 97b4e5d5bbb..00000000000 --- a/lib/c-ares-1.18.1/src/lib/ares_strsplit.c +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright (C) 2018 by John Schember - * - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -#if defined(__MVS__) -#include -#endif - -#include "ares_setup.h" -#include "ares_strsplit.h" -#include "ares.h" -#include "ares_private.h" - -static int list_contains(char * const *list, size_t num_elem, const char *str, int insensitive) -{ - size_t len; - size_t i; - - len = strlen(str); - for (i=0; i. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2018 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - x64) - basic_machine=x86_64-pc - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4*) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; - -nacl*) - ;; - -ios) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - pru-*) - os=-elf - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` - ;; -esac - -echo "$basic_machine$os" -exit - -# Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/lib/c-ares-1.18.1/AUTHORS b/lib/c-ares-1.19.0/AUTHORS similarity index 100% rename from lib/c-ares-1.18.1/AUTHORS rename to lib/c-ares-1.19.0/AUTHORS diff --git a/lib/c-ares-1.18.1/CHANGES b/lib/c-ares-1.19.0/CHANGES similarity index 92% rename from lib/c-ares-1.18.1/CHANGES rename to lib/c-ares-1.19.0/CHANGES index fcdc0437ae4..5ecd504f063 100644 --- a/lib/c-ares-1.18.1/CHANGES +++ b/lib/c-ares-1.19.0/CHANGES @@ -1,5 +1,448 @@ Changelog for the c-ares project. Generated with git2changes.pl +Version 1.19.0 (18 Jan 2023) + +bradh352 (18 Jan 2023) +- Prep for 1.19.0 release + +- Fix inverted logic in 25523e2 + + Fix .localhost. handling in prior commit + + Fix By: Brad House (@bradh352) + +- RFC6761 localhost definition includes subdomains + + RFC6761 6.3 states: + The domain "localhost." and any names falling within ".localhost." + + We were only honoring "localhost". + + Fixes: #477 + Fix By: Brad House (@bradh352) + +- docs: ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT docs wrong byte order + + As per #487, documentation states the port should be in network byte + order, but we can see from the test cases using MockServers on + different ports that this is not the case, it is definitely in host + byte order. + + Fix By: Brad House (@bradh352) + +GitHub (18 Jan 2023) +- [hopper-vul brought this change] + + Add str len check in config_sortlist to avoid stack overflow (#497) + + In ares_set_sortlist, it calls config_sortlist(..., sortstr) to parse + the input str and initialize a sortlist configuration. + + However, ares_set_sortlist has not any checks about the validity of the input str. + It is very easy to create an arbitrary length stack overflow with the unchecked + `memcpy(ipbuf, str, q-str);` and `memcpy(ipbufpfx, str, q-str);` + statements in the config_sortlist call, which could potentially cause severe + security impact in practical programs. + + This commit add necessary check for `ipbuf` and `ipbufpfx` which avoid the + potential stack overflows. + + fixes #496 + + Fix By: @hopper-vul + +bradh352 (18 Jan 2023) +- Fix build due to str-split sed gone wrong + + Fix By: Brad House (@bradh352) + +- cirrus-ci: switch to scan-build-py for MacOS + + MacOS seems to work better with scan-build-py + + Fix By: Brad House (@bradh352) + +- ares_strsplit* -> ares__strsplit* to comply with internal function naming + + Inspired by #495, but was missing test cases and would failed to build. + + Fix By: Brad House (@bradh352), Daniel Stenberg (@bagder) + +- Cirrus-CI: MacOS Homebrew has changed from /usr/local/opt to /opt/homebrew + + Fix paths for homebrew. + + Fix By: Brad House (@bradh352) + +- cirrus-ci: iOS build needs to use ARM MacOS image + + CirrusCI removed Intel-based MacOS images. Need to switch + iOS builds to use new ARM images as well. + + Fix By: Brad House (@bradh352) + +- cirrus-ci: new MacOS image + + Cirrus-CI has recently EOL'd Intel MacOS VMs, switch to the latest + ARM-based image. + + Fix By: Brad House (@bradh352) + +- acountry was passing stack variable to callback + + Recent ASAN versions picked up that acountry was passing stack + variables to ares_gethostbyname() then leaving the stack context. + We will now allocate a buffer for this. + + Fix By: Brad House (@bradh352) + +GitHub (13 Dec 2022) +- [Daniel Stenberg brought this change] + + docs: reformat/cleanup man pages SYNOPSIS sections (#494) + + To make them render "nicer" in both terminals and on the website. + + - Removes the bold + - Removes .PP lines + - Indents them more like proper code style + + Fix By: Daniel Stenberg (@bagder) + +- [Nikolaos Chatzikonstantinou brought this change] + + bug fix: new ares_strsplit (#492) + + * add ares_strsplit unit test + + The test reveals a bug in the implementation of ares_strsplit when the + make_set parameter is set to 1, as distinct domains are confused for + equal: + + out = ares_strsplit("example.com, example.co", ", ", 1, &n); + + evaluates to n = 1 with out = { "example.com" }. + + * bugfix and cleanup of ares_strsplit + + The purpose of ares_strsplit in c-ares is to split a comma-delimited + string of unique (up to letter case) domains. However, because the + terminating NUL byte was not checked in the substrings when comparing + for uniqueness, the function would sometimes drop domains it should + not. For example, + + ares_strsplit("example.com, example.co", ",") + + would only result in a single domain "example.com". + + Aside from this bugfix, the following cleanup is performed: + + 1. The tokenization now happens with the help of strcspn instead of the + custom function is_delim. + 2. The function list_contains has been inlined. + 3. The interface of ares_strsplit has been simplified by removing the + parameter make_set since in practice it was always 1. + 4. There are fewer passes over the input string. + 5. We resize the table using realloc() down to its minimum size. + 6. The docstring of ares_strsplit is updated and also a couple typos + are fixed. + + There occurs a single use of ares_strsplit and since the make_set + parameter has been removed, the call in ares_init.c is modified + accordingly. The unit test for ares_strsplit is also updated. + + Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + +bradh352 (23 Oct 2022) +- CirrusCI: update freebsd image + + Old FreeBSD image for CirrusCI has issues with newer symbols, update to later one. + + Fix By: Brad House (@bradh352) + +GitHub (23 Oct 2022) +- [Stephen Sachs brought this change] + + Fix Intel compiler deprecated options (#485) + + Options `-we ###` and `-wd ###` should not include a whitespace. They are also deprecated and `-diag-error` and `-diag-disable` are their replacements. + + Intel compiler 2021.6 is not able to be used in configure without the proposed patch. + + Fix By: Stephen Sachs (@stephenmsachs) + +- [Jonathan Ringer brought this change] + + Allow for CMake to use absolute install paths (#486) + + Generated libcares.pc could have bad paths when using absolute paths. + + Fix By: Jonathan Ringer (@jonringer) + +- [Thomas Dreibholz brought this change] + + Fix for issue #488: ensure that the number of iovec entries does not exceed system limits. (#489) + + c-ares could try to exceed maximum number of iovec entries supported by system. + + Fix By: Thomas Dreibholz (@dreibh) + +- [bsergean brought this change] + + Add include guards to ares_data.h (#491) + + All the other header files in the src/lib folder do have an include guard so it look like an overthought. + + Fix By: @bsergean + +- [Brad Spencer brought this change] + + Fix typo in docs for ares_process_fd (#490) + + A single letter was missing + + Fix By: Brad Spencer (@b-spencer) + +- [lifenjoiner brought this change] + + tools: refine help (#481) + + fix invalid help options and documentation typos + + Fix By: @lifenjoiner + +- [lifenjoiner brought this change] + + Git: ignore CMake temporary files (#480) + + exclude more files from git + + Fix By: @lifenjoiner + +- [lifenjoiner brought this change] + + adig: fix `-T` option (#479) + + Helper was missing flag to enable TCP mode of operation. + + Fix By: @lifenjoiner + +- [Frank brought this change] + + Add vcpkg installation instructions (#478) + + Update to include vcpkg installation instructions + + Fix By: @FrankXie05 + +- [marc-groundctl brought this change] + + Convert total timeout to per-query (#467) + + On Apple platforms, libresolv reports the total timeout in retrans, not the per-query time. This patch undoes that math to get the per-query time, which is what c-ares expects. This is not perfect because libresolv is inconsistent on whether the timeout is multiplied by retry or retry+1, but I don't see any way to distinguish these cases. + + Fix By: Marc Aldorasi (@marc-groundctl) + +- [marc-groundctl brought this change] + + Don't include version info in the static library (#468) + + The static library should not contain version info, since it would be linked into an executable or dll with its own version info. + + Fix By: @marc-groundctl + +- [Ridge Kennedy brought this change] + + Fix ares_getaddrinfo() numerical address fast path with AF_UNSPEC (#469) + + The conversion of numeric IPv4 addresses in fake_addrinfo() is broken when + the family is AF_UNSPEC. The initial call to ares_inet_pton with AF_INET + will succeed, but the subsequent call using AF_INET6 will fail. This results + in the fake_addrinfo() fast path failing, and ares_getaddrinfo() making a + query when none should be required. + + Resolve this by only attempting the call to ares_inet_pton with AF_INET6 + if the initial call with AF_INET was unsuccessful. + + Fix By: Ridge Kennedy (@ridgek) + +- [Manish Mehra brought this change] + + Configurable hosts path for file_lookup (#465) + + This changeset adds support for configurable hosts file + ARES_OPT_HOSTS_FILE (similar to ARES_OPT_RESOLVCONF). + + Co-authored-by: Manish Mehra (@mmehra) + +bradh352 (27 Apr 2022) +- CMake: Windows DLLs lack version information + + The cares.rc was not included in the build for CMake. Conditionally + add it when building for Windows. + + Fix By: Brad House (@bradh352) + Fixes Bug: #460 + +GitHub (27 Apr 2022) +- [Kai Pastor brought this change] + + CMake: Guard target creation in exported config (#464) + + User projects may call 'find_package(c-ares)' multiple times (e.g. + via dependencies), but targets must be created only once. + Shared and static target must be treated independently. + + Fix By: Kai Pastor (@dg0yt) + +bradh352 (27 Apr 2022) +- Honor valid DNS result even if other class returned an error + + When using ares_getaddrinfo() with PF_UNSPEC, if a DNS server returned + good data on an A record, followed by bad data on an AAAA record, the + good record would be thrown away and an error returned. + + If we got a good response from one of the two queries, regardless of + the order returned, we should honor that. + + Fix By: Dmitry Karpov (dkarpov@roku.com) + Signed Off By: Brad House (@bradh352) + +GitHub (2 Apr 2022) +- [Sam James brought this change] + + configure.ac: fix STDC_HEADERS typo (#459) + + There is no autoconf macro called STDC_HEADERS. AC_HEADER_STDC however does + exist and it defines the STDC_HEADERS macro for use. + + Not clear that STDC_HEADERS from its use in the repo is needed but + would rather not meddle with it for now. + + Fixes an annoying warning on `./configure`: + ``` + /var/tmp/portage/net-dns/c-ares-1.18.1/work/c-ares-1.18.1/configure: 24546: STDC_HEADERS: not found + ``` + + Signed-off-by: Sam James + +bradh352 (2 Mar 2022) +- Asterisks should be allowed in host validation as CNAMEs may reference wildcard domains + + CloudFlare appears to use this logic in CNAMEs as per + https://github.com/nodejs/node/issues/42171 + + Fixes: #457 + Fix By: Brad House (@bradh352) + +- Don't return on file lookup failure, set status + + When resolving a host via /etc/hosts, don't return with a predefined + error as there may be other tries. + + Fix By: Brad House (@bradh352) + +- 'localhost' special treatment enhancement + + Since localhost is special-cased, any errors should be ignored when + reading /etc/hosts as otherwise we could return an error if there + were for instance an invalidly formatted /etc/hosts or if /etc/hosts + had a permissions error while reading. + + This exact behavior appears to have been seen on OS/400 PASE + environments which allows AIX binares to run. + + Fix By: Brad House (@bradh352) + +- If chain building c-ares as part of another project, detect of res_servicename could fail (#451) + + If libresolv is already included with the build, c-ares wouldn't properly detect its use. + + May fix: #451 + Fix by: Brad House (@bradh352) + +- no analyze capability on ios + +- attempt to use scan-build on ios + +- disable tests on ios + +- fix switch statement + +- code coverage had gotten disabled + +- looks like shell expansion doesn't work with cirrus-ci, lets do it another way + +- attempt to autobuild for iOS + +GitHub (8 Dec 2021) +- [Brad House brought this change] + + Windows: rework/simplify initialization code, drop long EOL systems (#445) + + There was a lot of windows initialization code specific to the era that predates Windows Vista such as reading DNS configuration from the registry, and dynamically loading libraries to get access to functions that didn't exist in XP or earlier releases. + + Vista was released in January 2007, and was EOL'd in 2017, and support for Vista is still maintained with this patch set. + + XP was EOL'd in Apr 8 2014. + + I believe the last OS based on something earlier than Vista was POSReady 2009, as it was XP based for some reason, and that was EOL'd in January 2019. Considering any POS system falls under the PCI-DSS rules, they aren't allow to run POSReady 2009 any more so there is no reason to try to continue supporting such systems. + + We have also targeted with our build system Vista support for the last few years, and while developers could change the target, we haven't had any reports that they have. + +bradh352 (9 Nov 2021) +- Fix memory leak in reading /etc/hosts + + When an /etc/hosts lookup is performed, but fails with ENOTFOUND, and + a valid RFC6761 Section 6.3 fallback is performed, it could overwrite + variables that were already set and therefore leave the pointers + dangling, never to be cleaned up. + + Clean up explicitly on ENOTFOUND when returning from the file parser. + + Fixes: #439 + Fix By: Brad House (@bradh352) + +GitHub (2 Nov 2021) +- [Bobby Reynolds brought this change] + + Fix cross-compilation from Windows to Linux due to CPACK logic (#436) + + When determining value for CPACK_PACKAGE_ARCHITECTURE, prefer to use + value from CMAKE_SYSTEM_PROCESSOR before falling back to uname output. + + Additionally, if building from a Windows host, emit a fatal error + instead of attempting to call uname. + + Fix By: Bobby Reynolds (@reynoldsbd) + +bradh352 (1 Nov 2021) +- fix coveralls link + +- coveralls needs token + +- coveralls appears to require git + +- fix a couple of coveralls vars + +- more coveralls fixes + +- add code coverage libs to LDADD instead of _LIBS + +- make verbose + +- try to fix code coverage building + +- need -y for install + +- try to fix asan/ubsan/lsan when built with clang. try to support code coverage properly. + +- try another path + +- fix pip + +- attempt to enable some other build types that travis supported + Version 1.18.1 (26 Oct 2021) bradh352 (26 Oct 2021) @@ -4955,167 +5398,3 @@ Yang Tse (30 Dec 2009) Daniel Stenberg (30 Nov 2009) - start working on 1.7.1 - -Version 1.7.0 (27 Nov 2009) - -Yang Tse (27 Nov 2009) -- Preserve empty line following last target - -- - Larry Lansing fixed ares_parse_srv_reply to properly parse replies - which might contain non-SRV answers, skipping over potential non-SRV - ones such as CNAMEs. - -- When using icc, compile with -fpic and link with intel dynamic libraries. - -- Added 'currently' in italics to insist on transient situation. - -- Fix language - -- Daniel wants upcoming release to be 1.7.0 - -- Mention last changes - -- - Removed from external interface preprocessor symbol definition for - CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data() - makes it unnecessary. - -- Added README.msvc - -- Changed c-ares naming conventions when using MSVC as described in README.msvc - -- - Mention other recent changes - -- - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and - ares_addr6ttl in order to prevent name space pollution, along with - necessary changes to code base and man pages.This change does not break - ABI, there is no need to recompile existing applications. But existing - applications using these structs with the old name will need source code - adjustments when recompiled using c-ares 1.6.1. - -- - Jakub Hrozek fixed more function prototypes in man pages to sync them - with the ones declared in ares.h - -- Make configure remove the ares_build.h file included in distribution tarballs. - -- Fix macro redefinition. - -- Fix name space pollution. - -- Allow using different extra import libraries for debug and release builds. - -- Add manifest stuff to msvc makefile - -- Sync man page with reality - -- Add missing external API decoration for ares_set_socket_callback() - -- Add ares_free_data() man page. - -- - Provide in external interface preprocessor symbol definitions for - CARES_HAVE_ARES_FREE_DATA as an indication of function availability. - -- Remove typecast - -- Fix comment - -- Add ares_data.c and ares_data.h - -- Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API - to return a linked lists of results. These were also modified to internally - use the ares_data memory struct and as such its result must be free'ed with - ares_free_data(). - -- Initial support for the generic ares_free_data() function that will allow - applications to free memory allocated and returned by some c-ares funtions. - -- Make usage of calloc()'s arguments consistent with rest of code base - -- workaround icc 9.1 optimizer issue - -- Add icc fvisibility bug test - -- Fix icc 9.0 compiler warning: external definition with no prior declaration - -- Fix three var names - -- Add check for assert.h header file - -- getaddrinfo is fully thread safe on solaris versions which - implement the function even when h_errno is not a macro. - - The h_errno macro test now only done on systems for which there - is no hard coded knowledge about getaddrinfo's thread safeness. - -- Remove files generated on previous buildconf/configure run - -- Remove enable-thread / disable-thread configure option. These were only placebo - options. The library is always built as thread safe as possible on every system. - -- Refactor how preprocessor symbol _THREAD_SAFE definition is done. - -- Assume that getaddrinfo is thread safe, unless hard coded - knowledge says the contrary or h_errno is not defined. - -- Related with the threadsafe capability of getaddrinfo: - - - Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2 - and newer have a threadsafe getaddrinfo. - - - Fix Dragonfly BSD triplet detection. - - - In case the hard-coded knowledge says that getaddrinfo is threadsafe, - an additional check is done to verify that h_errno is also defined. - If h_errno isn't defined, we finally assume that it isn't threadsafe. - Jamie Lokier provided the inspiration for this extra check. - -- AIX 5.2 and newer have threadsafe getaddrinfo. - - Add some comments to better understand what the regex's pretend to achieve. - -- HP-UX 11.11 and later have threadsafe getaddrinfo - -- Check if getaddrinfo is threadsafe when function check allows it to be used - -- Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library - -- Add kernel32.lib - -- Mention last changes - -- Reinstate copyright symbol lost in previous commit - -- Make some strings different in resource file for debug or release builds - -- Ignore more subdirs - -- Fix compiler warning: conditional expression is constant - -- Sync linker and resource compiler options with Makefile.msvc - -- Follow Makefile.msvc subdirectory naming scheme, and sync compiler options - -- Updated MSVC makefile that allows building dynamic and static - c-ares libraries in debug and release flavours. - - Additionally each of the three sample programs is built against - each of the four possible c-ares libraries, generating all this - a total number of 12 executables and 4 libraries. - -- Test for USE_WINSOCK since it is more restrictive than WIN32 - -- Make header inclusion depend on HAVE_*_H definition - -- Remove unneeded preprocessor directives - -- Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds - -- source files used by sample programs - -- Renamed c-ares setup.h to ares_setup.h - -- Adjust include paths to take in account that currently: - - c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory. - - memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory - and also needs access to libcurl's generated curl_config.h diff --git a/lib/c-ares-1.18.1/CMakeLists.txt b/lib/c-ares-1.19.0/CMakeLists.txt similarity index 97% rename from lib/c-ares-1.18.1/CMakeLists.txt rename to lib/c-ares-1.19.0/CMakeLists.txt index cc4b590718d..d11c0bba52d 100644 --- a/lib/c-ares-1.18.1/CMakeLists.txt +++ b/lib/c-ares-1.19.0/CMakeLists.txt @@ -8,10 +8,10 @@ INCLUDE (CheckCSourceCompiles) INCLUDE (CheckStructHasMember) INCLUDE (CheckLibraryExists) -PROJECT (c-ares LANGUAGES C VERSION "1.18.0" ) +PROJECT (c-ares LANGUAGES C VERSION "1.19.0" ) # Set this version before release -SET (CARES_VERSION "1.18.1") +SET (CARES_VERSION "1.19.0") INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong. @@ -26,7 +26,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w # For example, a version of 4:0:2 would generate output such as: # libname.so -> libname.so.2 # libname.so.2 -> libname.so.2.2.0 -SET (CARES_LIB_VERSIONINFO "7:1:5") +SET (CARES_LIB_VERSIONINFO "8:0:6") OPTION (CARES_STATIC "Build as a static library" OFF) @@ -82,9 +82,14 @@ SET (TARGETS_INST_DEST # Function in Library # CHECK_LIBRARY_EXISTS can't be used as it will return true if the function -# is found in a different dependent library. +# is found in a different required/dependent library. MACRO (CARES_FUNCTION_IN_LIBRARY func lib var) + + SET (_ORIG_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") + SET (CMAKE_REQUIRED_LIBRARIES ) CHECK_FUNCTION_EXISTS ("${func}" "_CARES_FUNC_IN_LIB_GLOBAL_${func}") + SET (CMAKE_REQUIRED_LIBRARIES "${_ORIG_CMAKE_REQUIRED_LIBRARIES}") + IF ("${_CARES_FUNC_IN_LIB_GLOBAL_${func}}") SET (${var} FALSE) ELSE () @@ -689,6 +694,12 @@ IF (CARES_INSTALL) if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) if ( "${CPACK_PACKAGE_ARCHITECTURE}" STREQUAL "" ) + set( CPACK_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}" ) + endif() + if ( "${CPACK_PACKAGE_ARCHITECTURE}" STREQUAL "" ) + if ( "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows" ) + message( FATAL_ERROR "Failed to determine CPACK_PACKAGE_ARCHITECTURE. Is CMAKE_SYSTEM_PROCESSOR set?" ) + endif() # Note: the architecture should default to the local architecture, but it # in fact comes up empty. We call `uname -m` to ask the kernel instead. EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE ) diff --git a/lib/c-ares-1.18.1/CONTRIBUTING.md b/lib/c-ares-1.19.0/CONTRIBUTING.md similarity index 100% rename from lib/c-ares-1.18.1/CONTRIBUTING.md rename to lib/c-ares-1.19.0/CONTRIBUTING.md diff --git a/lib/c-ares-1.18.1/INSTALL.md b/lib/c-ares-1.19.0/INSTALL.md similarity index 95% rename from lib/c-ares-1.18.1/INSTALL.md rename to lib/c-ares-1.19.0/INSTALL.md index 1e33ad7fd0e..0f9d95a5219 100644 --- a/lib/c-ares-1.18.1/INSTALL.md +++ b/lib/c-ares-1.19.0/INSTALL.md @@ -382,6 +382,20 @@ sure that the var `OSTYPE` contains the string 'linux'; set the var `NDKBASE` to point to the base of your Novell NDK; and then type `make -f Makefile.netware` from the top source directory; +VCPKG +===== + +You can build and install c-ares using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: + +```sh or powershell + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install c-ares +``` + +The c-ares port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. PORTS ===== diff --git a/lib/c-ares-1.18.1/LICENSE.md b/lib/c-ares-1.19.0/LICENSE.md similarity index 100% rename from lib/c-ares-1.18.1/LICENSE.md rename to lib/c-ares-1.19.0/LICENSE.md diff --git a/lib/c-ares-1.18.1/Makefile.Watcom b/lib/c-ares-1.19.0/Makefile.Watcom similarity index 100% rename from lib/c-ares-1.18.1/Makefile.Watcom rename to lib/c-ares-1.19.0/Makefile.Watcom diff --git a/lib/c-ares-1.18.1/Makefile.am b/lib/c-ares-1.19.0/Makefile.am similarity index 100% rename from lib/c-ares-1.18.1/Makefile.am rename to lib/c-ares-1.19.0/Makefile.am diff --git a/lib/c-ares-1.18.1/Makefile.dj b/lib/c-ares-1.19.0/Makefile.dj similarity index 100% rename from lib/c-ares-1.18.1/Makefile.dj rename to lib/c-ares-1.19.0/Makefile.dj diff --git a/lib/c-ares-1.18.1/Makefile.in b/lib/c-ares-1.19.0/Makefile.in similarity index 99% rename from lib/c-ares-1.18.1/Makefile.in rename to lib/c-ares-1.19.0/Makefile.in index 7d7b59eaa2d..a512effa1f6 100644 --- a/lib/c-ares-1.18.1/Makefile.in +++ b/lib/c-ares-1.19.0/Makefile.in @@ -297,6 +297,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ diff --git a/lib/c-ares-1.18.1/Makefile.m32 b/lib/c-ares-1.19.0/Makefile.m32 similarity index 100% rename from lib/c-ares-1.18.1/Makefile.m32 rename to lib/c-ares-1.19.0/Makefile.m32 diff --git a/lib/c-ares-1.18.1/Makefile.msvc b/lib/c-ares-1.19.0/Makefile.msvc similarity index 100% rename from lib/c-ares-1.18.1/Makefile.msvc rename to lib/c-ares-1.19.0/Makefile.msvc diff --git a/lib/c-ares-1.18.1/Makefile.netware b/lib/c-ares-1.19.0/Makefile.netware similarity index 100% rename from lib/c-ares-1.18.1/Makefile.netware rename to lib/c-ares-1.19.0/Makefile.netware diff --git a/lib/c-ares-1.18.1/NEWS b/lib/c-ares-1.19.0/NEWS similarity index 100% rename from lib/c-ares-1.18.1/NEWS rename to lib/c-ares-1.19.0/NEWS diff --git a/lib/c-ares-1.18.1/README.cares b/lib/c-ares-1.19.0/README.cares similarity index 100% rename from lib/c-ares-1.18.1/README.cares rename to lib/c-ares-1.19.0/README.cares diff --git a/lib/c-ares-1.18.1/README.md b/lib/c-ares-1.19.0/README.md similarity index 95% rename from lib/c-ares-1.18.1/README.md rename to lib/c-ares-1.19.0/README.md index 24a96c453dd..b507a5c288e 100644 --- a/lib/c-ares-1.18.1/README.md +++ b/lib/c-ares-1.19.0/README.md @@ -3,7 +3,7 @@ c-ares [![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg)](https://cirrus-ci.com/github/c-ares/c-ares) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/aevgc5914tm72pvs/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares/branch/master) -[![Coverage Status](https://coveralls.io/repos/c-ares/c-ares/badge.svg?branch=master&service=github)](https://coveralls.io/github/c-ares/c-ares?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/c-ares/c-ares/badge.svg)](https://coveralls.io/github/c-ares/c-ares) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/c-ares.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:c-ares) [![Releases](https://coderelease.io/badge/c-ares/c-ares)](https://coderelease.io/github/repository/c-ares/c-ares) diff --git a/lib/c-ares-1.18.1/README.msvc b/lib/c-ares-1.19.0/README.msvc similarity index 100% rename from lib/c-ares-1.18.1/README.msvc rename to lib/c-ares-1.19.0/README.msvc diff --git a/lib/c-ares-1.19.0/RELEASE-NOTES b/lib/c-ares-1.19.0/RELEASE-NOTES new file mode 100644 index 00000000000..db705905bae --- /dev/null +++ b/lib/c-ares-1.19.0/RELEASE-NOTES @@ -0,0 +1,91 @@ +c-ares version 1.19.0 + +This is a feature and bugfix release. It addresses a couple of new feature +requests as well as a couple of bug fixes. + +Security: + o Low. Stack overflow in ares_set_sortlist() which is used during c-ares + initialization and typically provided by an administrator and not an + end user. [24] + +Changes: + o Windows: Drop support for XP and derivatives which greatly cleans up + initialization code. [3] + o Add ARES_OPT_HOSTS_FILE similar to ARES_OPT_RESOLVCONF for specifying a + custom hosts file location. [10] + o Add vcpkg installation instructions [13] + +Bug fixes: + o Fix cross-compilation from Windows to Linux due to CPACK logic. [1] + o Fix memory leak in reading /etc/hosts when using localhost fallback. [2] + o Fix chain building c-ares when libresolv is already included by another + project [4] + o File lookup should not immediately abort as there may be other tries due to + search criteria. + o Asterisks should be allowed in host validation as CNAMEs may reference + wildcard domains [5] + o AutoTools build system referenced bad STDC_HEADERS macro [6] + o Even if one address class returns a failure for ares_getaddrinfo() we should + still return the results we have + o CMake Windows: DLLs did not include resource file to include versions [7] [8] + o CMake: Guard target creation in exported config [9] + o Fix ares_getaddrinfo() numerical address resolution with AF_UNSPEC [11] + o Apple: fix libresolv configured query times. [12] + o Fix tools and help information [14] [15] + o Various documentation fixes and cleanups [16] [22] [25] + o Add include guards to ares_data.h [17] + o c-ares could try to exceed maximum number of iovec entries supported by + system [18] + o CMake package config generation allow for absolute install paths [19] + o Intel compiler fixes [20] + o ares_strsplit bugs [21] [23] + o The RFC6761 6.3 states localhost subdomains must be offline too. [26] + +Thanks go to these friendly people for their efforts and contributions: + Boby Reynolds (@reynoldsbd) + Brad House (@bradh352) + Brad Spencer (@b-spencer) + @bsergean + Daniel Stenberg (@bagder) + Dmitry Karpov + @FrankXie05 + @hopper-vul + Jonathan Ringer (@jonringer) + Kai Pastor (@dg0yt) + @lifenjoiner + Manish Mehra (@mmehra) + @marc-groundctl + Nikolaos Chatzikonstantinou (@createyourpersonalaccount) + Ridge Kennedy (@ridgek) + Sam James (@thesamesam) + Stephen Sachs (@stephenmsachs) + Thomas Dreibholz (@dreibh) +(18 contributors) + +References to bug reports and discussions on issues: + [1] = https://github.com/c-ares/c-ares/pull/436 + [2] = https://github.com/c-ares/c-ares/issues/439 + [3] = https://github.com/c-ares/c-ares/pull/445 + [4] = https://github.com/c-ares/c-ares/pull/451 + [5] = https://github.com/c-ares/c-ares/issues/457 + [6] = https://github.com/c-ares/c-ares/pull/459 + [7] = https://github.com/c-ares/c-ares/issues/460 + [8] = https://github.com/c-ares/c-ares/pull/468 + [9] = https://github.com/c-ares/c-ares/pull/464 + [10] = https://github.com/c-ares/c-ares/pull/465 + [11] = https://github.com/c-ares/c-ares/pull/469 + [12] = https://github.com/c-ares/c-ares/pull/467 + [13] = https://github.com/c-ares/c-ares/pull/478 + [14] = https://github.com/c-ares/c-ares/pull/479 + [15] = https://github.com/c-ares/c-ares/pull/481 + [16] = https://github.com/c-ares/c-ares/pull/490 + [17] = https://github.com/c-ares/c-ares/pull/491 + [18] = https://github.com/c-ares/c-ares/pull/489 + [19] = https://github.com/c-ares/c-ares/pull/486 + [20] = https://github.com/c-ares/c-ares/pull/485 + [21] = https://github.com/c-ares/c-ares/pull/492 + [22] = https://github.com/c-ares/c-ares/pull/494 + [23] = https://github.com/c-ares/c-ares/pull/495 + [24] = https://github.com/c-ares/c-ares/pull/497 + [25] = https://github.com/c-ares/c-ares/issues/487 + [26] = https://github.com/c-ares/c-ares/issues/477 diff --git a/lib/c-ares-1.18.1/SECURITY.md b/lib/c-ares-1.19.0/SECURITY.md similarity index 100% rename from lib/c-ares-1.18.1/SECURITY.md rename to lib/c-ares-1.19.0/SECURITY.md diff --git a/lib/c-ares-1.18.1/TODO b/lib/c-ares-1.19.0/TODO similarity index 100% rename from lib/c-ares-1.18.1/TODO rename to lib/c-ares-1.19.0/TODO diff --git a/lib/c-ares-1.18.1/acinclude.m4 b/lib/c-ares-1.19.0/acinclude.m4 similarity index 100% rename from lib/c-ares-1.18.1/acinclude.m4 rename to lib/c-ares-1.19.0/acinclude.m4 diff --git a/lib/c-ares-1.18.1/aclocal.m4 b/lib/c-ares-1.19.0/aclocal.m4 similarity index 100% rename from lib/c-ares-1.18.1/aclocal.m4 rename to lib/c-ares-1.19.0/aclocal.m4 diff --git a/lib/c-ares-1.18.1/aminclude_static.am b/lib/c-ares-1.19.0/aminclude_static.am similarity index 99% rename from lib/c-ares-1.18.1/aminclude_static.am rename to lib/c-ares-1.19.0/aminclude_static.am index c90aef60a4b..aad78eb4b1e 100644 --- a/lib/c-ares-1.18.1/aminclude_static.am +++ b/lib/c-ares-1.19.0/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Wed Oct 27 08:06:13 CEST 2021 +# from AX_AM_MACROS_STATIC on Sat Jan 28 22:07:59 CET 2023 # Code coverage diff --git a/lib/c-ares-1.18.1/buildconf b/lib/c-ares-1.19.0/buildconf similarity index 100% rename from lib/c-ares-1.18.1/buildconf rename to lib/c-ares-1.19.0/buildconf diff --git a/lib/c-ares-1.18.1/buildconf.bat b/lib/c-ares-1.19.0/buildconf.bat similarity index 100% rename from lib/c-ares-1.18.1/buildconf.bat rename to lib/c-ares-1.19.0/buildconf.bat diff --git a/lib/c-ares-1.18.1/c-ares-config.cmake.in b/lib/c-ares-1.19.0/c-ares-config.cmake.in similarity index 50% rename from lib/c-ares-1.18.1/c-ares-config.cmake.in rename to lib/c-ares-1.19.0/c-ares-config.cmake.in index 464837b3750..1d05b24e547 100644 --- a/lib/c-ares-1.18.1/c-ares-config.cmake.in +++ b/lib/c-ares-1.19.0/c-ares-config.cmake.in @@ -8,14 +8,17 @@ include("${CMAKE_CURRENT_LIST_DIR}/c-ares-targets.cmake") set(c-ares_LIBRARY c-ares::cares) if(@CARES_SHARED@) - add_library(c-ares::cares_shared INTERFACE IMPORTED) - set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") + if(NOT TARGET c-ares::cares_shared) + add_library(c-ares::cares_shared INTERFACE IMPORTED) + set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") + endif() set(c-ares_SHARED_LIBRARY c-ares::cares_shared) -elseif(@CARES_STATIC@) - add_library(c-ares::cares_static INTERFACE IMPORTED) - set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") endif() if(@CARES_STATIC@) + if(NOT TARGET c-ares::cares_static) + add_library(c-ares::cares_static INTERFACE IMPORTED) + set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") + endif() set(c-ares_STATIC_LIBRARY c-ares::cares_static) endif() diff --git a/lib/c-ares-1.18.1/compile b/lib/c-ares-1.19.0/compile similarity index 100% rename from lib/c-ares-1.18.1/compile rename to lib/c-ares-1.19.0/compile diff --git a/lib/c-ares-1.18.1/test/config.guess b/lib/c-ares-1.19.0/config.guess similarity index 54% rename from lib/c-ares-1.18.1/test/config.guess rename to lib/c-ares-1.19.0/config.guess index f50dcdb6de2..7f76b6228f7 100755 --- a/lib/c-ares-1.18.1/test/config.guess +++ b/lib/c-ares-1.19.0/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-02-24' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # This file 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 +# 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 @@ -27,11 +29,19 @@ timestamp='2018-02-24' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,7 +94,8 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -96,73 +107,90 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -174,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -188,18 +216,18 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -215,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -226,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -237,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -289,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -326,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -446,43 +490,43 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -508,78 +552,79 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -593,16 +638,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -610,57 +655,57 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + if test "$HP_ARCH" = ""; then + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -698,9 +743,9 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,14 +764,14 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -754,36 +799,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -791,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -809,103 +855,129 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -916,187 +988,225 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI=${LIBC}x32 + fi fi - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1104,12 +1214,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1119,11 +1229,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1131,31 +1241,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1180,249 +1290,404 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2022 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/c-ares-1.18.1/configure b/lib/c-ares-1.19.0/configure similarity index 98% rename from lib/c-ares-1.18.1/configure rename to lib/c-ares-1.19.0/configure index 737f0a0ddd9..4c5e1a966c6 100755 --- a/lib/c-ares-1.18.1/configure +++ b/lib/c-ares-1.19.0/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for c-ares 1.18.1. +# Generated by GNU Autoconf 2.71 for c-ares 1.19.0. # # Report bugs to . # @@ -855,8 +855,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.18.1' -PACKAGE_STRING='c-ares 1.18.1' +PACKAGE_VERSION='1.19.0' +PACKAGE_STRING='c-ares 1.19.0' PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' PACKAGE_URL='' @@ -927,6 +927,7 @@ DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR +FILECMD LN_S NM ac_ct_DUMPBIN @@ -1649,7 +1650,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures c-ares 1.18.1 to adapt to many kinds of systems. +\`configure' configures c-ares 1.19.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1720,7 +1721,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.18.1:";; + short | recursive ) echo "Configuration of c-ares 1.19.0:";; esac cat <<\_ACEOF @@ -1860,7 +1861,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.18.1 +c-ares configure 1.19.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2452,7 +2453,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c-ares $as_me 1.18.1, which was +It was created by c-ares $as_me 1.19.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3425,7 +3426,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -CARES_VERSION_INFO="7:1:5" +CARES_VERSION_INFO="8:0:6" @@ -6204,11 +6205,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} +if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_11=no + ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6250,11 +6251,11 @@ if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} +if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_prog_cxx_98=no + ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6875,7 +6876,7 @@ fi # Define the identity of the package. PACKAGE='c-ares' - VERSION='1.18.1' + VERSION='1.19.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -8733,8 +8734,8 @@ esac -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' @@ -9145,13 +9146,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -9289,7 +9290,7 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -9393,7 +9394,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -9436,7 +9437,7 @@ else $as_nop sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -9641,6 +9642,114 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. +set dummy ${ac_tool_prefix}file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="${ac_tool_prefix}file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_FILECMD"; then + ac_ct_FILECMD=$FILECMD + # Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_FILECMD"; then + ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD +if test -n "$ac_ct_FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 +printf "%s\n" "$ac_ct_FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_FILECMD" = x; then + FILECMD=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FILECMD=$ac_ct_FILECMD + fi +else + FILECMD="$ac_cv_prog_FILECMD" +fi + + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 @@ -9781,7 +9890,7 @@ beos*) bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -9815,14 +9924,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -9836,7 +9945,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -9883,7 +9992,7 @@ netbsd* | netbsdelf*-gnu) newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -10253,13 +10362,29 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cr} +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS + + + + + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + @@ -10676,7 +10801,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -10694,20 +10819,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -10731,7 +10856,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -10749,9 +10874,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -10951,7 +11076,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -11076,7 +11201,7 @@ ia64-*-hpux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -11097,7 +11222,7 @@ ia64-*-hpux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -11109,7 +11234,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -11135,7 +11260,7 @@ mips64*-*linux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -11143,7 +11268,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -11151,7 +11276,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -11175,14 +11300,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -11290,7 +11415,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -12073,8 +12198,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -12101,17 +12226,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; } _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[912]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[012],*|,*powerpc*-darwin[5-8]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -12944,8 +13064,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -13463,7 +13583,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -13886,15 +14006,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -13949,7 +14069,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -14061,6 +14181,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; interix[3-9]*) @@ -14075,7 +14196,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -14118,7 +14239,7 @@ _LT_EOF compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -14130,13 +14251,14 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) @@ -14146,7 +14268,7 @@ _LT_EOF archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -14278,7 +14400,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -14549,12 +14671,12 @@ fi cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -14595,7 +14717,7 @@ fi fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -14636,8 +14758,8 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -14671,7 +14793,7 @@ fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -14852,6 +14974,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; @@ -14923,6 +15046,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; osf3*) @@ -15615,7 +15739,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -15625,14 +15749,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -15651,7 +15775,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -15688,7 +15812,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -15721,7 +15845,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -16886,30 +17010,41 @@ striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; - esac + ;; + esac + fi fi @@ -17679,8 +17814,8 @@ fi cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' @@ -17771,11 +17906,11 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -17810,6 +17945,7 @@ fi emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes + file_list_spec_CXX='@' ;; dgux*) @@ -17840,7 +17976,7 @@ fi archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -17977,7 +18113,7 @@ fi # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -18117,13 +18253,13 @@ fi archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' @@ -18780,7 +18916,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -18863,7 +18999,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_static_CXX='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' @@ -19250,7 +19386,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -19258,7 +19394,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -19609,7 +19745,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) @@ -19618,14 +19754,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -19644,7 +19780,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -19681,7 +19817,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -19713,7 +19849,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -21736,8 +21872,8 @@ squeeze() { INTEL_UNIX_C) # tmp_CFLAGS="$tmp_CFLAGS -std=gnu89" - tmp_CPPFLAGS="$tmp_CPPFLAGS -we 140,147,165,266" - tmp_CPPFLAGS="$tmp_CPPFLAGS -wd 279,981,1469" + tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-error 140,147,165,266" + tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1469" ;; # INTEL_WINDOWS_C) @@ -24543,7 +24679,83 @@ fi -STDC_HEADERS +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } @@ -34652,7 +34864,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c-ares $as_me 1.18.1, which was +This file was extended by c-ares $as_me 1.19.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34720,7 +34932,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -c-ares config.status 1.18.1 +c-ares config.status 1.19.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -34886,12 +35098,14 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -35069,13 +35283,13 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ +FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ -AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -36077,6 +36291,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# A file(cmd) program that detects file types. +FILECMD=$lt_FILECMD + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -36095,8 +36312,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR +# Flags to create an archive (by configure). +lt_ar_flags=$lt_ar_flags + # Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS +AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -36486,7 +36706,7 @@ ltmain=$ac_aux_dir/ltmain.sh # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || diff --git a/lib/c-ares-1.18.1/configure.ac b/lib/c-ares-1.19.0/configure.ac similarity index 99% rename from lib/c-ares-1.18.1/configure.ac rename to lib/c-ares-1.19.0/configure.ac index 1d0fb5ce4e5..56a570bce01 100644 --- a/lib/c-ares-1.18.1/configure.ac +++ b/lib/c-ares-1.19.0/configure.ac @@ -1,9 +1,9 @@ AC_PREREQ([2.60]) -AC_INIT([c-ares], [1.18.1], +AC_INIT([c-ares], [1.19.0], [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) -CARES_VERSION_INFO="7:1:5" +CARES_VERSION_INFO="8:0:6" dnl This flag accepts an argument of the form current[:revision[:age]]. So, dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to dnl 1. @@ -493,7 +493,7 @@ dnl Back to "normal" configuring dnl ********************************************************************** dnl Checks for header files. -STDC_HEADERS +AC_HEADER_STDC AC_PROG_EGREP diff --git a/lib/c-ares-1.18.1/depcomp b/lib/c-ares-1.19.0/depcomp similarity index 100% rename from lib/c-ares-1.18.1/depcomp rename to lib/c-ares-1.19.0/depcomp diff --git a/lib/c-ares-1.18.1/docs/CMakeLists.txt b/lib/c-ares-1.19.0/docs/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.18.1/docs/CMakeLists.txt rename to lib/c-ares-1.19.0/docs/CMakeLists.txt diff --git a/lib/c-ares-1.18.1/docs/Makefile.am b/lib/c-ares-1.19.0/docs/Makefile.am similarity index 100% rename from lib/c-ares-1.18.1/docs/Makefile.am rename to lib/c-ares-1.19.0/docs/Makefile.am diff --git a/lib/c-ares-1.18.1/docs/Makefile.in b/lib/c-ares-1.19.0/docs/Makefile.in similarity index 99% rename from lib/c-ares-1.18.1/docs/Makefile.in rename to lib/c-ares-1.19.0/docs/Makefile.in index b4e656ec2e8..94dc18d1e04 100644 --- a/lib/c-ares-1.18.1/docs/Makefile.in +++ b/lib/c-ares-1.19.0/docs/Makefile.in @@ -224,6 +224,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ diff --git a/lib/c-ares-1.18.1/docs/Makefile.inc b/lib/c-ares-1.19.0/docs/Makefile.inc similarity index 100% rename from lib/c-ares-1.18.1/docs/Makefile.inc rename to lib/c-ares-1.19.0/docs/Makefile.inc diff --git a/lib/c-ares-1.18.1/docs/acountry.1 b/lib/c-ares-1.19.0/docs/acountry.1 similarity index 98% rename from lib/c-ares-1.18.1/docs/acountry.1 rename to lib/c-ares-1.19.0/docs/acountry.1 index 8c3aaea848d..ab5ab3d0223 100644 --- a/lib/c-ares-1.18.1/docs/acountry.1 +++ b/lib/c-ares-1.19.0/docs/acountry.1 @@ -17,7 +17,7 @@ This utility comes with the \fBc\-ares\fR asynchronous resolver library. \fB\-d\fR Print some extra debugging output. .TP -\fB\-h\fR, \fB\-\-help\fR +\fB\-h\fR, \fB\-?\fR Display this help and exit. .TP \fB\-v\fR diff --git a/lib/c-ares-1.18.1/docs/adig.1 b/lib/c-ares-1.19.0/docs/adig.1 similarity index 80% rename from lib/c-ares-1.18.1/docs/adig.1 rename to lib/c-ares-1.19.0/docs/adig.1 index 2056b959dbf..52ff49b7395 100644 --- a/lib/c-ares-1.18.1/docs/adig.1 +++ b/lib/c-ares-1.19.0/docs/adig.1 @@ -18,34 +18,40 @@ This utility comes with the \fBc\-ares\fR asynchronous resolver library. \fB\-c\fR class Set the query class. Possible values for class are -NY, CHAOS, HS, IN (default). +ANY, CHAOS, HS and IN (default). .TP \fB\-d\fR Print some extra debugging output. .TP \fB\-f\fR flag -Add a flag. +Add a behavior control flag. Possible values for flag are -igntc, noaliases, norecurse, primary, stayopen, usevc. + igntc - ignore to query in TCP to get truncated UDP answer, + noaliases - don't honor the HOSTALIASES environment variable, + norecurse - don't query upstream servers recursively, + primary - use the first server, + stayopen - don't close the communication sockets, and + usevc - always use TCP. .TP -\fB\-h\fR, \fB\-\-help\fR +\fB\-h\fR, \fB\-?\fR Display this help and exit. .TP -\fB\-T\fR port -Use specified TCP port to connect to DNS server. -.TP \fB\-s\fR server Connect to specified DNS server, instead of the system's default one(s). +Servers are tried in round-robin, if the previous one failed. .TP \fB\-t\fR type Query records of specified type. Possible values for type are A (default), AAAA, AFSDB, ANY, AXFR, CNAME, GPOS, HINFO, ISDN, KEY, LOC, MAILA, MAILB, MB, MD, MF, MG, MINFO, MR, MX, NAPTR, NS, NSAP, NSAP_PTR, NULL, -PTR, PX, RP, RT, SIG, SOA, SRV, TXT, URI, WKS, X25, +PTR, PX, RP, RT, SIG, SOA, SRV, TXT, URI, WKS and X25. +.TP +\fB\-T\fR port +Connect to the specified TCP port of DNS server. .TP \fB\-U\fR port -Use specified UDP port to connect to DNS server. +Connect to the specified UDP port of DNS server. .TP \fB\-x\fR For an IPv4 \fB-t PTR a.b.c.d\fR lookup, query for diff --git a/lib/c-ares-1.18.1/docs/ahost.1 b/lib/c-ares-1.19.0/docs/ahost.1 similarity index 98% rename from lib/c-ares-1.18.1/docs/ahost.1 rename to lib/c-ares-1.19.0/docs/ahost.1 index 430af821d49..07d9d1d18a1 100644 --- a/lib/c-ares-1.18.1/docs/ahost.1 +++ b/lib/c-ares-1.19.0/docs/ahost.1 @@ -17,7 +17,7 @@ This utility comes with the \fBc\-ares\fR asynchronous resolver library. \fB\-d\fR Print some extra debugging output. .TP -\fB\-h\fR, \fB\-\-help\fR +\fB\-h\fR, \fB\-?\fR Display this help and exit. .TP \fB\-t\fR type diff --git a/lib/c-ares-1.18.1/docs/ares_cancel.3 b/lib/c-ares-1.19.0/docs/ares_cancel.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_cancel.3 rename to lib/c-ares-1.19.0/docs/ares_cancel.3 diff --git a/lib/c-ares-1.18.1/docs/ares_create_query.3 b/lib/c-ares-1.19.0/docs/ares_create_query.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_create_query.3 rename to lib/c-ares-1.19.0/docs/ares_create_query.3 diff --git a/lib/c-ares-1.18.1/docs/ares_destroy.3 b/lib/c-ares-1.19.0/docs/ares_destroy.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_destroy.3 rename to lib/c-ares-1.19.0/docs/ares_destroy.3 diff --git a/lib/c-ares-1.18.1/docs/ares_destroy_options.3 b/lib/c-ares-1.19.0/docs/ares_destroy_options.3 similarity index 93% rename from lib/c-ares-1.18.1/docs/ares_destroy_options.3 rename to lib/c-ares-1.19.0/docs/ares_destroy_options.3 index 31e346b7953..d3779b60cf4 100644 --- a/lib/c-ares-1.18.1/docs/ares_destroy_options.3 +++ b/lib/c-ares-1.19.0/docs/ares_destroy_options.3 @@ -18,9 +18,9 @@ ares_destroy_options \- Destroy options initialized with ares_save_options .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_destroy_options(struct ares_options *\fIoptions\fP) +#include + +void ares_destroy_options(struct ares_options *\fIoptions\fP) .fi .SH DESCRIPTION The \fBares_destroy_options(3)\fP function destroys the options struct diff --git a/lib/c-ares-1.18.1/docs/ares_dup.3 b/lib/c-ares-1.19.0/docs/ares_dup.3 similarity index 93% rename from lib/c-ares-1.18.1/docs/ares_dup.3 rename to lib/c-ares-1.19.0/docs/ares_dup.3 index e64c10423d0..925c0cdd5f7 100644 --- a/lib/c-ares-1.18.1/docs/ares_dup.3 +++ b/lib/c-ares-1.19.0/docs/ares_dup.3 @@ -18,9 +18,9 @@ ares_dup \- Duplicate a resolver channel .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_dup(ares_channel *\fIdest\fP, ares_channel \fIsource\fP) +#include + +int ares_dup(ares_channel *\fIdest\fP, ares_channel \fIsource\fP) .fi .SH DESCRIPTION The \fBares_dup(3)\fP function duplicates an existing communications channel diff --git a/lib/c-ares-1.18.1/docs/ares_expand_name.3 b/lib/c-ares-1.19.0/docs/ares_expand_name.3 similarity index 90% rename from lib/c-ares-1.18.1/docs/ares_expand_name.3 rename to lib/c-ares-1.19.0/docs/ares_expand_name.3 index fc18df3ee30..e750ab89162 100644 --- a/lib/c-ares-1.18.1/docs/ares_expand_name.3 +++ b/lib/c-ares-1.19.0/docs/ares_expand_name.3 @@ -18,11 +18,11 @@ ares_expand_name \- Expand a DNS-encoded domain name .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_expand_name(const unsigned char *\fIencoded\fP, -.B const unsigned char *\fIabuf\fP, int \fIalen\fP, char **\fIs\fP, -.B long *\fIenclen\fP) +#include + +int ares_expand_name(const unsigned char *\fIencoded\fP, + const unsigned char *\fIabuf\fP, int \fIalen\fP, + char **\fIs\fP, long *\fIenclen\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_expand_string.3 b/lib/c-ares-1.19.0/docs/ares_expand_string.3 similarity index 89% rename from lib/c-ares-1.18.1/docs/ares_expand_string.3 rename to lib/c-ares-1.19.0/docs/ares_expand_string.3 index 33dd7bdada1..89037424f1f 100644 --- a/lib/c-ares-1.18.1/docs/ares_expand_string.3 +++ b/lib/c-ares-1.19.0/docs/ares_expand_string.3 @@ -18,11 +18,11 @@ ares_expand_string \- Expand a length encoded string .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_expand_string(const unsigned char *\fIencoded\fP, -.B const unsigned char *\fIabuf\fP, int \fIalen\fP, unsigned char **\fIs\fP, -.B long *\fIenclen\fP) +#include + +int ares_expand_string(const unsigned char *\fIencoded\fP, + const unsigned char *\fIabuf\fP, int \fIalen\fP, + unsigned char **\fIs\fP, long *\fIenclen\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_fds.3 b/lib/c-ares-1.19.0/docs/ares_fds.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_fds.3 rename to lib/c-ares-1.19.0/docs/ares_fds.3 diff --git a/lib/c-ares-1.18.1/docs/ares_free_data.3 b/lib/c-ares-1.19.0/docs/ares_free_data.3 similarity index 96% rename from lib/c-ares-1.18.1/docs/ares_free_data.3 rename to lib/c-ares-1.19.0/docs/ares_free_data.3 index 18e83ce7821..a6f3938be5c 100644 --- a/lib/c-ares-1.18.1/docs/ares_free_data.3 +++ b/lib/c-ares-1.19.0/docs/ares_free_data.3 @@ -19,11 +19,9 @@ ares_free_data \- Free data allocated by several c-ares functions .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_free_data(void *\fIdataptr\fP) -.PP -.B cc file.c -lcares +#include + +void ares_free_data(void *\fIdataptr\fP) .fi .SH DESCRIPTION .PP diff --git a/lib/c-ares-1.18.1/docs/ares_free_hostent.3 b/lib/c-ares-1.19.0/docs/ares_free_hostent.3 similarity index 95% rename from lib/c-ares-1.18.1/docs/ares_free_hostent.3 rename to lib/c-ares-1.19.0/docs/ares_free_hostent.3 index d692801bafe..7c92724e70c 100644 --- a/lib/c-ares-1.18.1/docs/ares_free_hostent.3 +++ b/lib/c-ares-1.19.0/docs/ares_free_hostent.3 @@ -18,9 +18,9 @@ ares_free_hostent \- Free host structure allocated by ares functions .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_free_hostent(struct hostent *\fIhost\fP) +#include + +void ares_free_hostent(struct hostent *\fIhost\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_free_string.3 b/lib/c-ares-1.19.0/docs/ares_free_string.3 similarity index 94% rename from lib/c-ares-1.18.1/docs/ares_free_string.3 rename to lib/c-ares-1.19.0/docs/ares_free_string.3 index 61d88aa27fc..d8a8e4689b5 100644 --- a/lib/c-ares-1.18.1/docs/ares_free_string.3 +++ b/lib/c-ares-1.19.0/docs/ares_free_string.3 @@ -18,9 +18,9 @@ ares_free_string \- Free strings allocated by ares functions .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_free_string(void *\fIstr\fP) +#include + +void ares_free_string(void *\fIstr\fP) .fi .SH DESCRIPTION The \fIares_free_string(3)\fP function frees a string allocated by an ares diff --git a/lib/c-ares-1.18.1/docs/ares_freeaddrinfo.3 b/lib/c-ares-1.19.0/docs/ares_freeaddrinfo.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_freeaddrinfo.3 rename to lib/c-ares-1.19.0/docs/ares_freeaddrinfo.3 diff --git a/lib/c-ares-1.18.1/docs/ares_get_servers.3 b/lib/c-ares-1.19.0/docs/ares_get_servers.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_get_servers.3 rename to lib/c-ares-1.19.0/docs/ares_get_servers.3 index d6064289bb7..eb5861b6015 100644 --- a/lib/c-ares-1.18.1/docs/ares_get_servers.3 +++ b/lib/c-ares-1.19.0/docs/ares_get_servers.3 @@ -19,10 +19,13 @@ ares_get_servers, ares_get_servers_ports \- Retrieve name servers from an initialized ares_channel .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_get_servers(ares_channel \fIchannel\fP, struct ares_addr_node **\fIservers\fP) -.B int ares_get_servers_ports(ares_channel \fIchannel\fP, struct ares_addr_port_node **\fIservers\fP) +#include + +int ares_get_servers(ares_channel \fIchannel\fP, + struct ares_addr_node **\fIservers\fP) + +int ares_get_servers_ports(ares_channel \fIchannel\fP, + struct ares_addr_port_node **\fIservers\fP) .fi .SH DESCRIPTION The \fBares_get_servers(3)\fP function retrieves name servers configuration diff --git a/lib/c-ares-1.18.1/docs/ares_get_servers_ports.3 b/lib/c-ares-1.19.0/docs/ares_get_servers_ports.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_get_servers_ports.3 rename to lib/c-ares-1.19.0/docs/ares_get_servers_ports.3 diff --git a/lib/c-ares-1.18.1/docs/ares_getaddrinfo.3 b/lib/c-ares-1.19.0/docs/ares_getaddrinfo.3 similarity index 90% rename from lib/c-ares-1.18.1/docs/ares_getaddrinfo.3 rename to lib/c-ares-1.19.0/docs/ares_getaddrinfo.3 index 33c8a50dd3f..eb085e5d26e 100644 --- a/lib/c-ares-1.18.1/docs/ares_getaddrinfo.3 +++ b/lib/c-ares-1.19.0/docs/ares_getaddrinfo.3 @@ -18,14 +18,16 @@ ares_getaddrinfo \- Initiate a host query by name and service .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_addrinfo_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, struct ares_addrinfo *\fIresult\fP) -.PP -.B void ares_getaddrinfo(ares_channel \fIchannel\fP, const char *\fIname\fP, -.B const char* \fIservice\fP, const struct ares_addrinfo_hints *\fIhints\fP, -.B ares_addrinfo_callback \fIcallback\fP, void *\fIarg\fP) +#include + +typedef void (*ares_addrinfo_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, + struct ares_addrinfo *\fIresult\fP) + +void ares_getaddrinfo(ares_channel \fIchannel\fP, const char *\fIname\fP, + const char* \fIservice\fP, + const struct ares_addrinfo_hints *\fIhints\fP, + ares_addrinfo_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_gethostbyaddr.3 b/lib/c-ares-1.19.0/docs/ares_gethostbyaddr.3 similarity index 86% rename from lib/c-ares-1.18.1/docs/ares_gethostbyaddr.3 rename to lib/c-ares-1.19.0/docs/ares_gethostbyaddr.3 index 77273075566..c58ca506150 100644 --- a/lib/c-ares-1.18.1/docs/ares_gethostbyaddr.3 +++ b/lib/c-ares-1.19.0/docs/ares_gethostbyaddr.3 @@ -18,14 +18,15 @@ ares_gethostbyaddr \- Initiate a host query by address .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, struct hostent *\fIhostent\fP) -.PP -.B void ares_gethostbyaddr(ares_channel \fIchannel\fP, const void *\fIaddr\fP, -.B int \fIaddrlen\fP, int \fIfamily\fP, ares_host_callback \fIcallback\fP, -.B void *\fIarg\fP) +#include + +typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, + struct hostent *\fIhostent\fP) + +void ares_gethostbyaddr(ares_channel \fIchannel\fP, const void *\fIaddr\fP, + int \fIaddrlen\fP, int \fIfamily\fP, + ares_host_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_gethostbyname.3 b/lib/c-ares-1.19.0/docs/ares_gethostbyname.3 similarity index 87% rename from lib/c-ares-1.18.1/docs/ares_gethostbyname.3 rename to lib/c-ares-1.19.0/docs/ares_gethostbyname.3 index cfd6a0a12a2..5b4d9702b3f 100644 --- a/lib/c-ares-1.18.1/docs/ares_gethostbyname.3 +++ b/lib/c-ares-1.19.0/docs/ares_gethostbyname.3 @@ -18,13 +18,15 @@ ares_gethostbyname \- Initiate a host query by name .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, struct hostent *\fIhostent\fP) -.PP -.B void ares_gethostbyname(ares_channel \fIchannel\fP, const char *\fIname\fP, -.B int \fIfamily\fP, ares_host_callback \fIcallback\fP, void *\fIarg\fP) +#include + +typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, + struct hostent *\fIhostent\fP) + +void ares_gethostbyname(ares_channel \fIchannel\fP, const char *\fIname\fP, + int \fIfamily\fP, ares_host_callback \fIcallback\fP, + void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_gethostbyname_file.3 b/lib/c-ares-1.19.0/docs/ares_gethostbyname_file.3 similarity index 93% rename from lib/c-ares-1.18.1/docs/ares_gethostbyname_file.3 rename to lib/c-ares-1.19.0/docs/ares_gethostbyname_file.3 index 8f59b415766..ab127fce77a 100644 --- a/lib/c-ares-1.18.1/docs/ares_gethostbyname_file.3 +++ b/lib/c-ares-1.19.0/docs/ares_gethostbyname_file.3 @@ -18,10 +18,10 @@ ares_gethostbyname_file \- Lookup a name in the system's hosts file .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_gethostbyname_file(ares_channel \fIchannel\fP, const char *\fIname\fP, -.B int \fIfamily\fP, struct hostent **host) +#include + +int ares_gethostbyname_file(ares_channel \fIchannel\fP, const char *\fIname\fP, + int \fIfamily\fP, struct hostent **host) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_getnameinfo.3 b/lib/c-ares-1.19.0/docs/ares_getnameinfo.3 similarity index 89% rename from lib/c-ares-1.18.1/docs/ares_getnameinfo.3 rename to lib/c-ares-1.19.0/docs/ares_getnameinfo.3 index 1017432108a..d10d8410157 100644 --- a/lib/c-ares-1.18.1/docs/ares_getnameinfo.3 +++ b/lib/c-ares-1.19.0/docs/ares_getnameinfo.3 @@ -18,14 +18,15 @@ ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_nameinfo_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, char *\fInode\fP, char *\fIservice\fP) -.PP -.B void ares_getnameinfo(ares_channel \fIchannel\fP, const struct sockaddr *\fIsa\fP, -.B ares_socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP, -.B void *\fIarg\fP) +#include + +typedef void (*ares_nameinfo_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, char *\fInode\fP, + char *\fIservice\fP) + +void ares_getnameinfo(ares_channel \fIchannel\fP, const struct sockaddr *\fIsa\fP, + ares_socklen_t \fIsalen\fP, int \fIflags\fP, + ares_nameinfo_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_getsock.3 b/lib/c-ares-1.19.0/docs/ares_getsock.3 similarity index 93% rename from lib/c-ares-1.18.1/docs/ares_getsock.3 rename to lib/c-ares-1.19.0/docs/ares_getsock.3 index 137329115e4..7908daebc19 100644 --- a/lib/c-ares-1.18.1/docs/ares_getsock.3 +++ b/lib/c-ares-1.19.0/docs/ares_getsock.3 @@ -18,10 +18,10 @@ ares_getsock \- get socket descriptors to wait on .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_getsock(ares_channel \fIchannel\fP, ares_socket_t *\fIsocks\fP, -.B int \fInumsocks\fP); +#include + +int ares_getsock(ares_channel \fIchannel\fP, ares_socket_t *\fIsocks\fP, + int \fInumsocks\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_inet_ntop.3 b/lib/c-ares-1.19.0/docs/ares_inet_ntop.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_inet_ntop.3 rename to lib/c-ares-1.19.0/docs/ares_inet_ntop.3 index 93ee09cf773..d0d0b5915ab 100644 --- a/lib/c-ares-1.18.1/docs/ares_inet_ntop.3 +++ b/lib/c-ares-1.19.0/docs/ares_inet_ntop.3 @@ -18,10 +18,10 @@ ares_inet_ntop \- convert a network format address to presentation format .SH SYNOPSIS .nf -.B #include -.PP -.B const char * -.B ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size); +#include + +const char *ares_inet_ntop(int \fIaf\fP, const void *\fIsrc\fP, char *\fIdst\fP, + ares_socklen_t \fIsize\fP); .fi .SH DESCRIPTION This is a portable version with the identical functionality of the commonly diff --git a/lib/c-ares-1.18.1/docs/ares_inet_pton.3 b/lib/c-ares-1.19.0/docs/ares_inet_pton.3 similarity index 94% rename from lib/c-ares-1.18.1/docs/ares_inet_pton.3 rename to lib/c-ares-1.19.0/docs/ares_inet_pton.3 index b7d86bb4e04..bf7140d3b54 100644 --- a/lib/c-ares-1.18.1/docs/ares_inet_pton.3 +++ b/lib/c-ares-1.19.0/docs/ares_inet_pton.3 @@ -18,9 +18,9 @@ ares_inet_pton \- convert an IPv4 or IPv6 address from text to binary form .SH SYNOPSIS .nf -.B #include -.PP -.B const char *ares_inet_pton(int af, const char *src, void *dst); +#include + +const char *ares_inet_pton(int \fIaf\fP, const char *\fIsrc\fP, void *\fIdst\fP); .fi .SH DESCRIPTION This is a portable version with the identical functionality of the commonly diff --git a/lib/c-ares-1.18.1/docs/ares_init.3 b/lib/c-ares-1.19.0/docs/ares_init.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_init.3 rename to lib/c-ares-1.19.0/docs/ares_init.3 diff --git a/lib/c-ares-1.18.1/docs/ares_init_options.3 b/lib/c-ares-1.19.0/docs/ares_init_options.3 similarity index 95% rename from lib/c-ares-1.18.1/docs/ares_init_options.3 rename to lib/c-ares-1.19.0/docs/ares_init_options.3 index b9d52a895c1..02d30721080 100644 --- a/lib/c-ares-1.18.1/docs/ares_init_options.3 +++ b/lib/c-ares-1.19.0/docs/ares_init_options.3 @@ -41,6 +41,7 @@ struct ares_options { int nsort; int ednspsz; char *resolvconf_path; + char *hosts_path; }; int ares_init_options(ares_channel *\fIchannelptr\fP, @@ -101,16 +102,14 @@ resolv.conf or the RES_OPTIONS environment variable. .B ARES_OPT_UDP_PORT .B unsigned short \fIudp_port\fP; .br -The port to use for queries over UDP, in network byte order. -The default value is 53 (in network byte order), the standard name -service port. +The port to use for queries over UDP, in host byte order. +The default value is 53, the standard name service port. .TP 18 .B ARES_OPT_TCP_PORT .B unsigned short \fItcp_port\fP; .br -The port to use for queries over TCP, in network byte order. -The default value is 53 (in network byte order), the standard name -service port. +The port to use for queries over TCP, in host byte order. +The default value is 53, the standard name service port. .TP 18 .B ARES_OPT_SERVERS .B struct in_addr *\fIservers\fP; @@ -195,6 +194,16 @@ should be set to a path string, and will be honoured on *nix like systems. The default is .B /etc/resolv.conf .br +.TP 18 +.B ARES_OPT_HOSTS_FILE +.B char *\fIhosts_path\fP; +.br +The path to use for reading the hosts file. The +.I hosts_path +should be set to a path string, and will be honoured on *nix like systems. The +default is +.B /etc/hosts +.br .PP The \fIoptmask\fP parameter also includes options without a corresponding field in the diff --git a/lib/c-ares-1.18.1/docs/ares_library_cleanup.3 b/lib/c-ares-1.19.0/docs/ares_library_cleanup.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_library_cleanup.3 rename to lib/c-ares-1.19.0/docs/ares_library_cleanup.3 diff --git a/lib/c-ares-1.18.1/docs/ares_library_init.3 b/lib/c-ares-1.19.0/docs/ares_library_init.3 similarity index 97% rename from lib/c-ares-1.18.1/docs/ares_library_init.3 rename to lib/c-ares-1.19.0/docs/ares_library_init.3 index b38cf325d4e..21fc3ecab54 100644 --- a/lib/c-ares-1.18.1/docs/ares_library_init.3 +++ b/lib/c-ares-1.19.0/docs/ares_library_init.3 @@ -79,7 +79,8 @@ DllMain function. Doing so will produce deadlocks and other problems. Initialize everything possible. This sets all known bits. .TP .B ARES_LIB_INIT_WIN32 -Initialize Win32/64 specific libraries. +Initialize Win32/64 specific libraries. As of c-ares 1.19.0, this is ignored +as there are no currently dynamically loaded libraries. .TP .B ARES_LIB_INIT_NONE Initialize nothing extra. This sets no bit. diff --git a/lib/c-ares-1.18.1/docs/ares_library_init_android.3 b/lib/c-ares-1.19.0/docs/ares_library_init_android.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_library_init_android.3 rename to lib/c-ares-1.19.0/docs/ares_library_init_android.3 diff --git a/lib/c-ares-1.18.1/docs/ares_library_initialized.3 b/lib/c-ares-1.19.0/docs/ares_library_initialized.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_library_initialized.3 rename to lib/c-ares-1.19.0/docs/ares_library_initialized.3 diff --git a/lib/c-ares-1.18.1/docs/ares_mkquery.3 b/lib/c-ares-1.19.0/docs/ares_mkquery.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_mkquery.3 rename to lib/c-ares-1.19.0/docs/ares_mkquery.3 index c8afad83cbd..e394fe2847a 100644 --- a/lib/c-ares-1.18.1/docs/ares_mkquery.3 +++ b/lib/c-ares-1.19.0/docs/ares_mkquery.3 @@ -18,11 +18,11 @@ ares_mkquery \- Compose a single-question DNS query buffer .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP, -.B unsigned short \fIid\fP, int \fIrd\fP, unsigned char **\fIbuf\fP, -.B int *\fIbuflen\fP) +#include + +int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP, + unsigned short \fIid\fP, int \fIrd\fP, unsigned char **\fIbuf\fP, + int *\fIbuflen\fP) .fi .SH DESCRIPTION Deprecated function. See \fIares_create_query(3)\fP instead! diff --git a/lib/c-ares-1.18.1/docs/ares_parse_a_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_a_reply.3 similarity index 90% rename from lib/c-ares-1.18.1/docs/ares_parse_a_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_a_reply.3 index 8e4908a7fe7..6038f68e599 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_a_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_a_reply.3 @@ -18,11 +18,11 @@ ares_parse_a_reply \- Parse a reply to a DNS query of type A .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, -.B struct hostent **\fIhost\fP, -.B struct ares_addrttl *\fIaddrttls\fP, int *\fInaddrttls\fP); +#include + +int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, + struct hostent **\fIhost\fP, + struct ares_addrttl *\fIaddrttls\fP, int *\fInaddrttls\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_aaaa_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_aaaa_reply.3 similarity index 89% rename from lib/c-ares-1.18.1/docs/ares_parse_aaaa_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_aaaa_reply.3 index 674acc5c468..bddd3c2f9fe 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_aaaa_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_aaaa_reply.3 @@ -18,11 +18,11 @@ ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_aaaa_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, -.B struct hostent **\fIhost\fP, -.B struct ares_addr6ttl *\fIaddrttls\fP, int *\fInaddrttls\fP); +#include + +int ares_parse_aaaa_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, + struct hostent **\fIhost\fP, + struct ares_addr6ttl *\fIaddrttls\fP, int *\fInaddrttls\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_caa_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_caa_reply.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_parse_caa_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_caa_reply.3 diff --git a/lib/c-ares-1.18.1/docs/ares_parse_mx_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_mx_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_mx_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_mx_reply.3 index 87df4592ea3..6c5c902d10c 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_mx_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_mx_reply.3 @@ -17,11 +17,10 @@ .SH NAME ares_parse_mx_reply \- Parse a reply to a DNS query of type MX .SH SYNOPSIS -.nf -.B #include -.PP -.B int ares_parse_mx_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_mx_reply** \fImx_out\fP); +#include + +int ares_parse_mx_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_mx_reply** \fImx_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_naptr_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_naptr_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_naptr_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_naptr_reply.3 index 2a5f1e5bd08..b98f8fd2409 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_naptr_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_naptr_reply.3 @@ -18,10 +18,10 @@ ares_parse_naptr_reply \- Parse a reply to a DNS query of type NAPTR .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_naptr_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_naptr_reply** \fInaptr_out\fP); +#include + +int ares_parse_naptr_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_naptr_reply** \fInaptr_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_ns_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_ns_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_ns_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_ns_reply.3 index b6340ac8464..b767e04f683 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_ns_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_ns_reply.3 @@ -18,10 +18,10 @@ ares_parse_ns_reply \- Parse a reply to a DNS query of type NS into a hostent .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_ns_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, -.B struct hostent **\fIhost\fP); +#include + +int ares_parse_ns_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, + struct hostent **\fIhost\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_ptr_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_ptr_reply.3 similarity index 89% rename from lib/c-ares-1.18.1/docs/ares_parse_ptr_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_ptr_reply.3 index 1016a6823fd..e3eb4d09b39 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_ptr_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_ptr_reply.3 @@ -18,11 +18,11 @@ ares_parse_ptr_reply \- Parse a reply to a DNS query of type PTR into a hostent .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_ptr_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, -.B const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP, -.B struct hostent **\fIhost\fP); +#include + +int ares_parse_ptr_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, + const void *\fIaddr\fP, int \fIaddrlen\fP, + int \fIfamily\fP, struct hostent **\fIhost\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_soa_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_soa_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_soa_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_soa_reply.3 index 1c4456f0bbe..c43f9be0841 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_soa_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_soa_reply.3 @@ -18,10 +18,10 @@ ares_parse_soa_reply \- Parse a reply to a DNS query of type SOA .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_soa_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_soa_reply** \fIsoa_out\fP); +#include + +int ares_parse_soa_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_soa_reply** \fIsoa_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_srv_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_srv_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_srv_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_srv_reply.3 index 9b561ffa365..d3c26dbc287 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_srv_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_srv_reply.3 @@ -18,10 +18,10 @@ ares_parse_srv_reply \- Parse a reply to a DNS query of type SRV .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_srv_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_srv_reply** \fIsrv_out\fP); +#include + +int ares_parse_srv_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_srv_reply** \fIsrv_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_txt_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_txt_reply.3 similarity index 90% rename from lib/c-ares-1.18.1/docs/ares_parse_txt_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_txt_reply.3 index e15d0eace15..6eeb04c7419 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_txt_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_txt_reply.3 @@ -18,13 +18,13 @@ ares_parse_txt_reply \- Parse a reply to a DNS query of type TXT .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_txt_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_txt_reply **\fItxt_out\fP); -.PP -.B int ares_parse_txt_reply_ext(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_txt_ext **\fItxt_out\fP); +#include + +int ares_parse_txt_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_txt_reply **\fItxt_out\fP); + +int ares_parse_txt_reply_ext(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_txt_ext **\fItxt_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_parse_uri_reply.3 b/lib/c-ares-1.19.0/docs/ares_parse_uri_reply.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_parse_uri_reply.3 rename to lib/c-ares-1.19.0/docs/ares_parse_uri_reply.3 index 09da1a94e58..60bc22854c7 100644 --- a/lib/c-ares-1.18.1/docs/ares_parse_uri_reply.3 +++ b/lib/c-ares-1.19.0/docs/ares_parse_uri_reply.3 @@ -18,10 +18,10 @@ ares_parse_uri_reply \- Parse a reply to a DNS query of type URI .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_parse_uri_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, -.B struct ares_uri_reply** \fIuri_out\fP); +#include + +int ares_parse_uri_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP, + struct ares_uri_reply** \fIuri_out\fP); .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_process.3 b/lib/c-ares-1.19.0/docs/ares_process.3 similarity index 97% rename from lib/c-ares-1.18.1/docs/ares_process.3 rename to lib/c-ares-1.19.0/docs/ares_process.3 index caabbf13b94..28666f2e152 100644 --- a/lib/c-ares-1.18.1/docs/ares_process.3 +++ b/lib/c-ares-1.19.0/docs/ares_process.3 @@ -44,7 +44,7 @@ if they complete successfully or fail. \fBares_process_fd(3)\fP works the same way but acts and operates only on the specific file descriptors (sockets) you pass in to the function. Use ARES_SOCKET_BAD for "no action". This function is provided to allow users of -c-ares to void \fIselect(3)\fP in their applications and within c-ares. +c-ares to avoid \fIselect(3)\fP in their applications and within c-ares. To only process possible timeout conditions without a socket event occurring, one may pass NULL as the values for both \fIread_fds\fP and \fIwrite_fds\fP for diff --git a/lib/c-ares-1.18.1/docs/ares_query.3 b/lib/c-ares-1.19.0/docs/ares_query.3 similarity index 91% rename from lib/c-ares-1.18.1/docs/ares_query.3 rename to lib/c-ares-1.19.0/docs/ares_query.3 index 733fbc972b5..1055baaed80 100644 --- a/lib/c-ares-1.18.1/docs/ares_query.3 +++ b/lib/c-ares-1.19.0/docs/ares_query.3 @@ -18,14 +18,15 @@ ares_query \- Initiate a single-question DNS query .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, unsigned char *\fIabuf\fP, int \fIalen\fP) -.PP -.B void ares_query(ares_channel \fIchannel\fP, const char *\fIname\fP, -.B int \fIdnsclass\fP, int \fItype\fP, ares_callback \fIcallback\fP, -.B void *\fIarg\fP) +#include + +typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, unsigned char *\fIabuf\fP, + int \fIalen\fP) + +void ares_query(ares_channel \fIchannel\fP, const char *\fIname\fP, + int \fIdnsclass\fP, int \fItype\fP, + ares_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_save_options.3 b/lib/c-ares-1.19.0/docs/ares_save_options.3 similarity index 94% rename from lib/c-ares-1.18.1/docs/ares_save_options.3 rename to lib/c-ares-1.19.0/docs/ares_save_options.3 index bddae049344..b5fcf17776d 100644 --- a/lib/c-ares-1.18.1/docs/ares_save_options.3 +++ b/lib/c-ares-1.19.0/docs/ares_save_options.3 @@ -18,9 +18,10 @@ ares_save_options \- Save configuration values obtained from initialized ares_channel .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_save_options(ares_channel \fIchannel\fP, struct ares_options *\fIoptions\fP, int *\fIoptmask\fP) +#include + +int ares_save_options(ares_channel \fIchannel\fP, + struct ares_options *\fIoptions\fP, int *\fIoptmask\fP) .fi .SH DESCRIPTION The \fBares_save_options(3)\fP function saves the channel data identified by diff --git a/lib/c-ares-1.18.1/docs/ares_search.3 b/lib/c-ares-1.19.0/docs/ares_search.3 similarity index 91% rename from lib/c-ares-1.18.1/docs/ares_search.3 rename to lib/c-ares-1.19.0/docs/ares_search.3 index 2c85d20f645..6b301877d04 100644 --- a/lib/c-ares-1.18.1/docs/ares_search.3 +++ b/lib/c-ares-1.19.0/docs/ares_search.3 @@ -18,14 +18,15 @@ ares_search \- Initiate a DNS query with domain search .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, unsigned char *\fIabuf\fP, int \fIalen\fP) -.PP -.B void ares_search(ares_channel \fIchannel\fP, const char *\fIname\fP, -.B int \fIdnsclass\fP, int \fItype\fP, ares_callback \fIcallback\fP, -.B void *\fIarg\fP) +#include + +typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, unsigned char *\fIabuf\fP, + int \fIalen\fP) + +void ares_search(ares_channel \fIchannel\fP, const char *\fIname\fP, + int \fIdnsclass\fP, int \fItype\fP, + ares_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_send.3 b/lib/c-ares-1.19.0/docs/ares_send.3 similarity index 89% rename from lib/c-ares-1.18.1/docs/ares_send.3 rename to lib/c-ares-1.19.0/docs/ares_send.3 index b89abfeb85a..bcd55b3f4e6 100644 --- a/lib/c-ares-1.18.1/docs/ares_send.3 +++ b/lib/c-ares-1.19.0/docs/ares_send.3 @@ -18,13 +18,14 @@ ares_send \- Initiate a DNS query .SH SYNOPSIS .nf -.B #include -.PP -.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, -.B int \fItimeouts\fP, unsigned char *\fIabuf\fP, int \fIalen\fP) -.PP -.B void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP, -.B int \fIqlen\fP, ares_callback \fIcallback\fP, void *\fIarg\fP) +#include + +typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP, + int \fItimeouts\fP, unsigned char *\fIabuf\fP, + int \fIalen\fP) + +void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP, + int \fIqlen\fP, ares_callback \fIcallback\fP, void *\fIarg\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_set_local_dev.3 b/lib/c-ares-1.19.0/docs/ares_set_local_dev.3 similarity index 92% rename from lib/c-ares-1.18.1/docs/ares_set_local_dev.3 rename to lib/c-ares-1.19.0/docs/ares_set_local_dev.3 index 7d82133ac13..059eae54753 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_local_dev.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_local_dev.3 @@ -18,9 +18,9 @@ ares_set_local_dev \- Bind to a specific network device when creating sockets. .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_set_local_dev(ares_channel \fIchannel\fP, const char* \fIlocal_dev_name\fP) +#include + +void ares_set_local_dev(ares_channel \fIchannel\fP, const char* \fIlocal_dev_name\fP) .fi .SH DESCRIPTION The \fBares_set_local_dev\fP function causes all future sockets diff --git a/lib/c-ares-1.18.1/docs/ares_set_local_ip4.3 b/lib/c-ares-1.19.0/docs/ares_set_local_ip4.3 similarity index 91% rename from lib/c-ares-1.18.1/docs/ares_set_local_ip4.3 rename to lib/c-ares-1.19.0/docs/ares_set_local_ip4.3 index e68e80e76ae..8425f5b67bf 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_local_ip4.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_local_ip4.3 @@ -18,9 +18,9 @@ ares_set_local_ip4 \- Set local IPv4 address outgoing requests. .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_set_local_ip4(ares_channel \fIchannel\fP, unsigned int \fIlocal_ip\fP) +#include + +void ares_set_local_ip4(ares_channel \fIchannel\fP, unsigned int \fIlocal_ip\fP) .fi .SH DESCRIPTION The \fBares_set_local_ip4\fP function sets the IP address for outbound diff --git a/lib/c-ares-1.18.1/docs/ares_set_local_ip6.3 b/lib/c-ares-1.19.0/docs/ares_set_local_ip6.3 similarity index 75% rename from lib/c-ares-1.18.1/docs/ares_set_local_ip6.3 rename to lib/c-ares-1.19.0/docs/ares_set_local_ip6.3 index e659f5c930b..6719ad35989 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_local_ip6.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_local_ip6.3 @@ -18,15 +18,15 @@ ares_set_local_ip6 \- Set local IPv6 address outgoing requests. .SH SYNOPSIS .nf -.B #include -.PP -.B void ares_set_local_ip6(ares_channel \fIchannel\fP, const unsigned char* \fIlocal_ip6\fP) +#include + +void ares_set_local_ip6(ares_channel \fIchannel\fP, const unsigned char* \fIlocal_ip6\fP) .fi .SH DESCRIPTION -The \fBares_set_local_ip6\fP function sets the IPv6 address for outbound -IPv6 requests. The parameter \fIlocal_ip6\fP is specified in network byte -order. This allows users to specify outbound interfaces when used on -multi-homed systems. The local_ip6 argument must be 16 bytes in length. +The \fBares_set_local_ip6\fP function sets the IPv6 address for outbound IPv6 +requests. The parameter \fIlocal_ip6\fP is specified in network byte order. +This allows users to specify outbound interfaces when used on multi-homed +systems. The \fIlocal_ip6\fP argument must be 16 bytes in length. .SH SEE ALSO .BR ares_set_local_ip4 (3) .SH NOTES diff --git a/lib/c-ares-1.18.1/docs/ares_set_servers.3 b/lib/c-ares-1.19.0/docs/ares_set_servers.3 similarity index 93% rename from lib/c-ares-1.18.1/docs/ares_set_servers.3 rename to lib/c-ares-1.19.0/docs/ares_set_servers.3 index 65ad1e16427..aeed0a51566 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_servers.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_servers.3 @@ -18,10 +18,13 @@ ares_set_servers, ares_set_servers_ports \- Initialize an ares_channel name servers configuration .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_set_servers(ares_channel \fIchannel\fP, struct ares_addr_node *\fIservers\fP) -.B int ares_set_servers_ports(ares_channel \fIchannel\fP, struct ares_addr_port_node *\fIservers\fP) +#include + +int ares_set_servers(ares_channel \fIchannel\fP, + struct ares_addr_node *\fIservers\fP) + +int ares_set_servers_ports(ares_channel \fIchannel\fP, + struct ares_addr_port_node *\fIservers\fP) .fi .SH DESCRIPTION The \fBares_set_servers(3)\fP function initializes name servers configuration diff --git a/lib/c-ares-1.18.1/docs/ares_set_servers_csv.3 b/lib/c-ares-1.19.0/docs/ares_set_servers_csv.3 similarity index 91% rename from lib/c-ares-1.18.1/docs/ares_set_servers_csv.3 rename to lib/c-ares-1.19.0/docs/ares_set_servers_csv.3 index 638d26987ed..a729281b978 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_servers_csv.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_servers_csv.3 @@ -18,10 +18,11 @@ ares_set_servers_csv, ares_set_servers_ports_csv \- Set list of DNS servers to be used. .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) -.B int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) +#include + +int ares_set_servers_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) + +int ares_set_servers_ports_csv(ares_channel \fIchannel\fP, const char* \fIservers\fP) .fi .SH DESCRIPTION The \fBares_set_servers_csv\fP and \fBares_set_servers_ports_csv\fPfunctions set diff --git a/lib/c-ares-1.18.1/docs/ares_set_servers_ports.3 b/lib/c-ares-1.19.0/docs/ares_set_servers_ports.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_set_servers_ports.3 rename to lib/c-ares-1.19.0/docs/ares_set_servers_ports.3 diff --git a/lib/c-ares-1.18.1/docs/ares_set_servers_ports_csv.3 b/lib/c-ares-1.19.0/docs/ares_set_servers_ports_csv.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_set_servers_ports_csv.3 rename to lib/c-ares-1.19.0/docs/ares_set_servers_ports_csv.3 diff --git a/lib/c-ares-1.18.1/docs/ares_set_socket_callback.3 b/lib/c-ares-1.19.0/docs/ares_set_socket_callback.3 similarity index 73% rename from lib/c-ares-1.18.1/docs/ares_set_socket_callback.3 rename to lib/c-ares-1.19.0/docs/ares_set_socket_callback.3 index 14a5ad2dcb5..70d7cf7d598 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_socket_callback.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_socket_callback.3 @@ -4,15 +4,15 @@ ares_set_socket_callback \- Set a socket creation callback .SH SYNOPSIS .nf -.B #include -.PP -.B typedef int (*ares_sock_create_callback)(ares_socket_t \fIsocket_fd\fP, +#include + +typedef int (*ares_sock_create_callback)(ares_socket_t \fIsocket_fd\fP, int \fItype\fP, void *\fIuserdata\fP) -.PP -.B void ares_set_socket_callback(ares_channel \fIchannel\fP, - ares_sock_create_callback \fIcallback\fP, - void *\fIuserdata\fP) + +void ares_set_socket_callback(ares_channel \fIchannel\fP, + ares_sock_create_callback \fIcallback\fP, + void *\fIuserdata\fP) .PP .B cc file.c -lcares .fi diff --git a/lib/c-ares-1.18.1/docs/ares_set_socket_configure_callback.3 b/lib/c-ares-1.19.0/docs/ares_set_socket_configure_callback.3 similarity index 73% rename from lib/c-ares-1.18.1/docs/ares_set_socket_configure_callback.3 rename to lib/c-ares-1.19.0/docs/ares_set_socket_configure_callback.3 index d3b2f930179..89188a6a9a0 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_socket_configure_callback.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_socket_configure_callback.3 @@ -4,17 +4,15 @@ ares_set_socket_configure_callback \- Set a socket configuration callback .SH SYNOPSIS .nf -.B #include -.PP -.B typedef int (*ares_sock_config_callback)(ares_socket_t \fIsocket_fd\fP, +#include + +typedef int (*ares_sock_config_callback)(ares_socket_t \fIsocket_fd\fP, int \fItype\fP, void *\fIuserdata\fP) -.PP -.B void ares_set_socket_configure_callback(ares_channel \fIchannel\fP, - ares_sock_config_callback \fIcallback\fP, - void *\fIuserdata\fP) -.PP -.B cc file.c -lcares + +void ares_set_socket_configure_callback(ares_channel \fIchannel\fP, + ares_sock_config_callback \fIcallback\fP, + void *\fIuserdata\fP) .fi .SH DESCRIPTION .PP diff --git a/lib/c-ares-1.18.1/docs/ares_set_socket_functions.3 b/lib/c-ares-1.19.0/docs/ares_set_socket_functions.3 similarity index 80% rename from lib/c-ares-1.18.1/docs/ares_set_socket_functions.3 rename to lib/c-ares-1.19.0/docs/ares_set_socket_functions.3 index 1cb0b8553bd..0c33a494118 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_socket_functions.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_socket_functions.3 @@ -4,21 +4,20 @@ ares_set_socket_functions \- Set socket io callbacks .SH SYNOPSIS .nf -.B #include -.PP -.B struct ares_socket_functions { - ares_socket_t(*\fIasocket\fP)(int, int, int, void *); - int(*\fIaclose\fP)(ares_socket_t, void *); - int(*\fIaconnect\fP)(ares_socket_t, const struct sockaddr *, ares_socklen_t, void *); - ares_ssize_t(*\fIarecvfrom\fP)(ares_socket_t, void *, size_t, int, struct sockaddr *, ares_socklen_t *, void *); - ares_ssize_t(*\fIasendv\fP)(ares_socket_t, const struct iovec *, int, void *); - }; +#include -.PP -.B void ares_set_socket_functions(ares_channel \fIchannel\fP, - const struct ares_socket_functions * \fIfunctions\fP, - void *\fIuser_data\fP); +struct ares_socket_functions { + ares_socket_t (*\fIasocket\fP)(int, int, int, void *); + int (*\fIaclose\fP)(ares_socket_t, void *); + int (*\fIaconnect\fP)(ares_socket_t, const struct sockaddr *, ares_socklen_t, void *); + ares_ssize_t (*\fIarecvfrom\fP)(ares_socket_t, void *, size_t, int, + struct sockaddr *, ares_socklen_t *, void *); + ares_ssize_t (*\fIasendv\fP)(ares_socket_t, const struct iovec *, int, void *); +}; +void ares_set_socket_functions(ares_channel \fIchannel\fP, + const struct ares_socket_functions * \fIfunctions\fP, + void *\fIuser_data\fP); .fi .SH DESCRIPTION .PP diff --git a/lib/c-ares-1.18.1/docs/ares_set_sortlist.3 b/lib/c-ares-1.19.0/docs/ares_set_sortlist.3 similarity index 94% rename from lib/c-ares-1.18.1/docs/ares_set_sortlist.3 rename to lib/c-ares-1.19.0/docs/ares_set_sortlist.3 index 24a97906ad9..50e99e87df8 100644 --- a/lib/c-ares-1.18.1/docs/ares_set_sortlist.3 +++ b/lib/c-ares-1.19.0/docs/ares_set_sortlist.3 @@ -16,9 +16,9 @@ ares_set_sortlist \- Initialize an ares_channel sortlist configuration .SH SYNOPSIS .nf -.B #include -.PP -.B int ares_set_sortlist(ares_channel \fIchannel\fP, const char *\fIsortstr\fP) +#include + +int ares_set_sortlist(ares_channel \fIchannel\fP, const char *\fIsortstr\fP) .fi .SH DESCRIPTION The \fBares_set_sortlist(3)\fP function initializes an address sortlist configuration diff --git a/lib/c-ares-1.18.1/docs/ares_strerror.3 b/lib/c-ares-1.19.0/docs/ares_strerror.3 similarity index 94% rename from lib/c-ares-1.18.1/docs/ares_strerror.3 rename to lib/c-ares-1.19.0/docs/ares_strerror.3 index 4b50d5bbb58..6369fccd607 100644 --- a/lib/c-ares-1.18.1/docs/ares_strerror.3 +++ b/lib/c-ares-1.19.0/docs/ares_strerror.3 @@ -18,9 +18,9 @@ ares_strerror \- Get the description of an ares library error code .SH SYNOPSIS .nf -.B #include -.PP -.B const char *ares_strerror(int \fIcode\fP) +#include + +const char *ares_strerror(int \fIcode\fP) .fi .SH DESCRIPTION The diff --git a/lib/c-ares-1.18.1/docs/ares_timeout.3 b/lib/c-ares-1.19.0/docs/ares_timeout.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_timeout.3 rename to lib/c-ares-1.19.0/docs/ares_timeout.3 diff --git a/lib/c-ares-1.18.1/docs/ares_version.3 b/lib/c-ares-1.19.0/docs/ares_version.3 similarity index 100% rename from lib/c-ares-1.18.1/docs/ares_version.3 rename to lib/c-ares-1.19.0/docs/ares_version.3 diff --git a/lib/c-ares-1.18.1/get_ver.awk b/lib/c-ares-1.19.0/get_ver.awk similarity index 100% rename from lib/c-ares-1.18.1/get_ver.awk rename to lib/c-ares-1.19.0/get_ver.awk diff --git a/lib/c-ares-1.18.1/include/CMakeLists.txt b/lib/c-ares-1.19.0/include/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.18.1/include/CMakeLists.txt rename to lib/c-ares-1.19.0/include/CMakeLists.txt diff --git a/lib/c-ares-1.18.1/include/Makefile.am b/lib/c-ares-1.19.0/include/Makefile.am similarity index 100% rename from lib/c-ares-1.18.1/include/Makefile.am rename to lib/c-ares-1.19.0/include/Makefile.am diff --git a/lib/c-ares-1.18.1/include/Makefile.in b/lib/c-ares-1.19.0/include/Makefile.in similarity index 99% rename from lib/c-ares-1.18.1/include/Makefile.in rename to lib/c-ares-1.19.0/include/Makefile.in index fad83f2c905..40c1d51fb17 100644 --- a/lib/c-ares-1.18.1/include/Makefile.in +++ b/lib/c-ares-1.19.0/include/Makefile.in @@ -234,6 +234,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ diff --git a/lib/c-ares-1.18.1/include/ares.h b/lib/c-ares-1.19.0/include/ares.h similarity index 98% rename from lib/c-ares-1.18.1/include/ares.h rename to lib/c-ares-1.19.0/include/ares.h index cf8a8553fe0..8c7520eec65 100644 --- a/lib/c-ares-1.18.1/include/ares.h +++ b/lib/c-ares-1.19.0/include/ares.h @@ -63,6 +63,13 @@ # include # include # include +/* To aid with linking against a static c-ares build, lets tell the microsoft + * compiler to pull in needed dependencies */ +# ifdef _MSC_VER +# pragma comment(lib, "ws2_32") +# pragma comment(lib, "advapi32") +# pragma comment(lib, "iphlpapi") +# endif #else # include # include @@ -168,6 +175,7 @@ extern "C" { #define ARES_OPT_EDNSPSZ (1 << 15) #define ARES_OPT_NOROTATE (1 << 16) #define ARES_OPT_RESOLVCONF (1 << 17) +#define ARES_OPT_HOSTS_FILE (1 << 18) /* Nameinfo flag values */ #define ARES_NI_NOFQDN (1 << 0) @@ -277,6 +285,7 @@ struct ares_options { int nsort; int ednspsz; char *resolvconf_path; + char *hosts_path; }; struct hostent; diff --git a/lib/c-ares-1.18.1/include/ares_build.h b/lib/c-ares-1.19.0/include/ares_build.h similarity index 100% rename from lib/c-ares-1.18.1/include/ares_build.h rename to lib/c-ares-1.19.0/include/ares_build.h diff --git a/lib/c-ares-1.18.1/include/ares_build.h.cmake b/lib/c-ares-1.19.0/include/ares_build.h.cmake similarity index 100% rename from lib/c-ares-1.18.1/include/ares_build.h.cmake rename to lib/c-ares-1.19.0/include/ares_build.h.cmake diff --git a/lib/c-ares-1.18.1/include/ares_build.h.in b/lib/c-ares-1.19.0/include/ares_build.h.in similarity index 100% rename from lib/c-ares-1.18.1/include/ares_build.h.in rename to lib/c-ares-1.19.0/include/ares_build.h.in diff --git a/lib/c-ares-1.18.1/include/ares_dns.h b/lib/c-ares-1.19.0/include/ares_dns.h similarity index 100% rename from lib/c-ares-1.18.1/include/ares_dns.h rename to lib/c-ares-1.19.0/include/ares_dns.h diff --git a/lib/c-ares-1.18.1/include/ares_nameser.h b/lib/c-ares-1.19.0/include/ares_nameser.h similarity index 100% rename from lib/c-ares-1.18.1/include/ares_nameser.h rename to lib/c-ares-1.19.0/include/ares_nameser.h diff --git a/lib/c-ares-1.18.1/include/ares_rules.h b/lib/c-ares-1.19.0/include/ares_rules.h similarity index 100% rename from lib/c-ares-1.18.1/include/ares_rules.h rename to lib/c-ares-1.19.0/include/ares_rules.h diff --git a/lib/c-ares-1.18.1/include/ares_version.h b/lib/c-ares-1.19.0/include/ares_version.h similarity index 85% rename from lib/c-ares-1.18.1/include/ares_version.h rename to lib/c-ares-1.19.0/include/ares_version.h index 22c6f62fd72..4d8d62fd18e 100644 --- a/lib/c-ares-1.18.1/include/ares_version.h +++ b/lib/c-ares-1.19.0/include/ares_version.h @@ -6,12 +6,12 @@ #define ARES_COPYRIGHT "2004 - 2021 Daniel Stenberg, ." #define ARES_VERSION_MAJOR 1 -#define ARES_VERSION_MINOR 18 -#define ARES_VERSION_PATCH 1 +#define ARES_VERSION_MINOR 19 +#define ARES_VERSION_PATCH 0 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ (ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.18.1" +#define ARES_VERSION_STR "1.19.0" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 diff --git a/lib/c-ares-1.18.1/install-sh b/lib/c-ares-1.19.0/install-sh similarity index 100% rename from lib/c-ares-1.18.1/install-sh rename to lib/c-ares-1.19.0/install-sh diff --git a/lib/c-ares-1.18.1/libcares.pc.cmake b/lib/c-ares-1.19.0/libcares.pc.cmake similarity index 76% rename from lib/c-ares-1.18.1/libcares.pc.cmake rename to lib/c-ares-1.19.0/libcares.pc.cmake index 67fd301d0a5..f1213cf8b69 100644 --- a/lib/c-ares-1.18.1/libcares.pc.cmake +++ b/lib/c-ares-1.19.0/libcares.pc.cmake @@ -4,10 +4,9 @@ # | (_|_____| (_| | | | __/\__ \ # \___| \__,_|_| \___||___/ # -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +exec_prefix=@CMAKE_INSTALL_FULL_BINDIR@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: c-ares URL: https://c-ares.org/ diff --git a/lib/c-ares-1.18.1/libcares.pc.in b/lib/c-ares-1.19.0/libcares.pc.in similarity index 100% rename from lib/c-ares-1.18.1/libcares.pc.in rename to lib/c-ares-1.19.0/libcares.pc.in diff --git a/lib/c-ares-1.18.1/ltmain.sh b/lib/c-ares-1.19.0/ltmain.sh similarity index 94% rename from lib/c-ares-1.18.1/ltmain.sh rename to lib/c-ares-1.19.0/ltmain.sh index 21e5e078472..8fb8700eef3 100755 --- a/lib/c-ares-1.18.1/ltmain.sh +++ b/lib/c-ares-1.19.0/ltmain.sh @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-15" -package_revision=2.4.6 +VERSION="2.4.7 Debian-2.4.7-4" +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ package_revision=2.4.6 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES 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 . +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# ## ------ ## @@ -139,9 +130,12 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ func_relative_path () } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ func_lt_ver () # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2015-10-07.11; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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 is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# 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. +# Please report bugs or propose patches to: +# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ scriptversion=2015-10-07.11; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ scriptversion=2015-10-07.11; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ func_remove_hook () } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1534,22 +1710,19 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - if eval $_G_hook '"$@"'; then - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - _G_rc_run_hooks=: + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift fi done - - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1559,14 +1732,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the -# hook's caller know that it should pay attention to -# '_result'. Returning $EXIT_FAILURE signalizes that -# arguments are left untouched by the hook and therefore caller will ignore the -# result variable. +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '_result', escaped +# suitably for 'eval'. +# +# The '_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). # # Like this: # @@ -1578,11 +1753,8 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). There is -# # no need to do the equivalent (but slower) action: -# # func_quote_for_eval ${1+"$@"} -# # my_options_prep_result=$func_quote_for_eval_result -# false +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1593,7 +1765,7 @@ func_run_hooks () # # args_changed=false # -# # Note that for efficiency, we parse as many options as we can +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do @@ -1610,18 +1782,17 @@ func_run_hooks () # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@", we could need that later -# # if $args_changed is true. +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # +# # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result # fi -# -# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1632,8 +1803,6 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# false # } # func_add_hook func_validate_options my_option_validation # @@ -1649,13 +1818,8 @@ func_options_finish () { $debug_cmd - _G_func_options_finish_exit=false - if func_run_hooks func_options ${1+"$@"}; then - func_options_finish_result=$func_run_hooks_result - _G_func_options_finish_exit=: - fi - - $_G_func_options_finish_exit + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish } @@ -1668,28 +1832,27 @@ func_options () { $debug_cmd - _G_rc_options=false + _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do - if eval func_$my_func '${1+"$@"}'; then - eval _G_res_var='$'"func_${my_func}_result" - eval set dummy "$_G_res_var" ; shift - _G_rc_options=: + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: fi done - # Save modified positional parameters for caller. As a top-level - # options-parser function we always need to set the 'func_options_result' - # variable (regardless the $_G_rc_options value). - if $_G_rc_options; then - func_options_result=$_G_res_var - else - func_quote_for_eval ${1+"$@"} - func_options_result=$func_quote_for_eval_result - fi - - $_G_rc_options + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1699,8 +1862,7 @@ func_options () # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1710,14 +1872,8 @@ func_options_prep () opt_verbose=false opt_warning_types= - _G_rc_options_prep=false - if func_run_hooks func_options_prep ${1+"$@"}; then - _G_rc_options_prep=: - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result - fi - - $_G_rc_options_prep + func_run_hooks func_options_prep ${1+"$@"} + func_propagate_result func_run_hooks func_options_prep } @@ -1729,27 +1885,32 @@ func_parse_options () { $debug_cmd - func_parse_options_result= - - _G_rc_parse_options=false + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: + func_run_hooks func_parse_options ${1+"$@"} + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1760,7 +1921,7 @@ func_parse_options () --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: + _G_parse_options_requote=: break fi case " $warning_categories $1" in @@ -1815,7 +1976,7 @@ func_parse_options () shift ;; - --) _G_rc_parse_options=: ; break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false @@ -1823,17 +1984,16 @@ func_parse_options () ;; esac - $_G_match_parse_options && _G_rc_parse_options=: + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - - if $_G_rc_parse_options; then + if $_G_parse_options_requote; then # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result fi - - $_G_rc_parse_options } @@ -1846,21 +2006,14 @@ func_validate_options () { $debug_cmd - _G_rc_validate_options=false - # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - if func_run_hooks func_validate_options ${1+"$@"}; then - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result - _G_rc_validate_options=: - fi + func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - $_G_rc_validate_options } @@ -1916,8 +2069,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1932,8 +2085,9 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1943,7 +2097,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -1969,7 +2123,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2011,31 +2165,44 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -2045,12 +2212,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2141,7 +2308,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-15 + version: $progname $scriptversion Debian-2.4.7-4 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2197,7 +2364,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ + func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2345,6 +2512,8 @@ libtool_options_prep () _G_rc_lt_options_prep=: + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2375,11 +2544,9 @@ libtool_options_prep () if $_G_rc_lt_options_prep; then # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result fi - - $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2482,11 +2649,9 @@ libtool_parse_options () if $_G_rc_lt_parse_options; then # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result fi - - $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -2543,8 +2708,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3510,8 +3675,8 @@ func_mode_compile () esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3584,8 +3749,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3740,7 +3905,8 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3846,6 +4012,8 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4188,8 +4356,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4199,8 +4367,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4257,12 +4425,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4273,8 +4441,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4570,8 +4738,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5350,7 +5518,8 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5360,7 +5529,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6703,9 +6872,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6941,6 +7110,13 @@ func_mode_link () prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7111,7 +7287,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7131,7 +7307,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7161,8 +7337,20 @@ func_mode_link () prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7303,9 +7491,9 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7319,16 +7507,21 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7346,8 +7539,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7370,12 +7563,13 @@ func_mode_link () # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ + # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7396,15 +7590,15 @@ func_mode_link () continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7524,8 +7718,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8733,7 +8927,7 @@ func_mode_link () test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8906,7 +9100,7 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -9000,7 +9194,7 @@ func_mode_link () versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9226,7 +9420,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -10037,8 +10231,8 @@ EOF for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10131,8 +10325,8 @@ EOF eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10606,12 +10800,13 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10851,13 +11046,15 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi diff --git a/lib/c-ares-1.18.1/m4/ax_ac_append_to_file.m4 b/lib/c-ares-1.19.0/m4/ax_ac_append_to_file.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_ac_append_to_file.m4 rename to lib/c-ares-1.19.0/m4/ax_ac_append_to_file.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_ac_print_to_file.m4 b/lib/c-ares-1.19.0/m4/ax_ac_print_to_file.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_ac_print_to_file.m4 rename to lib/c-ares-1.19.0/m4/ax_ac_print_to_file.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_add_am_macro_static.m4 b/lib/c-ares-1.19.0/m4/ax_add_am_macro_static.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_add_am_macro_static.m4 rename to lib/c-ares-1.19.0/m4/ax_add_am_macro_static.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_am_macros_static.m4 b/lib/c-ares-1.19.0/m4/ax_am_macros_static.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_am_macros_static.m4 rename to lib/c-ares-1.19.0/m4/ax_am_macros_static.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_check_gnu_make.m4 b/lib/c-ares-1.19.0/m4/ax_check_gnu_make.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_check_gnu_make.m4 rename to lib/c-ares-1.19.0/m4/ax_check_gnu_make.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_check_user_namespace.m4 b/lib/c-ares-1.19.0/m4/ax_check_user_namespace.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_check_user_namespace.m4 rename to lib/c-ares-1.19.0/m4/ax_check_user_namespace.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_check_uts_namespace.m4 b/lib/c-ares-1.19.0/m4/ax_check_uts_namespace.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_check_uts_namespace.m4 rename to lib/c-ares-1.19.0/m4/ax_check_uts_namespace.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_code_coverage.m4 b/lib/c-ares-1.19.0/m4/ax_code_coverage.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_code_coverage.m4 rename to lib/c-ares-1.19.0/m4/ax_code_coverage.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_cxx_compile_stdcxx_11.m4 b/lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_cxx_compile_stdcxx_11.m4 rename to lib/c-ares-1.19.0/m4/ax_cxx_compile_stdcxx_11.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_file_escapes.m4 b/lib/c-ares-1.19.0/m4/ax_file_escapes.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_file_escapes.m4 rename to lib/c-ares-1.19.0/m4/ax_file_escapes.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_pthread.m4 b/lib/c-ares-1.19.0/m4/ax_pthread.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_pthread.m4 rename to lib/c-ares-1.19.0/m4/ax_pthread.m4 diff --git a/lib/c-ares-1.18.1/m4/ax_require_defined.m4 b/lib/c-ares-1.19.0/m4/ax_require_defined.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/ax_require_defined.m4 rename to lib/c-ares-1.19.0/m4/ax_require_defined.m4 diff --git a/lib/c-ares-1.18.1/m4/cares-compilers.m4 b/lib/c-ares-1.19.0/m4/cares-compilers.m4 similarity index 99% rename from lib/c-ares-1.18.1/m4/cares-compilers.m4 rename to lib/c-ares-1.19.0/m4/cares-compilers.m4 index 5ae6b90b328..a5b1e2b182b 100644 --- a/lib/c-ares-1.18.1/m4/cares-compilers.m4 +++ b/lib/c-ares-1.19.0/m4/cares-compilers.m4 @@ -609,12 +609,12 @@ AC_DEFUN([CARES_SET_COMPILER_BASIC_OPTS], [ dnl #147: declaration is incompatible with 'previous one' dnl #165: too few arguments in function call dnl #266: function declared implicitly - tmp_CPPFLAGS="$tmp_CPPFLAGS -we 140,147,165,266" + tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-error 140,147,165,266" dnl Disable some remarks dnl #279: controlling expression is constant dnl #981: operands are evaluated in unspecified order dnl #1469: "cc" clobber ignored - tmp_CPPFLAGS="$tmp_CPPFLAGS -wd 279,981,1469" + tmp_CPPFLAGS="$tmp_CPPFLAGS -diag-disable 279,981,1469" ;; # INTEL_WINDOWS_C) diff --git a/lib/c-ares-1.18.1/m4/cares-confopts.m4 b/lib/c-ares-1.19.0/m4/cares-confopts.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/cares-confopts.m4 rename to lib/c-ares-1.19.0/m4/cares-confopts.m4 diff --git a/lib/c-ares-1.18.1/m4/cares-functions.m4 b/lib/c-ares-1.19.0/m4/cares-functions.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/cares-functions.m4 rename to lib/c-ares-1.19.0/m4/cares-functions.m4 diff --git a/lib/c-ares-1.18.1/m4/cares-reentrant.m4 b/lib/c-ares-1.19.0/m4/cares-reentrant.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/cares-reentrant.m4 rename to lib/c-ares-1.19.0/m4/cares-reentrant.m4 diff --git a/lib/c-ares-1.18.1/m4/libtool.m4 b/lib/c-ares-1.19.0/m4/libtool.m4 similarity index 97% rename from lib/c-ares-1.18.1/m4/libtool.m4 rename to lib/c-ares-1.19.0/m4/libtool.m4 index c4c02946dec..e7b68334557 100644 --- a/lib/c-ares-1.18.1/m4/libtool.m4 +++ b/lib/c-ares-1.19.0/m4/libtool.m4 @@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -219,8 +221,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -777,7 +779,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1041,8 +1043,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1066,17 +1068,12 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1125,12 +1122,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1244,7 +1241,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) +[m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1261,7 +1259,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1291,7 +1289,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1308,7 +1306,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1320,7 +1318,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1342,7 +1340,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1350,7 +1348,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1358,7 +1356,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1378,14 +1376,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1453,7 +1451,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1492,9 +1490,22 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1713,7 +1724,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1756,7 +1767,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2206,26 +2217,35 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2548,7 +2568,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; @@ -2558,14 +2578,14 @@ m4_if([$1], [],[ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2584,7 +2604,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2621,7 +2641,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2654,7 +2674,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3465,7 +3485,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3499,14 +3519,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3520,7 +3540,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3567,7 +3587,7 @@ netbsd* | netbsdelf*-gnu) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3694,13 +3714,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3726,7 +3746,7 @@ else # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3966,7 +3986,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3984,20 +4004,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4021,7 +4041,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ @@ -4039,9 +4059,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4329,7 +4349,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4412,7 +4432,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4754,7 +4774,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4937,7 +4957,7 @@ m4_if([$1], [CXX], [ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4945,7 +4965,7 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -5005,15 +5025,15 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5068,7 +5088,7 @@ dnl Note also adjust exclude_expsyms for C++ above. _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5180,6 +5200,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5194,7 +5215,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5237,7 +5258,7 @@ _LT_EOF _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5249,13 +5270,14 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) @@ -5265,7 +5287,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5397,7 +5419,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5580,12 +5602,12 @@ _LT_EOF cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5626,7 +5648,7 @@ _LT_EOF fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5674,7 +5696,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5815,6 +5837,7 @@ _LT_EOF # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; esac ;; @@ -5886,6 +5909,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6656,8 +6680,8 @@ if test yes != "$_lt_caught_CXX_error"; then cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6755,6 +6779,7 @@ if test yes != "$_lt_caught_CXX_error"; then emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6785,7 +6810,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6922,7 +6947,7 @@ if test yes != "$_lt_caught_CXX_error"; then # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7062,13 +7087,13 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8214,6 +8239,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) +# _LT_DECL_FILECMD +# ---------------- +# Check for a file(cmd) program that can be used to detect file type and magic +m4_defun([_LT_DECL_FILECMD], +[AC_CHECK_TOOL([FILECMD], [file], [:]) +_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) +])# _LD_DECL_FILECMD + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff --git a/lib/c-ares-1.18.1/m4/ltoptions.m4 b/lib/c-ares-1.19.0/m4/ltoptions.m4 similarity index 99% rename from lib/c-ares-1.18.1/m4/ltoptions.m4 rename to lib/c-ares-1.19.0/m4/ltoptions.m4 index 94b08297666..b0b5e9c2126 100644 --- a/lib/c-ares-1.18.1/m4/ltoptions.m4 +++ b/lib/c-ares-1.19.0/m4/ltoptions.m4 @@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives diff --git a/lib/c-ares-1.18.1/m4/ltsugar.m4 b/lib/c-ares-1.19.0/m4/ltsugar.m4 similarity index 98% rename from lib/c-ares-1.18.1/m4/ltsugar.m4 rename to lib/c-ares-1.19.0/m4/ltsugar.m4 index 48bc9344a4d..902508bd93a 100644 --- a/lib/c-ares-1.18.1/m4/ltsugar.m4 +++ b/lib/c-ares-1.19.0/m4/ltsugar.m4 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff --git a/lib/c-ares-1.18.1/m4/ltversion.m4 b/lib/c-ares-1.19.0/m4/ltversion.m4 similarity index 66% rename from lib/c-ares-1.18.1/m4/ltversion.m4 rename to lib/c-ares-1.19.0/m4/ltversion.m4 index fa04b52a3bf..b155d0aceca 100644 --- a/lib/c-ares-1.18.1/m4/ltversion.m4 +++ b/lib/c-ares-1.19.0/m4/ltversion.m4 @@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.7]) +m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/lib/c-ares-1.18.1/m4/lt~obsolete.m4 b/lib/c-ares-1.19.0/m4/lt~obsolete.m4 similarity index 98% rename from lib/c-ares-1.18.1/m4/lt~obsolete.m4 rename to lib/c-ares-1.19.0/m4/lt~obsolete.m4 index c6b26f88f6c..0f7a8759da8 100644 --- a/lib/c-ares-1.18.1/m4/lt~obsolete.m4 +++ b/lib/c-ares-1.19.0/m4/lt~obsolete.m4 @@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives diff --git a/lib/c-ares-1.18.1/m4/xc-am-iface.m4 b/lib/c-ares-1.19.0/m4/xc-am-iface.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/xc-am-iface.m4 rename to lib/c-ares-1.19.0/m4/xc-am-iface.m4 diff --git a/lib/c-ares-1.18.1/m4/xc-cc-check.m4 b/lib/c-ares-1.19.0/m4/xc-cc-check.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/xc-cc-check.m4 rename to lib/c-ares-1.19.0/m4/xc-cc-check.m4 diff --git a/lib/c-ares-1.18.1/m4/xc-lt-iface.m4 b/lib/c-ares-1.19.0/m4/xc-lt-iface.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/xc-lt-iface.m4 rename to lib/c-ares-1.19.0/m4/xc-lt-iface.m4 diff --git a/lib/c-ares-1.18.1/m4/xc-translit.m4 b/lib/c-ares-1.19.0/m4/xc-translit.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/xc-translit.m4 rename to lib/c-ares-1.19.0/m4/xc-translit.m4 diff --git a/lib/c-ares-1.18.1/m4/xc-val-flgs.m4 b/lib/c-ares-1.19.0/m4/xc-val-flgs.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/xc-val-flgs.m4 rename to lib/c-ares-1.19.0/m4/xc-val-flgs.m4 diff --git a/lib/c-ares-1.18.1/m4/zz40-xc-ovr.m4 b/lib/c-ares-1.19.0/m4/zz40-xc-ovr.m4 similarity index 100% rename from lib/c-ares-1.18.1/m4/zz40-xc-ovr.m4 rename to lib/c-ares-1.19.0/m4/zz40-xc-ovr.m4 diff --git a/lib/c-ares-1.18.1/maketgz b/lib/c-ares-1.19.0/maketgz similarity index 100% rename from lib/c-ares-1.18.1/maketgz rename to lib/c-ares-1.19.0/maketgz diff --git a/lib/c-ares-1.18.1/missing b/lib/c-ares-1.19.0/missing similarity index 100% rename from lib/c-ares-1.18.1/missing rename to lib/c-ares-1.19.0/missing diff --git a/lib/c-ares-1.18.1/msvc_ver.inc b/lib/c-ares-1.19.0/msvc_ver.inc similarity index 100% rename from lib/c-ares-1.18.1/msvc_ver.inc rename to lib/c-ares-1.19.0/msvc_ver.inc diff --git a/lib/c-ares-1.18.1/src/CMakeLists.txt b/lib/c-ares-1.19.0/src/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.18.1/src/CMakeLists.txt rename to lib/c-ares-1.19.0/src/CMakeLists.txt diff --git a/lib/c-ares-1.18.1/src/Makefile.am b/lib/c-ares-1.19.0/src/Makefile.am similarity index 100% rename from lib/c-ares-1.18.1/src/Makefile.am rename to lib/c-ares-1.19.0/src/Makefile.am diff --git a/lib/c-ares-1.18.1/src/Makefile.in b/lib/c-ares-1.19.0/src/Makefile.in similarity index 99% rename from lib/c-ares-1.18.1/src/Makefile.in rename to lib/c-ares-1.19.0/src/Makefile.in index 999e965d9ea..da56f4c23ca 100644 --- a/lib/c-ares-1.18.1/src/Makefile.in +++ b/lib/c-ares-1.19.0/src/Makefile.in @@ -245,6 +245,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ diff --git a/lib/c-ares-1.18.1/src/lib/CMakeLists.txt b/lib/c-ares-1.19.0/src/lib/CMakeLists.txt similarity index 96% rename from lib/c-ares-1.18.1/src/lib/CMakeLists.txt rename to lib/c-ares-1.19.0/src/lib/CMakeLists.txt index 7d37be21ace..5cea0762827 100644 --- a/lib/c-ares-1.18.1/src/lib/CMakeLists.txt +++ b/lib/c-ares-1.19.0/src/lib/CMakeLists.txt @@ -10,6 +10,11 @@ CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h) IF (CARES_SHARED) ADD_LIBRARY (${PROJECT_NAME} SHARED ${CSOURCES}) + # Include resource file in windows builds for versioned DLLs + IF (WIN32) + TARGET_SOURCES (${PROJECT_NAME} PRIVATE cares.rc) + ENDIF() + # Convert CARES_LIB_VERSIONINFO libtool version format into VERSION and SOVERSION # Convert from ":" separated into CMake list format using ";" STRING (REPLACE ":" ";" CARES_LIB_VERSIONINFO ${CARES_LIB_VERSIONINFO}) diff --git a/lib/c-ares-1.18.1/src/lib/Makefile.am b/lib/c-ares-1.19.0/src/lib/Makefile.am similarity index 100% rename from lib/c-ares-1.18.1/src/lib/Makefile.am rename to lib/c-ares-1.19.0/src/lib/Makefile.am diff --git a/lib/c-ares-1.18.1/src/lib/Makefile.in b/lib/c-ares-1.19.0/src/lib/Makefile.in similarity index 99% rename from lib/c-ares-1.18.1/src/lib/Makefile.in rename to lib/c-ares-1.19.0/src/lib/Makefile.in index 6b42bb85bfc..71449c1c43b 100644 --- a/lib/c-ares-1.18.1/src/lib/Makefile.in +++ b/lib/c-ares-1.19.0/src/lib/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Wed Oct 27 08:01:08 CEST 2021 +# from AX_AM_MACROS_STATIC on Sat Jan 28 10:29:54 CET 2023 VPATH = @srcdir@ am__is_gnu_make = { \ @@ -422,6 +422,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ @@ -636,7 +637,6 @@ HHEADERS = ares_android.h \ ares_inet_net_pton.h \ ares_iphlpapi.h \ ares_ipv6.h \ - ares_library_init.h \ ares_llist.h \ ares_nowarn.h \ ares_platform.h \ diff --git a/lib/c-ares-1.18.1/src/lib/Makefile.inc b/lib/c-ares-1.19.0/src/lib/Makefile.inc similarity index 98% rename from lib/c-ares-1.18.1/src/lib/Makefile.inc rename to lib/c-ares-1.19.0/src/lib/Makefile.inc index a3b060c289c..140378d67e2 100644 --- a/lib/c-ares-1.18.1/src/lib/Makefile.inc +++ b/lib/c-ares-1.19.0/src/lib/Makefile.inc @@ -65,7 +65,6 @@ HHEADERS = ares_android.h \ ares_inet_net_pton.h \ ares_iphlpapi.h \ ares_ipv6.h \ - ares_library_init.h \ ares_llist.h \ ares_nowarn.h \ ares_platform.h \ diff --git a/lib/c-ares-1.18.1/src/lib/ares__addrinfo2hostent.c b/lib/c-ares-1.19.0/src/lib/ares__addrinfo2hostent.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__addrinfo2hostent.c rename to lib/c-ares-1.19.0/src/lib/ares__addrinfo2hostent.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__addrinfo_localhost.c b/lib/c-ares-1.19.0/src/lib/ares__addrinfo_localhost.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__addrinfo_localhost.c rename to lib/c-ares-1.19.0/src/lib/ares__addrinfo_localhost.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__close_sockets.c b/lib/c-ares-1.19.0/src/lib/ares__close_sockets.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__close_sockets.c rename to lib/c-ares-1.19.0/src/lib/ares__close_sockets.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__get_hostent.c b/lib/c-ares-1.19.0/src/lib/ares__get_hostent.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__get_hostent.c rename to lib/c-ares-1.19.0/src/lib/ares__get_hostent.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__parse_into_addrinfo.c b/lib/c-ares-1.19.0/src/lib/ares__parse_into_addrinfo.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__parse_into_addrinfo.c rename to lib/c-ares-1.19.0/src/lib/ares__parse_into_addrinfo.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__read_line.c b/lib/c-ares-1.19.0/src/lib/ares__read_line.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__read_line.c rename to lib/c-ares-1.19.0/src/lib/ares__read_line.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__readaddrinfo.c b/lib/c-ares-1.19.0/src/lib/ares__readaddrinfo.c similarity index 97% rename from lib/c-ares-1.18.1/src/lib/ares__readaddrinfo.c rename to lib/c-ares-1.19.0/src/lib/ares__readaddrinfo.c index 673de87722b..2315df94111 100644 --- a/lib/c-ares-1.18.1/src/lib/ares__readaddrinfo.c +++ b/lib/c-ares-1.19.0/src/lib/ares__readaddrinfo.c @@ -234,12 +234,19 @@ int ares__readaddrinfo(FILE *fp, goto fail; } + /* If no results, its a failure */ + if (!nodes) + { + status = ARES_ENOTFOUND; + goto fail; + } + /* Free line buffer. */ ares_free(line); ares__addrinfo_cat_cnames(&ai->cnames, cnames); ares__addrinfo_cat_nodes(&ai->nodes, nodes); - return nodes ? ARES_SUCCESS : ARES_ENOTFOUND; + return ARES_SUCCESS; fail: ares_free(line); diff --git a/lib/c-ares-1.18.1/src/lib/ares__sortaddrinfo.c b/lib/c-ares-1.19.0/src/lib/ares__sortaddrinfo.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__sortaddrinfo.c rename to lib/c-ares-1.19.0/src/lib/ares__sortaddrinfo.c diff --git a/lib/c-ares-1.18.1/src/lib/ares__timeval.c b/lib/c-ares-1.19.0/src/lib/ares__timeval.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares__timeval.c rename to lib/c-ares-1.19.0/src/lib/ares__timeval.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_android.c b/lib/c-ares-1.19.0/src/lib/ares_android.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_android.c rename to lib/c-ares-1.19.0/src/lib/ares_android.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_android.h b/lib/c-ares-1.19.0/src/lib/ares_android.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_android.h rename to lib/c-ares-1.19.0/src/lib/ares_android.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_cancel.c b/lib/c-ares-1.19.0/src/lib/ares_cancel.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_cancel.c rename to lib/c-ares-1.19.0/src/lib/ares_cancel.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_config.h.cmake b/lib/c-ares-1.19.0/src/lib/ares_config.h.cmake similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_config.h.cmake rename to lib/c-ares-1.19.0/src/lib/ares_config.h.cmake diff --git a/lib/c-ares-1.18.1/src/lib/ares_config.h.in b/lib/c-ares-1.19.0/src/lib/ares_config.h.in similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_config.h.in rename to lib/c-ares-1.19.0/src/lib/ares_config.h.in diff --git a/lib/c-ares-1.18.1/src/lib/ares_create_query.c b/lib/c-ares-1.19.0/src/lib/ares_create_query.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_create_query.c rename to lib/c-ares-1.19.0/src/lib/ares_create_query.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_data.c b/lib/c-ares-1.19.0/src/lib/ares_data.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_data.c rename to lib/c-ares-1.19.0/src/lib/ares_data.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_data.h b/lib/c-ares-1.19.0/src/lib/ares_data.h similarity index 97% rename from lib/c-ares-1.18.1/src/lib/ares_data.h rename to lib/c-ares-1.19.0/src/lib/ares_data.h index 6b9dd9f8f74..54d729d0e7e 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_data.h +++ b/lib/c-ares-1.19.0/src/lib/ares_data.h @@ -1,3 +1,6 @@ +#ifndef __ARES_DATA_H +#define __ARES_DATA_H + /* Copyright (C) 2009-2013 by Daniel Stenberg * @@ -74,3 +77,5 @@ struct ares_data { void *ares_malloc_data(ares_datatype type); + +#endif // __ARES_DATA_H diff --git a/lib/c-ares-1.18.1/src/lib/ares_destroy.c b/lib/c-ares-1.19.0/src/lib/ares_destroy.c similarity index 96% rename from lib/c-ares-1.18.1/src/lib/ares_destroy.c rename to lib/c-ares-1.19.0/src/lib/ares_destroy.c index fed2009ab32..7ec2bde5a45 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_destroy.c +++ b/lib/c-ares-1.19.0/src/lib/ares_destroy.c @@ -38,6 +38,8 @@ void ares_destroy_options(struct ares_options *options) ares_free(options->lookups); if(options->resolvconf_path) ares_free(options->resolvconf_path); + if(options->hosts_path) + ares_free(options->hosts_path); } void ares_destroy(ares_channel channel) @@ -90,6 +92,9 @@ void ares_destroy(ares_channel channel) if (channel->resolvconf_path) ares_free(channel->resolvconf_path); + if (channel->hosts_path) + ares_free(channel->hosts_path); + ares_free(channel); } diff --git a/lib/c-ares-1.18.1/src/lib/ares_expand_name.c b/lib/c-ares-1.19.0/src/lib/ares_expand_name.c similarity index 97% rename from lib/c-ares-1.18.1/src/lib/ares_expand_name.c rename to lib/c-ares-1.19.0/src/lib/ares_expand_name.c index fcd88a2a42e..6c7a35a715b 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_expand_name.c +++ b/lib/c-ares-1.19.0/src/lib/ares_expand_name.c @@ -64,6 +64,8 @@ static int ares__isprint(int ch) * - underscores which are used in SRV records. * - Forward slashes such as are used for classless in-addr.arpa * delegation (CNAMEs) + * - Asterisks may be used for wildcard domains in CNAMEs as seen in the + * real world. * While RFC 2181 section 11 does state not to do validation, * that applies to servers, not clients. Vulnerabilities have been * reported when this validation is not performed. Security is more @@ -71,7 +73,7 @@ static int ares__isprint(int ch) * anyhow). */ static int is_hostnamech(int ch) { - /* [A-Za-z0-9-._/] + /* [A-Za-z0-9-*._/] * Don't use isalnum() as it is locale-specific */ if (ch >= 'A' && ch <= 'Z') @@ -80,7 +82,7 @@ static int is_hostnamech(int ch) return 1; if (ch >= '0' && ch <= '9') return 1; - if (ch == '-' || ch == '.' || ch == '_' || ch == '/') + if (ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '*') return 1; return 0; diff --git a/lib/c-ares-1.18.1/src/lib/ares_expand_string.c b/lib/c-ares-1.19.0/src/lib/ares_expand_string.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_expand_string.c rename to lib/c-ares-1.19.0/src/lib/ares_expand_string.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_fds.c b/lib/c-ares-1.19.0/src/lib/ares_fds.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_fds.c rename to lib/c-ares-1.19.0/src/lib/ares_fds.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_free_hostent.c b/lib/c-ares-1.19.0/src/lib/ares_free_hostent.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_free_hostent.c rename to lib/c-ares-1.19.0/src/lib/ares_free_hostent.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_free_string.c b/lib/c-ares-1.19.0/src/lib/ares_free_string.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_free_string.c rename to lib/c-ares-1.19.0/src/lib/ares_free_string.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_freeaddrinfo.c b/lib/c-ares-1.19.0/src/lib/ares_freeaddrinfo.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_freeaddrinfo.c rename to lib/c-ares-1.19.0/src/lib/ares_freeaddrinfo.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_getaddrinfo.c b/lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c similarity index 93% rename from lib/c-ares-1.18.1/src/lib/ares_getaddrinfo.c rename to lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c index 0a0225a59ec..bc9f19bf849 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_getaddrinfo.c +++ b/lib/c-ares-1.19.0/src/lib/ares_getaddrinfo.c @@ -326,7 +326,7 @@ static int fake_addrinfo(const char *name, } } - if (family == AF_INET6 || family == AF_UNSPEC) + if (!result && (family == AF_INET6 || family == AF_UNSPEC)) { struct ares_in6_addr addr6; result = ares_inet_pton(AF_INET6, name, &addr6) < 1 ? 0 : 1; @@ -404,6 +404,27 @@ static void end_hquery(struct host_query *hquery, int status) ares_free(hquery); } +static int is_localhost(const char *name) +{ + /* RFC6761 6.3 says : The domain "localhost." and any names falling within ".localhost." */ + size_t len; + + if (name == NULL) + return 0; + + if (strcmp(name, "localhost") == 0) + return 1; + + len = strlen(name); + if (len < 10 /* strlen(".localhost") */) + return 0; + + if (strcmp(name + (len - 10 /* strlen(".localhost") */), ".localhost") == 0) + return 1; + + return 0; +} + static int file_lookup(struct host_query *hquery) { FILE *fp; @@ -416,6 +437,11 @@ static int file_lookup(struct host_query *hquery) path_hosts = getenv("CARES_HOSTS"); } + if (hquery->channel->hosts_path) + { + path_hosts = hquery->channel->hosts_path; + } + if (!path_hosts) { #ifdef WIN32 @@ -466,21 +492,28 @@ static int file_lookup(struct host_query *hquery) { case ENOENT: case ESRCH: - return ARES_ENOTFOUND; + status = ARES_ENOTFOUND; + break; default: DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n", error, strerror(error))); DEBUGF(fprintf(stderr, "Error opening file: %s\n", path_hosts)); - return ARES_EFILE; + status = ARES_EFILE; + break; } } - status = ares__readaddrinfo(fp, hquery->name, hquery->port, &hquery->hints, hquery->ai); - fclose(fp); + else + { + status = ares__readaddrinfo(fp, hquery->name, hquery->port, &hquery->hints, hquery->ai); + fclose(fp); + } /* RFC6761 section 6.3 #3 states that "Name resolution APIs and libraries * SHOULD recognize localhost names as special and SHOULD always return the - * IP loopback address for address queries" */ - if (status == ARES_ENOTFOUND && strcmp(hquery->name, "localhost") == 0) + * IP loopback address for address queries". + * We will also ignore ALL errors when trying to resolve localhost, such + * as permissions errors reading /etc/hosts or a malformed /etc/hosts */ + if (status != ARES_SUCCESS && is_localhost(hquery->name)) { return ares__addrinfo_localhost(hquery->name, hquery->port, &hquery->hints, hquery->ai); @@ -497,7 +530,7 @@ static void next_lookup(struct host_query *hquery, int status) /* RFC6761 section 6.3 #3 says "Name resolution APIs SHOULD NOT send * queries for localhost names to their configured caching DNS * server(s)." */ - if (strcmp(hquery->name, "localhost") != 0) + if (!is_localhost(hquery->name)) { /* DNS lookup */ if (next_dns_lookup(hquery)) @@ -543,7 +576,16 @@ static void host_callback(void *arg, int status, int timeouts, if (addinfostatus != ARES_SUCCESS && addinfostatus != ARES_ENODATA) { /* error in parsing result e.g. no memory */ - end_hquery(hquery, addinfostatus); + if (addinfostatus == ARES_EBADRESP && hquery->ai->nodes) + { + /* We got a bad response from server, but at least one query + * ended with ARES_SUCCESS */ + end_hquery(hquery, ARES_SUCCESS); + } + else + { + end_hquery(hquery, addinfostatus); + } } else if (hquery->ai->nodes) { diff --git a/lib/c-ares-1.18.1/src/lib/ares_getenv.c b/lib/c-ares-1.19.0/src/lib/ares_getenv.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_getenv.c rename to lib/c-ares-1.19.0/src/lib/ares_getenv.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_getenv.h b/lib/c-ares-1.19.0/src/lib/ares_getenv.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_getenv.h rename to lib/c-ares-1.19.0/src/lib/ares_getenv.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_gethostbyaddr.c b/lib/c-ares-1.19.0/src/lib/ares_gethostbyaddr.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_gethostbyaddr.c rename to lib/c-ares-1.19.0/src/lib/ares_gethostbyaddr.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_gethostbyname.c b/lib/c-ares-1.19.0/src/lib/ares_gethostbyname.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_gethostbyname.c rename to lib/c-ares-1.19.0/src/lib/ares_gethostbyname.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_getnameinfo.c b/lib/c-ares-1.19.0/src/lib/ares_getnameinfo.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_getnameinfo.c rename to lib/c-ares-1.19.0/src/lib/ares_getnameinfo.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_getsock.c b/lib/c-ares-1.19.0/src/lib/ares_getsock.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_getsock.c rename to lib/c-ares-1.19.0/src/lib/ares_getsock.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_inet_net_pton.h b/lib/c-ares-1.19.0/src/lib/ares_inet_net_pton.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_inet_net_pton.h rename to lib/c-ares-1.19.0/src/lib/ares_inet_net_pton.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_init.c b/lib/c-ares-1.19.0/src/lib/ares_init.c similarity index 84% rename from lib/c-ares-1.18.1/src/lib/ares_init.c rename to lib/c-ares-1.19.0/src/lib/ares_init.c index de5d86c9aee..3f9cec65213 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_init.c +++ b/lib/c-ares-1.19.0/src/lib/ares_init.c @@ -47,9 +47,12 @@ #include #endif +#if defined(USE_WINSOCK) +# include +#endif + #include "ares.h" #include "ares_inet_net_pton.h" -#include "ares_library_init.h" #include "ares_nowarn.h" #include "ares_platform.h" #include "ares_private.h" @@ -58,6 +61,18 @@ #undef WIN32 /* Redefined in MingW/MSVC headers */ #endif +/* Define RtlGenRandom = SystemFunction036. This is in advapi32.dll. There is + * no need to dynamically load this, other software used widely does not. + * http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx + * https://docs.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom + */ +#ifdef _WIN32 +BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG RandomBufferLength); +# ifndef RtlGenRandom +# define RtlGenRandom(a,b) SystemFunction036(a,b) +# endif +#endif + static int init_by_options(ares_channel channel, const struct ares_options *options, int optmask); @@ -149,6 +164,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, channel->sock_funcs = NULL; channel->sock_func_cb_data = NULL; channel->resolvconf_path = NULL; + channel->hosts_path = NULL; channel->last_server = 0; channel->last_timeout_processed = (time_t)now.tv_sec; @@ -217,13 +233,15 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, if (channel->servers) ares_free(channel->servers); if (channel->ndomains != -1) - ares_strsplit_free(channel->domains, channel->ndomains); + ares__strsplit_free(channel->domains, channel->ndomains); if (channel->sortlist) ares_free(channel->sortlist); if(channel->lookups) ares_free(channel->lookups); if(channel->resolvconf_path) ares_free(channel->resolvconf_path); + if(channel->hosts_path) + ares_free(channel->hosts_path); ares_free(channel); return status; } @@ -335,6 +353,9 @@ int ares_save_options(ares_channel channel, struct ares_options *options, if (channel->resolvconf_path) (*optmask) |= ARES_OPT_RESOLVCONF; + if (channel->hosts_path) + (*optmask) |= ARES_OPT_HOSTS_FILE; + /* Copy easy stuff */ options->flags = channel->flags; @@ -414,6 +435,13 @@ int ares_save_options(ares_channel channel, struct ares_options *options, return ARES_ENOMEM; } + /* copy path for hosts file */ + if (channel->hosts_path) { + options->hosts_path = ares_strdup(channel->hosts_path); + if (!options->hosts_path) + return ARES_ENOMEM; + } + return ARES_SUCCESS; } @@ -530,6 +558,14 @@ static int init_by_options(ares_channel channel, return ARES_ENOMEM; } + /* Set path for hosts file, if given. */ + if ((optmask & ARES_OPT_HOSTS_FILE) && !channel->hosts_path) + { + channel->hosts_path = ares_strdup(options->hosts_path); + if (!channel->hosts_path && options->hosts_path) + return ARES_ENOMEM; + } + channel->optmask = optmask; return ARES_SUCCESS; @@ -608,227 +644,6 @@ static int get_REG_SZ(HKEY hKey, const char *leafKeyName, char **outptr) return 1; } -/* - * get_REG_SZ_9X() - * - * Functionally identical to get_REG_SZ() - * - * Supported on Windows 95, 98 and ME. - */ -static int get_REG_SZ_9X(HKEY hKey, const char *leafKeyName, char **outptr) -{ - DWORD dataType = 0; - DWORD size = 0; - int res; - - *outptr = NULL; - - /* Find out size of string stored in registry */ - res = RegQueryValueExA(hKey, leafKeyName, 0, &dataType, NULL, &size); - if ((res != ERROR_SUCCESS && res != ERROR_MORE_DATA) || !size) - return 0; - - /* Allocate buffer of indicated size plus one given that string - might have been stored without null termination */ - *outptr = ares_malloc(size+1); - if (!*outptr) - return 0; - - /* Get the value for real */ - res = RegQueryValueExA(hKey, leafKeyName, 0, &dataType, - (unsigned char *)*outptr, &size); - if ((res != ERROR_SUCCESS) || (size == 1)) - { - ares_free(*outptr); - *outptr = NULL; - return 0; - } - - /* Null terminate buffer allways */ - *(*outptr + size) = '\0'; - - return 1; -} - -/* - * get_enum_REG_SZ() - * - * Given a 'hKeyParent' handle to an open registry key and a 'leafKeyName' - * pointer to the name of the registry leaf key to be queried, parent key - * is enumerated searching in child keys for given leaf key name and its - * associated string value. When located, this returns a pointer in *outptr - * to a newly allocated memory area holding it as a null-terminated string. - * - * Returns 0 and nullifies *outptr upon inability to return a string value. - * - * Returns 1 and sets *outptr when returning a dynamically allocated string. - * - * Supported on Windows NT 3.5 and newer. - */ -static int get_enum_REG_SZ(HKEY hKeyParent, const char *leafKeyName, - char **outptr) -{ - char enumKeyName[256]; - DWORD enumKeyNameBuffSize; - DWORD enumKeyIdx = 0; - HKEY hKeyEnum; - int gotString; - int res; - - *outptr = NULL; - - for(;;) - { - enumKeyNameBuffSize = sizeof(enumKeyName); - res = RegEnumKeyExA(hKeyParent, enumKeyIdx++, enumKeyName, - &enumKeyNameBuffSize, 0, NULL, NULL, NULL); - if (res != ERROR_SUCCESS) - break; - res = RegOpenKeyExA(hKeyParent, enumKeyName, 0, KEY_QUERY_VALUE, - &hKeyEnum); - if (res != ERROR_SUCCESS) - continue; - gotString = get_REG_SZ(hKeyEnum, leafKeyName, outptr); - RegCloseKey(hKeyEnum); - if (gotString) - break; - } - - if (!*outptr) - return 0; - - return 1; -} - -/* - * get_DNS_Registry_9X() - * - * Functionally identical to get_DNS_Registry() - * - * Implementation supports Windows 95, 98 and ME. - */ -static int get_DNS_Registry_9X(char **outptr) -{ - HKEY hKey_VxD_MStcp; - int gotString; - int res; - - *outptr = NULL; - - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_9X, 0, KEY_READ, - &hKey_VxD_MStcp); - if (res != ERROR_SUCCESS) - return 0; - - gotString = get_REG_SZ_9X(hKey_VxD_MStcp, NAMESERVER, outptr); - RegCloseKey(hKey_VxD_MStcp); - - if (!gotString || !*outptr) - return 0; - - return 1; -} - -/* - * get_DNS_Registry_NT() - * - * Functionally identical to get_DNS_Registry() - * - * Refs: Microsoft Knowledge Base articles KB120642 and KB314053. - * - * Implementation supports Windows NT 3.5 and newer. - */ -static int get_DNS_Registry_NT(char **outptr) -{ - HKEY hKey_Interfaces = NULL; - HKEY hKey_Tcpip_Parameters; - int gotString; - int res; - - *outptr = NULL; - - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ, - &hKey_Tcpip_Parameters); - if (res != ERROR_SUCCESS) - return 0; - - /* - ** Global DNS settings override adapter specific parameters when both - ** are set. Additionally static DNS settings override DHCP-configured - ** parameters when both are set. - */ - - /* Global DNS static parameters */ - gotString = get_REG_SZ(hKey_Tcpip_Parameters, NAMESERVER, outptr); - if (gotString) - goto done; - - /* Global DNS DHCP-configured parameters */ - gotString = get_REG_SZ(hKey_Tcpip_Parameters, DHCPNAMESERVER, outptr); - if (gotString) - goto done; - - /* Try adapter specific parameters */ - res = RegOpenKeyExA(hKey_Tcpip_Parameters, "Interfaces", 0, - KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, - &hKey_Interfaces); - if (res != ERROR_SUCCESS) - { - hKey_Interfaces = NULL; - goto done; - } - - /* Adapter specific DNS static parameters */ - gotString = get_enum_REG_SZ(hKey_Interfaces, NAMESERVER, outptr); - if (gotString) - goto done; - - /* Adapter specific DNS DHCP-configured parameters */ - gotString = get_enum_REG_SZ(hKey_Interfaces, DHCPNAMESERVER, outptr); - -done: - if (hKey_Interfaces) - RegCloseKey(hKey_Interfaces); - - RegCloseKey(hKey_Tcpip_Parameters); - - if (!gotString || !*outptr) - return 0; - - return 1; -} - -/* - * get_DNS_Registry() - * - * Locates DNS info in the registry. When located, this returns a pointer - * in *outptr to a newly allocated memory area holding a null-terminated - * string with a space or comma seperated list of DNS IP addresses. - * - * Returns 0 and nullifies *outptr upon inability to return DNSes string. - * - * Returns 1 and sets *outptr when returning a dynamically allocated string. - */ -static int get_DNS_Registry(char **outptr) -{ - win_platform platform; - int gotString = 0; - - *outptr = NULL; - - platform = ares__getplatform(); - - if (platform == WIN_NT) - gotString = get_DNS_Registry_NT(outptr); - else if (platform == WIN_9X) - gotString = get_DNS_Registry_9X(outptr); - - if (!gotString) - return 0; - - return 1; -} - static void commanjoin(char** dst, const char* const src, const size_t len) { char *newbuf; @@ -857,106 +672,6 @@ static void commajoin(char **dst, const char *src) commanjoin(dst, src, strlen(src)); } -/* - * get_DNS_NetworkParams() - * - * Locates DNS info using GetNetworkParams() function from the Internet - * Protocol Helper (IP Helper) API. When located, this returns a pointer - * in *outptr to a newly allocated memory area holding a null-terminated - * string with a space or comma seperated list of DNS IP addresses. - * - * Returns 0 and nullifies *outptr upon inability to return DNSes string. - * - * Returns 1 and sets *outptr when returning a dynamically allocated string. - * - * Implementation supports Windows 98 and newer. - * - * Note: Ancient PSDK required in order to build a W98 target. - */ -static int get_DNS_NetworkParams(char **outptr) -{ - FIXED_INFO *fi, *newfi; - struct ares_addr namesrvr; - char *txtaddr; - IP_ADDR_STRING *ipAddr; - int res; - DWORD size = sizeof (*fi); - - *outptr = NULL; - - /* Verify run-time availability of GetNetworkParams() */ - if (ares_fpGetNetworkParams == ZERO_NULL) - return 0; - - fi = ares_malloc(size); - if (!fi) - return 0; - - res = (*ares_fpGetNetworkParams) (fi, &size); - if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) - goto done; - - newfi = ares_realloc(fi, size); - if (!newfi) - goto done; - - fi = newfi; - res = (*ares_fpGetNetworkParams) (fi, &size); - if (res != ERROR_SUCCESS) - goto done; - - for (ipAddr = &fi->DnsServerList; ipAddr; ipAddr = ipAddr->Next) - { - txtaddr = &ipAddr->IpAddress.String[0]; - - /* Validate converting textual address to binary format. */ - if (ares_inet_pton(AF_INET, txtaddr, &namesrvr.addrV4) == 1) - { - if ((namesrvr.addrV4.S_un.S_addr == INADDR_ANY) || - (namesrvr.addrV4.S_un.S_addr == INADDR_NONE)) - continue; - } - else if (ares_inet_pton(AF_INET6, txtaddr, &namesrvr.addrV6) == 1) - { - if (memcmp(&namesrvr.addrV6, &ares_in6addr_any, - sizeof(namesrvr.addrV6)) == 0) - continue; - } - else - continue; - - commajoin(outptr, txtaddr); - - if (!*outptr) - break; - } - -done: - if (fi) - ares_free(fi); - - if (!*outptr) - return 0; - - return 1; -} - -static BOOL ares_IsWindowsVistaOrGreater(void) -{ - OSVERSIONINFO vinfo; - memset(&vinfo, 0, sizeof(vinfo)); - vinfo.dwOSVersionInfoSize = sizeof(vinfo); -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4996) /* warning C4996: 'GetVersionExW': was declared deprecated */ -#endif - if (!GetVersionEx(&vinfo) || vinfo.dwMajorVersion < 6) - return FALSE; - return TRUE; -#ifdef _MSC_VER -#pragma warning(pop) -#endif -} /* A structure to hold the string form of IPv4 and IPv6 addresses so we can * sort them by a metric. @@ -1033,21 +748,20 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */ /* On this interface, get the best route to that destination. */ MIB_IPFORWARD_ROW2 row; SOCKADDR_INET ignored; - if(!ares_fpGetBestRoute2 || - ares_fpGetBestRoute2(/* The interface to use. The index is ignored since we are - * passing a LUID. - */ - luid, 0, - /* No specific source address. */ - NULL, - /* Our destination address. */ - dest, - /* No options. */ - 0, - /* The route row. */ - &row, - /* The best source address, which we don't need. */ - &ignored) != NO_ERROR + if(GetBestRoute2(/* The interface to use. The index is ignored since we are + * passing a LUID. + */ + luid, 0, + /* No specific source address. */ + NULL, + /* Our destination address. */ + dest, + /* No options. */ + 0, + /* The route row. */ + &row, + /* The best source address, which we don't need. */ + &ignored) != NO_ERROR /* If the metric is "unused" (-1) or too large for us to add the two * metrics, use the worst possible, thus sorting this last. */ @@ -1067,7 +781,7 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */ } /* - * get_DNS_AdaptersAddresses() + * get_DNS_Windows() * * Locates DNS info using GetAdaptersAddresses() function from the Internet * Protocol Helper (IP Helper) API. When located, this returns a pointer @@ -1082,7 +796,7 @@ static ULONG getBestRouteMetric(IF_LUID * const luid, /* Can't be const :( */ */ #define IPAA_INITIAL_BUF_SZ 15 * 1024 #define IPAA_MAX_TRIES 3 -static int get_DNS_AdaptersAddresses(char **outptr) +static int get_DNS_Windows(char **outptr) { IP_ADAPTER_DNS_SERVER_ADDRESS *ipaDNSAddr; IP_ADAPTER_ADDRESSES *ipaa, *newipaa, *ipaaEntry; @@ -1107,10 +821,6 @@ static int get_DNS_AdaptersAddresses(char **outptr) *outptr = NULL; - /* Verify run-time availability of GetAdaptersAddresses() */ - if (ares_fpGetAdaptersAddresses == ZERO_NULL) - return 0; - ipaa = ares_malloc(Bufsz); if (!ipaa) return 0; @@ -1127,8 +837,7 @@ static int get_DNS_AdaptersAddresses(char **outptr) } /* Usually this call suceeds with initial buffer size */ - res = (*ares_fpGetAdaptersAddresses) (AF_UNSPEC, AddrFlags, NULL, - ipaa, &ReqBufsz); + res = GetAdaptersAddresses(AF_UNSPEC, AddrFlags, NULL, ipaa, &ReqBufsz); if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) goto done; @@ -1142,8 +851,7 @@ static int get_DNS_AdaptersAddresses(char **outptr) Bufsz = ReqBufsz; ipaa = newipaa; } - res = (*ares_fpGetAdaptersAddresses) (AF_UNSPEC, AddrFlags, NULL, - ipaa, &ReqBufsz); + res = GetAdaptersAddresses(AF_UNSPEC, AddrFlags, NULL, ipaa, &ReqBufsz); if (res == ERROR_SUCCESS) break; } @@ -1185,26 +893,17 @@ static int get_DNS_AdaptersAddresses(char **outptr) addressesSize = newSize; } - /* Vista required for Luid or Ipv4Metric */ - if (ares_IsWindowsVistaOrGreater()) - { - /* Save the address as the next element in addresses. */ - addresses[addressesIndex].metric = - getBestRouteMetric(&ipaaEntry->Luid, - (SOCKADDR_INET*)(namesrvr.sa), - ipaaEntry->Ipv4Metric); - } - else - { - addresses[addressesIndex].metric = (ULONG)-1; - } + addresses[addressesIndex].metric = + getBestRouteMetric(&ipaaEntry->Luid, + (SOCKADDR_INET*)(namesrvr.sa), + ipaaEntry->Ipv4Metric); /* Record insertion index to make qsort stable */ addresses[addressesIndex].orig_idx = addressesIndex; - if (! ares_inet_ntop(AF_INET, &namesrvr.sa4->sin_addr, - addresses[addressesIndex].text, - sizeof(addresses[0].text))) { + if (!ares_inet_ntop(AF_INET, &namesrvr.sa4->sin_addr, + addresses[addressesIndex].text, + sizeof(addresses[0].text))) { continue; } ++addressesIndex; @@ -1227,26 +926,17 @@ static int get_DNS_AdaptersAddresses(char **outptr) addressesSize = newSize; } - /* Vista required for Luid or Ipv4Metric */ - if (ares_IsWindowsVistaOrGreater()) - { - /* Save the address as the next element in addresses. */ - addresses[addressesIndex].metric = - getBestRouteMetric(&ipaaEntry->Luid, - (SOCKADDR_INET*)(namesrvr.sa), - ipaaEntry->Ipv6Metric); - } - else - { - addresses[addressesIndex].metric = (ULONG)-1; - } + addresses[addressesIndex].metric = + getBestRouteMetric(&ipaaEntry->Luid, + (SOCKADDR_INET*)(namesrvr.sa), + ipaaEntry->Ipv6Metric); /* Record insertion index to make qsort stable */ addresses[addressesIndex].orig_idx = addressesIndex; - if (! ares_inet_ntop(AF_INET6, &namesrvr.sa6->sin6_addr, - addresses[addressesIndex].text, - sizeof(addresses[0].text))) { + if (!ares_inet_ntop(AF_INET6, &namesrvr.sa6->sin6_addr, + addresses[addressesIndex].text, + sizeof(addresses[0].text))) { continue; } ++addressesIndex; @@ -1294,35 +984,6 @@ static int get_DNS_AdaptersAddresses(char **outptr) return 1; } -/* - * get_DNS_Windows() - * - * Locates DNS info from Windows employing most suitable methods available at - * run-time no matter which Windows version it is. When located, this returns - * a pointer in *outptr to a newly allocated memory area holding a string with - * a space or comma seperated list of DNS IP addresses, null-terminated. - * - * Returns 0 and nullifies *outptr upon inability to return DNSes string. - * - * Returns 1 and sets *outptr when returning a dynamically allocated string. - * - * Implementation supports Windows 95 and newer. - */ -static int get_DNS_Windows(char **outptr) -{ - /* Try using IP helper API GetAdaptersAddresses(). IPv4 + IPv6, also sorts - * DNS servers by interface route metrics to try to use the best DNS server. */ - if (get_DNS_AdaptersAddresses(outptr)) - return 1; - - /* Try using IP helper API GetNetworkParams(). IPv4 only. */ - if (get_DNS_NetworkParams(outptr)) - return 1; - - /* Fall-back to registry information */ - return get_DNS_Registry(outptr); -} - /* * get_SuffixList_Windows() * @@ -1686,8 +1347,12 @@ static int init_by_resolv_conf(ares_channel channel) channel->tries = res.retry; if (channel->rotate == -1) channel->rotate = res.options & RES_ROTATE; - if (channel->timeout == -1) + if (channel->timeout == -1) { channel->timeout = res.retrans * 1000; +#ifdef __APPLE__ + channel->timeout /= (res.retry + 1) * (res.nscount > 0 ? res.nscount : 1); +#endif + } res_ndestroy(&res); } @@ -2021,6 +1686,11 @@ static int init_by_defaults(ares_channel channel) ares_free(channel->resolvconf_path); channel->resolvconf_path = NULL; } + + if(channel->hosts_path) { + ares_free(channel->hosts_path); + channel->hosts_path = NULL; + } } if(hostname) @@ -2243,6 +1913,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, q = str; while (*q && *q != '/' && *q != ';' && !ISSPACE(*q)) q++; + if (q-str >= 16) + return ARES_EBADSTR; memcpy(ipbuf, str, q-str); ipbuf[q-str] = '\0'; /* Find the prefix */ @@ -2251,6 +1923,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, const char *str2 = q+1; while (*q && *q != ';' && !ISSPACE(*q)) q++; + if (q-str >= 32) + return ARES_EBADSTR; memcpy(ipbufpfx, str, q-str); ipbufpfx[q-str] = '\0'; str = str2; @@ -2325,12 +1999,12 @@ static int set_search(ares_channel channel, const char *str) if(channel->ndomains != -1) { /* LCOV_EXCL_START: all callers check ndomains == -1 */ /* if we already have some domains present, free them first */ - ares_strsplit_free(channel->domains, channel->ndomains); + ares__strsplit_free(channel->domains, channel->ndomains); channel->domains = NULL; channel->ndomains = -1; } /* LCOV_EXCL_STOP */ - channel->domains = ares_strsplit(str, ", ", 1, &cnt); + channel->domains = ares__strsplit(str, ", ", &cnt); channel->ndomains = (int)cnt; if (channel->domains == NULL || channel->ndomains == 0) { channel->domains = NULL; @@ -2495,12 +2169,10 @@ static int sortlist_alloc(struct apattern **sortlist, int *nsort, return 1; } + /* initialize an rc4 key. If possible a cryptographically secure random key - is generated using a suitable function (for example win32's RtlGenRandom as - described in - http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx - otherwise the code defaults to cross-platform albeit less secure mechanism - using rand + is generated using a suitable function otherwise the code defaults to + cross-platform albeit less secure mechanism using rand */ static void randomize_key(unsigned char* key,int key_data_len) { @@ -2508,21 +2180,20 @@ static void randomize_key(unsigned char* key,int key_data_len) int counter=0; #ifdef WIN32 BOOLEAN res; - if (ares_fpSystemFunction036) - { - res = (*ares_fpSystemFunction036) (key, key_data_len); - if (res) - randomized = 1; - } + + res = RtlGenRandom(key, key_data_len); + if (res) + randomized = 1; + #else /* !WIN32 */ -#ifdef CARES_RANDOM_FILE +# ifdef CARES_RANDOM_FILE FILE *f = fopen(CARES_RANDOM_FILE, "rb"); if(f) { setvbuf(f, NULL, _IONBF, 0); counter = aresx_uztosi(fread(key, 1, key_data_len, f)); fclose(f); } -#endif +# endif #endif /* WIN32 */ if (!randomized) { diff --git a/lib/c-ares-1.18.1/src/lib/ares_iphlpapi.h b/lib/c-ares-1.19.0/src/lib/ares_iphlpapi.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_iphlpapi.h rename to lib/c-ares-1.19.0/src/lib/ares_iphlpapi.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_ipv6.h b/lib/c-ares-1.19.0/src/lib/ares_ipv6.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_ipv6.h rename to lib/c-ares-1.19.0/src/lib/ares_ipv6.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_library_init.c b/lib/c-ares-1.19.0/src/lib/ares_library_init.c similarity index 56% rename from lib/c-ares-1.18.1/src/lib/ares_library_init.c rename to lib/c-ares-1.19.0/src/lib/ares_library_init.c index e0055d44a1c..bbfcbeec178 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_library_init.c +++ b/lib/c-ares-1.19.0/src/lib/ares_library_init.c @@ -18,18 +18,10 @@ #include "ares_setup.h" #include "ares.h" -#include "ares_library_init.h" #include "ares_private.h" /* library-private global and unique instance vars */ -#ifdef USE_WINSOCK -fpGetNetworkParams_t ares_fpGetNetworkParams = ZERO_NULL; -fpSystemFunction036_t ares_fpSystemFunction036 = ZERO_NULL; -fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses = ZERO_NULL; -fpGetBestRoute2_t ares_fpGetBestRoute2 = ZERO_NULL; -#endif - #if defined(ANDROID) || defined(__ANDROID__) #include "ares_android.h" #endif @@ -59,81 +51,8 @@ void *(*ares_malloc)(size_t size) = default_malloc; void *(*ares_realloc)(void *ptr, size_t size) = default_realloc; void (*ares_free)(void *ptr) = default_free; -#ifdef USE_WINSOCK -static HMODULE hnd_iphlpapi; -static HMODULE hnd_advapi32; -#endif - - -static int ares_win32_init(void) -{ -#ifdef USE_WINSOCK - - hnd_iphlpapi = 0; - hnd_iphlpapi = LoadLibraryW(L"iphlpapi.dll"); - if (!hnd_iphlpapi) - return ARES_ELOADIPHLPAPI; - - ares_fpGetNetworkParams = (fpGetNetworkParams_t) - GetProcAddress(hnd_iphlpapi, "GetNetworkParams"); - if (!ares_fpGetNetworkParams) - { - FreeLibrary(hnd_iphlpapi); - return ARES_EADDRGETNETWORKPARAMS; - } - - ares_fpGetAdaptersAddresses = (fpGetAdaptersAddresses_t) - GetProcAddress(hnd_iphlpapi, "GetAdaptersAddresses"); - if (!ares_fpGetAdaptersAddresses) - { - /* This can happen on clients before WinXP, I don't - think it should be an error, unless we don't want to - support Windows 2000 anymore */ - } - - ares_fpGetBestRoute2 = (fpGetBestRoute2_t) - GetProcAddress(hnd_iphlpapi, "GetBestRoute2"); - if (!ares_fpGetBestRoute2) - { - /* This can happen on clients before Vista, I don't - think it should be an error, unless we don't want to - support Windows XP anymore */ - } - - /* - * When advapi32.dll is unavailable or advapi32.dll has no SystemFunction036, - * also known as RtlGenRandom, which is the case for Windows versions prior - * to WinXP then c-ares uses portable rand() function. Then don't error here. - */ - - hnd_advapi32 = 0; - hnd_advapi32 = LoadLibraryW(L"advapi32.dll"); - if (hnd_advapi32) - { - ares_fpSystemFunction036 = (fpSystemFunction036_t) - GetProcAddress(hnd_advapi32, "SystemFunction036"); - } - -#endif - return ARES_SUCCESS; -} - - -static void ares_win32_cleanup(void) -{ -#ifdef USE_WINSOCK - if (hnd_advapi32) - FreeLibrary(hnd_advapi32); - if (hnd_iphlpapi) - FreeLibrary(hnd_iphlpapi); -#endif -} - - int ares_library_init(int flags) { - int res; - if (ares_initialized) { ares_initialized++; @@ -141,12 +60,7 @@ int ares_library_init(int flags) } ares_initialized++; - if (flags & ARES_LIB_INIT_WIN32) - { - res = ares_win32_init(); - if (res != ARES_SUCCESS) - return res; /* LCOV_EXCL_LINE: can't test Win32 init failure */ - } + /* NOTE: ARES_LIB_INIT_WIN32 flag no longer used */ ares_init_flags = flags; @@ -176,8 +90,7 @@ void ares_library_cleanup(void) if (ares_initialized) return; - if (ares_init_flags & ARES_LIB_INIT_WIN32) - ares_win32_cleanup(); + /* NOTE: ARES_LIB_INIT_WIN32 flag no longer used */ #if defined(ANDROID) || defined(__ANDROID__) ares_library_cleanup_android(); diff --git a/lib/c-ares-1.18.1/src/lib/ares_llist.c b/lib/c-ares-1.19.0/src/lib/ares_llist.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_llist.c rename to lib/c-ares-1.19.0/src/lib/ares_llist.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_llist.h b/lib/c-ares-1.19.0/src/lib/ares_llist.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_llist.h rename to lib/c-ares-1.19.0/src/lib/ares_llist.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_mkquery.c b/lib/c-ares-1.19.0/src/lib/ares_mkquery.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_mkquery.c rename to lib/c-ares-1.19.0/src/lib/ares_mkquery.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_nowarn.c b/lib/c-ares-1.19.0/src/lib/ares_nowarn.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_nowarn.c rename to lib/c-ares-1.19.0/src/lib/ares_nowarn.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_nowarn.h b/lib/c-ares-1.19.0/src/lib/ares_nowarn.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_nowarn.h rename to lib/c-ares-1.19.0/src/lib/ares_nowarn.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_options.c b/lib/c-ares-1.19.0/src/lib/ares_options.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_options.c rename to lib/c-ares-1.19.0/src/lib/ares_options.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_a_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_a_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_a_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_a_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_aaaa_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_aaaa_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_aaaa_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_aaaa_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_caa_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_caa_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_caa_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_caa_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_mx_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_mx_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_mx_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_mx_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_naptr_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_naptr_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_naptr_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_naptr_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_ns_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_ns_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_ns_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_ns_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_ptr_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_ptr_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_ptr_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_ptr_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_soa_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_soa_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_soa_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_soa_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_srv_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_srv_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_srv_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_srv_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_txt_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_txt_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_txt_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_txt_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_parse_uri_reply.c b/lib/c-ares-1.19.0/src/lib/ares_parse_uri_reply.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_parse_uri_reply.c rename to lib/c-ares-1.19.0/src/lib/ares_parse_uri_reply.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_platform.c b/lib/c-ares-1.19.0/src/lib/ares_platform.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_platform.c rename to lib/c-ares-1.19.0/src/lib/ares_platform.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_platform.h b/lib/c-ares-1.19.0/src/lib/ares_platform.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_platform.h rename to lib/c-ares-1.19.0/src/lib/ares_platform.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_private.h b/lib/c-ares-1.19.0/src/lib/ares_private.h similarity index 99% rename from lib/c-ares-1.18.1/src/lib/ares_private.h rename to lib/c-ares-1.19.0/src/lib/ares_private.h index 60d69e08b79..53043a65137 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_private.h +++ b/lib/c-ares-1.19.0/src/lib/ares_private.h @@ -339,6 +339,9 @@ struct ares_channeldata { /* Path for resolv.conf file, configurable via ares_options */ char *resolvconf_path; + + /* Path for hosts file, configurable via ares_options */ + char *hosts_path; }; /* Does the domain end in ".onion" or ".onion."? Case-insensitive. */ diff --git a/lib/c-ares-1.18.1/src/lib/ares_process.c b/lib/c-ares-1.19.0/src/lib/ares_process.c similarity index 98% rename from lib/c-ares-1.18.1/src/lib/ares_process.c rename to lib/c-ares-1.19.0/src/lib/ares_process.c index 87329e35886..d5a6df8ba7c 100644 --- a/lib/c-ares-1.18.1/src/lib/ares_process.c +++ b/lib/c-ares-1.19.0/src/lib/ares_process.c @@ -209,6 +209,17 @@ static void write_tcp_data(ares_channel channel, ares_ssize_t scount; ares_ssize_t wcount; size_t n; + /* From writev manpage: An implementation can advertise its limit by defining + IOV_MAX in or at run time via the return value from + sysconf(_SC_IOV_MAX). On modern Linux systems, the limit is 1024. Back in + Linux 2.0 days, this limit was 16. */ +#if defined(IOV_MAX) + const size_t maxn = IOV_MAX; /* FreeBSD */ +#elif defined(_SC_IOV_MAX) + const size_t maxn = sysconf(_SC_IOV_MAX); /* Linux */ +#else + const size_t maxn = 16; /* Safe default */ +#endif if(!write_fds && (write_fd == ARES_SOCKET_BAD)) /* no possible action */ @@ -256,6 +267,8 @@ static void write_tcp_data(ares_channel channel, vec[n].iov_base = (char *) sendreq->data; vec[n].iov_len = sendreq->len; n++; + if(n >= maxn) + break; } wcount = socket_writev(channel, server->tcp_socket, vec, (int)n); ares_free(vec); diff --git a/lib/c-ares-1.18.1/src/lib/ares_query.c b/lib/c-ares-1.19.0/src/lib/ares_query.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_query.c rename to lib/c-ares-1.19.0/src/lib/ares_query.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_search.c b/lib/c-ares-1.19.0/src/lib/ares_search.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_search.c rename to lib/c-ares-1.19.0/src/lib/ares_search.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_send.c b/lib/c-ares-1.19.0/src/lib/ares_send.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_send.c rename to lib/c-ares-1.19.0/src/lib/ares_send.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_setup.h b/lib/c-ares-1.19.0/src/lib/ares_setup.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_setup.h rename to lib/c-ares-1.19.0/src/lib/ares_setup.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_strcasecmp.c b/lib/c-ares-1.19.0/src/lib/ares_strcasecmp.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_strcasecmp.c rename to lib/c-ares-1.19.0/src/lib/ares_strcasecmp.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_strcasecmp.h b/lib/c-ares-1.19.0/src/lib/ares_strcasecmp.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_strcasecmp.h rename to lib/c-ares-1.19.0/src/lib/ares_strcasecmp.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_strdup.c b/lib/c-ares-1.19.0/src/lib/ares_strdup.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_strdup.c rename to lib/c-ares-1.19.0/src/lib/ares_strdup.c diff --git a/lib/c-ares-1.18.1/src/lib/ares_strdup.h b/lib/c-ares-1.19.0/src/lib/ares_strdup.h similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_strdup.h rename to lib/c-ares-1.19.0/src/lib/ares_strdup.h diff --git a/lib/c-ares-1.18.1/src/lib/ares_strerror.c b/lib/c-ares-1.19.0/src/lib/ares_strerror.c similarity index 100% rename from lib/c-ares-1.18.1/src/lib/ares_strerror.c rename to lib/c-ares-1.19.0/src/lib/ares_strerror.c diff --git a/lib/c-ares-1.19.0/src/lib/ares_strsplit.c b/lib/c-ares-1.19.0/src/lib/ares_strsplit.c new file mode 100644 index 00000000000..194375c8308 --- /dev/null +++ b/lib/c-ares-1.19.0/src/lib/ares_strsplit.c @@ -0,0 +1,100 @@ +/* Copyright (C) 2018 by John Schember + * + * Permission to use, copy, modify, and distribute this + * software and its documentation for any purpose and without + * fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in + * advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +#if defined(__MVS__) +#include +#endif + +#include "ares_setup.h" +#include "ares_strsplit.h" +#include "ares.h" +#include "ares_private.h" + +void ares__strsplit_free(char **elms, size_t num_elm) +{ + size_t i; + + if (elms == NULL) + return; + + for (i=0; i> 24), (unsigned int)((addr.s_addr >> 16) & 255), @@ -232,6 +233,7 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host) if (!host || status != ARES_SUCCESS) { printf("Failed to lookup %s: %s\n", name, ares_strerror(status)); + free(arg); return; } @@ -244,6 +246,7 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host) printf("Failed to get CNAME for %s\n", name); else find_country_from_cname(cname, *(CARES_INADDR_CAST(struct in_addr *, host->h_addr))); + free(arg); } /* @@ -643,10 +646,10 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) /* Information from the man page. Formatting taken from man -h */ static void print_help_info_acountry(void) { - printf("acountry, version %s \n\n", ARES_VERSION_STR); - printf("usage: acountry [-hdv] {host|addr} ...\n\n" - " d : Print some extra debugging output.\n" + printf("acountry, version %s\n\n", ARES_VERSION_STR); + printf("usage: acountry [-hdv] host|addr ...\n\n" " h : Display this help and exit.\n" + " d : Print some extra debugging output.\n" " v : Be more verbose. Print extra information.\n\n"); exit(0); } diff --git a/lib/c-ares-1.18.1/src/tools/adig.c b/lib/c-ares-1.19.0/src/tools/adig.c similarity index 94% rename from lib/c-ares-1.18.1/src/tools/adig.c rename to lib/c-ares-1.19.0/src/tools/adig.c index 412ad467b55..cf5bd4d3f2f 100644 --- a/lib/c-ares-1.18.1/src/tools/adig.c +++ b/lib/c-ares-1.19.0/src/tools/adig.c @@ -296,6 +296,7 @@ int main(int argc, char **argv) if (!ISDIGIT(*optarg)) usage(); options.tcp_port = (unsigned short)strtol(optarg, NULL, 0); + options.flags |= ARES_FLAG_USEVC; optmask |= ARES_OPT_TCP_PORT; break; @@ -959,23 +960,27 @@ static void append_addr_list(struct ares_addr_node **head, /* Information from the man page. Formatting taken from man -h */ static void print_help_info_adig(void) { - printf("adig, version %s \n\n", ARES_VERSION_STR); - printf("usage: adig [-h] [-d] [-f flag] [-s server] [-c class] [-t type] [-T|U port] [-x | -xx] name ...\n\n" - " d : Print some extra debugging output.\n" - " f : Add a flag. Possible values for flag are igntc, noaliases, norecurse, primary, stayopen, usevc.\n" - " h : Display this help and exit.\n\n" - " T port : Use specified TCP port to connect to DNS server.\n" - " U port : Use specified UDP port to connect to DNS server.\n" - " c class : Set the query class. Possible values for class are NY, CHAOS, HS, IN (default).\n" - " s server : Connect to specified DNS server, instead of the system's default one(s).\n" - " t type : Query records of specified type. \n" - " Possible values for type are A \n" - " (default), AAAA, AFSDB, ANY,\n" - " AXFR, CNAME, GPOS, HINFO, ISDN,\n" - " KEY, LOC, MAILA, MAILB, MB, MD,\n" - " MF, MG, MINFO, MR, MX, NAPTR, NS,\n" - " NSAP, NSAP_PTR, NULL, PTR, PX, RP,\n" - " RT, SIG, SOA, SRV, TXT, URI, WKS, X25\n\n" + printf("adig, version %s\n\n", ARES_VERSION_STR); + printf("usage: adig [-h] [-d] [-f flag] [[-s server] ...] [-T|U port] [-c class] [-t type] [-x|-xx] name ...\n\n" + " h : Display this help and exit.\n" + " d : Print some extra debugging output.\n\n" + " f flag : Add a behavior control flag. Possible values are\n" + " igntc - ignore to query in TCP to get truncated UDP answer,\n" + " noaliases - don't honor the HOSTALIASES environment variable,\n" + " norecurse - don't query upstream servers recursively,\n" + " primary - use the first server,\n" + " stayopen - don't close the communication sockets, and\n" + " usevc - use TCP only.\n" + " s server : Connect to the specified DNS server, instead of the system's default one(s).\n" + " Servers are tried in round-robin, if the previous one failed.\n" + " T port : Connect to the specified TCP port of DNS server.\n" + " U port : Connect to the specified UDP port of DNS server.\n" + " c class : Set the query class. Possible values for class are ANY, CHAOS, HS and IN (default)\n" + " t type : Query records of the specified type.\n" + " Possible values for type are A (default), AAAA, AFSDB, ANY, AXFR,\n" + " CNAME, GPOS, HINFO, ISDN, KEY, LOC, MAILA, MAILB, MB, MD, MF, MG,\n" + " MINFO, MR, MX, NAPTR, NS, NSAP, NSAP_PTR, NULL, PTR, PX, RP, RT,\n" + " SIG, SOA, SRV, TXT, URI, WKS and X25.\n\n" " -x : For a '-t PTR a.b.c.d' lookup, query for 'd.c.b.a.in-addr.arpa.'\n" " -xx : As above, but for IPv6, compact the format into a bitstring like\n" " '[xabcdef00000000000000000000000000].IP6.ARPA.'\n"); diff --git a/lib/c-ares-1.18.1/src/tools/ahost.c b/lib/c-ares-1.19.0/src/tools/ahost.c similarity index 87% rename from lib/c-ares-1.18.1/src/tools/ahost.c rename to lib/c-ares-1.19.0/src/tools/ahost.c index 77ca7cd091e..8ac2106698b 100644 --- a/lib/c-ares-1.18.1/src/tools/ahost.c +++ b/lib/c-ares-1.19.0/src/tools/ahost.c @@ -213,19 +213,16 @@ static void usage(void) /* Information from the man page. Formatting taken from man -h */ static void print_help_info_ahost(void) { - printf("ahost, version %s \n\n", ARES_VERSION_STR); - printf("usage: ahost [-h] [-d] [-s {domain}] [-t {a|aaaa|u}] {host|addr} ...\n\n" - " d : Print some extra debugging output.\n" - " h : Display this help and exit.\n\n" - " s domain : Specify the domain to search instead of \n" - " using the default values from \n" - " /etc/resolv.conf. This option only has an \n" - " effect on platforms that use /etc/resolv.conf\n" - " for DNS configuration; it has no effect on other\n" - " platforms (such as Win32 or Android).\n" + printf("ahost, version %s\n\n", ARES_VERSION_STR); + printf("usage: ahost [-h] [-d] [[-s domain] ...] [-t a|aaaa|u] host|addr ...\n\n" + " h : Display this help and exit.\n" + " d : Print some extra debugging output.\n\n" + " s domain : Specify the domain to search instead of using the default values\n" + " from /etc/resolv.conf. This option only has an effect on\n" + " platforms that use /etc/resolv.conf for DNS configuration;\n" + " it has no effect on other platforms (such as Win32 or Android).\n\n" " t type : If type is \"a\", print the A record (default).\n" - " If type is \"aaaa\", print the AAAA record. If\n" - " type is \"u\", look for either AAAA or A record\n" - " (in that order).\n\n"); + " If type is \"aaaa\", print the AAAA record.\n" + " If type is \"u\", look for either AAAA or A record (in that order).\n\n"); exit(0); } diff --git a/lib/c-ares-1.18.1/src/tools/ares_getopt.c b/lib/c-ares-1.19.0/src/tools/ares_getopt.c similarity index 100% rename from lib/c-ares-1.18.1/src/tools/ares_getopt.c rename to lib/c-ares-1.19.0/src/tools/ares_getopt.c diff --git a/lib/c-ares-1.18.1/src/tools/ares_getopt.h b/lib/c-ares-1.19.0/src/tools/ares_getopt.h similarity index 100% rename from lib/c-ares-1.18.1/src/tools/ares_getopt.h rename to lib/c-ares-1.19.0/src/tools/ares_getopt.h diff --git a/lib/c-ares-1.18.1/test/CMakeLists.txt b/lib/c-ares-1.19.0/test/CMakeLists.txt similarity index 100% rename from lib/c-ares-1.18.1/test/CMakeLists.txt rename to lib/c-ares-1.19.0/test/CMakeLists.txt diff --git a/lib/c-ares-1.18.1/test/Makefile.am b/lib/c-ares-1.19.0/test/Makefile.am similarity index 84% rename from lib/c-ares-1.18.1/test/Makefile.am rename to lib/c-ares-1.19.0/test/Makefile.am index 1fe8b2d3a84..504e65e468a 100644 --- a/lib/c-ares-1.18.1/test/Makefile.am +++ b/lib/c-ares-1.19.0/test/Makefile.am @@ -31,21 +31,19 @@ libgmock_la_CPPFLAGS = -isystem $(srcdir)/gmock-1.11.0 noinst_PROGRAMS = arestest aresfuzz aresfuzzname dnsdump EXTRA_DIST = fuzzcheck.sh CMakeLists.txt Makefile.m32 Makefile.msvc README.md buildconf $(srcdir)/fuzzinput/* $(srcdir)/fuzznames/* arestest_SOURCES = $(TESTSOURCES) $(TESTHEADERS) -arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) # Not interested in coverage of test code, but linking the test binary needs the coverage option +arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) $(CODE_COVERAGE_LIBS) include $(top_srcdir)/aminclude_static.am -arestest_LIBS = $(CODE_COVERAGE_LIBS) - aresfuzz_SOURCES = $(FUZZSOURCES) -aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) aresfuzzname_SOURCES = $(FUZZNAMESOURCES) -aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) dnsdump_SOURCES = $(DUMPSOURCES) -dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) test: check diff --git a/lib/c-ares-1.18.1/test/Makefile.in b/lib/c-ares-1.19.0/test/Makefile.in similarity index 98% rename from lib/c-ares-1.18.1/test/Makefile.in rename to lib/c-ares-1.19.0/test/Makefile.in index 0d422be48d5..32af8d2a199 100644 --- a/lib/c-ares-1.18.1/test/Makefile.in +++ b/lib/c-ares-1.19.0/test/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Mon Oct 25 23:08:32 CEST 2021 +# from AX_AM_MACROS_STATIC on Tue Nov 8 13:43:42 CET 2022 VPATH = @srcdir@ @@ -137,11 +137,14 @@ am__v_lt_1 = am__objects_1 = ares-test-fuzz.$(OBJEXT) ares-fuzz.$(OBJEXT) am_aresfuzz_OBJECTS = $(am__objects_1) aresfuzz_OBJECTS = $(am_aresfuzz_OBJECTS) -aresfuzz_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la +am__DEPENDENCIES_1 = +aresfuzz_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la \ + $(am__DEPENDENCIES_1) am__objects_2 = ares-test-fuzz-name.$(OBJEXT) ares-fuzz.$(OBJEXT) am_aresfuzzname_OBJECTS = $(am__objects_2) aresfuzzname_OBJECTS = $(am_aresfuzzname_OBJECTS) -aresfuzzname_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la +aresfuzzname_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la \ + $(am__DEPENDENCIES_1) am__objects_3 = ares-test-main.$(OBJEXT) ares-test-init.$(OBJEXT) \ ares-test.$(OBJEXT) ares-test-ns.$(OBJEXT) \ ares-test-parse.$(OBJEXT) ares-test-parse-a.$(OBJEXT) \ @@ -158,13 +161,14 @@ am__objects_3 = ares-test-main.$(OBJEXT) ares-test-init.$(OBJEXT) \ am__objects_4 = am_arestest_OBJECTS = $(am__objects_3) $(am__objects_4) arestest_OBJECTS = $(am_arestest_OBJECTS) -am__DEPENDENCIES_1 = arestest_DEPENDENCIES = libgmock.la \ - $(ARES_BLD_DIR)/src/lib/libcares.la $(am__DEPENDENCIES_1) + $(ARES_BLD_DIR)/src/lib/libcares.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__objects_5 = dns-proto.$(OBJEXT) dns-dump.$(OBJEXT) am_dnsdump_OBJECTS = $(am__objects_5) dnsdump_OBJECTS = $(am_dnsdump_OBJECTS) -dnsdump_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la +dnsdump_DEPENDENCIES = $(ARES_BLD_DIR)/src/lib/libcares.la \ + $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -536,6 +540,7 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GCOV = @GCOV@ GENHTML = @GENHTML@ GREP = @GREP@ @@ -690,7 +695,9 @@ libgmock_la_SOURCES = \ libgmock_la_CPPFLAGS = -isystem $(srcdir)/gmock-1.11.0 EXTRA_DIST = fuzzcheck.sh CMakeLists.txt Makefile.m32 Makefile.msvc README.md buildconf $(srcdir)/fuzzinput/* $(srcdir)/fuzznames/* arestest_SOURCES = $(TESTSOURCES) $(TESTHEADERS) -arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) + +# Not interested in coverage of test code, but linking the test binary needs the coverage option +arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) $(CODE_COVERAGE_LIBS) @CODE_COVERAGE_ENABLED_TRUE@GITIGNOREFILES := $(GITIGNOREFILES) $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) @CODE_COVERAGE_ENABLED_TRUE@code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) @CODE_COVERAGE_ENABLED_TRUE@code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) @@ -708,15 +715,12 @@ arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/src/lib/libcares.la $(PTHREAD_LIBS) # sanitizes the test-name: replaces with underscores: dashes and dots @CODE_COVERAGE_ENABLED_TRUE@code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) @CODE_COVERAGE_ENABLED_TRUE@AM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage - -# Not interested in coverage of test code, but linking the test binary needs the coverage option -arestest_LIBS = $(CODE_COVERAGE_LIBS) aresfuzz_SOURCES = $(FUZZSOURCES) -aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +aresfuzz_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) aresfuzzname_SOURCES = $(FUZZNAMESOURCES) -aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +aresfuzzname_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) dnsdump_SOURCES = $(DUMPSOURCES) -dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la +dnsdump_LDADD = $(ARES_BLD_DIR)/src/lib/libcares.la $(CODE_COVERAGE_LIBS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/lib/c-ares-1.18.1/test/Makefile.inc b/lib/c-ares-1.19.0/test/Makefile.inc similarity index 100% rename from lib/c-ares-1.18.1/test/Makefile.inc rename to lib/c-ares-1.19.0/test/Makefile.inc diff --git a/lib/c-ares-1.18.1/test/Makefile.m32 b/lib/c-ares-1.19.0/test/Makefile.m32 similarity index 100% rename from lib/c-ares-1.18.1/test/Makefile.m32 rename to lib/c-ares-1.19.0/test/Makefile.m32 diff --git a/lib/c-ares-1.18.1/test/Makefile.msvc b/lib/c-ares-1.19.0/test/Makefile.msvc similarity index 100% rename from lib/c-ares-1.18.1/test/Makefile.msvc rename to lib/c-ares-1.19.0/test/Makefile.msvc diff --git a/lib/c-ares-1.18.1/test/README.md b/lib/c-ares-1.19.0/test/README.md similarity index 100% rename from lib/c-ares-1.18.1/test/README.md rename to lib/c-ares-1.19.0/test/README.md diff --git a/lib/c-ares-1.18.1/test/aclocal.m4 b/lib/c-ares-1.19.0/test/aclocal.m4 similarity index 100% rename from lib/c-ares-1.18.1/test/aclocal.m4 rename to lib/c-ares-1.19.0/test/aclocal.m4 diff --git a/lib/c-ares-1.18.1/test/aminclude_static.am b/lib/c-ares-1.19.0/test/aminclude_static.am similarity index 99% rename from lib/c-ares-1.18.1/test/aminclude_static.am rename to lib/c-ares-1.19.0/test/aminclude_static.am index 06312564858..306f5b68518 100644 --- a/lib/c-ares-1.18.1/test/aminclude_static.am +++ b/lib/c-ares-1.19.0/test/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Mon Oct 25 23:08:32 CEST 2021 +# from AX_AM_MACROS_STATIC on Tue Nov 8 13:43:42 CET 2022 # Code coverage diff --git a/lib/c-ares-1.18.1/test/ares-fuzz.c b/lib/c-ares-1.19.0/test/ares-fuzz.c similarity index 100% rename from lib/c-ares-1.18.1/test/ares-fuzz.c rename to lib/c-ares-1.19.0/test/ares-fuzz.c diff --git a/lib/c-ares-1.18.1/test/ares-test-ai.h b/lib/c-ares-1.19.0/test/ares-test-ai.h similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-ai.h rename to lib/c-ares-1.19.0/test/ares-test-ai.h diff --git a/lib/c-ares-1.18.1/test/ares-test-fuzz-name.c b/lib/c-ares-1.19.0/test/ares-test-fuzz-name.c similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-fuzz-name.c rename to lib/c-ares-1.19.0/test/ares-test-fuzz-name.c diff --git a/lib/c-ares-1.18.1/test/ares-test-fuzz.c b/lib/c-ares-1.19.0/test/ares-test-fuzz.c similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-fuzz.c rename to lib/c-ares-1.19.0/test/ares-test-fuzz.c diff --git a/lib/c-ares-1.18.1/test/ares-test-init.cc b/lib/c-ares-1.19.0/test/ares-test-init.cc similarity index 94% rename from lib/c-ares-1.18.1/test/ares-test-init.cc rename to lib/c-ares-1.19.0/test/ares-test-init.cc index ff6c6c6e02f..ee845181459 100644 --- a/lib/c-ares-1.18.1/test/ares-test-init.cc +++ b/lib/c-ares-1.19.0/test/ares-test-init.cc @@ -88,6 +88,8 @@ TEST_F(LibraryTest, OptionsChannelInit) { optmask |= ARES_OPT_ROTATE; opts.resolvconf_path = strdup("/etc/resolv.conf"); optmask |= ARES_OPT_RESOLVCONF; + opts.hosts_path = strdup("/etc/hosts"); + optmask |= ARES_OPT_HOSTS_FILE; ares_channel channel = nullptr; EXPECT_EQ(ARES_SUCCESS, ares_init_options(&channel, &opts, optmask)); @@ -115,6 +117,7 @@ TEST_F(LibraryTest, OptionsChannelInit) { EXPECT_EQ(std::string(opts.domains[1]), std::string(opts2.domains[1])); EXPECT_EQ(std::string(opts.lookups), std::string(opts2.lookups)); EXPECT_EQ(std::string(opts.resolvconf_path), std::string(opts2.resolvconf_path)); + EXPECT_EQ(std::string(opts.hosts_path), std::string(opts2.hosts_path)); ares_destroy_options(&opts); ares_destroy_options(&opts2); @@ -174,6 +177,8 @@ TEST_F(LibraryTest, OptionsChannelAllocFail) { optmask |= ARES_OPT_ROTATE; opts.resolvconf_path = strdup("/etc/resolv.conf"); optmask |= ARES_OPT_RESOLVCONF; + opts.hosts_path = strdup("/etc/hosts"); + optmask |= ARES_OPT_HOSTS_FILE; ares_channel channel = nullptr; for (int ii = 1; ii <= 8; ii++) { @@ -270,6 +275,8 @@ TEST_F(DefaultChannelTest, SetAddresses) { TEST_F(DefaultChannelTest, SetSortlistFailures) { EXPECT_EQ(ARES_ENODATA, ares_set_sortlist(nullptr, "1.2.3.4")); + EXPECT_EQ(ARES_EBADSTR, ares_set_sortlist(channel_, "111.111.111.111*/16")); + EXPECT_EQ(ARES_EBADSTR, ares_set_sortlist(channel_, "111.111.111.111/255.255.255.240*")); EXPECT_EQ(ARES_SUCCESS, ares_set_sortlist(channel_, "xyzzy ; lwk")); EXPECT_EQ(ARES_SUCCESS, ares_set_sortlist(channel_, "xyzzy ; 0x123")); } @@ -430,6 +437,32 @@ CONTAINED_TEST_F(LibraryTest, ContainerMyResolvConfInit, return HasFailure(); } +// Allow hosts path to be configurable +NameContentList myhosts = { + {"/tmp/hosts", "10.0.12.26 foobar\n" + "2001:A0:C::1A foobar\n"}}; +CONTAINED_TEST_F(LibraryTest, ContainerMyHostsInit, + "myhostname", "mydomain.org", myhosts) { + char filename[] = "/tmp/hosts"; + ares_channel channel = nullptr; + struct ares_options options = {0}; + options.hosts_path = strdup(filename); + int optmask = ARES_OPT_HOSTS_FILE; + EXPECT_EQ(ARES_SUCCESS, ares_init_options(&channel, &options, optmask)); + + optmask = 0; + free(options.hosts_path); + options.hosts_path = NULL; + + EXPECT_EQ(ARES_SUCCESS, ares_save_options(channel, &options, &optmask)); + EXPECT_EQ(ARES_OPT_HOSTS_FILE, (optmask & ARES_OPT_HOSTS_FILE)); + EXPECT_EQ(std::string(filename), std::string(options.hosts_path)); + + ares_destroy_options(&options); + ares_destroy(channel); + return HasFailure(); +} + NameContentList hostconf = { {"/etc/resolv.conf", "nameserver 1.2.3.4\n" "sortlist1.2.3.4\n" // malformed line diff --git a/lib/c-ares-1.18.1/test/ares-test-internal.cc b/lib/c-ares-1.19.0/test/ares-test-internal.cc similarity index 95% rename from lib/c-ares-1.18.1/test/ares-test-internal.cc rename to lib/c-ares-1.19.0/test/ares-test-internal.cc index 96d4edece52..1cb7e427dcd 100644 --- a/lib/c-ares-1.18.1/test/ares-test-internal.cc +++ b/lib/c-ares-1.19.0/test/ares-test-internal.cc @@ -19,6 +19,7 @@ extern "C" { #include "ares_nowarn.h" #include "ares_inet_net_pton.h" #include "ares_data.h" +#include "ares_strsplit.h" #include "ares_private.h" #include "bitncmp.h" @@ -47,6 +48,47 @@ void CheckPtoN4(int size, unsigned int value, const char *input) { } #endif +#ifndef CARES_SYMBOL_HIDING +TEST_F(LibraryTest, Strsplit) { + using std::vector; + using std::string; + size_t n; + struct { + vector inputs; + vector delimiters; + vector> expected; + } data = { + { + "", + " ", + " ", + "example.com, example.co", + " a, b, A,c, d, e,,,D,e,e,E", + }, + { ", ", ", ", ", ", ", ", ", " }, + { + {}, {}, {}, + { "example.com", "example.co" }, + { "a", "b", "c", "d", "e" }, + }, + }; + for(size_t i = 0; i < data.inputs.size(); i++) { + char **out = ares__strsplit(data.inputs.at(i).c_str(), + data.delimiters.at(i).c_str(), &n); + if(data.expected.at(i).size() == 0) { + EXPECT_EQ(out, nullptr); + } + else { + EXPECT_EQ(n, data.expected.at(i).size()); + for(size_t j = 0; j < n && j < data.expected.at(i).size(); j++) { + EXPECT_STREQ(out[j], data.expected.at(i).at(j).c_str()); + } + } + ares__strsplit_free(out, n); + } +} +#endif + TEST_F(LibraryTest, InetPtoN) { struct in_addr a4; struct in6_addr a6; diff --git a/lib/c-ares-1.18.1/test/ares-test-live.cc b/lib/c-ares-1.19.0/test/ares-test-live.cc similarity index 96% rename from lib/c-ares-1.18.1/test/ares-test-live.cc rename to lib/c-ares-1.19.0/test/ares-test-live.cc index 03d775e59a9..4e5680df4f3 100644 --- a/lib/c-ares-1.18.1/test/ares-test-live.cc +++ b/lib/c-ares-1.19.0/test/ares-test-live.cc @@ -159,6 +159,7 @@ TEST_P(DefaultChannelModeTest, LiveGetLocalhostByNameV6) { Process(); EXPECT_TRUE(result.done_); if (result.status_ != ARES_ECONNREFUSED) { + EXPECT_EQ(ARES_SUCCESS, result.status_); EXPECT_EQ(1, (int)result.host_.addrs_.size()); EXPECT_EQ(AF_INET6, result.host_.addrtype_); std::stringstream ss; @@ -167,6 +168,34 @@ TEST_P(DefaultChannelModeTest, LiveGetLocalhostByNameV6) { } } +TEST_P(DefaultChannelModeTest, LiveGetNonExistLocalhostByNameV4) { + HostResult result; + ares_gethostbyname(channel_, "idonotexist.localhost", AF_INET, HostCallback, &result); + Process(); + EXPECT_TRUE(result.done_); + if (result.status_ != ARES_ECONNREFUSED) { + EXPECT_EQ(ARES_SUCCESS, result.status_); + EXPECT_EQ(1, (int)result.host_.addrs_.size()); + EXPECT_EQ(AF_INET, result.host_.addrtype_); + EXPECT_NE(std::string::npos, result.host_.name_.find("idonotexist.localhost")); + } +} + +TEST_P(DefaultChannelModeTest, LiveGetNonExistLocalhostByNameV6) { + HostResult result; + ares_gethostbyname(channel_, "idonotexist.localhost", AF_INET6, HostCallback, &result); + Process(); + EXPECT_TRUE(result.done_); + if (result.status_ != ARES_ECONNREFUSED) { + EXPECT_EQ(ARES_SUCCESS, result.status_); + EXPECT_EQ(1, (int)result.host_.addrs_.size()); + EXPECT_EQ(AF_INET6, result.host_.addrtype_); + std::stringstream ss; + ss << HostEnt(result.host_); + EXPECT_NE(std::string::npos, result.host_.name_.find("idonotexist.localhost")); + } +} + TEST_P(DefaultChannelModeTest, LiveGetLocalhostByNameIPV4) { HostResult result; ares_gethostbyname(channel_, "127.0.0.1", AF_INET, HostCallback, &result); diff --git a/lib/c-ares-1.18.1/test/ares-test-main.cc b/lib/c-ares-1.19.0/test/ares-test-main.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-main.cc rename to lib/c-ares-1.19.0/test/ares-test-main.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-misc.cc b/lib/c-ares-1.19.0/test/ares-test-misc.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-misc.cc rename to lib/c-ares-1.19.0/test/ares-test-misc.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-mock-ai.cc b/lib/c-ares-1.19.0/test/ares-test-mock-ai.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-mock-ai.cc rename to lib/c-ares-1.19.0/test/ares-test-mock-ai.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-mock.cc b/lib/c-ares-1.19.0/test/ares-test-mock.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-mock.cc rename to lib/c-ares-1.19.0/test/ares-test-mock.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-ns.cc b/lib/c-ares-1.19.0/test/ares-test-ns.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-ns.cc rename to lib/c-ares-1.19.0/test/ares-test-ns.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-a.cc b/lib/c-ares-1.19.0/test/ares-test-parse-a.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-a.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-a.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-aaaa.cc b/lib/c-ares-1.19.0/test/ares-test-parse-aaaa.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-aaaa.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-aaaa.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-caa.cc b/lib/c-ares-1.19.0/test/ares-test-parse-caa.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-caa.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-caa.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-mx.cc b/lib/c-ares-1.19.0/test/ares-test-parse-mx.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-mx.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-mx.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-naptr.cc b/lib/c-ares-1.19.0/test/ares-test-parse-naptr.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-naptr.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-naptr.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-ns.cc b/lib/c-ares-1.19.0/test/ares-test-parse-ns.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-ns.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-ns.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-ptr.cc b/lib/c-ares-1.19.0/test/ares-test-parse-ptr.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-ptr.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-ptr.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-soa-any.cc b/lib/c-ares-1.19.0/test/ares-test-parse-soa-any.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-soa-any.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-soa-any.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-soa.cc b/lib/c-ares-1.19.0/test/ares-test-parse-soa.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-soa.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-soa.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-srv.cc b/lib/c-ares-1.19.0/test/ares-test-parse-srv.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-srv.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-srv.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-txt.cc b/lib/c-ares-1.19.0/test/ares-test-parse-txt.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-txt.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-txt.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse-uri.cc b/lib/c-ares-1.19.0/test/ares-test-parse-uri.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse-uri.cc rename to lib/c-ares-1.19.0/test/ares-test-parse-uri.cc diff --git a/lib/c-ares-1.18.1/test/ares-test-parse.cc b/lib/c-ares-1.19.0/test/ares-test-parse.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test-parse.cc rename to lib/c-ares-1.19.0/test/ares-test-parse.cc diff --git a/lib/c-ares-1.18.1/test/ares-test.cc b/lib/c-ares-1.19.0/test/ares-test.cc similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test.cc rename to lib/c-ares-1.19.0/test/ares-test.cc diff --git a/lib/c-ares-1.18.1/test/ares-test.h b/lib/c-ares-1.19.0/test/ares-test.h similarity index 100% rename from lib/c-ares-1.18.1/test/ares-test.h rename to lib/c-ares-1.19.0/test/ares-test.h diff --git a/lib/c-ares-1.18.1/test/buildconf b/lib/c-ares-1.19.0/test/buildconf similarity index 100% rename from lib/c-ares-1.18.1/test/buildconf rename to lib/c-ares-1.19.0/test/buildconf diff --git a/lib/c-ares-1.18.1/test/compile b/lib/c-ares-1.19.0/test/compile similarity index 100% rename from lib/c-ares-1.18.1/test/compile rename to lib/c-ares-1.19.0/test/compile diff --git a/lib/c-ares-1.18.1/config.guess b/lib/c-ares-1.19.0/test/config.guess similarity index 54% rename from lib/c-ares-1.18.1/config.guess rename to lib/c-ares-1.19.0/test/config.guess index f50dcdb6de2..7f76b6228f7 100755 --- a/lib/c-ares-1.18.1/config.guess +++ b/lib/c-ares-1.19.0/test/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2018-02-24' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # This file 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 +# 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 @@ -27,11 +29,19 @@ timestamp='2018-02-24' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,7 +94,8 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -96,73 +107,90 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -174,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -188,18 +216,18 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -215,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -226,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -237,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -289,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -326,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -446,43 +490,43 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -508,78 +552,79 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -593,16 +638,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -610,57 +655,57 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + if test "$HP_ARCH" = ""; then + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -698,9 +743,9 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -719,14 +764,14 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -754,36 +799,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -791,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -809,103 +855,129 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -916,187 +988,225 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI=${LIBC}x32 + fi fi - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1104,12 +1214,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1119,11 +1229,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1131,31 +1241,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1180,249 +1290,404 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2022 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + basic_os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + basic_os=nextstep2 + ;; + *) + basic_os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x$basic_os != x +then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS + IFS="-" read kernel os <&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-${kernel:+$kernel-}$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/c-ares-1.18.1/test/configure b/lib/c-ares-1.19.0/test/configure similarity index 98% rename from lib/c-ares-1.18.1/test/configure rename to lib/c-ares-1.19.0/test/configure index b9259e2a716..5ad0fb01cb3 100755 --- a/lib/c-ares-1.18.1/test/configure +++ b/lib/c-ares-1.19.0/test/configure @@ -692,6 +692,7 @@ ac_ct_AR AR DLLTOOL OBJDUMP +FILECMD LN_S NM ac_ct_DUMPBIN @@ -4600,8 +4601,8 @@ esac -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' @@ -6159,13 +6160,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -6303,7 +6304,7 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -6407,7 +6408,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6450,7 +6451,7 @@ else $as_nop sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -6655,6 +6656,114 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. +set dummy ${ac_tool_prefix}file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$FILECMD"; then + ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_FILECMD="${ac_tool_prefix}file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FILECMD=$ac_cv_prog_FILECMD +if test -n "$FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 +printf "%s\n" "$FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_FILECMD"; then + ac_ct_FILECMD=$FILECMD + # Extract the first word of "file", so it can be a program name with args. +set dummy file; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FILECMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_FILECMD"; then + ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FILECMD="file" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD +if test -n "$ac_ct_FILECMD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 +printf "%s\n" "$ac_ct_FILECMD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_FILECMD" = x; then + FILECMD=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FILECMD=$ac_ct_FILECMD + fi +else + FILECMD="$ac_cv_prog_FILECMD" +fi + + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 @@ -6798,7 +6907,7 @@ beos*) bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -6832,14 +6941,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -6853,7 +6962,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -6900,7 +7009,7 @@ netbsd* | netbsdelf*-gnu) newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -7274,13 +7383,29 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cr} +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS + + + + + + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. + @@ -7697,7 +7822,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -7715,20 +7840,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -7752,7 +7877,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, + # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7770,9 +7895,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7972,7 +8097,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -8097,7 +8222,7 @@ ia64-*-hpux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -8118,7 +8243,7 @@ ia64-*-hpux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -8130,7 +8255,7 @@ ia64-*-hpux*) ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -8156,7 +8281,7 @@ mips64*-*linux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -8164,7 +8289,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -8172,7 +8297,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -8196,14 +8321,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -8311,7 +8436,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -9094,8 +9219,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 + $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -9122,17 +9247,12 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; } _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[912]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.[012],*|,*powerpc*-darwin[5-8]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -9530,8 +9650,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -10049,7 +10169,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -10472,15 +10592,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time + # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) + # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -10535,7 +10655,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10647,6 +10767,7 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; interix[3-9]*) @@ -10661,7 +10782,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -10704,7 +10825,7 @@ _LT_EOF compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -10716,13 +10837,14 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) @@ -10732,7 +10854,7 @@ _LT_EOF archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -10864,7 +10986,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -11135,12 +11257,12 @@ fi cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. + # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl*) - # Native MSVC + cl* | icl*) + # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -11181,7 +11303,7 @@ fi fi' ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -11222,8 +11344,8 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -11257,7 +11379,7 @@ fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -11438,6 +11560,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; @@ -11509,6 +11632,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes + file_list_spec='@' ;; osf3*) @@ -12201,7 +12325,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -12211,14 +12335,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -12237,7 +12361,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -12274,7 +12398,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -12307,7 +12431,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -13472,30 +13596,41 @@ striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if test -z "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; - esac + ;; + esac + fi fi @@ -14265,8 +14400,8 @@ fi cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC + ,cl* | no,cl* | ,icl* | no,icl*) + # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' @@ -14357,11 +14492,11 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -14396,6 +14531,7 @@ fi emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes + file_list_spec_CXX='@' ;; dgux*) @@ -14426,7 +14562,7 @@ fi archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -14563,7 +14699,7 @@ fi # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -14703,13 +14839,13 @@ fi archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' @@ -15366,7 +15502,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -15449,7 +15585,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_static_CXX='-qstaticlink' ;; *) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' @@ -15836,7 +15972,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -15844,7 +15980,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) + cl* | icl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -16195,7 +16331,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) @@ -16204,14 +16340,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl*) - # Native MSVC + *,cl* | *,icl*) + # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -16230,7 +16366,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -16267,7 +16403,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC wrapper + # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -16299,7 +16435,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -18711,6 +18847,7 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' @@ -18719,6 +18856,7 @@ want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -18893,6 +19031,7 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ +FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ @@ -18901,7 +19040,6 @@ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ -AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -19887,6 +20025,9 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd +# A file(cmd) program that detects file types. +FILECMD=$lt_FILECMD + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -19911,8 +20052,11 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR +# Flags to create an archive (by configure). +lt_ar_flags=$lt_ar_flags + # Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS +AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -20302,7 +20446,7 @@ ltmain=$ac_aux_dir/ltmain.sh # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || diff --git a/lib/c-ares-1.18.1/test/configure.ac b/lib/c-ares-1.19.0/test/configure.ac similarity index 100% rename from lib/c-ares-1.18.1/test/configure.ac rename to lib/c-ares-1.19.0/test/configure.ac diff --git a/lib/c-ares-1.18.1/test/depcomp b/lib/c-ares-1.19.0/test/depcomp similarity index 100% rename from lib/c-ares-1.18.1/test/depcomp rename to lib/c-ares-1.19.0/test/depcomp diff --git a/lib/c-ares-1.18.1/test/dns-dump.cc b/lib/c-ares-1.19.0/test/dns-dump.cc similarity index 100% rename from lib/c-ares-1.18.1/test/dns-dump.cc rename to lib/c-ares-1.19.0/test/dns-dump.cc diff --git a/lib/c-ares-1.18.1/test/dns-proto-test.cc b/lib/c-ares-1.19.0/test/dns-proto-test.cc similarity index 100% rename from lib/c-ares-1.18.1/test/dns-proto-test.cc rename to lib/c-ares-1.19.0/test/dns-proto-test.cc diff --git a/lib/c-ares-1.18.1/test/dns-proto.cc b/lib/c-ares-1.19.0/test/dns-proto.cc similarity index 100% rename from lib/c-ares-1.18.1/test/dns-proto.cc rename to lib/c-ares-1.19.0/test/dns-proto.cc diff --git a/lib/c-ares-1.18.1/test/dns-proto.h b/lib/c-ares-1.19.0/test/dns-proto.h similarity index 100% rename from lib/c-ares-1.18.1/test/dns-proto.h rename to lib/c-ares-1.19.0/test/dns-proto.h diff --git a/lib/c-ares-1.18.1/test/fuzzcheck.sh b/lib/c-ares-1.19.0/test/fuzzcheck.sh similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzcheck.sh rename to lib/c-ares-1.19.0/test/fuzzcheck.sh diff --git a/lib/c-ares-1.18.1/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 b/lib/c-ares-1.19.0/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 rename to lib/c-ares-1.19.0/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/00539467ca159b36aea95e61f9729115 b/lib/c-ares-1.19.0/test/fuzzinput/00539467ca159b36aea95e61f9729115 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/00539467ca159b36aea95e61f9729115 rename to lib/c-ares-1.19.0/test/fuzzinput/00539467ca159b36aea95e61f9729115 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e b/lib/c-ares-1.19.0/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e rename to lib/c-ares-1.19.0/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 b/lib/c-ares-1.19.0/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 rename to lib/c-ares-1.19.0/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 b/lib/c-ares-1.19.0/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 rename to lib/c-ares-1.19.0/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd b/lib/c-ares-1.19.0/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd rename to lib/c-ares-1.19.0/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 b/lib/c-ares-1.19.0/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 rename to lib/c-ares-1.19.0/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 b/lib/c-ares-1.19.0/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 rename to lib/c-ares-1.19.0/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 b/lib/c-ares-1.19.0/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 rename to lib/c-ares-1.19.0/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc b/lib/c-ares-1.19.0/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc rename to lib/c-ares-1.19.0/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc diff --git a/lib/c-ares-1.18.1/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa b/lib/c-ares-1.19.0/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa rename to lib/c-ares-1.19.0/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa diff --git a/lib/c-ares-1.18.1/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca b/lib/c-ares-1.19.0/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca rename to lib/c-ares-1.19.0/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca diff --git a/lib/c-ares-1.18.1/test/fuzzinput/06d47d3681493f1b1d41236f460d896f b/lib/c-ares-1.19.0/test/fuzzinput/06d47d3681493f1b1d41236f460d896f similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/06d47d3681493f1b1d41236f460d896f rename to lib/c-ares-1.19.0/test/fuzzinput/06d47d3681493f1b1d41236f460d896f diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 b/lib/c-ares-1.19.0/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 rename to lib/c-ares-1.19.0/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede b/lib/c-ares-1.19.0/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede rename to lib/c-ares-1.19.0/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede diff --git a/lib/c-ares-1.18.1/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e b/lib/c-ares-1.19.0/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e rename to lib/c-ares-1.19.0/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e diff --git a/lib/c-ares-1.18.1/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 b/lib/c-ares-1.19.0/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 rename to lib/c-ares-1.19.0/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 b/lib/c-ares-1.19.0/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 rename to lib/c-ares-1.19.0/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 b/lib/c-ares-1.19.0/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 rename to lib/c-ares-1.19.0/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf b/lib/c-ares-1.19.0/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf rename to lib/c-ares-1.19.0/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf diff --git a/lib/c-ares-1.18.1/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 b/lib/c-ares-1.19.0/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 rename to lib/c-ares-1.19.0/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 b/lib/c-ares-1.19.0/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 rename to lib/c-ares-1.19.0/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 b/lib/c-ares-1.19.0/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 rename to lib/c-ares-1.19.0/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 b/lib/c-ares-1.19.0/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 rename to lib/c-ares-1.19.0/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/21891480074b5635dbbe7137bdcabccd b/lib/c-ares-1.19.0/test/fuzzinput/21891480074b5635dbbe7137bdcabccd similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/21891480074b5635dbbe7137bdcabccd rename to lib/c-ares-1.19.0/test/fuzzinput/21891480074b5635dbbe7137bdcabccd diff --git a/lib/c-ares-1.18.1/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 b/lib/c-ares-1.19.0/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 rename to lib/c-ares-1.19.0/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb b/lib/c-ares-1.19.0/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb rename to lib/c-ares-1.19.0/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb diff --git a/lib/c-ares-1.18.1/test/fuzzinput/25589deb55c08429345f289d1c9b0254 b/lib/c-ares-1.19.0/test/fuzzinput/25589deb55c08429345f289d1c9b0254 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/25589deb55c08429345f289d1c9b0254 rename to lib/c-ares-1.19.0/test/fuzzinput/25589deb55c08429345f289d1c9b0254 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 b/lib/c-ares-1.19.0/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 rename to lib/c-ares-1.19.0/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/276f12da56866273e76059ad0e7be97e b/lib/c-ares-1.19.0/test/fuzzinput/276f12da56866273e76059ad0e7be97e similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/276f12da56866273e76059ad0e7be97e rename to lib/c-ares-1.19.0/test/fuzzinput/276f12da56866273e76059ad0e7be97e diff --git a/lib/c-ares-1.18.1/test/fuzzinput/29198a2e380cb19babec9e02116d213e b/lib/c-ares-1.19.0/test/fuzzinput/29198a2e380cb19babec9e02116d213e similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/29198a2e380cb19babec9e02116d213e rename to lib/c-ares-1.19.0/test/fuzzinput/29198a2e380cb19babec9e02116d213e diff --git a/lib/c-ares-1.18.1/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 b/lib/c-ares-1.19.0/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 rename to lib/c-ares-1.19.0/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 b/lib/c-ares-1.19.0/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 rename to lib/c-ares-1.19.0/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 b/lib/c-ares-1.19.0/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 rename to lib/c-ares-1.19.0/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 b/lib/c-ares-1.19.0/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 rename to lib/c-ares-1.19.0/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf b/lib/c-ares-1.19.0/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf rename to lib/c-ares-1.19.0/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf diff --git a/lib/c-ares-1.18.1/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 b/lib/c-ares-1.19.0/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 rename to lib/c-ares-1.19.0/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da b/lib/c-ares-1.19.0/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da rename to lib/c-ares-1.19.0/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da diff --git a/lib/c-ares-1.18.1/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a b/lib/c-ares-1.19.0/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a rename to lib/c-ares-1.19.0/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a diff --git a/lib/c-ares-1.18.1/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 b/lib/c-ares-1.19.0/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 rename to lib/c-ares-1.19.0/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df b/lib/c-ares-1.19.0/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df rename to lib/c-ares-1.19.0/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df diff --git a/lib/c-ares-1.18.1/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a b/lib/c-ares-1.19.0/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a rename to lib/c-ares-1.19.0/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a diff --git a/lib/c-ares-1.18.1/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b b/lib/c-ares-1.19.0/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b rename to lib/c-ares-1.19.0/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b diff --git a/lib/c-ares-1.18.1/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 b/lib/c-ares-1.19.0/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 rename to lib/c-ares-1.19.0/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e b/lib/c-ares-1.19.0/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e rename to lib/c-ares-1.19.0/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e diff --git a/lib/c-ares-1.18.1/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 b/lib/c-ares-1.19.0/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 rename to lib/c-ares-1.19.0/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 b/lib/c-ares-1.19.0/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 rename to lib/c-ares-1.19.0/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 b/lib/c-ares-1.19.0/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 rename to lib/c-ares-1.19.0/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 b/lib/c-ares-1.19.0/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 rename to lib/c-ares-1.19.0/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 b/lib/c-ares-1.19.0/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 rename to lib/c-ares-1.19.0/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a b/lib/c-ares-1.19.0/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a rename to lib/c-ares-1.19.0/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a diff --git a/lib/c-ares-1.18.1/test/fuzzinput/answer_a b/lib/c-ares-1.19.0/test/fuzzinput/answer_a similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/answer_a rename to lib/c-ares-1.19.0/test/fuzzinput/answer_a diff --git a/lib/c-ares-1.18.1/test/fuzzinput/answer_aaaa b/lib/c-ares-1.19.0/test/fuzzinput/answer_aaaa similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/answer_aaaa rename to lib/c-ares-1.19.0/test/fuzzinput/answer_aaaa diff --git a/lib/c-ares-1.18.1/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 b/lib/c-ares-1.19.0/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 rename to lib/c-ares-1.19.0/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 b/lib/c-ares-1.19.0/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 rename to lib/c-ares-1.19.0/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 b/lib/c-ares-1.19.0/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 rename to lib/c-ares-1.19.0/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5637790584012800 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5637790584012800 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5637790584012800 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5637790584012800 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5650695891451904 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5650695891451904 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5650695891451904 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5650695891451904 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5651369832218624 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5651369832218624 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5651369832218624 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5651369832218624 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5674462260756480 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5674462260756480 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5674462260756480 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5674462260756480 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5680630672654336 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5680630672654336 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5680630672654336 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5680630672654336 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5683497160671232 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5683497160671232 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5683497160671232 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5683497160671232 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5687310655422464 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5687310655422464 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5687310655422464 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5687310655422464 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5695341573177344 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5695341573177344 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5695341573177344 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5695341573177344 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5697835103682560 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5697835103682560 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5697835103682560 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5697835103682560 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5728518081609728 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5728518081609728 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5728518081609728 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5728518081609728 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5732960017317888 b/lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5732960017317888 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/clusterfuzz-5732960017317888 rename to lib/c-ares-1.19.0/test/fuzzinput/clusterfuzz-5732960017317888 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 b/lib/c-ares-1.19.0/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 rename to lib/c-ares-1.19.0/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 b/lib/c-ares-1.19.0/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 rename to lib/c-ares-1.19.0/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/f1b900d50806021953321c3b604ee497 b/lib/c-ares-1.19.0/test/fuzzinput/f1b900d50806021953321c3b604ee497 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/f1b900d50806021953321c3b604ee497 rename to lib/c-ares-1.19.0/test/fuzzinput/f1b900d50806021953321c3b604ee497 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 b/lib/c-ares-1.19.0/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 rename to lib/c-ares-1.19.0/test/fuzzinput/f6606f624be8c628328cea01d2cd07a9 diff --git a/lib/c-ares-1.18.1/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce b/lib/c-ares-1.19.0/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce rename to lib/c-ares-1.19.0/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce diff --git a/lib/c-ares-1.18.1/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d b/lib/c-ares-1.19.0/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d rename to lib/c-ares-1.19.0/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d diff --git a/lib/c-ares-1.18.1/test/fuzzinput/multi-indir b/lib/c-ares-1.19.0/test/fuzzinput/multi-indir similarity index 100% rename from lib/c-ares-1.18.1/test/fuzzinput/multi-indir rename to lib/c-ares-1.19.0/test/fuzzinput/multi-indir diff --git a/lib/c-ares-1.18.1/test/fuzznames/name01 b/lib/c-ares-1.19.0/test/fuzznames/name01 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name01 rename to lib/c-ares-1.19.0/test/fuzznames/name01 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name02 b/lib/c-ares-1.19.0/test/fuzznames/name02 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name02 rename to lib/c-ares-1.19.0/test/fuzznames/name02 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name03 b/lib/c-ares-1.19.0/test/fuzznames/name03 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name03 rename to lib/c-ares-1.19.0/test/fuzznames/name03 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name04 b/lib/c-ares-1.19.0/test/fuzznames/name04 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name04 rename to lib/c-ares-1.19.0/test/fuzznames/name04 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name05 b/lib/c-ares-1.19.0/test/fuzznames/name05 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name05 rename to lib/c-ares-1.19.0/test/fuzznames/name05 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name06 b/lib/c-ares-1.19.0/test/fuzznames/name06 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name06 rename to lib/c-ares-1.19.0/test/fuzznames/name06 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name07 b/lib/c-ares-1.19.0/test/fuzznames/name07 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name07 rename to lib/c-ares-1.19.0/test/fuzznames/name07 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name08 b/lib/c-ares-1.19.0/test/fuzznames/name08 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name08 rename to lib/c-ares-1.19.0/test/fuzznames/name08 diff --git a/lib/c-ares-1.18.1/test/fuzznames/name09 b/lib/c-ares-1.19.0/test/fuzznames/name09 similarity index 100% rename from lib/c-ares-1.18.1/test/fuzznames/name09 rename to lib/c-ares-1.19.0/test/fuzznames/name09 diff --git a/lib/c-ares-1.18.1/test/gmock-1.11.0/gmock-gtest-all.cc b/lib/c-ares-1.19.0/test/gmock-1.11.0/gmock-gtest-all.cc similarity index 100% rename from lib/c-ares-1.18.1/test/gmock-1.11.0/gmock-gtest-all.cc rename to lib/c-ares-1.19.0/test/gmock-1.11.0/gmock-gtest-all.cc diff --git a/lib/c-ares-1.18.1/test/gmock-1.11.0/gmock/gmock.h b/lib/c-ares-1.19.0/test/gmock-1.11.0/gmock/gmock.h similarity index 100% rename from lib/c-ares-1.18.1/test/gmock-1.11.0/gmock/gmock.h rename to lib/c-ares-1.19.0/test/gmock-1.11.0/gmock/gmock.h diff --git a/lib/c-ares-1.18.1/test/gmock-1.11.0/gtest/gtest.h b/lib/c-ares-1.19.0/test/gmock-1.11.0/gtest/gtest.h similarity index 100% rename from lib/c-ares-1.18.1/test/gmock-1.11.0/gtest/gtest.h rename to lib/c-ares-1.19.0/test/gmock-1.11.0/gtest/gtest.h diff --git a/lib/c-ares-1.18.1/test/install-sh b/lib/c-ares-1.19.0/test/install-sh similarity index 100% rename from lib/c-ares-1.18.1/test/install-sh rename to lib/c-ares-1.19.0/test/install-sh diff --git a/lib/c-ares-1.18.1/test/ltmain.sh b/lib/c-ares-1.19.0/test/ltmain.sh similarity index 94% rename from lib/c-ares-1.18.1/test/ltmain.sh rename to lib/c-ares-1.19.0/test/ltmain.sh index 21e5e078472..8fb8700eef3 100755 --- a/lib/c-ares-1.18.1/test/ltmain.sh +++ b/lib/c-ares-1.19.0/test/ltmain.sh @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-15" -package_revision=2.4.6 +VERSION="2.4.7 Debian-2.4.7-4" +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ package_revision=2.4.6 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES 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 . +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# ## ------ ## @@ -139,9 +130,12 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ func_relative_path () } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ func_lt_ver () # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2015-10-07.11; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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 is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# , and GPL version 2 or later +# . You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# 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. +# Please report bugs or propose patches to: +# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ scriptversion=2015-10-07.11; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ scriptversion=2015-10-07.11; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ func_remove_hook () } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1534,22 +1710,19 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - if eval $_G_hook '"$@"'; then - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - _G_rc_run_hooks=: + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift fi done - - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1559,14 +1732,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed -# options in '_result', escaped suitably for -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the -# hook's caller know that it should pay attention to -# '_result'. Returning $EXIT_FAILURE signalizes that -# arguments are left untouched by the hook and therefore caller will ignore the -# result variable. +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '_result', escaped +# suitably for 'eval'. +# +# The '_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). # # Like this: # @@ -1578,11 +1753,8 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). There is -# # no need to do the equivalent (but slower) action: -# # func_quote_for_eval ${1+"$@"} -# # my_options_prep_result=$func_quote_for_eval_result -# false +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1593,7 +1765,7 @@ func_run_hooks () # # args_changed=false # -# # Note that for efficiency, we parse as many options as we can +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do @@ -1610,18 +1782,17 @@ func_run_hooks () # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@", we could need that later -# # if $args_changed is true. +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # +# # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result # fi -# -# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1632,8 +1803,6 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# false # } # func_add_hook func_validate_options my_option_validation # @@ -1649,13 +1818,8 @@ func_options_finish () { $debug_cmd - _G_func_options_finish_exit=false - if func_run_hooks func_options ${1+"$@"}; then - func_options_finish_result=$func_run_hooks_result - _G_func_options_finish_exit=: - fi - - $_G_func_options_finish_exit + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish } @@ -1668,28 +1832,27 @@ func_options () { $debug_cmd - _G_rc_options=false + _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do - if eval func_$my_func '${1+"$@"}'; then - eval _G_res_var='$'"func_${my_func}_result" - eval set dummy "$_G_res_var" ; shift - _G_rc_options=: + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: fi done - # Save modified positional parameters for caller. As a top-level - # options-parser function we always need to set the 'func_options_result' - # variable (regardless the $_G_rc_options value). - if $_G_rc_options; then - func_options_result=$_G_res_var - else - func_quote_for_eval ${1+"$@"} - func_options_result=$func_quote_for_eval_result - fi - - $_G_rc_options + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1699,8 +1862,7 @@ func_options () # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1710,14 +1872,8 @@ func_options_prep () opt_verbose=false opt_warning_types= - _G_rc_options_prep=false - if func_run_hooks func_options_prep ${1+"$@"}; then - _G_rc_options_prep=: - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result - fi - - $_G_rc_options_prep + func_run_hooks func_options_prep ${1+"$@"} + func_propagate_result func_run_hooks func_options_prep } @@ -1729,27 +1885,32 @@ func_parse_options () { $debug_cmd - func_parse_options_result= - - _G_rc_parse_options=false + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: + func_run_hooks func_parse_options ${1+"$@"} + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1760,7 +1921,7 @@ func_parse_options () --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: + _G_parse_options_requote=: break fi case " $warning_categories $1" in @@ -1815,7 +1976,7 @@ func_parse_options () shift ;; - --) _G_rc_parse_options=: ; break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false @@ -1823,17 +1984,16 @@ func_parse_options () ;; esac - $_G_match_parse_options && _G_rc_parse_options=: + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - - if $_G_rc_parse_options; then + if $_G_parse_options_requote; then # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result fi - - $_G_rc_parse_options } @@ -1846,21 +2006,14 @@ func_validate_options () { $debug_cmd - _G_rc_validate_options=false - # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - if func_run_hooks func_validate_options ${1+"$@"}; then - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result - _G_rc_validate_options=: - fi + func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - $_G_rc_validate_options } @@ -1916,8 +2069,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1932,8 +2085,9 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1943,7 +2097,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -1969,7 +2123,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2011,31 +2165,44 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -2045,12 +2212,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2141,7 +2308,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-15 + version: $progname $scriptversion Debian-2.4.7-4 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2197,7 +2364,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ + func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2345,6 +2512,8 @@ libtool_options_prep () _G_rc_lt_options_prep=: + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2375,11 +2544,9 @@ libtool_options_prep () if $_G_rc_lt_options_prep; then # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result fi - - $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2482,11 +2649,9 @@ libtool_parse_options () if $_G_rc_lt_parse_options; then # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result fi - - $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -2543,8 +2708,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3510,8 +3675,8 @@ func_mode_compile () esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3584,8 +3749,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3740,7 +3905,8 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3846,6 +4012,8 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4188,8 +4356,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4199,8 +4367,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4257,12 +4425,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4273,8 +4441,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4570,8 +4738,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5350,7 +5518,8 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5360,7 +5529,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6703,9 +6872,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6941,6 +7110,13 @@ func_mode_link () prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7111,7 +7287,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7131,7 +7307,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7161,8 +7337,20 @@ func_mode_link () prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7303,9 +7491,9 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7319,16 +7507,21 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7346,8 +7539,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7370,12 +7563,13 @@ func_mode_link () # -fuse-ld=* Linker select flags for GCC # -static-* direct GCC to link specific libraries statically # -fcilkplus Cilk Plus language extension features for C/C++ + # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7396,15 +7590,15 @@ func_mode_link () continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7524,8 +7718,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8733,7 +8927,7 @@ func_mode_link () test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8906,7 +9100,7 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -9000,7 +9194,7 @@ func_mode_link () versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9226,7 +9420,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -10037,8 +10231,8 @@ EOF for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10131,8 +10325,8 @@ EOF eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10606,12 +10800,13 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10851,13 +11046,15 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi diff --git a/lib/c-ares-1.18.1/test/missing b/lib/c-ares-1.19.0/test/missing similarity index 100% rename from lib/c-ares-1.18.1/test/missing rename to lib/c-ares-1.19.0/test/missing diff --git a/lib/c-ares-1.18.1/test/test-driver b/lib/c-ares-1.19.0/test/test-driver similarity index 100% rename from lib/c-ares-1.18.1/test/test-driver rename to lib/c-ares-1.19.0/test/test-driver diff --git a/lib/cfl/.github/actionlint-matcher.json b/lib/cfl/.github/actionlint-matcher.json new file mode 100644 index 00000000000..7b1ba251e61 --- /dev/null +++ b/lib/cfl/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] + } \ No newline at end of file diff --git a/lib/cfl/.github/dependabot.yml b/lib/cfl/.github/dependabot.yml new file mode 100644 index 00000000000..12f9b4a0ba2 --- /dev/null +++ b/lib/cfl/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/lib/cfl/.github/workflows/build.yaml b/lib/cfl/.github/workflows/build.yaml new file mode 100644 index 00000000000..8f3ad73910e --- /dev/null +++ b/lib/cfl/.github/workflows/build.yaml @@ -0,0 +1,168 @@ +name: Build PR(s) and master branch. +on: + push: + branches: + - master + pull_request: + branches: + - master + types: [opened, reopened, synchronize] +jobs: + build-windows: + name: Build sources on amd64 for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, windows-2019] + steps: + - uses: actions/checkout@v3 + - name: Build on ${{ matrix.os }} with vs-2019 + run: | + .\scripts\win_build.bat + - name: Run unit tests. + run: | + ctest --rerun-failed --output-on-failure -C Debug --test-dir .\tests\ + + build-msys2: + name: Build sources on MSYS2 for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [windows-latest, windows-2019] + steps: + - uses: actions/checkout@v3 + - name: Get dependencies w/ chocolatey + uses: crazy-max/ghaction-chocolatey@v2 + with: + args: install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' + - uses: msys2/setup-msys2@v2 + with: + update: true + msystem: UCRT64 + path-type: inherit + install: >- + mingw-w64-ucrt-x86_64-gcc + - name: Build on ${{ matrix.os }} with MSYS2 + shell: msys2 {0} + run: | + cmake -G "MinGW Makefiles" -DCFL_TESTS=On . + cmake --build . + - name: Run unit tests. + run: | + ctest --rerun-failed --output-on-failure -C Debug --test-dir .\tests\ + + build-centos: + name: CentOS 7 build to confirm no issues once used downstream + runs-on: ubuntu-latest + container: centos:7 + steps: + - name: Set up base image dependencies + run: | + yum -y update + yum install -y ca-certificates cmake gcc gcc-c++ make wget + wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + rpm -ivh epel-release-latest-7.noarch.rpm + yum install -y cmake3 + shell: bash + + - uses: actions/checkout@v3 + + - name: Run compilation + run: | + cmake3 -DCFL_DEV=on . + make + + build-debian: + name: Debian Buster build to confirm no issues once used downstream + runs-on: ubuntu-latest + container: debian:buster + steps: + - name: Set up base image dependencies + run: | + apt-get update + apt-get install -y build-essential cmake make + shell: bash + + - uses: actions/checkout@v3 + + - name: Run compilation + run: | + cmake -DCFL_DEV=on . + make + + build-unix-arm64: + name: Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + compiler: [ gcc, clang ] + steps: + - uses: actions/checkout@v3 + - name: Build on ${{ matrix.os }} with ${{ matrix.compiler }} + uses: uraimo/run-on-arch-action@v2.3.0 + with: + arch: aarch64 + distro: ubuntu20.04 + run: | + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + file \ + make + export CC=${{ env.compiler }} + cmake -DCFL_TESTS=On . + make all + CTEST_OUTPUT_ON_FAILURE=1 make test + env: + CC: ${{ matrix.compiler }} + + build-unix-amd64: + name: Build sources on amd64 for ${{ matrix.os }} - ${{ matrix.compiler }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + compiler: [ gcc, clang ] + steps: + - uses: actions/checkout@v3 + - name: Build on ${{ matrix.os }} with ${{ matrix.compiler }} + run: | + echo "CC = $CC, CXX = $CXX" + cmake -DCFL_TESTS=On . + make all + CTEST_OUTPUT_ON_FAILURE=1 make test + env: + CC: ${{ matrix.compiler }} + + build-analysis-tests: + name: Build with various code analysis tools + strategy: + fail-fast: false + matrix: + preset: + - clang-sanitize-address + - clang-sanitize-memory + - clang-sanitize-undefined + - clang-sanitize-dataflow + - clang-sanitize-safe-stack + - valgrind + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: docker://lpenz/ghaction-cmake:0.19 + with: + preset: ${{ matrix.preset }} + # dependencies_debian: '' + cmakeflags: '-DCFL_TESTS=On -DCFL_DEV=on .' + build_command: make all diff --git a/lib/cfl/.github/workflows/lint.yaml b/lib/cfl/.github/workflows/lint.yaml new file mode 100644 index 00000000000..7e3dc05b65e --- /dev/null +++ b/lib/cfl/.github/workflows/lint.yaml @@ -0,0 +1,30 @@ +name: Lint PRs +on: + pull_request: + workflow_dispatch: + +jobs: + shellcheck: + runs-on: ubuntu-latest + name: Shellcheck + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + - uses: ludeeus/action-shellcheck@master + with: + ignore_paths: lib + + actionlint: + runs-on: ubuntu-latest + name: Actionlint + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + - run: | + echo "::add-matcher::.github/actionlint-matcher.json" + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + ./actionlint -color -shellcheck= + shell: bash + diff --git a/lib/cfl/.github/workflows/packages.yaml b/lib/cfl/.github/workflows/packages.yaml new file mode 100644 index 00000000000..2c5bedbee2b --- /dev/null +++ b/lib/cfl/.github/workflows/packages.yaml @@ -0,0 +1,102 @@ +name: Build packages for master or a tagged release + +on: + push: + branches: + - master + # Any tag starting with 'v' + tags: + - 'v*' + workflow_dispatch: + +jobs: + build-distro-packages-arm64: + runs-on: ubuntu-latest + name: build arm64 packages + strategy: + fail-fast: true + matrix: + format: [ rpm, deb ] + steps: + - uses: actions/checkout@v3 + - uses: uraimo/run-on-arch-action@v2.3.0 + name: Build the ${{matrix.format}} packages + with: + arch: aarch64 + distro: ubuntu20.04 + run: | + apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + file \ + rpm \ + make + cmake . + echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {} + + - name: Store the master package artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.format }}-arm64 + path: | + ./*.${{matrix.format}} + + build-distro-packages-amd64: + name: build amd64 packages + strategy: + fail-fast: true + matrix: + format: [ rpm, deb ] + + runs-on: [ ubuntu-latest ] + steps: + - uses: actions/checkout@v3 + - name: Build the ${{matrix.format}} packages + run: | + cmake . + echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {} + + - name: Store the master package artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.format }}-amd64 + path: | + ./*.${{matrix.format}} + + release: + name: Create release and upload packages + needs: + - build-distro-packages-amd64 + - build-distro-packages-arm64 + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download all artefacts + uses: actions/download-artifact@v3 + with: + path: artifacts/ + + - name: Display structure of downloaded files + run: ls -R + working-directory: artifacts + shell: bash + + - name: Unstable release on push to master to make it easier to download + uses: pyTooling/Actions/releaser@r0 + continue-on-error: true + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: 'unstable' + rm: true + files: | + artifacts/**/* + + - name: Release on tag + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + generate_release_notes: true + files: | + artifacts/**/* diff --git a/lib/cfl/.gitignore b/lib/cfl/.gitignore new file mode 100644 index 00000000000..db0ae7436b8 --- /dev/null +++ b/lib/cfl/.gitignore @@ -0,0 +1,6 @@ +build/* +include/cfl/cfl_info.h +include/cfl/cfl_version.h +cfl.sublime* +tests/cfl_tests_internal.h + diff --git a/lib/cfl/CMakeLists.txt b/lib/cfl/CMakeLists.txt new file mode 100644 index 00000000000..961c7a239d6 --- /dev/null +++ b/lib/cfl/CMakeLists.txt @@ -0,0 +1,270 @@ +cmake_minimum_required(VERSION 3.12) +project(cfl C) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# C Floppy Version +set(CFL_VERSION_MAJOR 0) +set(CFL_VERSION_MINOR 2) +set(CFL_VERSION_PATCH 0) +set(CFL_VERSION_STR "${CFL_VERSION_MAJOR}.${CFL_VERSION_MINOR}.${CFL_VERSION_PATCH}") + +# Configuration options +option(CFL_DEV "Enable development mode" No) +option(CFL_TESTS "Enable unit testing" No) +option(CFL_INSTALL_BUNDLED_XXHASH_HEADERS "Enable bundled xxHash headers installation" Yes) + +if(CFL_DEV) + set(CMAKE_BUILD_TYPE Debug) + set(CFL_TESTS On) +endif() + +# Include helpers +include(cmake/macros.cmake) +include(CheckCSourceCompiles) +include(GNUInstallDirs) + +# Define macro to identify Windows system (without Cygwin) +if(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(CFL_SYSTEM_WINDOWS On) + add_definitions(-DCFL_SYSTEM_WINDOWS) +endif() + +# Define macro to identify macOS system +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(CFL_SYSTEM_MACOS On) + add_definitions(-DCFL_SYSTEM_MACOS) +endif() + +if(NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") +endif() + +# Define __FILENAME__ consistently across Operating Systems +if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") +else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") +endif() + + + +# timespec_get() support +check_c_source_compiles(" + #include + int main() { + struct tm tm; + return timespec_get(&tm, TIME_UTC); + }" CFL_HAVE_TIMESPEC_GET) +if(CFL_HAVE_TIMESPEC_GET) + CFL_DEFINITION(CFL_HAVE_TIMESPEC_GET) +endif() + +# gmtime_r() support +check_c_source_compiles(" + #include + int main() { + struct tm tm; + struct timespec tms; + return gmtime_r(&tms.tv_sec, &tm); + }" CFL_HAVE_GMTIME_R) +if(CFL_HAVE_GMTIME_R) + CFL_DEFINITION(CFL_HAVE_GMTIME_R) +endif() + +# gmtime_s() support +check_c_source_compiles(" + #include + int main() { + struct tm tm; + struct timespec tms; + return gmtime_s(&tm, &tms.tv_sec); + }" CFL_HAVE_GMTIME_S) +if(CFL_HAVE_GMTIME_S) + CFL_DEFINITION(CFL_HAVE_GMTIME_S) +endif() + +# clock_get_time() support for macOS. +check_c_source_compiles(" + #include + #include + int main() { + clock_serv_t cclock; + mach_timespec_t mts; + host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); + clock_get_time(cclock, &mts); + return mach_port_deallocate(mach_task_self(), cclock); + }" CFL_HAVE_CLOCK_GET_TIME) +if(CFL_HAVE_CLOCK_GET_TIME) + CFL_DEFINITION(CFL_HAVE_CLOCK_GET_TIME) +endif() + +configure_file( + "${PROJECT_SOURCE_DIR}/include/cfl/cfl_info.h.in" + "${PROJECT_SOURCE_DIR}/include/cfl/cfl_info.h" + ) + +configure_file( + "${PROJECT_SOURCE_DIR}/include/cfl/cfl_version.h.in" + "${PROJECT_SOURCE_DIR}/include/cfl/cfl_version.h" + ) + +# Include headers and dependency headers +include_directories( + lib/xxhash/ + include + ) + +# xxHash +if(NOT TARGET xxhash) + # Do something when target found + set(XXHASH_BUILD_ENABLE_INLINE_API OFF) + set(XXHASH_BUILD_XXHSUM OFF) + set(BUILD_SHARED_LIBS OFF) + add_subdirectory(lib/xxhash/cmake_unofficial EXCLUDE_FROM_ALL) +endif() + +# Installation Directories +# ======================== +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(CFL_INSTALL_BINDIR "bin") + set(CFL_INSTALL_LIBDIR "lib") + set(CFL_INSTALL_INCLUDEDIR "include") +else() + set(CFL_INSTALL_BINDIR ${CMAKE_INSTALL_FULL_BINDIR}) + set(CFL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") + set(CFL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include") +endif() + +# Output paths +set(CFL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") +set(CFL_BUILD_DIR "${CFL_ROOT}/build") + +# CFL sources +add_subdirectory(include) +add_subdirectory(src) + +# Tests +if(CFL_TESTS) + enable_testing() + add_subdirectory(tests) +endif() + +# Installer Generation (Cpack) +# ============================ + +set(CPACK_PACKAGE_VERSION ${CFL_VERSION_STR}) +set(CPACK_PACKAGE_NAME "cfl") +set(CPACK_PACKAGE_RELEASE 1) +set(CPACK_PACKAGE_CONTACT "Eduardo Silva ") +set(CPACK_PACKAGE_VENDOR "Calyptia") +set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") +set(CPACK_PACKAGING_INSTALL_PREFIX "/") + +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") + +if(CFL_SYSTEM_WINDOWS) + set(CPACK_GENERATOR "ZIP") + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-win64") + else() + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-win32") + endif() +endif() + + +# Enable components +set(CPACK_DEB_COMPONENT_INSTALL ON) +set(CPACK_RPM_COMPONENT_INSTALL ON) +set(CPACK_productbuild_COMPONENT_INSTALL ON) +set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} binary library headers) +set(CPACK_COMPONENTS_GROUPING "ONE_PER_GROUP") + +set(CPACK_COMPONENT_BINARY_GROUP "RUNTIME") +set(CPACK_COMPONENT_LIBRARY_GROUP "RUNTIME") + +# Debian package setup and name sanitizer +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + +find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems") +if(DPKG_PROGRAM) + execute_process( + COMMAND ${DPKG_PROGRAM} --print-architecture + OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + set(CPACK_DEBIAN_HEADERS_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}-headers.deb") + set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") + set(CPACK_DEBIAN_RUNTIME_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") + set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONTROL_EXTRA + ${CMAKE_CURRENT_SOURCE_DIR}/debian/conffiles + ) +endif() + +# RPM Generation information +set(CPACK_RPM_PACKAGE_GROUP "System Environment/Daemons") +set(CPACK_RPM_PACKAGE_LICENSE "Apache v2.0") +set(CPACK_RPM_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE}) +set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/cpack/description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "C Traces Library") +set(CPACK_RPM_SPEC_MORE_DEFINE "%define ignore \#") +set(CPACK_RPM_USER_FILELIST + "%ignore /lib" + "%ignore /lib64" + "%ignore /lib64/pkgconfig" + "%ignore /usr/local" + "%ignore /usr/local/bin") + +set(CPACK_RPM_PACKAGE_AUTOREQ ON) +set(CPACK_RPM_RUNTIME_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") +set(CPACK_RPM_HEADERS_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}-headers.rpm") +set(CPACK_RPM_RUNTIME_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}.rpm") + +# CPack: DEB +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + +# CPack: Windows System +if(CPACK_GENERATOR MATCHES "ZIP") + set(CPACK_MONOLITHIC_INSTALL 1) + set(CPACK_PACKAGE_INSTALL_DIRECTORY "cfl") +endif() + +# CPack: macOS w/ productbuild +if(CFL_SYSTEM_MACOS) + # Determine the platform suffix + execute_process( + COMMAND uname -m + RESULT_VARIABLE UNAME_M_RESULT + OUTPUT_VARIABLE UNAME_ARCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (UNAME_M_RESULT EQUAL 0 AND UNAME_ARCH STREQUAL "arm64") + set(CFL_PKG ${CFL_BUILD_DIR}/${CPACK_PACKAGE_NAME}-${CFL_VERSION_STR}-apple) + elseif(UNAME_M_RESULT EQUAL 0 AND UNAME_ARCH STREQUAL "x86_64") + set(CFL_PKG ${CFL_BUILD_DIR}/${CPACK_PACKAGE_NAME}-${CFL_VERSION_STR}-intel) + else() + set(CFL_PKG ${CFL_BUILD_DIR}/${CPACK_PACKAGE_NAME}-${CFL_VERSION_STR}-${UNAME_ARCH}) + endif() + + if (CPACK_GENERATOR MATCHES "productbuild") + set(CPACK_SET_DESTDIR "ON") + configure_file(cpack/macos/welcome.txt.cmakein ${CFL_BUILD_DIR}/welcome.txt) + configure_file(LICENSE ${CFL_BUILD_DIR}/LICENSE.txt) + find_program(CONVERTER textutil) + if (NOT CONVERTER) + message(FATAL_ERROR "textutil not found.") + endif() + if (CONVERTER) + execute_process(COMMAND ${CONVERTER} -convert html "${CMAKE_SOURCE_DIR}/README.md" -output "${CFL_BUILD_DIR}/README.html") + endif() + set(CPACK_PACKAGE_FILE_NAME "${CFL_PKG}") + set(CPACK_RESOURCE_FILE_WELCOME ${CFL_BUILD_DIR}/welcome.txt) + set(CPACK_RESOURCE_FILE_LICENSE ${CFL_BUILD_DIR}/LICENSE.txt) + set(CPACK_RESOURCE_FILE_README ${CFL_BUILD_DIR}/README.html) + set(CPACK_PRODUCTBUILD_IDENTIFIER "com.calyptia.${CPACK_PACKAGE_NAME}") + endif() +endif() + +include(CPack) diff --git a/lib/cfl/LICENSE b/lib/cfl/LICENSE new file mode 100644 index 00000000000..f433b1a53f5 --- /dev/null +++ b/lib/cfl/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/lib/cfl/README.md b/lib/cfl/README.md new file mode 100644 index 00000000000..4050bef8b27 --- /dev/null +++ b/lib/cfl/README.md @@ -0,0 +1,23 @@ +# CFL + +CFL is a tiny library that provides interfaces for data structures, originally created to satisfy the needs of Fluent Bit and other libraries used internally like CMetrics and CTraces projects. + +note: The name doesn't mean anything specific, you can call it `c:\ floppy` if you want. + +## Interfaces + +- cfl_sds: string manipulation +- cfl_list: linked list +- cfl_kv: key value pairs by using a linked list (cfl_list) +- cfl_array: array of elements +- cfl_variant: interface to manage contexts with vairant types +- cfl_time: time utilities +- cfl_hash: 64bit hashing functions + +## License + +This program is under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). + +## Authors + +Copyright is assigned to the `CFL Authors`, you can see a list of contributors [here](https://github.com/fluent/cfl/graphs/contributors). diff --git a/lib/cfl/appveyor.yml b/lib/cfl/appveyor.yml new file mode 100644 index 00000000000..1f60cfebc1c --- /dev/null +++ b/lib/cfl/appveyor.yml @@ -0,0 +1,34 @@ +version: v1-winbuild-{build} + +image: Visual Studio 2019 + +platform: + - Win32 + - x64 + +environment: + vspath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community' + winflexbison: https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip + PATH: '%PATH%;C:\WinFlexBison' + +configuration: + - Release + +skip_commits: + message: /workflows/ + files: + - '.github/**' + +install: + - ps: Invoke-WebRequest -O winflexbison.zip $env:winflexbison + - ps: Expand-Archive winflexbison.zip -Destination /WinFlexBison + - ps: Copy-Item -Path /WinFlexBison/win_bison.exe /WinFlexBison/bison.exe + - ps: Copy-Item -Path /WinFlexBison/win_flex.exe /WinFlexBison/flex.exe + +before_build: + - if %PLATFORM%==Win32 call "%vspath%\VC\Auxiliary\Build\vcvars32.bat" + - if %PLATFORM%==x64 call "%vspatH%\VC\Auxiliary\Build\vcvars64.bat" + +build_script: + - .\scripts\win_build.bat + - ctest -C Debug --test-dir .\tests\ diff --git a/lib/cfl/cmake/macros.cmake b/lib/cfl/cmake/macros.cmake new file mode 100644 index 00000000000..bbbd09be229 --- /dev/null +++ b/lib/cfl/cmake/macros.cmake @@ -0,0 +1,10 @@ +# Macro to set definitions +macro(CFL_DEFINITION var) + add_definitions(-D${var}) + set(CFL_BUILD_FLAGS "${CFL_BUILD_FLAGS}#ifndef ${var}\n#define ${var}\n#endif\n") + set(CFL_INFO_FLAGS "${CFL_INFO_FLAGS} ${var}") +endmacro() + +macro(CFL_OPTION option value) + set(${option} ${value} CACHE INTERNAL "" FORCE) +endmacro() diff --git a/lib/cfl/cpack/description b/lib/cfl/cpack/description new file mode 100644 index 00000000000..9293bf13f99 --- /dev/null +++ b/lib/cfl/cpack/description @@ -0,0 +1 @@ +Tiny library for data structures, call it C Floppy ;) diff --git a/lib/cfl/cpack/macos/welcome.txt.cmakein b/lib/cfl/cpack/macos/welcome.txt.cmakein new file mode 100644 index 00000000000..0ef28bc264c --- /dev/null +++ b/lib/cfl/cpack/macos/welcome.txt.cmakein @@ -0,0 +1,6 @@ +This will install @CPACK_PACKAGE_NAME@ on your Mac. + +-------------------------------------------------- + +Thank you for trying @CPACK_PACKAGE_NAME@! Have a fantastic day! + diff --git a/lib/cfl/include/CMakeLists.txt b/lib/cfl/include/CMakeLists.txt new file mode 100644 index 00000000000..bf2e3879b6e --- /dev/null +++ b/lib/cfl/include/CMakeLists.txt @@ -0,0 +1,17 @@ +file(GLOB cflHeaders "cfl/*.h") +install(FILES ${cflHeaders} + DESTINATION ${CFL_INSTALL_INCLUDEDIR}/cfl + COMPONENT headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + +# xxHash +if(CFL_INSTALL_BUNDLED_XXHASH_HEADERS) + install(FILES ${CFL_ROOT}/lib/xxhash/xxh3.h + DESTINATION ${CFL_INSTALL_INCLUDEDIR} + COMPONENT headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + install(FILES ${CFL_ROOT}/lib/xxhash/xxhash.h + DESTINATION ${CFL_INSTALL_INCLUDEDIR} + COMPONENT headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) +endif() diff --git a/lib/cfl/include/cfl/cfl.h b/lib/cfl/include/cfl/cfl.h new file mode 100644 index 00000000000..fee8fcf4dc1 --- /dev/null +++ b/lib/cfl/include/cfl/cfl.h @@ -0,0 +1,42 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_H +#define CFL_H + +#define CFL_FALSE 0 +#define CFL_TRUE !CFL_FALSE + +/* headers that are needed in general */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int cfl_init(); + +#endif diff --git a/lib/cfl/include/cfl/cfl_array.h b/lib/cfl/include/cfl/cfl_array.h new file mode 100644 index 00000000000..e260d24d3fc --- /dev/null +++ b/lib/cfl/include/cfl/cfl_array.h @@ -0,0 +1,62 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_ARRAY_H +#define CFL_ARRAY_H + +#include +#include + +struct cfl_array { + int resizable; + struct cfl_variant **entries; + size_t slot_count; + size_t entry_count; +}; + +struct cfl_array *cfl_array_create(size_t slot_count); +void cfl_array_destroy(struct cfl_array *array); + +static inline struct cfl_variant *cfl_array_fetch_by_index(struct cfl_array *array, + size_t position) +{ + if (position >= array->entry_count) { + return NULL; + } + + return array->entries[position]; +} + +int cfl_array_resizable(struct cfl_array *array, int v); +int cfl_array_remove_by_index(struct cfl_array *array, size_t position); +int cfl_array_remove_by_reference(struct cfl_array *array, struct cfl_variant *value); +int cfl_array_append(struct cfl_array *array, struct cfl_variant *value); +int cfl_array_append_string(struct cfl_array *array, char *value); +int cfl_array_append_bytes(struct cfl_array *array, char *value, size_t length); +int cfl_array_append_reference(struct cfl_array *array, void *value); +int cfl_array_append_bool(struct cfl_array *array, int value); +int cfl_array_append_int64(struct cfl_array *array, int64_t value); +int cfl_array_append_double(struct cfl_array *array, double value); +int cfl_array_append_array(struct cfl_array *array, struct cfl_array *value); +int cfl_array_append_new_array(struct cfl_array *array, size_t size); +int cfl_array_append_kvlist(struct cfl_array *array, struct +cfl_kvlist *value); +int cfl_array_print(FILE *fp, struct cfl_array *array); + +#endif diff --git a/lib/cfl/include/cfl/cfl_compat.h b/lib/cfl/include/cfl/cfl_compat.h new file mode 100644 index 00000000000..36c56233be5 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_compat.h @@ -0,0 +1,46 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This file contains compatibility functions and macros for various platforms. + * + * Including this header file should make platforms behave more consistently; + * Add more macros if you find any missing features. + */ + +#ifndef CFL_COMPAT_H +#define CFL_COMPAT_H + +#ifdef CFL_SYSTEM_WINDOWS + +#ifdef _MSC_VER +/* + * cl.exe that is one of the C++ compilers for Windows prefers + * to add an underscore to each POSIX function. + * To suppress compiler warnings, we need these trivial macros. + * For MSYS2 platform on Windows, we don't need to do. + */ +#define timezone _timezone +#define tzname _tzname +#define strncasecmp _strnicmp +#define timegm _mkgmtime +#endif /* _MSC_VER */ + +#endif +#endif diff --git a/lib/cfl/include/cfl/cfl_found.h b/lib/cfl/include/cfl/cfl_found.h new file mode 100644 index 00000000000..d6416be8124 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_found.h @@ -0,0 +1,47 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This is a dummy header that can be used by parent projects to check if + * CFL headers are found in their path. + * + * Why ?, because includes "cfl_info.h" which is only generated once + * CMake runs in CFL project. Likely this check is done before that. + * + * + * In order to use it, the caller might try to use check_c_source_compiles() CMake function + * and try to include this header and invoke the inline function defined here, e.g: + * + * check_c_source_compiles(" + * include + * + * int main() { + * return cfl_found(); + * }" CFL_FOUND) + */ + +#ifndef CFL_FOUND_H +#define CFL_FOUND_H + +static inline int cfl_found() +{ + return 0; +} + +#endif diff --git a/lib/cfl/include/cfl/cfl_hash.h b/lib/cfl/include/cfl/cfl_hash.h new file mode 100644 index 00000000000..5be5e3695e0 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_hash.h @@ -0,0 +1,37 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_HASH_H +#define CFL_HASH_H + +/* NOTE: this is just a wrapper for naming convention */ + +#include +#include "xxh3.h" + +#define cfl_hash_state_t XXH3_state_t +#define cfl_hash_64bits_reset XXH3_64bits_reset +#define cfl_hash_64bits_update XXH3_64bits_update +#define cfl_hash_64bits_digest XXH3_64bits_digest +#define cfl_hash_64bits XXH3_64bits + +#define cfl_hash_128bits_t XXH128_hash_t +#define cfl_hash_128bits XXH3_128bits + +#endif diff --git a/lib/cfl/include/cfl/cfl_info.h.in b/lib/cfl/include/cfl/cfl_info.h.in new file mode 100644 index 00000000000..e2f0d511f14 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_info.h.in @@ -0,0 +1,28 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_INFO_H +#define CFL_INFO_H + +#define CFL_SOURCE_DIR "@CMAKE_SOURCE_DIR@" + +/* General flags set by /CMakeLists.txt */ +@CFL_BUILD_FLAGS@ + +#endif diff --git a/lib/cfl/include/cfl/cfl_kv.h b/lib/cfl/include/cfl/cfl_kv.h new file mode 100644 index 00000000000..f44c5be63d9 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_kv.h @@ -0,0 +1,43 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_KV_H +#define CFL_KV_H + +#include +#include +#include + +struct cfl_kv { + cfl_sds_t key; + cfl_sds_t val; + struct cfl_list _head; +}; + +void cfl_kv_init(struct cfl_list *list); +struct cfl_kv *cfl_kv_item_create_len(struct cfl_list *list, + char *k_buf, size_t k_len, + char *v_buf, size_t v_len); +struct cfl_kv *cfl_kv_item_create(struct cfl_list *list, + char *k_buf, char *v_buf); +void cfl_kv_item_destroy(struct cfl_kv *kv); +void cfl_kv_release(struct cfl_list *list); +const char *cfl_kv_get_key_value(const char *key, struct cfl_list *list); + +#endif diff --git a/lib/cfl/include/cfl/cfl_kvlist.h b/lib/cfl/include/cfl/cfl_kvlist.h new file mode 100644 index 00000000000..5f920e583e0 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_kvlist.h @@ -0,0 +1,76 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_KVLIST_H +#define CFL_KVLIST_H + +#include +#include +#include +#include + +struct cfl_kvpair { + cfl_sds_t key; /* Key */ + struct cfl_variant *val; /* Value */ + struct cfl_list _head; /* Link to list cfl_kvlist->list */ +}; + +struct cfl_kvlist { + struct cfl_list list; +}; + +struct cfl_kvlist *cfl_kvlist_create(); +void cfl_kvlist_destroy(struct cfl_kvlist *list); + +int cfl_kvlist_insert_string(struct cfl_kvlist *list, + char *key, char *value); + +int cfl_kvlist_insert_bytes(struct cfl_kvlist *list, + char *key, char *value, + size_t value_length); + +int cfl_kvlist_insert_reference(struct cfl_kvlist *list, + char *key, void *value); + +int cfl_kvlist_insert_bool(struct cfl_kvlist *list, + char *key, int value); + +int cfl_kvlist_insert_int64(struct cfl_kvlist *list, + char *key, int64_t value); + +int cfl_kvlist_insert_double(struct cfl_kvlist *list, + char *key, double value); + +int cfl_kvlist_insert_array(struct cfl_kvlist *list, + char *key, struct cfl_array *value); + +int cfl_kvlist_insert_new_array(struct cfl_kvlist *list, + char *key, size_t size); + +int cfl_kvlist_insert_kvlist(struct cfl_kvlist *list, + char *key, struct cfl_kvlist *value); + +int cfl_kvlist_insert(struct cfl_kvlist *list, + char *key, struct cfl_variant *value); + +int cfl_kvlist_count(struct cfl_kvlist *list); +struct cfl_variant *cfl_kvlist_fetch(struct cfl_kvlist *list, char *key); +int cfl_kvlist_print(FILE *fp, struct cfl_kvlist *list); + +#endif diff --git a/lib/cfl/include/cfl/cfl_list.h b/lib/cfl/include/cfl/cfl_list.h new file mode 100644 index 00000000000..963e002c648 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_list.h @@ -0,0 +1,195 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This is a rebranded copy of the original Monkey HTTP Server linked list + * interface (cfl_list). + * + * - http://monkey-project.com + * - https://github.com/monkey/monkey + */ + +#ifndef CFL_LIST_H +#define CFL_LIST_H + +#include +#include + +#ifdef _WIN32 +/* Windows */ +#define cfl_container_of(address, type, field) ((type *)( \ + (unsigned char *)(address) - \ + (intptr_t)(&((type *)0)->field))) +#else +/* Rest of the world */ +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + +#define cfl_container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + +struct cfl_list { + struct cfl_list *prev, *next; +}; + +static inline void cfl_list_init(struct cfl_list *list) +{ + list->next = list; + list->prev = list; +} + +static inline void __cfl_list_add(struct cfl_list *_new, + struct cfl_list *prev, + struct cfl_list *next) +{ + next->prev = _new; + _new->next = next; + _new->prev = prev; + prev->next = _new; +} + +static inline void cfl_list_add(struct cfl_list *_new, + struct cfl_list *head) +{ + __cfl_list_add(_new, head->prev, head); +} + +static inline void cfl_list_add_after(struct cfl_list *_new, + struct cfl_list *prev, + struct cfl_list *head) +{ + struct cfl_list *next; + + if (head->prev == head->next || + head->prev == prev) { + cfl_list_add(_new, head); + } + else { + next = prev->next; + next->prev = prev; + _new->next = next; + _new->prev = prev; + prev->next = _new; + } +} + +static inline void __cfl_list_del(struct cfl_list *prev, + struct cfl_list *next) +{ + prev->next = next; + next->prev = prev; +} + +static inline void cfl_list_del(struct cfl_list *entry) +{ + __cfl_list_del(entry->prev, entry->next); + + entry->prev = NULL; + entry->next = NULL; +} + +static inline int cfl_list_is_empty(struct cfl_list *head) +{ + if (head->next == head) { + return 1; + } + + return 0; +} + +static inline int cfl_list_size(struct cfl_list *head) +{ + int ret = 0; + struct cfl_list *it; + + for (it = head->next; it != head; it = it->next, ret++); + + return ret; +} + +static inline void cfl_list_entry_init(struct cfl_list *entry) +{ + entry->next = NULL; + entry->prev = NULL; +} + +static inline int cfl_list_entry_is_orphan(struct cfl_list *entry) +{ + if (entry->next != NULL && + entry->prev != NULL) { + return CFL_FALSE; + } + + return CFL_TRUE; +} + +static inline void cfl_list_cat(struct cfl_list *list, struct cfl_list *head) +{ + struct cfl_list *last; + + last = head->prev; + last->next = list->next; + list->next->prev = last; + list->prev->next = head; + head->prev = list->prev; +} + +#define cfl_list_foreach(curr, head) for( curr = (head)->next; curr != (head); curr = curr->next ) +#define cfl_list_foreach_safe(curr, n, head) \ + for (curr = (head)->next, n = curr->next; curr != (head); curr = n, n = curr->next) + + +#define cfl_list_foreach_r(curr, head) for( curr = (head)->prev; curr != (head); curr = curr->prev ) +#define cfl_list_foreach_safe_r(curr, n, head) \ + for (curr = (head)->prev, n = curr->prev; curr != (head); curr = n, n = curr->prev) + +#define cfl_list_entry( ptr, type, member ) cfl_container_of( ptr, type, member ) + +/* + * First node of the list + * ---------------------- + * Be careful with this Macro, its intended to be used when some node is already linked + * to the list (ptr). If the list is empty it will return the list address as it points + * to it self: list == list->prev == list->next. + * + * If exists some possiblity that your code handle an empty list, use cfl_list_is_empty() + * previously to check if its empty or not. + */ +#define cfl_list_entry_first(ptr, type, member) cfl_container_of((ptr)->next, type, member) + +/* First node of the list + * --------------------- + * Be careful with this Macro, its intended to be used when some node is already linked + * to the list (ptr). If the list is empty it will return the list address as it points + * to it self: list == list->prev == list->next. + * + * If exists some possiblity that your code handle an empty list, use cfl_list_is_empty() + * previously to check if its empty or not. + */ +#define cfl_list_entry_last(ptr, type, member) cfl_container_of((ptr)->prev, type, member) + +/* Next node */ +#define cfl_list_entry_next(ptr, type, member, head) \ + (ptr)->next == (head) ? cfl_container_of((head)->next, type, member) : \ + cfl_container_of((ptr)->next, type, member); + +#endif /* !cfl_list_H_ */ diff --git a/lib/cfl/include/cfl/cfl_log.h b/lib/cfl/include/cfl/cfl_log.h new file mode 100644 index 00000000000..9ceb0015b66 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_log.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_LOG_H +#define CFL_LOG_H + +#include + +int cfl_report_runtime_error_impl(int errnum, char *file, int line); + +#ifdef __FILENAME__ +#define cfl_report_runtime_error() cfl_report_runtime_error_impl(errno, __FILENAME__, __LINE__) +#else +#define cfl_report_runtime_error() cfl_report_runtime_error_impl(errno, __FILE__, __LINE__) +#endif + +#define cfl_errno() do {} while (0) + +#endif diff --git a/lib/cfl/include/cfl/cfl_sds.h b/lib/cfl/include/cfl/cfl_sds.h new file mode 100644 index 00000000000..350547376c5 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_sds.h @@ -0,0 +1,65 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_SDS_H +#define CFL_SDS_H + +/* + * This interface is a minimized version of Fluent Bit SDS just for easily + * string storage + */ + +#include +#include +#include + +#define CFL_SDS_HEADER_SIZE (sizeof(uint64_t) + sizeof(uint64_t)) + +typedef char *cfl_sds_t; + +#pragma pack(push, 1) +struct cfl_sds { + uint64_t len; /* used */ + uint64_t alloc; /* excluding the header and null terminator */ + char buf[]; +}; +#pragma pack(pop) + +#define CFL_SDS_HEADER(s) ((struct cfl_sds *) (s - CFL_SDS_HEADER_SIZE)) + +static inline void cfl_sds_len_set(cfl_sds_t s, size_t len) +{ + CFL_SDS_HEADER(s)->len = len; +} + +size_t cfl_sds_avail(cfl_sds_t s); +cfl_sds_t sds_alloc(size_t size); +size_t cfl_sds_alloc(cfl_sds_t s); +cfl_sds_t cfl_sds_increase(cfl_sds_t s, size_t len); +size_t cfl_sds_len(cfl_sds_t s); +cfl_sds_t cfl_sds_create_len(const char *str, int len); +cfl_sds_t cfl_sds_create(const char *str); +void cfl_sds_destroy(cfl_sds_t s); +cfl_sds_t cfl_sds_cat(cfl_sds_t s, const char *str, int len); +cfl_sds_t cfl_sds_create_size(size_t size); +void cfl_sds_set_len(cfl_sds_t s, size_t len); +void cfl_sds_cat_safe(cfl_sds_t *buf, const char *str, int len); +cfl_sds_t cfl_sds_printf(cfl_sds_t *sds, const char *fmt, ...); + +#endif diff --git a/lib/cfl/include/cfl/cfl_time.h b/lib/cfl/include/cfl/cfl_time.h new file mode 100644 index 00000000000..9c141c1b880 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_time.h @@ -0,0 +1,27 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_TIME_H +#define CFL_TIME_H + +#include + +uint64_t cfl_time_now(); + +#endif diff --git a/lib/cfl/include/cfl/cfl_variant.h b/lib/cfl/include/cfl/cfl_variant.h new file mode 100644 index 00000000000..6249ffdd1e4 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_variant.h @@ -0,0 +1,65 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_VARIANT_H +#define CFL_VARIANT_H + +#include +#include + +#define CFL_VARIANT_STRING 1 +#define CFL_VARIANT_BOOL 2 +#define CFL_VARIANT_INT 3 +#define CFL_VARIANT_DOUBLE 4 +#define CFL_VARIANT_ARRAY 5 +#define CFL_VARIANT_KVLIST 6 +#define CFL_VARIANT_BYTES 7 +#define CFL_VARIANT_REFERENCE 8 + +struct cfl_array; +struct cfl_kvlist; + +struct cfl_variant { + int type; + + union { + cfl_sds_t as_string; + cfl_sds_t as_bytes; + unsigned int as_bool; + int64_t as_int64; + double as_double; + void *as_reference; + struct cfl_array *as_array; + struct cfl_kvlist *as_kvlist; + } data; +}; +int cfl_variant_print(FILE *fp, struct cfl_variant *val); +struct cfl_variant *cfl_variant_create_from_string(char *value); +struct cfl_variant *cfl_variant_create_from_bytes(char *value, size_t length); +struct cfl_variant *cfl_variant_create_from_bool(int value); +struct cfl_variant *cfl_variant_create_from_int64(int64_t value); +struct cfl_variant *cfl_variant_create_from_double(double value); +struct cfl_variant *cfl_variant_create_from_array(struct cfl_array *value); +struct cfl_variant *cfl_variant_create_from_kvlist(struct cfl_kvlist *value); +struct cfl_variant *cfl_variant_create_from_reference(void *value); +struct cfl_variant *cfl_variant_create(); + +void cfl_variant_destroy(struct cfl_variant *instance); + +#endif diff --git a/lib/cfl/include/cfl/cfl_version.h.in b/lib/cfl/include/cfl/cfl_version.h.in new file mode 100644 index 00000000000..9df8459a393 --- /dev/null +++ b/lib/cfl/include/cfl/cfl_version.h.in @@ -0,0 +1,36 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_VERSION_H +#define CFL_VERSION_H + +/* Helpers to convert/format version string */ +#define STR_HELPER(s) #s +#define STR(s) STR_HELPER(s) + +/* CTraces Version */ +#define CFL_VERSION_MAJOR @CFL_VERSION_MAJOR@ +#define CFL_VERSION_MINOR @CFL_VERSION_MINOR@ +#define CFL_VERSION_PATCH @CFL_VERSION_PATCH@ +#define CFL_VERSION (CFL_VERSION_MAJOR * 10000 \ + CFL_VERSION_MINOR * 100 \ + CFL_VERSION_PATCH) +#define CFL_VERSION_STR "@CFL_VERSION_STR@" + +#endif diff --git a/lib/cfl/lib/xxhash/.gitattributes b/lib/cfl/lib/xxhash/.gitattributes new file mode 100644 index 00000000000..fbcf75b5553 --- /dev/null +++ b/lib/cfl/lib/xxhash/.gitattributes @@ -0,0 +1,10 @@ +# Set the default behavior +* text eol=lf + +# Explicitly declare source files +*.c text eol=lf +*.h text eol=lf + +# Denote files that should not be modified. +*.odt binary + diff --git a/lib/cfl/lib/xxhash/.github/workflows/ci.yml b/lib/cfl/lib/xxhash/.github/workflows/ci.yml new file mode 100644 index 00000000000..882925f8e08 --- /dev/null +++ b/lib/cfl/lib/xxhash/.github/workflows/ci.yml @@ -0,0 +1,439 @@ +# Known critical issues: +# - AVX512 related tests are incomplete. Because default environment of +# GitHub Actions doesn't guarantee to support AVX512. +# As of May 2021, they're using Xeon E5-2673 (which doesn't support +# AVX512) and Xeon Platinum 8171M (which supports AVX512). +# See also https://github.com/actions/runner/issues/1069 +# +# In this CI script, it always run `make default` which compiles xxHash +# with AVX512 intrinsics. But if test runner doesn't support AVX512, +# it doesn't run `make check` which tests runtime error/consistency. +# It means that this test stochastically detects a failure in AVX512 +# code path. +# +# Known issues: +# - This test script ignores exit code of cppcheck which can see under +# Job:Linux x64 misc tests > cppcheck in the GitHub Actions report. +# Because xxHash project doesn't 100% follow their recommendation. +# Also sometimes it reports false positives. +# +# - GitHub Actions doesn't support Visual Studio 2015 and 2013. +# https://github.com/actions/virtual-environments/issues/387 +# +# - Setup procedure for msys2 environment is painfully slow. It takes +# 3..5 minutes. +# +# Notes: +# - You can investigate various information at the right pane of GitHub +# Actions report page. +# +# | Item | Section in the right pane | +# | ------------------------- | ------------------------------------- | +# | OS, VM | Set up job | +# | git repo, commit hash | Run actions/checkout@v2 | +# | gcc, tools | Environment info | +# +# - To fail earlier, order of tests in the same job are roughly sorted by +# elapsed time. +# +# Todos: +# - [ ] Linux: Add native ARM runner. +# - [ ] Linux: Add native ARM64 runner. +# - [ ] Linux: Add native PPC64LE runner. +# - [ ] Linux: Add native S390X runner. +# - [ ] Windows: Add VS2013. +# - [ ] Windows: Add VS2015. +# - [ ] Windows: Add clang for msys2. +# - [ ] Windows: Add native or emulated ARM runner. +# - [ ] Windows: Add native or emulated ARM64 runner. + + +# Name of the workflow is also displayed as a SVG badge +name: xxHash CI tests + +on: [push, pull_request] + +jobs: + xxhash-c-compilers: + name: CC=${{ matrix.cc }}, ${{ matrix.os }} + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. + matrix: + include: [ + # You can access the following values via ${{ matrix.??? }} + # + # pkgs : apt-get package names. It can include multiple package names which are delimited by space. + # cc : C compiler executable. + # cxx : C++ compiler executable for `make ctocpptest`. + # avx512 : Set 'true' if compiler supports avx512. Otherwise, set 'false'. + # os : GitHub Actions YAML workflow label. See https://github.com/actions/virtual-environments#available-environments + + # cc + { pkgs: '', cc: cc, cxx: c++, avx512: 'true', os: ubuntu-latest, }, + + # gcc + { pkgs: '', cc: gcc, cxx: g++, avx512: 'true', os: ubuntu-latest, }, + { pkgs: 'gcc-11 g++-11 lib32gcc-11-dev', cc: gcc-11, cxx: g++-11, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'gcc-10 g++-10 lib32gcc-10-dev', cc: gcc-10, cxx: g++-10, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'gcc-9 g++-9 lib32gcc-9-dev', cc: gcc-9, cxx: g++-9, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'gcc-8 g++-8 lib32gcc-8-dev', cc: gcc-8, cxx: g++-8, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'gcc-7 g++-7 lib32gcc-7-dev', cc: gcc-7, cxx: g++-7, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'gcc-6 g++-6 lib32gcc-6-dev', cc: gcc-6, cxx: g++-6, avx512: 'true', os: ubuntu-18.04, }, + { pkgs: 'gcc-5 g++-5 lib32gcc-5-dev', cc: gcc-5, cxx: g++-5, avx512: 'true', os: ubuntu-18.04, }, + { pkgs: 'gcc-4.8 g++-4.8 lib32gcc-4.8-dev ', cc: gcc-4.8, cxx: g++-4.8, avx512: 'false', os: ubuntu-18.04, }, + + # clang + { pkgs: '', cc: clang, cxx: clang++, avx512: 'true', os: ubuntu-latest, }, + { pkgs: 'clang-12', cc: clang-12, cxx: clang++-12, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-11', cc: clang-11, cxx: clang++-11, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-10', cc: clang-10, cxx: clang++-10, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-9', cc: clang-9, cxx: clang++-9, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-8', cc: clang-8, cxx: clang++-8, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-7', cc: clang-7, cxx: clang++-7, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-6.0', cc: clang-6.0, cxx: clang++-6.0, avx512: 'true', os: ubuntu-20.04, }, + { pkgs: 'clang-5.0', cc: clang-5.0, cxx: clang++-5.0, avx512: 'true', os: ubuntu-18.04, }, + { pkgs: 'clang-4.0', cc: clang-4.0, cxx: clang++-4.0, avx512: 'true', os: ubuntu-18.04, }, + { pkgs: 'clang-3.9', cc: clang-3.9, cxx: clang++-3.9, avx512: 'true', os: ubuntu-18.04, }, + ] + + runs-on: ${{ matrix.os }} + env: # Set environment variables + # We globally set CC and CXX to improve compatibility with .travis.yml + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + + - name: apt-get install + run: | + sudo apt-get update + sudo apt-get install gcc-multilib + sudo apt-get install ${{ matrix.pkgs }} + + - name: Environment info + run: | + echo && type $CC && which $CC && $CC --version + echo && type $CXX && which $CXX && $CXX --version + echo && type make && make -v + echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present + + - name: C90 + no-long-long compliance + if: always() + run: | + CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror" make clean xxhsum + + - name: C90 + XXH_NO_LONG_LONG + if: always() + run: | + # strict c90, with no long long support; resulting in no XXH64_* symbol + make clean c90test + + - name: dispatch + if: always() + run: | + # removing sign conversion warnings due to a bug in gcc-5's definition of some AVX512 intrinsics + CFLAGS="-Werror" MOREFLAGS="-Wno-sign-conversion" make clean dispatch + + - name: DISPATCH=1 + if: always() + run: | + CFLAGS="-Wall -Wextra -Werror" make DISPATCH=1 clean default + + - name: noxxh3test + if: always() + run: | + # check library can be compiled with XXH_NO_XXH3, resulting in no XXH3_* symbol + make clean noxxh3test + + - name: make avx512f + if: ${{ matrix.avx512 == 'true' }} + run: | + CFLAGS="-O1 -mavx512f -Werror" make clean default + + - name: test-all + if: always() + run: | + make clean test-all + + + ubuntu-consistency: + name: Linux x64 check results consistency + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + + - name: Environment info + run: | + echo && gcc --version + echo && make -v + echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present + + - name: Scalar code path + run: | + CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR make clean check + + - name: SSE2 code path + run: | + CPPFLAGS=-DXXH_VECTOR=XXH_SSE2 make clean check + + - name: AVX2 code path + run: | + CPPFLAGS="-mavx2 -DXXH_VECTOR=XXH_AVX2" make clean check + + # As for AVX512, see "Known critical issues" at the top of this file + - name: AVX512 code path + run: | + # Run "make check" if /proc/cpuinfo has flags for avx512. + grep -q "^flags.*\bavx512\b" /proc/cpuinfo && CPPFLAGS="-mavx512f -DXXH_VECTOR=XXH_AVX512" make clean check || (echo This test runner does not support AVX512. && $(exit 0)) + + - name: reroll code path (#240) + run: | + CPPFLAGS=-DXXH_REROLL=1 make clean check + + - name: tests/bench + run: | + make -C tests/bench + + + ubuntu-misc: + name: Linux x64 misc tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + + - name: apt-get install + run: | + sudo apt-get install valgrind cppcheck + + - name: Environment info + run: | + echo && gcc --version + echo && clang --version + echo && valgrind --version + echo && cppcheck --version + echo && make -v + echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present + + - name: cppcheck + run: | + # This test script ignores exit code of cppcheck. See knowin issues + # at the top of this file. + make clean cppcheck || echo There are some cppcheck reports + + - name: test-mem (valgrind) + run: | + make clean test-mem + + - name: usan + run: | + make clean usan + + - name: Lint Unicode in root-dir, cli/, tests/, tests/bench/, tests/collisions/. + run: | + make lint-unicode + + + ubuntu-cmake-unofficial: + name: Linux x64 cmake unofficial build test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + + - name: Environment info + run: | + echo && gcc --version + echo && cmake --version + echo && make -v + echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present + + - name: cmake + run: | + cd cmake_unofficial + mkdir build + cd build + cmake .. + CFLAGS=-Werror make + + + # Linux, { ARM, ARM64, PPC64LE, PPC64, S390X } + # All tests are using QEMU and gcc cross compiler. + + qemu-consistency: + name: QEMU ${{ matrix.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. + matrix: + include: [ + { name: ARM, xcc_pkg: gcc-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static }, + { name: ARM64, xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static }, + { name: PPC64LE-gcc9, xcc_pkg: gcc-9-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-9, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static }, + { name: PPC64LE-gcc10, xcc_pkg: gcc-10-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-10, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static }, + { name: PPC64-gcc9, xcc_pkg: gcc-9-powerpc64-linux-gnu, xcc: powerpc64-linux-gnu-gcc-9, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64-static }, + { name: PPC64-gcc10, xcc_pkg: gcc-10-powerpc64-linux-gnu, xcc: powerpc64-linux-gnu-gcc-10, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64-static }, + { name: S390X, xcc_pkg: gcc-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static }, + { name: MIPS, xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static }, + ] + env: # Set environment variables + XCC: ${{ matrix.xcc }} + XEMU: ${{ matrix.xemu }} + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + - name: apt update & install + run: | + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib qemu-utils qemu-user-static + sudo apt-get install ${{ matrix.xcc_pkg }} ${{ matrix.xemu_pkg }} + + - name: Environment info + run: | + echo && which $XCC + echo && $XCC --version + echo && $XCC -v # Show built-in specs + echo && which $XEMU + echo && $XEMU --version + + - name: ARM (XXH_VECTOR=[ scalar, NEON ]) + if: ${{ matrix.name == 'ARM' }} + run: | + CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + CPPFLAGS="-DXXH_VECTOR=XXH_NEON" CFLAGS="-O3 -march=armv7-a -fPIC -mfloat-abi=softfp -mfpu=neon-vfpv4" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + + - name: ARM64 (XXH_VECTOR=[ scalar, NEON ]) + if: ${{ matrix.name == 'ARM64' }} + run: | + CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + CPPFLAGS="-DXXH_VECTOR=XXH_NEON" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + + - name: ${{ matrix.name }} (XXH_VECTOR=[ scalar, VSX ]) + if: ${{ startsWith(matrix.name, 'PPC64') }} + run: | + CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + CPPFLAGS="-DXXH_VECTOR=XXH_VSX" CFLAGS="-O3 -maltivec -mvsx -mpower8-vector -mcpu=power8" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + + - name: S390X (XXH_VECTOR=[ scalar, VSX ]) + if: ${{ matrix.name == 'S390X' }} + run: | + CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -march=arch11 -mzvector" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + + - name: MIPS (XXH_VECTOR=[ scalar ]) + if: ${{ matrix.name == 'MIPS' }} + run: | + LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + + # macOS + + macos-latest-general: + name: macOS general test + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - name: Environment info + run: | + echo && clang --version + echo && sysctl -a | grep machdep.cpu # cpuinfo + + - name: make + run: | + CFLAGS="-Werror" make clean default + + - name: make test + run: | + # test scenario where "stdout" is not the console + make clean test MOREFLAGS='-Werror' | tee + + + # Windows, { VC++2019, VC++2017 } x { x64, Win32, ARM, ARM64 } + # + # - Default shell for Windows environment is PowerShell Core. + # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell + # + # - "windows-2019" uses Visual Studio 2019. + # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019 + # + # - "windows-2016" uses Visual Studio 2017. + # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2016-Readme.md#visual-studio-enterprise-2017 + + windows-visualc-general: + name: ${{ matrix.system.vc }}, ${{ matrix.arch }} + runs-on: ${{ matrix.system.os }} # Runs-on foreach value of strategy.matrix.system.os + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. + matrix: + system: [ + { os: windows-2019, vc: "VC++ 2019" }, + { os: windows-2016, vc: "VC++ 2017" }, + ] + arch: [ x64, Win32, ARM, ARM64 ] + steps: + - uses: actions/checkout@v2 + + - name: Build ${{ matrix.system.os }}, ${{ matrix.arch }} + run: | + cd cmake_unofficial + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.arch }} -DXXHASH_C_FLAGS="/WX" + cmake --build . --config Release + + - name: Test + # Run benchmark for testing only if target arch is x64 or Win32. + if: ${{ matrix.arch == 'x64' || matrix.arch == 'Win32' }} + run: | + .\cmake_unofficial\build\Release\xxhsum.exe -bi1 + + + # Windows, { mingw64, mingw32 } + # + # - Shell for msys2 is sh (msys2). defaults.run.shell is for this setting. + # + # https://github.com/msys2/MINGW-packages/blob/master/.github/workflows/main.yml + # https://github.com/actions/starter-workflows/issues/95 + + windows-msys2-general: + name: Windows ${{ matrix.msystem }} + runs-on: windows-latest + strategy: + fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix failed. + matrix: + include: [ + { msystem: mingw64, toolchain: mingw-w64-x86_64-toolchain }, + { msystem: mingw32, toolchain: mingw-w64-i686-toolchain }, + ] + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v2 # https://github.com/actions/checkout + - uses: msys2/setup-msys2@v2 # https://github.com/msys2/setup-msys2 + with: + msystem: MSYS + install: mingw-w64-i686-make ${{ matrix.toolchain }} + update: true + + - name: Update + run: | + pacman --noconfirm -Suuy + pacman --noconfirm -Suu + + - name: mingw64 + if: ${{ matrix.msystem == 'mingw64' }} + run: | + PATH=/mingw64/bin:$PATH /mingw32/bin/mingw32-make clean test MOREFLAGS=-Werror + PATH=/mingw64/bin:$PATH /mingw32/bin/mingw32-make -C tests/bench + # Abort if result of "file ./xxhsum.exe" doesn't contain 'x86-64'. + # Expected output is "./xxhsum.exe: PE32+ executable (console) x86-64, for MS Windows" + file ./xxhsum.exe | grep -q 'x86-64' || $(exit 1) + ./xxhsum.exe --version + + - name: mingw32 + if: ${{ matrix.msystem == 'mingw32' }} + run: | + PATH=/mingw32/bin:$PATH /mingw32/bin/mingw32-make.exe clean test MOREFLAGS=-Werror + PATH=/mingw32/bin:$PATH /mingw32/bin/mingw32-make.exe -C tests/bench + # Abort if result of "file ./xxhsum.exe" doesn't contain '80386'. + # Expected output is "./xxhsum.exe: PE32 executable (console) Intel 80386, for MS Windows" + file ./xxhsum.exe | grep -q '80386' || $(exit 1) + ./xxhsum.exe --version diff --git a/lib/cfl/lib/xxhash/.gitignore b/lib/cfl/lib/xxhash/.gitignore new file mode 100644 index 00000000000..e8645286e58 --- /dev/null +++ b/lib/cfl/lib/xxhash/.gitignore @@ -0,0 +1,47 @@ +# objects +*.o +*.obj +*.s + +# libraries +libxxhash.* +!libxxhash.pc.in + +# Executables +*.exe +xxh32sum +xxh64sum +xxh128sum +xxhsum +xxhsum32 +xxhsum_privateXXH +xxhsum_inlinedXXH +dispatch +tests/generate_unicode_test + +# local conf +.clang_complete + +# Mac OS-X artefacts +*.dSYM +.DS_Store + +# Wasm / emcc / emscripten artefacts +*.html +*.wasm +*.js + +# CMake build directories +build*/ + +# project managers artifacts +.projectile + +# analyzer artifacts +infer-out + +# test artifacts +.test* +tmp* +tests/*.unicode +tests/unicode_test* diff --git a/lib/cfl/lib/xxhash/.travis.yml b/lib/cfl/lib/xxhash/.travis.yml new file mode 100644 index 00000000000..9f9e42cac46 --- /dev/null +++ b/lib/cfl/lib/xxhash/.travis.yml @@ -0,0 +1,142 @@ +language: c + +# Dump CPU info before start +before_install: + - cat /proc/cpuinfo || echo /proc/cpuinfo is not present + +matrix: + fast_finish: true + include: + + - name: General linux x64 tests + arch: amd64 + addons: + apt: + packages: + - g++-multilib + - gcc-multilib + - cppcheck + script: + - make -B test-all + - make clean + - CFLAGS="-Werror" MOREFLAGS="-Wno-sign-conversion" make dispatch # removing sign conversion warnings due to a bug in gcc-5's definition of some AVX512 intrinsics + - make clean + - CFLAGS="-O1 -mavx512f -Werror" make + - make clean + - CFLAGS="-Wall -Wextra -Werror" make DISPATCH=1 + - make clean + - CFLAGS="-std=c90 -pedantic -Wno-long-long -Werror" make xxhsum # check C90 + long long compliance + - make c90test # strict c90, with no long long support; resulting in no XXH64_* symbol + - make noxxh3test # check library can be compiled with XXH_NO_XXH3, resulting in no XXH3_* symbol + + + - name: Check results consistency on x64 + arch: amd64 + script: + - CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR make check # Scalar code path + - make clean + - CPPFLAGS=-DXXH_VECTOR=XXH_SSE2 make check # SSE2 code path + - make clean + - CPPFLAGS="-mavx2 -DXXH_VECTOR=XXH_AVX2" make check # AVX2 code path + - make clean + - CPPFLAGS="-mavx512f -DXXH_VECTOR=XXH_AVX512" make check # AVX512 code path + - make clean + - CPPFLAGS=-DXXH_REROLL=1 make check # reroll code path (#240) + - make -C tests/bench + + - name: macOS General Test + os: osx + compiler: clang + script: + - CFLAGS="-Werror" make # test library build + - make clean + - make test MOREFLAGS='-Werror' | tee # test scenario where `stdout` is not the console + + - name: ARM compilation and consistency checks (Qemu) + dist: xenial + arch: amd64 + addons: + apt: + packages: + - qemu-system-arm + - qemu-user-static + - gcc-arm-linux-gnueabi + - libc6-dev-armel-cross + script: + # arm (32-bit) + - CC=arm-linux-gnueabi-gcc CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR LDFLAGS=-static RUN_ENV=qemu-arm-static make check # Scalar code path + - make clean + # NEON (32-bit) + - CC=arm-linux-gnueabi-gcc CPPFLAGS=-DXXH_VECTOR=XXH_NEON CFLAGS="-O3 -march=armv7-a -fPIC -mfloat-abi=softfp -mfpu=neon-vfpv4" LDFLAGS=-static RUN_ENV=qemu-arm-static make check # NEON code path + + - name: aarch64 compilation and consistency checks + dist: xenial + arch: arm64 + script: + # aarch64 + - CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR make check # Scalar code path + # NEON (64-bit) + - make clean + - CPPFLAGS=-DXXH_VECTOR=XXH_NEON make check # NEON code path + # clang + - make clean + - CC=clang CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR make check # Scalar code path + # clang + NEON + - make clean + - CC=clang CPPFLAGS=-DXXH_VECTOR=XXH_NEON make check # NEON code path + + # We need Bionic here because the QEMU versions shipped in the older repos + # do not support POWER8 emulation, and compiling QEMU from source is a pain. + - name: PowerPC + PPC64 compilation and consistency checks (Qemu on Bionic) + dist: bionic + arch: amd64 + addons: + apt: + packages: + - qemu-system-ppc + - qemu-user-static + - gcc-powerpc-linux-gnu + - gcc-powerpc64-linux-gnu + - libc6-dev-powerpc-cross + - libc6-dev-ppc64-cross + script: + - CC=powerpc-linux-gnu-gcc RUN_ENV=qemu-ppc-static LDFLAGS=-static make check # Scalar code path + - make clean + - CC=powerpc64-linux-gnu-gcc RUN_ENV=qemu-ppc64-static CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR CFLAGS="-O3" LDFLAGS="-static -m64" make check # Scalar code path + # VSX code + - make clean + - CC=powerpc64-linux-gnu-gcc RUN_ENV="qemu-ppc64-static -cpu power8" CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -maltivec -mvsx -mcpu=power8 -mpower8-vector" LDFLAGS="-static -m64" make check # VSX code path + # altivec.h redefinition issue #426 + - make clean + - CC=powerpc64-linux-gnu-gcc CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-maltivec -mvsx -mcpu=power8 -mpower8-vector" make -C tests test_ppc_redefine + + - name: PPC64LE compilation and consistency checks + dist: xenial + arch: ppc64le + script: + # Scalar (universal) code path + - CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR LDFLAGS=-static make check + # VSX code path (64-bit) + - make clean + - CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -maltivec -mvsx -mpower8-vector -mcpu=power8" LDFLAGS="-static" make check + # altivec.h redefinition issue #426 + - make clean + - CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-maltivec -mvsx -mcpu=power8 -mpower8-vector" make -C tests test_ppc_redefine + + - name: IBM s390x compilation and consistency checks + dist: bionic + arch: s390x + script: + # Scalar (universal) code path + - CPPFLAGS=-DXXH_VECTOR=XXH_SCALAR LDFLAGS=-static make check + # s390x code path (64-bit) + - make clean + - CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -march=arch11 -mzvector" LDFLAGS="-static" make check + + - name: cmake build test + script: + - cd cmake_unofficial + - mkdir build + - cd build + - cmake .. + - CFLAGS=-Werror make diff --git a/lib/cfl/lib/xxhash/CHANGELOG b/lib/cfl/lib/xxhash/CHANGELOG new file mode 100644 index 00000000000..ff59d8bb1f4 --- /dev/null +++ b/lib/cfl/lib/xxhash/CHANGELOG @@ -0,0 +1,71 @@ +v0.8.1 +- perf : much improved performance for XXH3 streaming variants, notably on gcc and msvc +- perf : improved XXH64 speed and latency on small inputs +- perf : small XXH32 speed and latency improvement on small inputs of random size +- perf : minor stack usage improvement for XXH32 and XXH64 +- api : new experimental variants XXH3_*_withSecretandSeed() +- api : update XXH3_generateSecret(), can no generate secret of any size (>= XXH3_SECRET_SIZE_MIN) +- cli : xxhsum can now generate and check XXH3 checksums, using command `-H3` +- build: can build xxhash without XXH3, with new build macro XXH_NO_XXH3 +- build: fix xxh_x86dispatch build with MSVC, by @apankrat +- build: XXH_INLINE_ALL can always be used safely, even after XXH_NAMESPACE or a previous XXH_INLINE_ALL +- build: improved PPC64LE vector support, by @mpe +- install: fix pkgconfig, by @ellert +- install: compatibility with Haiku, by @Begasus +- doc : code comments made compatible with doxygen, by @easyaspi314 +- misc : XXH_ACCEPT_NULL_INPUT_POINTER is no longer necessary, all functions can accept NULL input pointers, as long as size == 0 +- misc : complete refactor of CI tests on Github Actions, offering much larger coverage, by @t-mat +- misc : xxhsum code base split into multiple specialized units, within directory cli/, by @easyaspi314 + +v0.8.0 +- api : stabilize XXH3 +- cli : xxhsum can parse BSD-style --check lines, by @WayneD +- cli : `xxhsum -` accepts console input, requested by @jaki +- cli : xxhsum accepts -- separator, by @jaki +- cli : fix : print correct default algo for symlinked helpers, by @martinetd +- install: improved pkgconfig script, allowing custom install locations, requested by @ellert + +v0.7.4 +- perf: automatic vector detection and selection at runtime (`xxh_x86dispatch.h`), initiated by @easyaspi314 +- perf: added AVX512 support, by @gzm55 +- api : new: secret generator `XXH_generateSecret()`, suggested by @koraa +- api : fix: XXH3_state_t is movable, identified by @koraa +- api : fix: state is correctly aligned in AVX mode (unlike `malloc()`), by @easyaspi314 +- api : fix: streaming generated wrong values in some combination of random ingestion lengths, reported by @WayneD +- cli : fix unicode print on Windows, by @easyaspi314 +- cli : can `-c` check file generated by sfv +- build: `make DISPATCH=1` generates `xxhsum` and `libxxhash` with runtime vector detection (x86/x64 only) +- install: cygwin installation support +- doc : Cryptol specification of XXH32 and XXH64, by @weaversa + +v0.7.3 +- perf: improved speed for large inputs (~+20%) +- perf: improved latency for small inputs (~10%) +- perf: s390x Vectorial code, by @easyaspi314 +- cli: improved support for Unicode filenames on Windows, thanks to @easyaspi314 and @t-mat +- api: `xxhash.h` can now be included in any order, with and without `XXH_STATIC_LINKING_ONLY` and `XXH_INLINE_ALL` +- build: xxHash's implementation transferred into `xxhash.h`. No more need to have `xxhash.c` in the `/include` directory for `XXH_INLINE_ALL` to work +- install: created pkg-config file, by @bket +- install: VCpkg installation instructions, by @LilyWangL +- doc: Highly improved code documentation, by @easyaspi314 +- misc: New test tool in `/tests/collisions`: brute force collision tester for 64-bit hashes + +v0.7.2 +- Fixed collision ratio of `XXH128` for some specific input lengths, reported by @svpv +- Improved `VSX` and `NEON` variants, by @easyaspi314 +- Improved performance of scalar code path (`XXH_VECTOR=0`), by @easyaspi314 +- `xxhsum`: can generate 128-bit hashes with the `-H2` option (note: for experimental purposes only! `XXH128` is not yet frozen) +- `xxhsum`: option `-q` removes status notifications + +v0.7.1 +- Secret first: the algorithm computation can be altered by providing a "secret", which is any blob of bytes, of size >= `XXH3_SECRET_SIZE_MIN`. +- `seed` is still available, and acts as a secret generator +- updated `ARM NEON` variant by @easyaspi314 +- Streaming implementation is available +- Improve compatibility and performance with Visual Studio, with help from @aras-p +- Better integration when using `XXH_INLINE_ALL`: do not pollute host namespace, use its own macros, such as `XXH_ASSERT()`, `XXH_ALIGN`, etc. +- 128-bit variant provides helper functions for comparison of hashes. +- Better `clang` generation of `rotl` instruction, thanks to @easyaspi314 +- `XXH_REROLL` build macro to reduce binary size, by @easyaspi314 +- Improved `cmake` script, by @Mezozoysky +- Full benchmark program provided in `/tests/bench` diff --git a/lib/cfl/lib/xxhash/Doxyfile b/lib/cfl/lib/xxhash/Doxyfile new file mode 100644 index 00000000000..634e1e1a38d --- /dev/null +++ b/lib/cfl/lib/xxhash/Doxyfile @@ -0,0 +1,58 @@ +# Doxygen config for xxHash +DOXYFILE_ENCODING = UTF-8 + +PROJECT_NAME = "xxHash" +PROJECT_NUMBER = "0.8.0" +PROJECT_BRIEF = "Extremely fast non-cryptographic hash function" +OUTPUT_DIRECTORY = doxygen +OUTPUT_LANGUAGE = English + +# We already separate the internal docs. +INTERNAL_DOCS = YES +# Consistency +SORT_MEMBER_DOCS = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES + +# Warnings +QUIET = YES +# Until we document everything +WARN_IF_UNDOCUMENTED = NO + +# TODO: Add the other files. It is just xxhash.h for now. +FILE_PATTERNS = xxhash.h xxh_x86dispatch.c +# Note: xxHash's source files are technically ASCII only. +INPUT_ENCODING = UTF-8 +TAB_SIZE = 4 +MARKDOWN_SUPPORT = YES + +# xxHash is a C library +OPTIMIZE_OUTPUT_FOR_C = YES +# So we can document the internals +EXTRACT_STATIC = YES +# Document the macros +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +# Predefine some macros to clean up the output. +PREDEFINED = "XXH_DOXYGEN=" \ + "XXH_PUBLIC_API=" \ + "XXH_FORCE_INLINE=static inline" \ + "XXH_NO_INLINE=static" \ + "XXH_RESTRICT=restrict" \ + "XSUM_API=" \ + "XXH_STATIC_LINKING_ONLY" \ + "XXH_IMPLEMENTATION" \ + "XXH_ALIGN(N)=alignas(N)" \ + "XXH_ALIGN_MEMBER(align,type)=alignas(align) type" + +# We want HTML docs +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +# Tweak the colors a bit +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_GAMMA = 100 +HTML_COLORSTYLE_SAT = 100 + +# We don't want LaTeX. +GENERATE_LATEX = NO diff --git a/lib/cfl/lib/xxhash/LICENSE b/lib/cfl/lib/xxhash/LICENSE new file mode 100644 index 00000000000..6bc30a1bc55 --- /dev/null +++ b/lib/cfl/lib/xxhash/LICENSE @@ -0,0 +1,26 @@ +xxHash Library +Copyright (c) 2012-2020 Yann Collet +All rights reserved. + +BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + +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 HOLDER 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. diff --git a/lib/cfl/lib/xxhash/README.md b/lib/cfl/lib/xxhash/README.md new file mode 100644 index 00000000000..2406c8d2443 --- /dev/null +++ b/lib/cfl/lib/xxhash/README.md @@ -0,0 +1,236 @@ + +xxHash - Extremely fast hash algorithm +====================================== + +xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. +It successfully completes the [SMHasher](https://code.google.com/p/smhasher/wiki/SMHasher) test suite +which evaluates collision, dispersion and randomness qualities of hash functions. +Code is highly portable, and hashes are identical across all platforms (little / big endian). + +|Branch |Status | +|------------|---------| +|dev | [![Build Status](https://github.com/Cyan4973/xxHash/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/Cyan4973/xxHash/actions?query=branch%3Adev+) | + + +Benchmarks +------------------------- + +The reference system uses an Intel i7-9700K cpu, and runs Ubuntu x64 20.04. +The [open source benchmark program] is compiled with `clang` v10.0 using `-O3` flag. + +| Hash Name | Width | Bandwidth (GB/s) | Small Data Velocity | Quality | Comment | +| --------- | ----- | ---------------- | ----- | --- | --- | +| __XXH3__ (SSE2) | 64 | 31.5 GB/s | 133.1 | 10 +| __XXH128__ (SSE2) | 128 | 29.6 GB/s | 118.1 | 10 +| _RAM sequential read_ | N/A | 28.0 GB/s | N/A | N/A | _for reference_ +| City64 | 64 | 22.0 GB/s | 76.6 | 10 +| T1ha2 | 64 | 22.0 GB/s | 99.0 | 9 | Slightly worse [collisions] +| City128 | 128 | 21.7 GB/s | 57.7 | 10 +| __XXH64__ | 64 | 19.4 GB/s | 71.0 | 10 +| SpookyHash | 64 | 19.3 GB/s | 53.2 | 10 +| Mum | 64 | 18.0 GB/s | 67.0 | 9 | Slightly worse [collisions] +| __XXH32__ | 32 | 9.7 GB/s | 71.9 | 10 +| City32 | 32 | 9.1 GB/s | 66.0 | 10 +| Murmur3 | 32 | 3.9 GB/s | 56.1 | 10 +| SipHash | 64 | 3.0 GB/s | 43.2 | 10 +| FNV64 | 64 | 1.2 GB/s | 62.7 | 5 | Poor avalanche properties +| Blake2 | 256 | 1.1 GB/s | 5.1 | 10 | Cryptographic +| SHA1 | 160 | 0.8 GB/s | 5.6 | 10 | Cryptographic but broken +| MD5 | 128 | 0.6 GB/s | 7.8 | 10 | Cryptographic but broken + +[open source benchmark program]: https://github.com/Cyan4973/xxHash/tree/release/tests/bench +[collisions]: https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison#collision-study + +note 1: Small data velocity is a _rough_ evaluation of algorithm's efficiency on small data. For more detailed analysis, please refer to next paragraph. + +note 2: some algorithms feature _faster than RAM_ speed. In which case, they can only reach their full speed when input data is already in CPU cache (L3 or better). Otherwise, they max out on RAM speed limit. + +### Small data + +Performance on large data is only one part of the picture. +Hashing is also very useful in constructions like hash tables and bloom filters. +In these use cases, it's frequent to hash a lot of small data (starting at a few bytes). +Algorithm's performance can be very different for such scenarios, since parts of the algorithm, +such as initialization or finalization, become fixed cost. +The impact of branch mis-prediction also becomes much more present. + +XXH3 has been designed for excellent performance on both long and small inputs, +which can be observed in the following graph: + +![XXH3, latency, random size](https://user-images.githubusercontent.com/750081/61976089-aedeab00-af9f-11e9-9239-e5375d6c080f.png) + +For a more detailed analysis, visit the wiki : +https://github.com/Cyan4973/xxHash/wiki/Performance-comparison#benchmarks-concentrating-on-small-data- + +Quality +------------------------- + +Speed is not the only property that matters. +Produced hash values must respect excellent dispersion and randomness properties, +so that any sub-section of it can be used to maximally spread out a table or index, +as well as reduce the amount of collisions to the minimal theoretical level, following the [birthday paradox]. + +`xxHash` has been tested with Austin Appleby's excellent SMHasher test suite, +and passes all tests, ensuring reasonable quality levels. +It also passes extended tests from [newer forks of SMHasher], featuring additional scenarios and conditions. + +Finally, xxHash provides its own [massive collision tester](https://github.com/Cyan4973/xxHash/tree/dev/tests/collisions), +able to generate and compare billions of hashes to test the limits of 64-bit hash algorithms. +On this front too, xxHash features good results, in line with the [birthday paradox]. +A more detailed analysis is documented [in the wiki](https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison). + +[birthday paradox]: https://en.wikipedia.org/wiki/Birthday_problem +[newer forks of SMHasher]: https://github.com/rurban/smhasher + + +### Build modifiers + +The following macros can be set at compilation time to modify libxxhash's behavior. They are generally disabled by default. + +- `XXH_INLINE_ALL`: Make all functions `inline`, with implementations being directly included within `xxhash.h`. + Inlining functions is beneficial for speed on small keys. + It's _extremely effective_ when key length is expressed as _a compile time constant_, + with performance improvements observed in the +200% range . + See [this article](https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html) for details. +- `XXH_PRIVATE_API`: same outcome as `XXH_INLINE_ALL`. Still available for legacy support. + The name underlines that `XXH_*` symbols will not be exported. +- `XXH_NAMESPACE`: Prefixes all symbols with the value of `XXH_NAMESPACE`. + This macro can only use compilable character set. + Useful to evade symbol naming collisions, + in case of multiple inclusions of xxHash's source code. + Client applications still use the regular function names, + as symbols are automatically translated through `xxhash.h`. +- `XXH_FORCE_MEMORY_ACCESS`: The default method `0` uses a portable `memcpy()` notation. + Method `1` uses a gcc-specific `packed` attribute, which can provide better performance for some targets. + Method `2` forces unaligned reads, which is not standards compliant, but might sometimes be the only way to extract better read performance. + Method `3` uses a byteshift operation, which is best for old compilers which don't inline `memcpy()` or big-endian systems without a byteswap instruction +- `XXH_FORCE_ALIGN_CHECK`: Use a faster direct read path when input is aligned. + This option can result in dramatic performance improvement when input to hash is aligned on 32 or 64-bit boundaries, + when running on architectures unable to load memory from unaligned addresses, or suffering a performance penalty from it. + It is (slightly) detrimental on platform with good unaligned memory access performance (same instruction for both aligned and unaligned accesses). + This option is automatically disabled on `x86`, `x64` and `aarch64`, and enabled on all other platforms. +- `XXH_VECTOR` : manually select a vector instruction set (default: auto-selected at compilation time). Available instruction sets are `XXH_SCALAR`, `XXH_SSE2`, `XXH_AVX2`, `XXH_AVX512`, `XXH_NEON` and `XXH_VSX`. Compiler may require additional flags to ensure proper support (for example, `gcc` on linux will require `-mavx2` for AVX2, and `-mavx512f` for AVX512). +- `XXH_NO_PREFETCH` : disable prefetching. Some platforms or situations may perform better without prefetching. XXH3 only. +- `XXH_PREFETCH_DIST` : select prefetching distance. For close-to-metal adaptation to specific hardware platforms. XXH3 only. +- `XXH_NO_INLINE_HINTS`: By default, xxHash uses `__attribute__((always_inline))` and `__forceinline` to improve performance at the cost of code size. + Defining this macro to 1 will mark all internal functions as `static`, allowing the compiler to decide whether to inline a function or not. + This is very useful when optimizing for smallest binary size, + and is automatically defined when compiling with `-O0`, `-Os`, `-Oz`, or `-fno-inline` on GCC and Clang. + This may also increase performance depending on compiler and architecture. +- `XXH32_ENDJMP`: Switch multi-branch finalization stage of XXH32 by a single jump. + This is generally undesirable for performance, especially when hashing inputs of random sizes. + But depending on exact architecture and compiler, a jump might provide slightly better performance on small inputs. Disabled by default. +- `XXH_STATIC_LINKING_ONLY`: gives access to internal state declaration, required for static allocation. + Incompatible with dynamic linking, due to risks of ABI changes. +- `XXH_NO_XXH3` : removes symbols related to `XXH3` (both 64 & 128 bits) from generated binary. + Useful to reduce binary size, notably for applications which do not use `XXH3`. +- `XXH_NO_LONG_LONG`: removes compilation of algorithms relying on 64-bit types (XXH3 and XXH64). Only XXH32 will be compiled. + Useful for targets (architectures and compilers) without 64-bit support. +- `XXH_IMPORT`: MSVC specific: should only be defined for dynamic linking, as it prevents linkage errors. +- `XXH_CPU_LITTLE_ENDIAN`: By default, endianness is determined by a runtime test resolved at compile time. + If, for some reason, the compiler cannot simplify the runtime test, it can cost performance. + It's possible to skip auto-detection and simply state that the architecture is little-endian by setting this macro to 1. + Setting it to 0 states big-endian. +- `XXH_DEBUGLEVEL` : When set to any value >= 1, enables `assert()` statements. + This (slightly) slows down execution, but may help finding bugs during debugging sessions. + +When compiling the Command Line Interface `xxhsum` with `make`, the following environment variables can also be set : +- `DISPATCH=1` : use `xxh_x86dispatch.c`, to automatically select between `scalar`, `sse2`, `avx2` or `avx512` instruction set at runtime, depending on local host. This option is only valid for `x86`/`x64` systems. + + +### Building xxHash - Using vcpkg + +You can download and install xxHash using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install xxhash + +The xxHash port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + + +### Example + +The simplest example calls xxhash 64-bit variant as a one-shot function +generating a hash value from a single buffer, and invoked from a C/C++ program: + +```C +#include "xxhash.h" + + (...) + XXH64_hash_t hash = XXH64(buffer, size, seed); +} +``` + +Streaming variant is more involved, but makes it possible to provide data incrementally: + +```C +#include "stdlib.h" /* abort() */ +#include "xxhash.h" + + +XXH64_hash_t calcul_hash_streaming(FileHandler fh) +{ + /* create a hash state */ + XXH64_state_t* const state = XXH64_createState(); + if (state==NULL) abort(); + + size_t const bufferSize = SOME_SIZE; + void* const buffer = malloc(bufferSize); + if (buffer==NULL) abort(); + + /* Initialize state with selected seed */ + XXH64_hash_t const seed = 0; /* or any other value */ + if (XXH64_reset(state, seed) == XXH_ERROR) abort(); + + /* Feed the state with input data, any size, any number of times */ + (...) + while ( /* some data left */ ) { + size_t const length = get_more_data(buffer, bufferSize, fh); + if (XXH64_update(state, buffer, length) == XXH_ERROR) abort(); + (...) + } + (...) + + /* Produce the final hash value */ + XXH64_hash_t const hash = XXH64_digest(state); + + /* State could be re-used; but in this example, it is simply freed */ + free(buffer); + XXH64_freeState(state); + + return hash; +} +``` + + +### License + +The library files `xxhash.c` and `xxhash.h` are BSD licensed. +The utility `xxhsum` is GPL licensed. + + +### Other programming languages + +Beyond the C reference version, +xxHash is also available from many different programming languages, +thanks to great contributors. +They are [listed here](http://www.xxhash.com/#other-languages). + + +### Packaging status + +Many distributions bundle a package manager +which allows easy xxhash installation as both a `libxxhash` library +and `xxhsum` command line interface. + +[![Packaging status](https://repology.org/badge/vertical-allrepos/xxhash.svg)](https://repology.org/project/xxhash/versions) + + +### Special Thanks + +- Takayuki Matsuoka, aka @t-mat, for creating `xxhsum -c` and great support during early xxh releases +- Mathias Westerdahl, aka @JCash, for introducing the first version of `XXH64` +- Devin Hussey, aka @easyaspi314, for incredible low-level optimizations on `XXH3` and `XXH128` diff --git a/lib/cfl/lib/xxhash/appveyor.yml b/lib/cfl/lib/xxhash/appveyor.yml new file mode 100644 index 00000000000..7aef900fc22 --- /dev/null +++ b/lib/cfl/lib/xxhash/appveyor.yml @@ -0,0 +1,115 @@ +#---------------------------------# +# general configuration # +#---------------------------------# +version: 1.0.{build} +max_jobs: 2 + +#---------------------------------# +# environment configuration # +#---------------------------------# +clone_depth: 2 +environment: + matrix: + - COMPILER: "visual" + ARCH: "x64" + TEST_XXHSUM: "true" + - COMPILER: "visual" + ARCH: "Win32" + TEST_XXHSUM: "true" + - COMPILER: "visual" + ARCH: "Win32" + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + TEST_XXHSUM: "true" + - COMPILER: "visual" + ARCH: "ARM" +# Below tests are now disabled due to redundancy. +# Their equivalent already runs correctly on Github Actions. +# - COMPILER: "visual" +# ARCH: "x64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +# TEST_XXHSUM: "true" +# - COMPILER: "visual" +# ARCH: "ARM64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +# # note: ARM64 is not available with Visual Studio 14 2015, which is default for Appveyor + +# The following tests were also flacky on Appveyor, for various reasons. +# - COMPILER: "gcc" +# PLATFORM: "mingw64" +# - COMPILER: "gcc" +# PLATFORM: "mingw32" +# - COMPILER: "gcc" +# PLATFORM: "clang" + +install: + - ECHO Installing %COMPILER% %PLATFORM% %ARCH% + - MKDIR bin + - if [%COMPILER%]==[gcc] SET PATH_ORIGINAL=%PATH% + - if [%COMPILER%]==[gcc] ( + SET "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin" && + SET "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin" && + COPY C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe && + COPY C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe + ) + +#---------------------------------# +# build configuration # +#---------------------------------# +build_script: + - if [%PLATFORM%]==[mingw32] SET PATH=%PATH_MINGW32%;%PATH_ORIGINAL% + - if [%PLATFORM%]==[mingw64] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL% + - if [%PLATFORM%]==[clang] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL% + - ECHO *** + - ECHO Building %COMPILER% %PLATFORM% %ARCH% + - ECHO *** + + - if [%COMPILER%]==[gcc] ( + if [%PLATFORM%]==[clang] ( + clang -v + ) ELSE ( + gcc -v + ) + ) + - if [%COMPILER%]==[gcc] ( + echo ----- && + make -v && + echo ----- && + if not [%PLATFORM%]==[clang] ( + if [%PLATFORM%]==[mingw32] ( SET CPPFLAGS=-DPOOL_MT=0 ) && + make -B clean test MOREFLAGS=-Werror + ) ELSE ( + SET CXXFLAGS=--std=c++14 && + make -B clean test CC=clang CXX=clang++ MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wno-pass-failed" NO_C90_TEST=true + ) && + make -C tests/bench + ) + # note 1: strict c90 tests with clang fail, due to (erroneous) presence on `inline` keyword in some included system file + # note 2: multi-threading code doesn't work with mingw32, disabled through POOL_MT=0 + # note 3: clang requires C++14 to compile sort because its own code contains c++14-only code + + - if [%COMPILER%]==[visual] ( + cd cmake_unofficial && + cmake . -DCMAKE_BUILD_TYPE=Release -A %ARCH% -DXXHASH_C_FLAGS="/WX" && + cmake --build . --config Release + ) + +#---------------------------------# +# tests configuration # +#---------------------------------# +test_script: + # note: can only run x86 and x64 binaries on Appveyor + # note: if %COMPILER%==gcc, xxhsum was already tested within `make test` + - if [%TEST_XXHSUM%]==[true] ( + ECHO *** && + ECHO Testing %COMPILER% %PLATFORM% %ARCH% && + ECHO *** && + cd Release && + xxhsum.exe -bi1 && + ECHO ------- xxhsum tested ------- + ) + + +#---------------------------------# +# artifacts configuration # +#---------------------------------# +# none yet diff --git a/lib/cfl/lib/xxhash/cmake_unofficial/.gitignore b/lib/cfl/lib/xxhash/cmake_unofficial/.gitignore new file mode 100644 index 00000000000..93d9fe4f6d0 --- /dev/null +++ b/lib/cfl/lib/xxhash/cmake_unofficial/.gitignore @@ -0,0 +1,12 @@ +# cmake artifacts + +CMakeCache.txt +CMakeFiles +Makefile +cmake_install.cmake + + +# make compilation results + +*.dylib +*.a diff --git a/lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt b/lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt new file mode 100644 index 00000000000..d5456b018ab --- /dev/null +++ b/lib/cfl/lib/xxhash/cmake_unofficial/CMakeLists.txt @@ -0,0 +1,173 @@ +# To the extent possible under law, the author(s) have dedicated all +# copyright and related and neighboring rights to this software to +# the public domain worldwide. This software is distributed without +# any warranty. +# +# For details, see . + +cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) + +set(XXHASH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") + +file(STRINGS "${XXHASH_DIR}/xxhash.h" XXHASH_VERSION_MAJOR REGEX "^#define XXH_VERSION_MAJOR +([0-9]+) *$") +string(REGEX REPLACE "^#define XXH_VERSION_MAJOR +([0-9]+) *$" "\\1" XXHASH_VERSION_MAJOR "${XXHASH_VERSION_MAJOR}") +file(STRINGS "${XXHASH_DIR}/xxhash.h" XXHASH_VERSION_MINOR REGEX "^#define XXH_VERSION_MINOR +([0-9]+) *$") +string(REGEX REPLACE "^#define XXH_VERSION_MINOR +([0-9]+) *$" "\\1" XXHASH_VERSION_MINOR "${XXHASH_VERSION_MINOR}") +file(STRINGS "${XXHASH_DIR}/xxhash.h" XXHASH_VERSION_RELEASE REGEX "^#define XXH_VERSION_RELEASE +([0-9]+) *$") +string(REGEX REPLACE "^#define XXH_VERSION_RELEASE +([0-9]+) *$" "\\1" XXHASH_VERSION_RELEASE "${XXHASH_VERSION_RELEASE}") +set(XXHASH_VERSION_STRING "${XXHASH_VERSION_MAJOR}.${XXHASH_VERSION_MINOR}.${XXHASH_VERSION_RELEASE}") +set(XXHASH_LIB_VERSION ${XXHASH_VERSION_STRING}) +set(XXHASH_LIB_SOVERSION "${XXHASH_VERSION_MAJOR}") +mark_as_advanced(XXHASH_VERSION_MAJOR XXHASH_VERSION_MINOR XXHASH_VERSION_RELEASE XXHASH_VERSION_STRING XXHASH_LIB_VERSION XXHASH_LIB_SOVERSION) + +if("${CMAKE_VERSION}" VERSION_LESS "3.13") + #message(WARNING "CMake ${CMAKE_VERSION} has no CMP0077 policy: options will erase uncached/untyped normal vars!") +else() + cmake_policy (SET CMP0077 NEW) +endif() +if("${CMAKE_VERSION}" VERSION_LESS "3.0") + project(xxHash C) +else() + cmake_policy (SET CMP0048 NEW) + project(xxHash + VERSION ${XXHASH_VERSION_STRING} + LANGUAGES C) +endif() + +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Project build type" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE + PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel") +endif() +if(NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "xxHash build type: ${CMAKE_BUILD_TYPE}") +endif() +# Enable assert() statements in debug builds +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + add_compile_definitions(XXH_DEBUGLEVEL=1) +endif() + +option(BUILD_SHARED_LIBS "Build shared library" ON) +option(XXHASH_BUILD_XXHSUM "Build the xxhsum binary" ON) + +# If XXHASH is being bundled in another project, we don't want to +# install anything. However, we want to let people override this, so +# we'll use the XXHASH_BUNDLED_MODE variable to let them do that; just +# set it to OFF in your project before you add_subdirectory(xxhash/cmake_unofficial). +if(NOT DEFINED XXHASH_BUNDLED_MODE) + if("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + set(XXHASH_BUNDLED_MODE OFF) + else() + set(XXHASH_BUNDLED_MODE ON) + endif() +endif() +set(XXHASH_BUNDLED_MODE ${XXHASH_BUNDLED_MODE} CACHE BOOL "" FORCE) +mark_as_advanced(XXHASH_BUNDLED_MODE) + +# Allow people to choose whether to build shared or static libraries +# via the BUILD_SHARED_LIBS option unless we are in bundled mode, in +# which case we always use static libraries. +include(CMakeDependentOption) +CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON "NOT XXHASH_BUNDLED_MODE" OFF) + +# libxxhash +add_library(xxhash "${XXHASH_DIR}/xxhash.c") +add_library(${PROJECT_NAME}::xxhash ALIAS xxhash) + +target_include_directories(xxhash + PUBLIC + $ + $) +if (BUILD_SHARED_LIBS) + target_compile_definitions(xxhash PUBLIC XXH_EXPORT) +endif () +set_target_properties(xxhash PROPERTIES + SOVERSION "${XXHASH_LIB_SOVERSION}" + VERSION "${XXHASH_VERSION_STRING}") + +if(XXHASH_BUILD_XXHSUM) + set(XXHSUM_DIR "${XXHASH_DIR}/cli") + # xxhsum + add_executable(xxhsum "${XXHSUM_DIR}/xxhsum.c" + "${XXHSUM_DIR}/xsum_os_specific.c" + "${XXHSUM_DIR}/xsum_output.c" + "${XXHSUM_DIR}/xsum_sanity_check.c" + "${XXHSUM_DIR}/xsum_bench.c" + ) + add_executable(${PROJECT_NAME}::xxhsum ALIAS xxhsum) + + target_link_libraries(xxhsum PRIVATE xxhash) + target_include_directories(xxhsum PRIVATE "${XXHASH_DIR}") +endif(XXHASH_BUILD_XXHSUM) + +# Extra warning flags +include (CheckCCompilerFlag) +if (XXHASH_C_FLAGS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XXHASH_C_FLAGS}") +endif() + +if(NOT XXHASH_BUNDLED_MODE) + include(GNUInstallDirs) + + install(TARGETS xxhash + EXPORT xxHashTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(FILES "${XXHASH_DIR}/xxhash.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + install(FILES "${XXHASH_DIR}/xxh3.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + if(XXHASH_BUILD_XXHSUM) + install(TARGETS xxhsum + EXPORT xxHashTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + install(FILES "${XXHASH_DIR}/xxhsum.1" + DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") + endif(XXHASH_BUILD_XXHSUM) + + include(CMakePackageConfigHelpers) + + set(xxHash_VERSION_CONFIG "${PROJECT_BINARY_DIR}/xxHashConfigVersion.cmake") + set(xxHash_PROJECT_CONFIG "${PROJECT_BINARY_DIR}/xxHashConfig.cmake") + set(xxHash_TARGETS_CONFIG "${PROJECT_BINARY_DIR}/xxHashTargets.cmake") + set(xxHash_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/xxHash/") + write_basic_package_version_file(${xxHash_VERSION_CONFIG} + VERSION ${XXHASH_VERSION_STRING} + COMPATIBILITY AnyNewerVersion) + configure_package_config_file( + ${PROJECT_SOURCE_DIR}/xxHashConfig.cmake.in + ${xxHash_PROJECT_CONFIG} + INSTALL_DESTINATION ${xxHash_CONFIG_INSTALL_DIR}) + if("${CMAKE_VERSION}" VERSION_LESS "3.0") + set(XXHASH_EXPORT_SET xxhash) + if(XXHASH_BUILD_XXHSUM) + set(XXHASH_EXPORT_SET ${XXHASH_EXPORT_SET} xxhsum) + endif() + export(TARGETS ${XXHASH_EXPORT_SET} + FILE ${xxHash_TARGETS_CONFIG} + NAMESPACE ${PROJECT_NAME}::) + else() + export(EXPORT xxHashTargets + FILE ${xxHash_TARGETS_CONFIG} + NAMESPACE ${PROJECT_NAME}::) + endif() + + install(FILES ${xxHash_PROJECT_CONFIG} ${xxHash_VERSION_CONFIG} + DESTINATION ${xxHash_CONFIG_INSTALL_DIR}) + install(EXPORT xxHashTargets + DESTINATION ${xxHash_CONFIG_INSTALL_DIR} + NAMESPACE ${PROJECT_NAME}::) + + # configure and install pkg-config + set(PREFIX ${CMAKE_INSTALL_PREFIX}) + set(EXECPREFIX "\${prefix}") + set(INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") + set(LIBDIR "${CMAKE_INSTALL_LIBDIR}") + set(VERSION "${XXHASH_VERSION_STRING}") + configure_file(${XXHASH_DIR}/libxxhash.pc.in ${CMAKE_BINARY_DIR}/libxxhash.pc @ONLY) + + install(FILES ${CMAKE_BINARY_DIR}/libxxhash.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +endif(NOT XXHASH_BUNDLED_MODE) diff --git a/lib/cfl/lib/xxhash/cmake_unofficial/README.md b/lib/cfl/lib/xxhash/cmake_unofficial/README.md new file mode 100644 index 00000000000..66df7909a73 --- /dev/null +++ b/lib/cfl/lib/xxhash/cmake_unofficial/README.md @@ -0,0 +1,36 @@ + +## Usage + +### Way 1: import targets +Build xxHash targets: + + cd + mkdir build + cd build + cmake ../cmake_unofficial [options] + cmake --build . + cmake --build . --target install #optional + +Where possible options are: +- `-DXXHASH_BUILD_ENABLE_INLINE_API=`: adds xxhash.c for the `-DXXH_INLINE_ALL` api. ON by default. +- `-DXXHASH_BUILD_XXHSUM=`: build the command line binary. ON by default +- `-DBUILD_SHARED_LIBS=`: build dynamic library. ON by default. +- `-DCMAKE_INSTALL_PREFIX=`: use custom install prefix path. + +Add lines into downstream CMakeLists.txt: + + find_package(xxHash 0.7 CONFIG REQUIRED) + ... + target_link_libraries(MyTarget PRIVATE xxHash::xxhash) + +### Way 2: Add subdirectory +Add lines into downstream CMakeLists.txt: + + option(BUILD_SHARED_LIBS "Build shared libs" OFF) #optional + ... + set(XXHASH_BUILD_ENABLE_INLINE_API OFF) #optional + set(XXHASH_BUILD_XXHSUM OFF) #optional + add_subdirectory( EXCLUDE_FROM_ALL) + ... + target_link_libraries(MyTarget PRIVATE xxHash::xxhash) + diff --git a/lib/cfl/lib/xxhash/cmake_unofficial/xxHashConfig.cmake.in b/lib/cfl/lib/xxhash/cmake_unofficial/xxHashConfig.cmake.in new file mode 100644 index 00000000000..fd282bee667 --- /dev/null +++ b/lib/cfl/lib/xxhash/cmake_unofficial/xxHashConfig.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include(${CMAKE_CURRENT_LIST_DIR}/xxHashTargets.cmake) + diff --git a/lib/cfl/lib/xxhash/doc/README.md b/lib/cfl/lib/xxhash/doc/README.md new file mode 100644 index 00000000000..a73ad72907c --- /dev/null +++ b/lib/cfl/lib/xxhash/doc/README.md @@ -0,0 +1,9 @@ +xxHash Specification +======================= + +This directory contains material defining the xxHash algorithm. +It's described in [this specification document](xxhash_spec.md). + +The algorithm is also be illustrated by a [simple educational library](https://github.com/easyaspi314/xxhash-clean), +written by @easyaspi314 and designed for readability +(as opposed to the reference library which is designed for speed). diff --git a/lib/cfl/lib/xxhash/doc/xxhash.cry b/lib/cfl/lib/xxhash/doc/xxhash.cry new file mode 100644 index 00000000000..984e1c8b6b6 --- /dev/null +++ b/lib/cfl/lib/xxhash/doc/xxhash.cry @@ -0,0 +1,206 @@ +module xxhash where + +/** + * The 32-bit variant of xxHash. The first argument is the sequence + * of L bytes to hash. The second argument is a seed value. + */ +XXH32 : {L} (fin L) => [L][8] -> [32] -> [32] +XXH32 input seed = XXH32_avalanche acc1 + where (stripes16 # stripes4 # stripes1) = input + accR = foldl XXH32_rounds (XXH32_init seed) (split stripes16 : [L/16][16][8]) + accL = `(L % 2^^32) + if (`L:Integer) < 16 + then seed + PRIME32_5 + else XXH32_converge accR + acc4 = foldl XXH32_digest4 accL (split stripes4 : [(L%16)/4][4][8]) + acc1 = foldl XXH32_digest1 acc4 (stripes1 : [L%4][8]) + +/** + * The 64-bit variant of xxHash. The first argument is the sequence + * of L bytes to hash. The second argument is a seed value. + */ +XXH64 : {L} (fin L) => [L][8] -> [64] -> [64] +XXH64 input seed = XXH64_avalanche acc1 + where (stripes32 # stripes8 # stripes4 # stripes1) = input + accR = foldl XXH64_rounds (XXH64_init seed) (split stripes32 : [L/32][32][8]) + accL = `(L % 2^^64) + if (`L:Integer) < 32 + then seed + PRIME64_5 + else XXH64_converge accR + acc8 = foldl XXH64_digest8 accL (split stripes8 : [(L%32)/8][8][8]) + acc4 = foldl XXH64_digest4 acc8 (split stripes4 : [(L%8)/4][4][8]) + acc1 = foldl XXH64_digest1 acc4 (stripes1 : [L%4][8]) + +private + + //Utility functions + + /** + * Combines a sequence of bytes into a word using the little-endian + * convention. + */ + toLE bytes = join (reverse bytes) + + //32-bit xxHash helper functions + + //32-bit prime number constants + PRIME32_1 = 0x9E3779B1 : [32] + PRIME32_2 = 0x85EBCA77 : [32] + PRIME32_3 = 0xC2B2AE3D : [32] + PRIME32_4 = 0x27D4EB2F : [32] + PRIME32_5 = 0x165667B1 : [32] + + /** + * The property shows that the hexadecimal representation of the + * PRIME32 constants is the same as the binary representation. + */ + property PRIME32s_as_bits_correct = + (PRIME32_1 == 0b10011110001101110111100110110001) /\ + (PRIME32_2 == 0b10000101111010111100101001110111) /\ + (PRIME32_3 == 0b11000010101100101010111000111101) /\ + (PRIME32_4 == 0b00100111110101001110101100101111) /\ + (PRIME32_5 == 0b00010110010101100110011110110001) + + /** + * This function initializes the four internal accumulators of XXH32. + */ + XXH32_init : [32] -> [4][32] + XXH32_init seed = [acc1, acc2, acc3, acc4] + where acc1 = seed + PRIME32_1 + PRIME32_2 + acc2 = seed + PRIME32_2 + acc3 = seed + 0 + acc4 = seed - PRIME32_1 + + /** + * This processes a single lane of the main round function of XXH32. + */ + XXH32_round : [32] -> [32] -> [32] + XXH32_round accN laneN = ((accN + laneN * PRIME32_2) <<< 13) * PRIME32_1 + + /** + * This is the main round function of XXH32 and processes a stripe, + * i.e. 4 lanes with 4 bytes each. + */ + XXH32_rounds : [4][32] -> [16][8] -> [4][32] + XXH32_rounds accs stripe = + [ XXH32_round accN (toLE laneN) | accN <- accs | laneN <- split stripe ] + + /** + * This function combines the four lane accumulators into a single + * 32-bit value. + */ + XXH32_converge : [4][32] -> [32] + XXH32_converge [acc1, acc2, acc3, acc4] = + (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18) + + /** + * This function digests a four byte lane + */ + XXH32_digest4 : [32] -> [4][8] -> [32] + XXH32_digest4 acc lane = ((acc + toLE lane * PRIME32_3) <<< 17) * PRIME32_4 + + /** + * This function digests a single byte lane + */ + XXH32_digest1 : [32] -> [8] -> [32] + XXH32_digest1 acc lane = ((acc + (0 # lane) * PRIME32_5) <<< 11) * PRIME32_1 + + /** + * This function ensures that all input bits have a chance to impact + * any bit in the output digest, resulting in an unbiased + * distribution. + */ + XXH32_avalanche : [32] -> [32] + XXH32_avalanche acc0 = acc5 + where acc1 = acc0 ^ (acc0 >> 15) + acc2 = acc1 * PRIME32_2 + acc3 = acc2 ^ (acc2 >> 13) + acc4 = acc3 * PRIME32_3 + acc5 = acc4 ^ (acc4 >> 16) + + //64-bit xxHash helper functions + + //64-bit prime number constants + PRIME64_1 = 0x9E3779B185EBCA87 : [64] + PRIME64_2 = 0xC2B2AE3D27D4EB4F : [64] + PRIME64_3 = 0x165667B19E3779F9 : [64] + PRIME64_4 = 0x85EBCA77C2B2AE63 : [64] + PRIME64_5 = 0x27D4EB2F165667C5 : [64] + + /** + * The property shows that the hexadecimal representation of the + * PRIME64 constants is the same as the binary representation. + */ + property PRIME64s_as_bits_correct = + (PRIME64_1 == 0b1001111000110111011110011011000110000101111010111100101010000111) /\ + (PRIME64_2 == 0b1100001010110010101011100011110100100111110101001110101101001111) /\ + (PRIME64_3 == 0b0001011001010110011001111011000110011110001101110111100111111001) /\ + (PRIME64_4 == 0b1000010111101011110010100111011111000010101100101010111001100011) /\ + (PRIME64_5 == 0b0010011111010100111010110010111100010110010101100110011111000101) + + /** + * This function initializes the four internal accumulators of XXH64. + */ + XXH64_init : [64] -> [4][64] + XXH64_init seed = [acc1, acc2, acc3, acc4] + where acc1 = seed + PRIME64_1 + PRIME64_2 + acc2 = seed + PRIME64_2 + acc3 = seed + 0 + acc4 = seed - PRIME64_1 + + /** + * This processes a single lane of the main round function of XXH64. + */ + XXH64_round : [64] -> [64] -> [64] + XXH64_round accN laneN = ((accN + laneN * PRIME64_2) <<< 31) * PRIME64_1 + + /** + * This is the main round function of XXH64 and processes a stripe, + * i.e. 4 lanes with 8 bytes each. + */ + XXH64_rounds : [4][64] -> [32][8] -> [4][64] + XXH64_rounds accs stripe = + [ XXH64_round accN (toLE laneN) | accN <- accs | laneN <- split stripe ] + + /** + * This is a helper function, used to merge the four lane accumulators. + */ + mergeAccumulator : [64] -> [64] -> [64] + mergeAccumulator acc accN = (acc ^ XXH64_round 0 accN) * PRIME64_1 + PRIME64_4 + + /** + * This function combines the four lane accumulators into a single + * 64-bit value. + */ + XXH64_converge : [4][64] -> [64] + XXH64_converge [acc1, acc2, acc3, acc4] = + foldl mergeAccumulator ((acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18)) [acc1, acc2, acc3, acc4] + + /** + * This function digests an eight byte lane + */ + XXH64_digest8 : [64] -> [8][8] -> [64] + XXH64_digest8 acc lane = ((acc ^ XXH64_round 0 (toLE lane)) <<< 27) * PRIME64_1 + PRIME64_4 + + /** + * This function digests a four byte lane + */ + XXH64_digest4 : [64] -> [4][8] -> [64] + XXH64_digest4 acc lane = ((acc ^ (0 # toLE lane) * PRIME64_1) <<< 23) * PRIME64_2 + PRIME64_3 + + /** + * This function digests a single byte lane + */ + XXH64_digest1 : [64] -> [8] -> [64] + XXH64_digest1 acc lane = ((acc ^ (0 # lane) * PRIME64_5) <<< 11) * PRIME64_1 + + /** + * This function ensures that all input bits have a chance to impact + * any bit in the output digest, resulting in an unbiased + * distribution. + */ + XXH64_avalanche : [64] -> [64] + XXH64_avalanche acc0 = acc5 + where acc1 = acc0 ^ (acc0 >> 33) + acc2 = acc1 * PRIME64_2 + acc3 = acc2 ^ (acc2 >> 29) + acc4 = acc3 * PRIME64_3 + acc5 = acc4 ^ (acc4 >> 32) diff --git a/lib/cfl/lib/xxhash/doc/xxhash_spec.md b/lib/cfl/lib/xxhash/doc/xxhash_spec.md new file mode 100644 index 00000000000..80576d6bd17 --- /dev/null +++ b/lib/cfl/lib/xxhash/doc/xxhash_spec.md @@ -0,0 +1,351 @@ +xxHash fast digest algorithm +====================== + +### Notices + +Copyright (c) Yann Collet + +Permission is granted to copy and distribute this document +for any purpose and without charge, +including translations into other languages +and incorporation into compilations, +provided that the copyright notice and this notice are preserved, +and that any substantive changes or deletions from the original +are clearly marked. +Distribution of this document is unlimited. + +### Version + +0.1.1 (10/10/18) + + +Table of Contents +--------------------- +- [Introduction](#introduction) +- [XXH32 algorithm description](#xxh32-algorithm-description) +- [XXH64 algorithm description](#xxh64-algorithm-description) +- [Performance considerations](#performance-considerations) +- [Reference Implementation](#reference-implementation) + + +Introduction +---------------- + +This document describes the xxHash digest algorithm for both 32-bit and 64-bit variants, named `XXH32` and `XXH64`. The algorithm takes an input a message of arbitrary length and an optional seed value, then produces an output of 32 or 64-bit as "fingerprint" or "digest". + +xxHash is primarily designed for speed. It is labeled non-cryptographic, and is not meant to avoid intentional collisions (same digest for 2 different messages), or to prevent producing a message with a predefined digest. + +XXH32 is designed to be fast on 32-bit machines. +XXH64 is designed to be fast on 64-bit machines. +Both variants produce different output. +However, a given variant shall produce exactly the same output, irrespective of the cpu / os used. In particular, the result remains identical whatever the endianness and width of the cpu is. + +### Operation notations + +All operations are performed modulo {32,64} bits. Arithmetic overflows are expected. +`XXH32` uses 32-bit modular operations. `XXH64` uses 64-bit modular operations. + +- `+`: denotes modular addition +- `*`: denotes modular multiplication +- `X <<< s`: denotes the value obtained by circularly shifting (rotating) `X` left by `s` bit positions. +- `X >> s`: denotes the value obtained by shifting `X` right by s bit positions. Upper `s` bits become `0`. +- `X xor Y`: denotes the bit-wise XOR of `X` and `Y` (same width). + + +XXH32 Algorithm Description +------------------------------------- + +### Overview + +We begin by supposing that we have a message of any length `L` as input, and that we wish to find its digest. Here `L` is an arbitrary nonnegative integer; `L` may be zero. The following steps are performed to compute the digest of the message. + +The algorithm collect and transform input in _stripes_ of 16 bytes. The transforms are stored inside 4 "accumulators", each one storing an unsigned 32-bit value. Each accumulator can be processed independently in parallel, speeding up processing for cpu with multiple execution units. + +The algorithm uses 32-bits addition, multiplication, rotate, shift and xor operations. Many operations require some 32-bits prime number constants, all defined below: + +```c + static const u32 PRIME32_1 = 0x9E3779B1U; // 0b10011110001101110111100110110001 + static const u32 PRIME32_2 = 0x85EBCA77U; // 0b10000101111010111100101001110111 + static const u32 PRIME32_3 = 0xC2B2AE3DU; // 0b11000010101100101010111000111101 + static const u32 PRIME32_4 = 0x27D4EB2FU; // 0b00100111110101001110101100101111 + static const u32 PRIME32_5 = 0x165667B1U; // 0b00010110010101100110011110110001 +``` + +These constants are prime numbers, and feature a good mix of bits 1 and 0, neither too regular, nor too dissymmetric. These properties help dispersion capabilities. + +### Step 1. Initialize internal accumulators + +Each accumulator gets an initial value based on optional `seed` input. Since the `seed` is optional, it can be `0`. + +```c + u32 acc1 = seed + PRIME32_1 + PRIME32_2; + u32 acc2 = seed + PRIME32_2; + u32 acc3 = seed + 0; + u32 acc4 = seed - PRIME32_1; +``` + +#### Special case: input is less than 16 bytes + +When the input is too small (< 16 bytes), the algorithm will not process any stripes. Consequently, it will not make use of parallel accumulators. + +In this case, a simplified initialization is performed, using a single accumulator: + +```c + u32 acc = seed + PRIME32_5; +``` + +The algorithm then proceeds directly to step 4. + +### Step 2. Process stripes + +A stripe is a contiguous segment of 16 bytes. +It is evenly divided into 4 _lanes_, of 4 bytes each. +The first lane is used to update accumulator 1, the second lane is used to update accumulator 2, and so on. + +Each lane read its associated 32-bit value using __little-endian__ convention. + +For each {lane, accumulator}, the update process is called a _round_, and applies the following formula: + +```c + accN = accN + (laneN * PRIME32_2); + accN = accN <<< 13; + accN = accN * PRIME32_1; +``` + +This shuffles the bits so that any bit from input _lane_ impacts several bits in output _accumulator_. All operations are performed modulo 2^32. + +Input is consumed one full stripe at a time. Step 2 is looped as many times as necessary to consume the whole input, except for the last remaining bytes which cannot form a stripe (< 16 bytes). +When that happens, move to step 3. + +### Step 3. Accumulator convergence + +All 4 lane accumulators from the previous steps are merged to produce a single remaining accumulator of the same width (32-bit). The associated formula is as follows: + +```c + acc = (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18); +``` + +### Step 4. Add input length + +The input total length is presumed known at this stage. This step is just about adding the length to accumulator, so that it participates to final mixing. + +```c + acc = acc + (u32)inputLength; +``` + +Note that, if input length is so large that it requires more than 32-bits, only the lower 32-bits are added to the accumulator. + +### Step 5. Consume remaining input + +There may be up to 15 bytes remaining to consume from the input. +The final stage will digest them according to following pseudo-code: + +```c + while (remainingLength >= 4) { + lane = read_32bit_little_endian(input_ptr); + acc = acc + lane * PRIME32_3; + acc = (acc <<< 17) * PRIME32_4; + input_ptr += 4; remainingLength -= 4; + } + + while (remainingLength >= 1) { + lane = read_byte(input_ptr); + acc = acc + lane * PRIME32_5; + acc = (acc <<< 11) * PRIME32_1; + input_ptr += 1; remainingLength -= 1; + } +``` + +This process ensures that all input bytes are present in the final mix. + +### Step 6. Final mix (avalanche) + +The final mix ensures that all input bits have a chance to impact any bit in the output digest, resulting in an unbiased distribution. This is also called avalanche effect. + +```c + acc = acc xor (acc >> 15); + acc = acc * PRIME32_2; + acc = acc xor (acc >> 13); + acc = acc * PRIME32_3; + acc = acc xor (acc >> 16); +``` + +### Step 7. Output + +The `XXH32()` function produces an unsigned 32-bit value as output. + +For systems which require to store and/or display the result in binary or hexadecimal format, the canonical format is defined to reproduce the same value as the natural decimal format, hence follows __big-endian__ convention (most significant byte first). + + +XXH64 Algorithm Description +------------------------------------- + +### Overview + +`XXH64`'s algorithm structure is very similar to `XXH32` one. The major difference is that `XXH64` uses 64-bit arithmetic, speeding up memory transfer for 64-bit compliant systems, but also relying on cpu capability to efficiently perform 64-bit operations. + +The algorithm collects and transforms input in _stripes_ of 32 bytes. The transforms are stored inside 4 "accumulators", each one storing an unsigned 64-bit value. Each accumulator can be processed independently in parallel, speeding up processing for cpu with multiple execution units. + +The algorithm uses 64-bit addition, multiplication, rotate, shift and xor operations. Many operations require some 64-bit prime number constants, all defined below: + +```c + static const u64 PRIME64_1 = 0x9E3779B185EBCA87ULL; // 0b1001111000110111011110011011000110000101111010111100101010000111 + static const u64 PRIME64_2 = 0xC2B2AE3D27D4EB4FULL; // 0b1100001010110010101011100011110100100111110101001110101101001111 + static const u64 PRIME64_3 = 0x165667B19E3779F9ULL; // 0b0001011001010110011001111011000110011110001101110111100111111001 + static const u64 PRIME64_4 = 0x85EBCA77C2B2AE63ULL; // 0b1000010111101011110010100111011111000010101100101010111001100011 + static const u64 PRIME64_5 = 0x27D4EB2F165667C5ULL; // 0b0010011111010100111010110010111100010110010101100110011111000101 +``` + +These constants are prime numbers, and feature a good mix of bits 1 and 0, neither too regular, nor too dissymmetric. These properties help dispersion capabilities. + +### Step 1. Initialize internal accumulators + +Each accumulator gets an initial value based on optional `seed` input. Since the `seed` is optional, it can be `0`. + +```c + u64 acc1 = seed + PRIME64_1 + PRIME64_2; + u64 acc2 = seed + PRIME64_2; + u64 acc3 = seed + 0; + u64 acc4 = seed - PRIME64_1; +``` + +#### Special case: input is less than 32 bytes + +When the input is too small (< 32 bytes), the algorithm will not process any stripes. Consequently, it will not make use of parallel accumulators. + +In this case, a simplified initialization is performed, using a single accumulator: + +```c + u64 acc = seed + PRIME64_5; +``` + +The algorithm then proceeds directly to step 4. + +### Step 2. Process stripes + +A stripe is a contiguous segment of 32 bytes. +It is evenly divided into 4 _lanes_, of 8 bytes each. +The first lane is used to update accumulator 1, the second lane is used to update accumulator 2, and so on. + +Each lane read its associated 64-bit value using __little-endian__ convention. + +For each {lane, accumulator}, the update process is called a _round_, and applies the following formula: + +```c + round(accN,laneN): + accN = accN + (laneN * PRIME64_2); + accN = accN <<< 31; + return accN * PRIME64_1; +``` + +This shuffles the bits so that any bit from input _lane_ impacts several bits in output _accumulator_. All operations are performed modulo 2^64. + +Input is consumed one full stripe at a time. Step 2 is looped as many times as necessary to consume the whole input, except for the last remaining bytes which cannot form a stripe (< 32 bytes). +When that happens, move to step 3. + +### Step 3. Accumulator convergence + +All 4 lane accumulators from previous steps are merged to produce a single remaining accumulator of same width (64-bit). The associated formula is as follows. + +Note that accumulator convergence is more complex than 32-bit variant, and requires to define another function called _mergeAccumulator()_: + +```c + mergeAccumulator(acc,accN): + acc = acc xor round(0, accN); + acc = acc * PRIME64_1; + return acc + PRIME64_4; +``` + +which is then used in the convergence formula: + +```c + acc = (acc1 <<< 1) + (acc2 <<< 7) + (acc3 <<< 12) + (acc4 <<< 18); + acc = mergeAccumulator(acc, acc1); + acc = mergeAccumulator(acc, acc2); + acc = mergeAccumulator(acc, acc3); + acc = mergeAccumulator(acc, acc4); +``` + +### Step 4. Add input length + +The input total length is presumed known at this stage. This step is just about adding the length to accumulator, so that it participates to final mixing. + +```c + acc = acc + inputLength; +``` + +### Step 5. Consume remaining input + +There may be up to 31 bytes remaining to consume from the input. +The final stage will digest them according to following pseudo-code: + +```c + while (remainingLength >= 8) { + lane = read_64bit_little_endian(input_ptr); + acc = acc xor round(0, lane); + acc = (acc <<< 27) * PRIME64_1; + acc = acc + PRIME64_4; + input_ptr += 8; remainingLength -= 8; + } + + if (remainingLength >= 4) { + lane = read_32bit_little_endian(input_ptr); + acc = acc xor (lane * PRIME64_1); + acc = (acc <<< 23) * PRIME64_2; + acc = acc + PRIME64_3; + input_ptr += 4; remainingLength -= 4; + } + + while (remainingLength >= 1) { + lane = read_byte(input_ptr); + acc = acc xor (lane * PRIME64_5); + acc = (acc <<< 11) * PRIME64_1; + input_ptr += 1; remainingLength -= 1; + } +``` + +This process ensures that all input bytes are present in the final mix. + +### Step 6. Final mix (avalanche) + +The final mix ensures that all input bits have a chance to impact any bit in the output digest, resulting in an unbiased distribution. This is also called avalanche effect. + +```c + acc = acc xor (acc >> 33); + acc = acc * PRIME64_2; + acc = acc xor (acc >> 29); + acc = acc * PRIME64_3; + acc = acc xor (acc >> 32); +``` + +### Step 7. Output + +The `XXH64()` function produces an unsigned 64-bit value as output. + +For systems which require to store and/or display the result in binary or hexadecimal format, the canonical format is defined to reproduce the same value as the natural decimal format, hence follows __big-endian__ convention (most significant byte first). + +Performance considerations +---------------------------------- + +The xxHash algorithms are simple and compact to implement. They provide a system independent "fingerprint" or digest of a message of arbitrary length. + +The algorithm allows input to be streamed and processed in multiple steps. In such case, an internal buffer is needed to ensure data is presented to the algorithm in full stripes. + +On 64-bit systems, the 64-bit variant `XXH64` is generally faster to compute, so it is a recommended variant, even when only 32-bit are needed. + +On 32-bit systems though, positions are reversed: `XXH64` performance is reduced, due to its usage of 64-bit arithmetic. `XXH32` becomes a faster variant. + + +Reference Implementation +---------------------------------------- + +A reference library written in C is available at https://www.xxhash.com. +The web page also links to multiple other implementations written in many different languages. +It links to the [github project page](https://github.com/Cyan4973/xxHash) where an [issue board](https://github.com/Cyan4973/xxHash/issues) can be used for further public discussions on the topic. + + +Version changes +-------------------- +v0.7.3: Minor fixes +v0.1.1: added a note on rationale for selection of constants +v0.1.0: initial release diff --git a/lib/cfl/lib/xxhash/libxxhash.pc.in b/lib/cfl/lib/xxhash/libxxhash.pc.in new file mode 100644 index 00000000000..28c16448567 --- /dev/null +++ b/lib/cfl/lib/xxhash/libxxhash.pc.in @@ -0,0 +1,15 @@ +# xxHash - Extremely fast hash algorithm +# Copyright (C) 2012-2020, Yann Collet, Facebook +# BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + +prefix=@PREFIX@ +exec_prefix=@EXECPREFIX@ +includedir=${prefix}/@INCLUDEDIR@ +libdir=${exec_prefix}/@LIBDIR@ + +Name: xxhash +Description: extremely fast hash algorithm +URL: http://www.xxhash.com/ +Version: @VERSION@ +Libs: -L${libdir} -lxxhash +Cflags: -I${includedir} diff --git a/lib/cfl/lib/xxhash/xxh3.h b/lib/cfl/lib/xxhash/xxh3.h new file mode 100644 index 00000000000..f7dc1959b57 --- /dev/null +++ b/lib/cfl/lib/xxhash/xxh3.h @@ -0,0 +1,55 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Development source file for `xxh3` + * Copyright (C) 2019-2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * 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. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + +/* + * Note: This file used to host the source code of XXH3_* variants. + * during the development period. + * The source code is now properly integrated within xxhash.h. + * + * xxh3.h is no longer useful, + * but it is still provided for compatibility with source code + * which used to include it directly. + * + * Programs are now highly discouraged to include xxh3.h. + * Include `xxhash.h` instead, which is the officially supported interface. + * + * In the future, xxh3.h will start to generate warnings, then errors, + * then it will be removed from source package and from include directory. + */ + +/* Simulate the same impact as including the old xxh3.h source file */ + +#define XXH_INLINE_ALL +#include "xxhash.h" diff --git a/lib/cfl/lib/xxhash/xxh_x86dispatch.c b/lib/cfl/lib/xxhash/xxh_x86dispatch.c new file mode 100644 index 00000000000..399bad90458 --- /dev/null +++ b/lib/cfl/lib/xxhash/xxh_x86dispatch.c @@ -0,0 +1,770 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (C) 2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * 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. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + + +/*! + * @file xxh_x86dispatch.c + * + * Automatic dispatcher code for the @ref xxh3_family on x86-based targets. + * + * Optional add-on. + * + * **Compile this file with the default flags for your target.** Do not compile + * with flags like `-mavx*`, `-march=native`, or `/arch:AVX*`, there will be + * an error. See @ref XXH_X86DISPATCH_ALLOW_AVX for details. + * + * @defgroup dispatch x86 Dispatcher + * @{ + */ + +#if defined (__cplusplus) +extern "C" { +#endif + +#if !(defined(__x86_64__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64)) +# error "Dispatching is currently only supported on x86 and x86_64." +#endif + +/*! + * @def XXH_X86DISPATCH_ALLOW_AVX + * @brief Disables the AVX sanity check. + * + * Don't compile xxh_x86dispatch.c with options like `-mavx*`, `-march=native`, + * or `/arch:AVX*`. It is intended to be compiled for the minimum target, and + * it selectively enables SSE2, AVX2, and AVX512 when it is needed. + * + * Using this option _globally_ allows this feature, and therefore makes it + * undefined behavior to execute on any CPU without said feature. + * + * Even if the source code isn't directly using AVX intrinsics in a function, + * the compiler can still generate AVX code from autovectorization and by + * "upgrading" SSE2 intrinsics to use the VEX prefixes (a.k.a. AVX128). + * + * Use the same flags that you use to compile the rest of the program; this + * file will safely generate SSE2, AVX2, and AVX512 without these flags. + * + * Define XXH_X86DISPATCH_ALLOW_AVX to ignore this check, and feel free to open + * an issue if there is a target in the future where AVX is a default feature. + */ +#ifdef XXH_DOXYGEN +# define XXH_X86DISPATCH_ALLOW_AVX +#endif + +#if defined(__AVX__) && !defined(XXH_X86DISPATCH_ALLOW_AVX) +# error "Do not compile xxh_x86dispatch.c with AVX enabled! See the comment above." +#endif + +#ifdef __has_include +# define XXH_HAS_INCLUDE(header) __has_include(header) +#else +# define XXH_HAS_INCLUDE(header) 0 +#endif + +/*! + * @def XXH_DISPATCH_SCALAR + * @brief Enables/dispatching the scalar code path. + * + * If this is defined to 0, SSE2 support is assumed. This reduces code size + * when the scalar path is not needed. + * + * This is automatically defined to 0 when... + * - SSE2 support is enabled in the compiler + * - Targeting x86_64 + * - Targeting Android x86 + * - Targeting macOS + */ +#ifndef XXH_DISPATCH_SCALAR +# if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) /* SSE2 on by default */ \ + || defined(__x86_64__) || defined(_M_X64) /* x86_64 */ \ + || defined(__ANDROID__) || defined(__APPLEv__) /* Android or macOS */ +# define XXH_DISPATCH_SCALAR 0 /* disable */ +# else +# define XXH_DISPATCH_SCALAR 1 +# endif +#endif +/*! + * @def XXH_DISPATCH_AVX2 + * @brief Enables/disables dispatching for AVX2. + * + * This is automatically detected if it is not defined. + * - GCC 4.7 and later are known to support AVX2, but >4.9 is required for + * to get the AVX2 intrinsics and typedefs without -mavx -mavx2. + * - Visual Studio 2013 Update 2 and later are known to support AVX2. + * - The GCC/Clang internal header `` is detected. While this is + * not allowed to be included directly, it still appears in the builtin + * include path and is detectable with `__has_include`. + * + * @see XXH_AVX2 + */ +#ifndef XXH_DISPATCH_AVX2 +# if (defined(__GNUC__) && (__GNUC__ > 4)) /* GCC 5.0+ */ \ + || (defined(_MSC_VER) && _MSC_VER >= 1900) /* VS 2015+ */ \ + || (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 180030501) /* VS 2013 Update 2 */ \ + || XXH_HAS_INCLUDE() /* GCC/Clang internal header */ +# define XXH_DISPATCH_AVX2 1 /* enable dispatch towards AVX2 */ +# else +# define XXH_DISPATCH_AVX2 0 +# endif +#endif /* XXH_DISPATCH_AVX2 */ + +/*! + * @def XXH_DISPATCH_AVX512 + * @brief Enables/disables dispatching for AVX512. + * + * Automatically detected if one of the following conditions is met: + * - GCC 4.9 and later are known to support AVX512. + * - Visual Studio 2017 and later are known to support AVX2. + * - The GCC/Clang internal header `` is detected. While this + * is not allowed to be included directly, it still appears in the builtin + * include path and is detectable with `__has_include`. + * + * @see XXH_AVX512 + */ +#ifndef XXH_DISPATCH_AVX512 +# if (defined(__GNUC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))) /* GCC 4.9+ */ \ + || (defined(_MSC_VER) && _MSC_VER >= 1910) /* VS 2017+ */ \ + || XXH_HAS_INCLUDE() /* GCC/Clang internal header */ +# define XXH_DISPATCH_AVX512 1 /* enable dispatch towards AVX512 */ +# else +# define XXH_DISPATCH_AVX512 0 +# endif +#endif /* XXH_DISPATCH_AVX512 */ + +/*! + * @def XXH_TARGET_SSE2 + * @brief Allows a function to be compiled with SSE2 intrinsics. + * + * Uses `__attribute__((__target__("sse2")))` on GCC to allow SSE2 to be used + * even with `-mno-sse2`. + * + * @def XXH_TARGET_AVX2 + * @brief Like @ref XXH_TARGET_SSE2, but for AVX2. + * + * @def XXH_TARGET_AVX512 + * @brief Like @ref XXH_TARGET_SSE2, but for AVX512. + */ +#if defined(__GNUC__) +# include /* SSE2 */ +# if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512 +# include /* AVX2, AVX512F */ +# endif +# define XXH_TARGET_SSE2 __attribute__((__target__("sse2"))) +# define XXH_TARGET_AVX2 __attribute__((__target__("avx2"))) +# define XXH_TARGET_AVX512 __attribute__((__target__("avx512f"))) +#elif defined(_MSC_VER) +# include +# define XXH_TARGET_SSE2 +# define XXH_TARGET_AVX2 +# define XXH_TARGET_AVX512 +#else +# error "Dispatching is currently not supported for your compiler." +#endif + +#ifdef XXH_DISPATCH_DEBUG +/* debug logging */ +# include +# define XXH_debugPrint(str) { fprintf(stderr, "DEBUG: xxHash dispatch: %s \n", str); fflush(NULL); } +#else +# define XXH_debugPrint(str) ((void)0) +# undef NDEBUG /* avoid redefinition */ +# define NDEBUG +#endif +#include + +#define XXH_INLINE_ALL +#define XXH_X86DISPATCH +#include "xxhash.h" + +/* + * Support both AT&T and Intel dialects + * + * GCC doesn't convert AT&T syntax to Intel syntax, and will error out if + * compiled with -masm=intel. Instead, it supports dialect switching with + * curly braces: { AT&T syntax | Intel syntax } + * + * Clang's integrated assembler automatically converts AT&T syntax to Intel if + * needed, making the dialect switching useless (it isn't even supported). + * + * Note: Comments are written in the inline assembly itself. + */ +#ifdef __clang__ +# define XXH_I_ATT(intel, att) att "\n\t" +#else +# define XXH_I_ATT(intel, att) "{" att "|" intel "}\n\t" +#endif + +/*! + * @internal + * @brief Runs CPUID. + * + * @param eax , ecx The parameters to pass to CPUID, %eax and %ecx respectively. + * @param abcd The array to store the result in, `{ eax, ebx, ecx, edx }` + */ +static void XXH_cpuid(xxh_u32 eax, xxh_u32 ecx, xxh_u32* abcd) +{ +#if defined(_MSC_VER) + __cpuidex(abcd, eax, ecx); +#else + xxh_u32 ebx, edx; +# if defined(__i386__) && defined(__PIC__) + __asm__( + "# Call CPUID\n\t" + "#\n\t" + "# On 32-bit x86 with PIC enabled, we are not allowed to overwrite\n\t" + "# EBX, so we use EDI instead.\n\t" + XXH_I_ATT("mov edi, ebx", "movl %%ebx, %%edi") + XXH_I_ATT("cpuid", "cpuid" ) + XXH_I_ATT("xchg edi, ebx", "xchgl %%ebx, %%edi") + : "=D" (ebx), +# else + __asm__( + "# Call CPUID\n\t" + XXH_I_ATT("cpuid", "cpuid") + : "=b" (ebx), +# endif + "+a" (eax), "+c" (ecx), "=d" (edx)); + abcd[0] = eax; + abcd[1] = ebx; + abcd[2] = ecx; + abcd[3] = edx; +#endif +} + +/* + * Modified version of Intel's guide + * https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family + */ + +#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512 +/*! + * @internal + * @brief Runs `XGETBV`. + * + * While the CPU may support AVX2, the operating system might not properly save + * the full YMM/ZMM registers. + * + * xgetbv is used for detecting this: Any compliant operating system will define + * a set of flags in the xcr0 register indicating how it saves the AVX registers. + * + * You can manually disable this flag on Windows by running, as admin: + * + * bcdedit.exe /set xsavedisable 1 + * + * and rebooting. Run the same command with 0 to re-enable it. + */ +static xxh_u64 XXH_xgetbv(void) +{ +#if defined(_MSC_VER) + return _xgetbv(0); /* min VS2010 SP1 compiler is required */ +#else + xxh_u32 xcr0_lo, xcr0_hi; + __asm__( + "# Call XGETBV\n\t" + "#\n\t" + "# Older assemblers (e.g. macOS's ancient GAS version) don't support\n\t" + "# the XGETBV opcode, so we encode it by hand instead.\n\t" + "# See for details.\n\t" + ".byte 0x0f, 0x01, 0xd0\n\t" + : "=a" (xcr0_lo), "=d" (xcr0_hi) : "c" (0)); + return xcr0_lo | ((xxh_u64)xcr0_hi << 32); +#endif +} +#endif + +#define XXH_SSE2_CPUID_MASK (1 << 26) +#define XXH_OSXSAVE_CPUID_MASK ((1 << 26) | (1 << 27)) +#define XXH_AVX2_CPUID_MASK (1 << 5) +#define XXH_AVX2_XGETBV_MASK ((1 << 2) | (1 << 1)) +#define XXH_AVX512F_CPUID_MASK (1 << 16) +#define XXH_AVX512F_XGETBV_MASK ((7 << 5) | (1 << 2) | (1 << 1)) + +/*! + * @internal + * @brief Returns the best XXH3 implementation. + * + * Runs various CPUID/XGETBV tests to try and determine the best implementation. + * + * @ret The best @ref XXH_VECTOR implementation. + * @see XXH_VECTOR_TYPES + */ +static int XXH_featureTest(void) +{ + xxh_u32 abcd[4]; + xxh_u32 max_leaves; + int best = XXH_SCALAR; +#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512 + xxh_u64 xgetbv_val; +#endif +#if defined(__GNUC__) && defined(__i386__) + xxh_u32 cpuid_supported; + __asm__( + "# For the sake of ruthless backwards compatibility, check if CPUID\n\t" + "# is supported in the EFLAGS on i386.\n\t" + "# This is not necessary on x86_64 - CPUID is mandatory.\n\t" + "# The ID flag (bit 21) in the EFLAGS register indicates support\n\t" + "# for the CPUID instruction. If a software procedure can set and\n\t" + "# clear this flag, the processor executing the procedure supports\n\t" + "# the CPUID instruction.\n\t" + "# \n\t" + "#\n\t" + "# Routine is from .\n\t" + + "# Save EFLAGS\n\t" + XXH_I_ATT("pushfd", "pushfl" ) + "# Store EFLAGS\n\t" + XXH_I_ATT("pushfd", "pushfl" ) + "# Invert the ID bit in stored EFLAGS\n\t" + XXH_I_ATT("xor dword ptr[esp], 0x200000", "xorl $0x200000, (%%esp)") + "# Load stored EFLAGS (with ID bit inverted)\n\t" + XXH_I_ATT("popfd", "popfl" ) + "# Store EFLAGS again (ID bit may or not be inverted)\n\t" + XXH_I_ATT("pushfd", "pushfl" ) + "# eax = modified EFLAGS (ID bit may or may not be inverted)\n\t" + XXH_I_ATT("pop eax", "popl %%eax" ) + "# eax = whichever bits were changed\n\t" + XXH_I_ATT("xor eax, dword ptr[esp]", "xorl (%%esp), %%eax" ) + "# Restore original EFLAGS\n\t" + XXH_I_ATT("popfd", "popfl" ) + "# eax = zero if ID bit can't be changed, else non-zero\n\t" + XXH_I_ATT("and eax, 0x200000", "andl $0x200000, %%eax" ) + : "=a" (cpuid_supported) :: "cc"); + + if (XXH_unlikely(!cpuid_supported)) { + XXH_debugPrint("CPUID support is not detected!"); + return best; + } + +#endif + /* Check how many CPUID pages we have */ + XXH_cpuid(0, 0, abcd); + max_leaves = abcd[0]; + + /* Shouldn't happen on hardware, but happens on some QEMU configs. */ + if (XXH_unlikely(max_leaves == 0)) { + XXH_debugPrint("Max CPUID leaves == 0!"); + return best; + } + + /* Check for SSE2, OSXSAVE and xgetbv */ + XXH_cpuid(1, 0, abcd); + + /* + * Test for SSE2. The check is redundant on x86_64, but it doesn't hurt. + */ + if (XXH_unlikely((abcd[3] & XXH_SSE2_CPUID_MASK) != XXH_SSE2_CPUID_MASK)) + return best; + + XXH_debugPrint("SSE2 support detected."); + + best = XXH_SSE2; +#if XXH_DISPATCH_AVX2 || XXH_DISPATCH_AVX512 + /* Make sure we have enough leaves */ + if (XXH_unlikely(max_leaves < 7)) + return best; + + /* Test for OSXSAVE and XGETBV */ + if ((abcd[2] & XXH_OSXSAVE_CPUID_MASK) != XXH_OSXSAVE_CPUID_MASK) + return best; + + /* CPUID check for AVX features */ + XXH_cpuid(7, 0, abcd); + + xgetbv_val = XXH_xgetbv(); +#if XXH_DISPATCH_AVX2 + /* Validate that AVX2 is supported by the CPU */ + if ((abcd[1] & XXH_AVX2_CPUID_MASK) != XXH_AVX2_CPUID_MASK) + return best; + + /* Validate that the OS supports YMM registers */ + if ((xgetbv_val & XXH_AVX2_XGETBV_MASK) != XXH_AVX2_XGETBV_MASK) { + XXH_debugPrint("AVX2 supported by the CPU, but not the OS."); + return best; + } + + /* AVX2 supported */ + XXH_debugPrint("AVX2 support detected."); + best = XXH_AVX2; +#endif +#if XXH_DISPATCH_AVX512 + /* Check if AVX512F is supported by the CPU */ + if ((abcd[1] & XXH_AVX512F_CPUID_MASK) != XXH_AVX512F_CPUID_MASK) { + XXH_debugPrint("AVX512F not supported by CPU"); + return best; + } + + /* Validate that the OS supports ZMM registers */ + if ((xgetbv_val & XXH_AVX512F_XGETBV_MASK) != XXH_AVX512F_XGETBV_MASK) { + XXH_debugPrint("AVX512F supported by the CPU, but not the OS."); + return best; + } + + /* AVX512F supported */ + XXH_debugPrint("AVX512F support detected."); + best = XXH_AVX512; +#endif +#endif + return best; +} + + +/* === Vector implementations === */ + +/*! + * @internal + * @brief Defines the various dispatch functions. + * + * TODO: Consolidate? + * + * @param suffix The suffix for the functions, e.g. sse2 or scalar + * @param target XXH_TARGET_* or empty. + */ +#define XXH_DEFINE_DISPATCH_FUNCS(suffix, target) \ + \ +/* === XXH3, default variants === */ \ + \ +XXH_NO_INLINE target XXH64_hash_t \ +XXHL64_default_##suffix(const void* XXH_RESTRICT input, size_t len) \ +{ \ + return XXH3_hashLong_64b_internal( \ + input, len, XXH3_kSecret, sizeof(XXH3_kSecret), \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix \ + ); \ +} \ + \ +/* === XXH3, Seeded variants === */ \ + \ +XXH_NO_INLINE target XXH64_hash_t \ +XXHL64_seed_##suffix(const void* XXH_RESTRICT input, size_t len, \ + XXH64_hash_t seed) \ +{ \ + return XXH3_hashLong_64b_withSeed_internal( \ + input, len, seed, XXH3_accumulate_512_##suffix, \ + XXH3_scrambleAcc_##suffix, XXH3_initCustomSecret_##suffix \ + ); \ +} \ + \ +/* === XXH3, Secret variants === */ \ + \ +XXH_NO_INLINE target XXH64_hash_t \ +XXHL64_secret_##suffix(const void* XXH_RESTRICT input, size_t len, \ + const void* secret, size_t secretLen) \ +{ \ + return XXH3_hashLong_64b_internal( \ + input, len, secret, secretLen, \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix \ + ); \ +} \ + \ +/* === XXH3 update variants === */ \ + \ +XXH_NO_INLINE target XXH_errorcode \ +XXH3_update_##suffix(XXH3_state_t* state, const void* input, size_t len) \ +{ \ + return XXH3_update(state, (const xxh_u8*)input, len, \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix); \ +} \ + \ +/* === XXH128 default variants === */ \ + \ +XXH_NO_INLINE target XXH128_hash_t \ +XXHL128_default_##suffix(const void* XXH_RESTRICT input, size_t len) \ +{ \ + return XXH3_hashLong_128b_internal( \ + input, len, XXH3_kSecret, sizeof(XXH3_kSecret), \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix \ + ); \ +} \ + \ +/* === XXH128 Secret variants === */ \ + \ +XXH_NO_INLINE target XXH128_hash_t \ +XXHL128_secret_##suffix(const void* XXH_RESTRICT input, size_t len, \ + const void* XXH_RESTRICT secret, size_t secretLen) \ +{ \ + return XXH3_hashLong_128b_internal( \ + input, len, (const xxh_u8*)secret, secretLen, \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix); \ +} \ + \ +/* === XXH128 Seeded variants === */ \ + \ +XXH_NO_INLINE target XXH128_hash_t \ +XXHL128_seed_##suffix(const void* XXH_RESTRICT input, size_t len, \ + XXH64_hash_t seed) \ +{ \ + return XXH3_hashLong_128b_withSeed_internal(input, len, seed, \ + XXH3_accumulate_512_##suffix, XXH3_scrambleAcc_##suffix, \ + XXH3_initCustomSecret_##suffix); \ +} + +/* End XXH_DEFINE_DISPATCH_FUNCS */ + +#if XXH_DISPATCH_SCALAR +XXH_DEFINE_DISPATCH_FUNCS(scalar, /* nothing */) +#endif +XXH_DEFINE_DISPATCH_FUNCS(sse2, XXH_TARGET_SSE2) +#if XXH_DISPATCH_AVX2 +XXH_DEFINE_DISPATCH_FUNCS(avx2, XXH_TARGET_AVX2) +#endif +#if XXH_DISPATCH_AVX512 +XXH_DEFINE_DISPATCH_FUNCS(avx512, XXH_TARGET_AVX512) +#endif +#undef XXH_DEFINE_DISPATCH_FUNCS + +/* ==== Dispatchers ==== */ + +typedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_default)(const void* XXH_RESTRICT, size_t); + +typedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_withSeed)(const void* XXH_RESTRICT, size_t, XXH64_hash_t); + +typedef XXH64_hash_t (*XXH3_dispatchx86_hashLong64_withSecret)(const void* XXH_RESTRICT, size_t, const void* XXH_RESTRICT, size_t); + +typedef XXH_errorcode (*XXH3_dispatchx86_update)(XXH3_state_t*, const void*, size_t); + +typedef struct { + XXH3_dispatchx86_hashLong64_default hashLong64_default; + XXH3_dispatchx86_hashLong64_withSeed hashLong64_seed; + XXH3_dispatchx86_hashLong64_withSecret hashLong64_secret; + XXH3_dispatchx86_update update; +} XXH_dispatchFunctions_s; + +#define XXH_NB_DISPATCHES 4 + +/*! + * @internal + * @brief Table of dispatchers for @ref XXH3_64bits(). + * + * @pre The indices must match @ref XXH_VECTOR_TYPE. + */ +static const XXH_dispatchFunctions_s XXH_kDispatch[XXH_NB_DISPATCHES] = { +#if XXH_DISPATCH_SCALAR + /* Scalar */ { XXHL64_default_scalar, XXHL64_seed_scalar, XXHL64_secret_scalar, XXH3_update_scalar }, +#else + /* Scalar */ { NULL, NULL, NULL, NULL }, +#endif + /* SSE2 */ { XXHL64_default_sse2, XXHL64_seed_sse2, XXHL64_secret_sse2, XXH3_update_sse2 }, +#if XXH_DISPATCH_AVX2 + /* AVX2 */ { XXHL64_default_avx2, XXHL64_seed_avx2, XXHL64_secret_avx2, XXH3_update_avx2 }, +#else + /* AVX2 */ { NULL, NULL, NULL, NULL }, +#endif +#if XXH_DISPATCH_AVX512 + /* AVX512 */ { XXHL64_default_avx512, XXHL64_seed_avx512, XXHL64_secret_avx512, XXH3_update_avx512 } +#else + /* AVX512 */ { NULL, NULL, NULL, NULL } +#endif +}; +/*! + * @internal + * @brief The selected dispatch table for @ref XXH3_64bits(). + */ +static XXH_dispatchFunctions_s XXH_g_dispatch = { NULL, NULL, NULL, NULL }; + + +typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_default)(const void* XXH_RESTRICT, size_t); + +typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSeed)(const void* XXH_RESTRICT, size_t, XXH64_hash_t); + +typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSecret)(const void* XXH_RESTRICT, size_t, const void* XXH_RESTRICT, size_t); + +typedef struct { + XXH3_dispatchx86_hashLong128_default hashLong128_default; + XXH3_dispatchx86_hashLong128_withSeed hashLong128_seed; + XXH3_dispatchx86_hashLong128_withSecret hashLong128_secret; + XXH3_dispatchx86_update update; +} XXH_dispatch128Functions_s; + + +/*! + * @internal + * @brief Table of dispatchers for @ref XXH3_128bits(). + * + * @pre The indices must match @ref XXH_VECTOR_TYPE. + */ +static const XXH_dispatch128Functions_s XXH_kDispatch128[XXH_NB_DISPATCHES] = { +#if XXH_DISPATCH_SCALAR + /* Scalar */ { XXHL128_default_scalar, XXHL128_seed_scalar, XXHL128_secret_scalar, XXH3_update_scalar }, +#else + /* Scalar */ { NULL, NULL, NULL, NULL }, +#endif + /* SSE2 */ { XXHL128_default_sse2, XXHL128_seed_sse2, XXHL128_secret_sse2, XXH3_update_sse2 }, +#if XXH_DISPATCH_AVX2 + /* AVX2 */ { XXHL128_default_avx2, XXHL128_seed_avx2, XXHL128_secret_avx2, XXH3_update_avx2 }, +#else + /* AVX2 */ { NULL, NULL, NULL, NULL }, +#endif +#if XXH_DISPATCH_AVX512 + /* AVX512 */ { XXHL128_default_avx512, XXHL128_seed_avx512, XXHL128_secret_avx512, XXH3_update_avx512 } +#else + /* AVX512 */ { NULL, NULL, NULL, NULL } +#endif +}; + +/*! + * @internal + * @brief The selected dispatch table for @ref XXH3_64bits(). + */ +static XXH_dispatch128Functions_s XXH_g_dispatch128 = { NULL, NULL, NULL, NULL }; + +/*! + * @internal + * @brief Runs a CPUID check and sets the correct dispatch tables. + */ +static void XXH_setDispatch(void) +{ + int vecID = XXH_featureTest(); + XXH_STATIC_ASSERT(XXH_AVX512 == XXH_NB_DISPATCHES-1); + assert(XXH_SCALAR <= vecID && vecID <= XXH_AVX512); +#if !XXH_DISPATCH_SCALAR + assert(vecID != XXH_SCALAR); +#endif +#if !XXH_DISPATCH_AVX512 + assert(vecID != XXH_AVX512); +#endif +#if !XXH_DISPATCH_AVX2 + assert(vecID != XXH_AVX2); +#endif + XXH_g_dispatch = XXH_kDispatch[vecID]; + XXH_g_dispatch128 = XXH_kDispatch128[vecID]; +} + + +/* ==== XXH3 public functions ==== */ + +static XXH64_hash_t +XXH3_hashLong_64b_defaultSecret_selection(const void* input, size_t len, + XXH64_hash_t seed64, const xxh_u8* secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + if (XXH_g_dispatch.hashLong64_default == NULL) XXH_setDispatch(); + return XXH_g_dispatch.hashLong64_default(input, len); +} + +XXH64_hash_t XXH3_64bits_dispatch(const void* input, size_t len) +{ + return XXH3_64bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_defaultSecret_selection); +} + +static XXH64_hash_t +XXH3_hashLong_64b_withSeed_selection(const void* input, size_t len, + XXH64_hash_t seed64, const xxh_u8* secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + if (XXH_g_dispatch.hashLong64_seed == NULL) XXH_setDispatch(); + return XXH_g_dispatch.hashLong64_seed(input, len, seed64); +} + +XXH64_hash_t XXH3_64bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed_selection); +} + +static XXH64_hash_t +XXH3_hashLong_64b_withSecret_selection(const void* input, size_t len, + XXH64_hash_t seed64, const xxh_u8* secret, size_t secretLen) +{ + (void)seed64; + if (XXH_g_dispatch.hashLong64_secret == NULL) XXH_setDispatch(); + return XXH_g_dispatch.hashLong64_secret(input, len, secret, secretLen); +} + +XXH64_hash_t XXH3_64bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen) +{ + return XXH3_64bits_internal(input, len, 0, secret, secretLen, XXH3_hashLong_64b_withSecret_selection); +} + +XXH_errorcode +XXH3_64bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len) +{ + if (XXH_g_dispatch.update == NULL) XXH_setDispatch(); + return XXH_g_dispatch.update(state, (const xxh_u8*)input, len); +} + + +/* ==== XXH128 public functions ==== */ + +static XXH128_hash_t +XXH3_hashLong_128b_defaultSecret_selection(const void* input, size_t len, + XXH64_hash_t seed64, const void* secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + if (XXH_g_dispatch128.hashLong128_default == NULL) XXH_setDispatch(); + return XXH_g_dispatch128.hashLong128_default(input, len); +} + +XXH128_hash_t XXH3_128bits_dispatch(const void* input, size_t len) +{ + return XXH3_128bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_128b_defaultSecret_selection); +} + +static XXH128_hash_t +XXH3_hashLong_128b_withSeed_selection(const void* input, size_t len, + XXH64_hash_t seed64, const void* secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + if (XXH_g_dispatch128.hashLong128_seed == NULL) XXH_setDispatch(); + return XXH_g_dispatch128.hashLong128_seed(input, len, seed64); +} + +XXH128_hash_t XXH3_128bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_128b_withSeed_selection); +} + +static XXH128_hash_t +XXH3_hashLong_128b_withSecret_selection(const void* input, size_t len, + XXH64_hash_t seed64, const void* secret, size_t secretLen) +{ + (void)seed64; + if (XXH_g_dispatch128.hashLong128_secret == NULL) XXH_setDispatch(); + return XXH_g_dispatch128.hashLong128_secret(input, len, secret, secretLen); +} + +XXH128_hash_t XXH3_128bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen) +{ + return XXH3_128bits_internal(input, len, 0, secret, secretLen, XXH3_hashLong_128b_withSecret_selection); +} + +XXH_errorcode +XXH3_128bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len) +{ + if (XXH_g_dispatch128.update == NULL) XXH_setDispatch(); + return XXH_g_dispatch128.update(state, (const xxh_u8*)input, len); +} + +#if defined (__cplusplus) +} +#endif +/*! @} */ diff --git a/lib/cfl/lib/xxhash/xxh_x86dispatch.h b/lib/cfl/lib/xxhash/xxh_x86dispatch.h new file mode 100644 index 00000000000..6bc17bcbbe4 --- /dev/null +++ b/lib/cfl/lib/xxhash/xxh_x86dispatch.h @@ -0,0 +1,86 @@ +/* + * xxHash - XXH3 Dispatcher for x86-based targets + * Copyright (C) 2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * 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. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + +#ifndef XXH_X86DISPATCH_H_13563687684 +#define XXH_X86DISPATCH_H_13563687684 + +#include "xxhash.h" /* XXH64_hash_t, XXH3_state_t */ + +#if defined (__cplusplus) +extern "C" { +#endif + +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_dispatch(const void* input, size_t len); +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed); +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen); +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len); + +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_dispatch(const void* input, size_t len); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed_dispatch(const void* input, size_t len, XXH64_hash_t seed); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret_dispatch(const void* input, size_t len, const void* secret, size_t secretLen); +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update_dispatch(XXH3_state_t* state, const void* input, size_t len); + +#if defined (__cplusplus) +} +#endif + + +/* automatic replacement of XXH3 functions. + * can be disabled by setting XXH_DISPATCH_DISABLE_REPLACE */ +#ifndef XXH_DISPATCH_DISABLE_REPLACE + +# undef XXH3_64bits +# define XXH3_64bits XXH3_64bits_dispatch +# undef XXH3_64bits_withSeed +# define XXH3_64bits_withSeed XXH3_64bits_withSeed_dispatch +# undef XXH3_64bits_withSecret +# define XXH3_64bits_withSecret XXH3_64bits_withSecret_dispatch +# undef XXH3_64bits_update +# define XXH3_64bits_update XXH3_64bits_update_dispatch + +# undef XXH128 +# define XXH128 XXH3_128bits_withSeed_dispatch +# define XXH3_128bits XXH3_128bits_dispatch +# undef XXH3_128bits +# define XXH3_128bits XXH3_128bits_dispatch +# undef XXH3_128bits_withSeed +# define XXH3_128bits_withSeed XXH3_128bits_withSeed_dispatch +# undef XXH3_128bits_withSecret +# define XXH3_128bits_withSecret XXH3_128bits_withSecret_dispatch +# undef XXH3_128bits_update +# define XXH3_128bits_update XXH3_128bits_update_dispatch + +#endif /* XXH_DISPATCH_DISABLE_REPLACE */ + +#endif /* XXH_X86DISPATCH_H_13563687684 */ diff --git a/lib/cfl/lib/xxhash/xxhash.c b/lib/cfl/lib/xxhash/xxhash.c new file mode 100644 index 00000000000..0fae88c5d67 --- /dev/null +++ b/lib/cfl/lib/xxhash/xxhash.c @@ -0,0 +1,43 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Copyright (C) 2012-2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * 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. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ + + +/* + * xxhash.c instantiates functions defined in xxhash.h + */ + +#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */ +#define XXH_IMPLEMENTATION /* access definitions */ + +#include "xxhash.h" diff --git a/lib/cfl/lib/xxhash/xxhash.h b/lib/cfl/lib/xxhash/xxhash.h new file mode 100644 index 00000000000..08ab7945723 --- /dev/null +++ b/lib/cfl/lib/xxhash/xxhash.h @@ -0,0 +1,5580 @@ +/* + * xxHash - Extremely Fast Hash algorithm + * Header File + * Copyright (C) 2012-2020 Yann Collet + * + * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + * + * 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. + * + * You can contact the author at: + * - xxHash homepage: https://www.xxhash.com + * - xxHash source repository: https://github.com/Cyan4973/xxHash + */ +/*! + * @mainpage xxHash + * + * @file xxhash.h + * xxHash prototypes and implementation + */ +/* TODO: update */ +/* Notice extracted from xxHash homepage: + +xxHash is an extremely fast hash algorithm, running at RAM speed limits. +It also successfully passes all tests from the SMHasher suite. + +Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) + +Name Speed Q.Score Author +xxHash 5.4 GB/s 10 +CrapWow 3.2 GB/s 2 Andrew +MurmurHash 3a 2.7 GB/s 10 Austin Appleby +SpookyHash 2.0 GB/s 10 Bob Jenkins +SBox 1.4 GB/s 9 Bret Mulvey +Lookup3 1.2 GB/s 9 Bob Jenkins +SuperFastHash 1.2 GB/s 1 Paul Hsieh +CityHash64 1.05 GB/s 10 Pike & Alakuijala +FNV 0.55 GB/s 5 Fowler, Noll, Vo +CRC32 0.43 GB/s 9 +MD5-32 0.33 GB/s 10 Ronald L. Rivest +SHA1-32 0.28 GB/s 10 + +Q.Score is a measure of quality of the hash function. +It depends on successfully passing SMHasher test set. +10 is a perfect score. + +Note: SMHasher's CRC32 implementation is not the fastest one. +Other speed-oriented implementations can be faster, +especially in combination with PCLMUL instruction: +https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html?showComment=1552696407071#c3490092340461170735 + +A 64-bit version, named XXH64, is available since r35. +It offers much better speed, but for 64-bit applications only. +Name Speed on 64 bits Speed on 32 bits +XXH64 13.8 GB/s 1.9 GB/s +XXH32 6.8 GB/s 6.0 GB/s +*/ + +#if defined (__cplusplus) +extern "C" { +#endif + +/* **************************** + * INLINE mode + ******************************/ +/*! + * XXH_INLINE_ALL (and XXH_PRIVATE_API) + * Use these build macros to inline xxhash into the target unit. + * Inlining improves performance on small inputs, especially when the length is + * expressed as a compile-time constant: + * + * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html + * + * It also keeps xxHash symbols private to the unit, so they are not exported. + * + * Usage: + * #define XXH_INLINE_ALL + * #include "xxhash.h" + * + * Do not compile and link xxhash.o as a separate object, as it is not useful. + */ +#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \ + && !defined(XXH_INLINE_ALL_31684351384) + /* this section should be traversed only once */ +# define XXH_INLINE_ALL_31684351384 + /* give access to the advanced API, required to compile implementations */ +# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */ +# define XXH_STATIC_LINKING_ONLY + /* make all functions private */ +# undef XXH_PUBLIC_API +# if defined(__GNUC__) +# define XXH_PUBLIC_API static __inline __attribute__((unused)) +# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +# define XXH_PUBLIC_API static inline +# elif defined(_MSC_VER) +# define XXH_PUBLIC_API static __inline +# else + /* note: this version may generate warnings for unused static functions */ +# define XXH_PUBLIC_API static +# endif + + /* + * This part deals with the special case where a unit wants to inline xxHash, + * but "xxhash.h" has previously been included without XXH_INLINE_ALL, + * such as part of some previously included *.h header file. + * Without further action, the new include would just be ignored, + * and functions would effectively _not_ be inlined (silent failure). + * The following macros solve this situation by prefixing all inlined names, + * avoiding naming collision with previous inclusions. + */ + /* Before that, we unconditionally #undef all symbols, + * in case they were already defined with XXH_NAMESPACE. + * They will then be redefined for XXH_INLINE_ALL + */ +# undef XXH_versionNumber + /* XXH32 */ +# undef XXH32 +# undef XXH32_createState +# undef XXH32_freeState +# undef XXH32_reset +# undef XXH32_update +# undef XXH32_digest +# undef XXH32_copyState +# undef XXH32_canonicalFromHash +# undef XXH32_hashFromCanonical + /* XXH64 */ +# undef XXH64 +# undef XXH64_createState +# undef XXH64_freeState +# undef XXH64_reset +# undef XXH64_update +# undef XXH64_digest +# undef XXH64_copyState +# undef XXH64_canonicalFromHash +# undef XXH64_hashFromCanonical + /* XXH3_64bits */ +# undef XXH3_64bits +# undef XXH3_64bits_withSecret +# undef XXH3_64bits_withSeed +# undef XXH3_64bits_withSecretandSeed +# undef XXH3_createState +# undef XXH3_freeState +# undef XXH3_copyState +# undef XXH3_64bits_reset +# undef XXH3_64bits_reset_withSeed +# undef XXH3_64bits_reset_withSecret +# undef XXH3_64bits_update +# undef XXH3_64bits_digest +# undef XXH3_generateSecret + /* XXH3_128bits */ +# undef XXH128 +# undef XXH3_128bits +# undef XXH3_128bits_withSeed +# undef XXH3_128bits_withSecret +# undef XXH3_128bits_reset +# undef XXH3_128bits_reset_withSeed +# undef XXH3_128bits_reset_withSecret +# undef XXH3_128bits_reset_withSecretandSeed +# undef XXH3_128bits_update +# undef XXH3_128bits_digest +# undef XXH128_isEqual +# undef XXH128_cmp +# undef XXH128_canonicalFromHash +# undef XXH128_hashFromCanonical + /* Finally, free the namespace itself */ +# undef XXH_NAMESPACE + + /* employ the namespace for XXH_INLINE_ALL */ +# define XXH_NAMESPACE XXH_INLINE_ + /* + * Some identifiers (enums, type names) are not symbols, + * but they must nonetheless be renamed to avoid redeclaration. + * Alternative solution: do not redeclare them. + * However, this requires some #ifdefs, and has a more dispersed impact. + * Meanwhile, renaming can be achieved in a single place. + */ +# define XXH_IPREF(Id) XXH_NAMESPACE ## Id +# define XXH_OK XXH_IPREF(XXH_OK) +# define XXH_ERROR XXH_IPREF(XXH_ERROR) +# define XXH_errorcode XXH_IPREF(XXH_errorcode) +# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t) +# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t) +# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t) +# define XXH32_state_s XXH_IPREF(XXH32_state_s) +# define XXH32_state_t XXH_IPREF(XXH32_state_t) +# define XXH64_state_s XXH_IPREF(XXH64_state_s) +# define XXH64_state_t XXH_IPREF(XXH64_state_t) +# define XXH3_state_s XXH_IPREF(XXH3_state_s) +# define XXH3_state_t XXH_IPREF(XXH3_state_t) +# define XXH128_hash_t XXH_IPREF(XXH128_hash_t) + /* Ensure the header is parsed again, even if it was previously included */ +# undef XXHASH_H_5627135585666179 +# undef XXHASH_H_STATIC_13879238742 +#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */ + + + +/* **************************************************************** + * Stable API + *****************************************************************/ +#ifndef XXHASH_H_5627135585666179 +#define XXHASH_H_5627135585666179 1 + + +/*! + * @defgroup public Public API + * Contains details on the public xxHash functions. + * @{ + */ +/* specific declaration modes for Windows */ +#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API) +# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT)) +# ifdef XXH_EXPORT +# define XXH_PUBLIC_API __declspec(dllexport) +# elif XXH_IMPORT +# define XXH_PUBLIC_API __declspec(dllimport) +# endif +# else +# define XXH_PUBLIC_API /* do nothing */ +# endif +#endif + +#ifdef XXH_DOXYGEN +/*! + * @brief Emulate a namespace by transparently prefixing all symbols. + * + * If you want to include _and expose_ xxHash functions from within your own + * library, but also want to avoid symbol collisions with other libraries which + * may also include xxHash, you can use XXH_NAMESPACE to automatically prefix + * any public symbol from xxhash library with the value of XXH_NAMESPACE + * (therefore, avoid empty or numeric values). + * + * Note that no change is required within the calling program as long as it + * includes `xxhash.h`: Regular symbol names will be automatically translated + * by this header. + */ +# define XXH_NAMESPACE /* YOUR NAME HERE */ +# undef XXH_NAMESPACE +#endif + +#ifdef XXH_NAMESPACE +# define XXH_CAT(A,B) A##B +# define XXH_NAME2(A,B) XXH_CAT(A,B) +# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) +/* XXH32 */ +# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) +# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) +# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) +# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) +# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) +# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) +# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) +# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) +# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) +/* XXH64 */ +# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) +# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) +# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) +# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) +# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) +# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) +# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) +# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) +# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) +/* XXH3_64bits */ +# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits) +# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret) +# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed) +# define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecretandSeed) +# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState) +# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState) +# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState) +# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset) +# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed) +# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret) +# define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed) +# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update) +# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest) +# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret) +# define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed) +/* XXH3_128bits */ +# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128) +# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits) +# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed) +# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret) +# define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed) +# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset) +# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed) +# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret) +# define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed) +# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update) +# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest) +# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual) +# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp) +# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash) +# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical) +#endif + + +/* ************************************* +* Version +***************************************/ +#define XXH_VERSION_MAJOR 0 +#define XXH_VERSION_MINOR 8 +#define XXH_VERSION_RELEASE 1 +#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) + +/*! + * @brief Obtains the xxHash version. + * + * This is mostly useful when xxHash is compiled as a shared library, + * since the returned value comes from the library, as opposed to header file. + * + * @return `XXH_VERSION_NUMBER` of the invoked library. + */ +XXH_PUBLIC_API unsigned XXH_versionNumber (void); + + +/* **************************** +* Common basic types +******************************/ +#include /* size_t */ +typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; + + +/*-********************************************************************** +* 32-bit hash +************************************************************************/ +#if defined(XXH_DOXYGEN) /* Don't show include */ +/*! + * @brief An unsigned 32-bit integer. + * + * Not necessarily defined to `uint32_t` but functionally equivalent. + */ +typedef uint32_t XXH32_hash_t; + +#elif !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint32_t XXH32_hash_t; + +#else +# include +# if UINT_MAX == 0xFFFFFFFFUL + typedef unsigned int XXH32_hash_t; +# else +# if ULONG_MAX == 0xFFFFFFFFUL + typedef unsigned long XXH32_hash_t; +# else +# error "unsupported platform: need a 32-bit type" +# endif +# endif +#endif + +/*! + * @} + * + * @defgroup xxh32_family XXH32 family + * @ingroup public + * Contains functions used in the classic 32-bit xxHash algorithm. + * + * @note + * XXH32 is useful for older platforms, with no or poor 64-bit performance. + * Note that @ref xxh3_family provides competitive speed + * for both 32-bit and 64-bit systems, and offers true 64/128 bit hash results. + * + * @see @ref xxh64_family, @ref xxh3_family : Other xxHash families + * @see @ref xxh32_impl for implementation details + * @{ + */ + +/*! + * @brief Calculates the 32-bit hash of @p input using xxHash32. + * + * Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark): 5.4 GB/s + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * @param seed The 32-bit seed to alter the hash's output predictably. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 32-bit hash value. + * + * @see + * XXH64(), XXH3_64bits_withSeed(), XXH3_128bits_withSeed(), XXH128(): + * Direct equivalents for the other variants of xxHash. + * @see + * XXH32_createState(), XXH32_update(), XXH32_digest(): Streaming version. + */ +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed); + +/*! + * Streaming functions generate the xxHash value from an incremental input. + * This method is slower than single-call functions, due to state management. + * For small inputs, prefer `XXH32()` and `XXH64()`, which are better optimized. + * + * An XXH state must first be allocated using `XXH*_createState()`. + * + * Start a new hash by initializing the state with a seed using `XXH*_reset()`. + * + * Then, feed the hash state by calling `XXH*_update()` as many times as necessary. + * + * The function returns an error code, with 0 meaning OK, and any other value + * meaning there is an error. + * + * Finally, a hash value can be produced anytime, by using `XXH*_digest()`. + * This function returns the nn-bits hash as an int or long long. + * + * It's still possible to continue inserting input into the hash state after a + * digest, and generate new hash values later on by invoking `XXH*_digest()`. + * + * When done, release the state using `XXH*_freeState()`. + * + * Example code for incrementally hashing a file: + * @code{.c} + * #include + * #include + * #define BUFFER_SIZE 256 + * + * // Note: XXH64 and XXH3 use the same interface. + * XXH32_hash_t + * hashFile(FILE* stream) + * { + * XXH32_state_t* state; + * unsigned char buf[BUFFER_SIZE]; + * size_t amt; + * XXH32_hash_t hash; + * + * state = XXH32_createState(); // Create a state + * assert(state != NULL); // Error check here + * XXH32_reset(state, 0xbaad5eed); // Reset state with our seed + * while ((amt = fread(buf, 1, sizeof(buf), stream)) != 0) { + * XXH32_update(state, buf, amt); // Hash the file in chunks + * } + * hash = XXH32_digest(state); // Finalize the hash + * XXH32_freeState(state); // Clean up + * return hash; + * } + * @endcode + */ + +/*! + * @typedef struct XXH32_state_s XXH32_state_t + * @brief The opaque state struct for the XXH32 streaming API. + * + * @see XXH32_state_s for details. + */ +typedef struct XXH32_state_s XXH32_state_t; + +/*! + * @brief Allocates an @ref XXH32_state_t. + * + * Must be freed with XXH32_freeState(). + * @return An allocated XXH32_state_t on success, `NULL` on failure. + */ +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void); +/*! + * @brief Frees an @ref XXH32_state_t. + * + * Must be allocated with XXH32_createState(). + * @param statePtr A pointer to an @ref XXH32_state_t allocated with @ref XXH32_createState(). + * @return XXH_OK. + */ +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); +/*! + * @brief Copies one @ref XXH32_state_t to another. + * + * @param dst_state The state to copy to. + * @param src_state The state to copy from. + * @pre + * @p dst_state and @p src_state must not be `NULL` and must not overlap. + */ +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); + +/*! + * @brief Resets an @ref XXH32_state_t to begin a new hash. + * + * This function resets and seeds a state. Call it before @ref XXH32_update(). + * + * @param statePtr The state struct to reset. + * @param seed The 32-bit seed to alter the hash result predictably. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return @ref XXH_OK on success, @ref XXH_ERROR on failure. + */ +XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, XXH32_hash_t seed); + +/*! + * @brief Consumes a block of @p input to an @ref XXH32_state_t. + * + * Call this to incrementally consume blocks of data. + * + * @param statePtr The state struct to update. + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * + * @pre + * @p statePtr must not be `NULL`. + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return @ref XXH_OK on success, @ref XXH_ERROR on failure. + */ +XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); + +/*! + * @brief Returns the calculated hash value from an @ref XXH32_state_t. + * + * @note + * Calling XXH32_digest() will not affect @p statePtr, so you can update, + * digest, and update again. + * + * @param statePtr The state struct to calculate the hash from. + * + * @pre + * @p statePtr must not be `NULL`. + * + * @return The calculated xxHash32 value from that state. + */ +XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); + +/******* Canonical representation *******/ + +/* + * The default return values from XXH functions are unsigned 32 and 64 bit + * integers. + * This the simplest and fastest format for further post-processing. + * + * However, this leaves open the question of what is the order on the byte level, + * since little and big endian conventions will store the same number differently. + * + * The canonical representation settles this issue by mandating big-endian + * convention, the same convention as human-readable numbers (large digits first). + * + * When writing hash values to storage, sending them over a network, or printing + * them, it's highly recommended to use the canonical representation to ensure + * portability across a wider range of systems, present and future. + * + * The following functions allow transformation of hash values to and from + * canonical format. + */ + +/*! + * @brief Canonical (big endian) representation of @ref XXH32_hash_t. + */ +typedef struct { + unsigned char digest[4]; /*!< Hash bytes, big endian */ +} XXH32_canonical_t; + +/*! + * @brief Converts an @ref XXH32_hash_t to a big endian @ref XXH32_canonical_t. + * + * @param dst The @ref XXH32_canonical_t pointer to be stored to. + * @param hash The @ref XXH32_hash_t to be converted. + * + * @pre + * @p dst must not be `NULL`. + */ +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); + +/*! + * @brief Converts an @ref XXH32_canonical_t to a native @ref XXH32_hash_t. + * + * @param src The @ref XXH32_canonical_t to convert. + * + * @pre + * @p src must not be `NULL`. + * + * @return The converted hash. + */ +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); + + +#ifdef __has_attribute +# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x) +#else +# define XXH_HAS_ATTRIBUTE(x) 0 +#endif + +/* C-language Attributes are added in C23. */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201710L) && defined(__has_c_attribute) +# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) +#else +# define XXH_HAS_C_ATTRIBUTE(x) 0 +#endif + +#if defined(__cplusplus) && defined(__has_cpp_attribute) +# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +# define XXH_HAS_CPP_ATTRIBUTE(x) 0 +#endif + +/* +Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute +introduced in CPP17 and C23. +CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough +C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough +*/ +#if XXH_HAS_C_ATTRIBUTE(x) +# define XXH_FALLTHROUGH [[fallthrough]] +#elif XXH_HAS_CPP_ATTRIBUTE(x) +# define XXH_FALLTHROUGH [[fallthrough]] +#elif XXH_HAS_ATTRIBUTE(__fallthrough__) +# define XXH_FALLTHROUGH __attribute__ ((fallthrough)) +#else +# define XXH_FALLTHROUGH +#endif + +/*! + * @} + * @ingroup public + * @{ + */ + +#ifndef XXH_NO_LONG_LONG +/*-********************************************************************** +* 64-bit hash +************************************************************************/ +#if defined(XXH_DOXYGEN) /* don't include */ +/*! + * @brief An unsigned 64-bit integer. + * + * Not necessarily defined to `uint64_t` but functionally equivalent. + */ +typedef uint64_t XXH64_hash_t; +#elif !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint64_t XXH64_hash_t; +#else +# include +# if defined(__LP64__) && ULONG_MAX == 0xFFFFFFFFFFFFFFFFULL + /* LP64 ABI says uint64_t is unsigned long */ + typedef unsigned long XXH64_hash_t; +# else + /* the following type must have a width of 64-bit */ + typedef unsigned long long XXH64_hash_t; +# endif +#endif + +/*! + * @} + * + * @defgroup xxh64_family XXH64 family + * @ingroup public + * @{ + * Contains functions used in the classic 64-bit xxHash algorithm. + * + * @note + * XXH3 provides competitive speed for both 32-bit and 64-bit systems, + * and offers true 64/128 bit hash results. + * It provides better speed for systems with vector processing capabilities. + */ + + +/*! + * @brief Calculates the 64-bit hash of @p input using xxHash64. + * + * This function usually runs faster on 64-bit systems, but slower on 32-bit + * systems (see benchmark). + * + * @param input The block of data to be hashed, at least @p length bytes in size. + * @param length The length of @p input, in bytes. + * @param seed The 64-bit seed to alter the hash's output predictably. + * + * @pre + * The memory between @p input and @p input + @p length must be valid, + * readable, contiguous memory. However, if @p length is `0`, @p input may be + * `NULL`. In C++, this also must be *TriviallyCopyable*. + * + * @return The calculated 64-bit hash. + * + * @see + * XXH32(), XXH3_64bits_withSeed(), XXH3_128bits_withSeed(), XXH128(): + * Direct equivalents for the other variants of xxHash. + * @see + * XXH64_createState(), XXH64_update(), XXH64_digest(): Streaming version. + */ +XXH_PUBLIC_API XXH64_hash_t XXH64(const void* input, size_t length, XXH64_hash_t seed); + +/******* Streaming *******/ +/*! + * @brief The opaque state struct for the XXH64 streaming API. + * + * @see XXH64_state_s for details. + */ +typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ +XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); +XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dst_state, const XXH64_state_t* src_state); + +XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t* statePtr, XXH64_hash_t seed); +XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* statePtr); + +/******* Canonical representation *******/ +typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t; +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash); +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src); + +/*! + * @} + * ************************************************************************ + * @defgroup xxh3_family XXH3 family + * @ingroup public + * @{ + * + * XXH3 is a more recent hash algorithm featuring: + * - Improved speed for both small and large inputs + * - True 64-bit and 128-bit outputs + * - SIMD acceleration + * - Improved 32-bit viability + * + * Speed analysis methodology is explained here: + * + * https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html + * + * Compared to XXH64, expect XXH3 to run approximately + * ~2x faster on large inputs and >3x faster on small ones, + * exact differences vary depending on platform. + * + * XXH3's speed benefits greatly from SIMD and 64-bit arithmetic, + * but does not require it. + * Any 32-bit and 64-bit targets that can run XXH32 smoothly + * can run XXH3 at competitive speeds, even without vector support. + * Further details are explained in the implementation. + * + * Optimized implementations are provided for AVX512, AVX2, SSE2, NEON, POWER8, + * ZVector and scalar targets. This can be controlled via the XXH_VECTOR macro. + * + * XXH3 implementation is portable: + * it has a generic C90 formulation that can be compiled on any platform, + * all implementations generage exactly the same hash value on all platforms. + * Starting from v0.8.0, it's also labelled "stable", meaning that + * any future version will also generate the same hash value. + * + * XXH3 offers 2 variants, _64bits and _128bits. + * + * When only 64 bits are needed, prefer invoking the _64bits variant, as it + * reduces the amount of mixing, resulting in faster speed on small inputs. + * It's also generally simpler to manipulate a scalar return type than a struct. + * + * The API supports one-shot hashing, streaming mode, and custom secrets. + */ + +/*-********************************************************************** +* XXH3 64-bit variant +************************************************************************/ + +/* XXH3_64bits(): + * default 64-bit variant, using default secret and default seed of 0. + * It's the fastest variant. */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* data, size_t len); + +/* + * XXH3_64bits_withSeed(): + * This variant generates a custom secret on the fly + * based on default secret altered using the `seed` value. + * While this operation is decently fast, note that it's not completely free. + * Note: seed==0 produces the same results as XXH3_64bits(). + */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed(const void* data, size_t len, XXH64_hash_t seed); + +/*! + * The bare minimum size for a custom secret. + * + * @see + * XXH3_64bits_withSecret(), XXH3_64bits_reset_withSecret(), + * XXH3_128bits_withSecret(), XXH3_128bits_reset_withSecret(). + */ +#define XXH3_SECRET_SIZE_MIN 136 + +/* + * XXH3_64bits_withSecret(): + * It's possible to provide any blob of bytes as a "secret" to generate the hash. + * This makes it more difficult for an external actor to prepare an intentional collision. + * The main condition is that secretSize *must* be large enough (>= XXH3_SECRET_SIZE_MIN). + * However, the quality of the secret impacts the dispersion of the hash algorithm. + * Therefore, the secret _must_ look like a bunch of random bytes. + * Avoid "trivial" or structured data such as repeated sequences or a text document. + * Whenever in doubt about the "randomness" of the blob of bytes, + * consider employing "XXH3_generateSecret()" instead (see below). + * It will generate a proper high entropy secret derived from the blob of bytes. + * Another advantage of using XXH3_generateSecret() is that + * it guarantees that all bits within the initial blob of bytes + * will impact every bit of the output. + * This is not necessarily the case when using the blob of bytes directly + * because, when hashing _small_ inputs, only a portion of the secret is employed. + */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize); + + +/******* Streaming *******/ +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + */ + +/*! + * @brief The state struct for the XXH3 streaming API. + * + * @see XXH3_state_s for details. + */ +typedef struct XXH3_state_s XXH3_state_t; +XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void); +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr); +XXH_PUBLIC_API void XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state); + +/* + * XXH3_64bits_reset(): + * Initialize with default parameters. + * digest will be equivalent to `XXH3_64bits()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH3_state_t* statePtr); +/* + * XXH3_64bits_reset_withSeed(): + * Generate a custom secret from `seed`, and store it into `statePtr`. + * digest will be equivalent to `XXH3_64bits_withSeed()`. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed); +/* + * XXH3_64bits_reset_withSecret(): + * `secret` is referenced, it _must outlive_ the hash streaming session. + * Similar to one-shot API, `secretSize` must be >= `XXH3_SECRET_SIZE_MIN`, + * and the quality of produced hash values depends on secret's entropy + * (secret's content should look like a bunch of random bytes). + * When in doubt about the randomness of a candidate `secret`, + * consider employing `XXH3_generateSecret()` instead (see below). + */ +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize); + +XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH3_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* statePtr); + +/* note : canonical representation of XXH3 is the same as XXH64 + * since they both produce XXH64_hash_t values */ + + +/*-********************************************************************** +* XXH3 128-bit variant +************************************************************************/ + +/*! + * @brief The return value from 128-bit hashes. + * + * Stored in little endian order, although the fields themselves are in native + * endianness. + */ +typedef struct { + XXH64_hash_t low64; /*!< `value & 0xFFFFFFFFFFFFFFFF` */ + XXH64_hash_t high64; /*!< `value >> 64` */ +} XXH128_hash_t; + +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* data, size_t len); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed(const void* data, size_t len, XXH64_hash_t seed); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize); + +/******* Streaming *******/ +/* + * Streaming requires state maintenance. + * This operation costs memory and CPU. + * As a consequence, streaming is slower than one-shot hashing. + * For better performance, prefer one-shot functions whenever applicable. + * + * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits(). + * Use already declared XXH3_createState() and XXH3_freeState(). + * + * All reset and streaming functions have same meaning as their 64-bit counterpart. + */ + +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH3_state_t* statePtr); +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed); +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize); + +XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH3_state_t* statePtr, const void* input, size_t length); +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* statePtr); + +/* Following helper functions make it possible to compare XXH128_hast_t values. + * Since XXH128_hash_t is a structure, this capability is not offered by the language. + * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */ + +/*! + * XXH128_isEqual(): + * Return: 1 if `h1` and `h2` are equal, 0 if they are not. + */ +XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2); + +/*! + * XXH128_cmp(): + * + * This comparator is compatible with stdlib's `qsort()`/`bsearch()`. + * + * return: >0 if *h128_1 > *h128_2 + * =0 if *h128_1 == *h128_2 + * <0 if *h128_1 < *h128_2 + */ +XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2); + + +/******* Canonical representation *******/ +typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t; +XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash); +XXH_PUBLIC_API XXH128_hash_t XXH128_hashFromCanonical(const XXH128_canonical_t* src); + + +#endif /* XXH_NO_LONG_LONG */ + +/*! + * @} + */ +#endif /* XXHASH_H_5627135585666179 */ + + + +#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) +#define XXHASH_H_STATIC_13879238742 +/* **************************************************************************** + * This section contains declarations which are not guaranteed to remain stable. + * They may change in future versions, becoming incompatible with a different + * version of the library. + * These declarations should only be used with static linking. + * Never use them in association with dynamic linking! + ***************************************************************************** */ + +/* + * These definitions are only present to allow static allocation + * of XXH states, on stack or in a struct, for example. + * Never **ever** access their members directly. + */ + +/*! + * @internal + * @brief Structure for XXH32 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is + * an opaque type. This allows fields to safely be changed. + * + * Typedef'd to @ref XXH32_state_t. + * Do not access the members of this struct directly. + * @see XXH64_state_s, XXH3_state_s + */ +struct XXH32_state_s { + XXH32_hash_t total_len_32; /*!< Total length hashed, modulo 2^32 */ + XXH32_hash_t large_len; /*!< Whether the hash is >= 16 (handles @ref total_len_32 overflow) */ + XXH32_hash_t v[4]; /*!< Accumulator lanes */ + XXH32_hash_t mem32[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */ + XXH32_hash_t memsize; /*!< Amount of data in @ref mem32 */ + XXH32_hash_t reserved; /*!< Reserved field. Do not read or write to it, it may be removed. */ +}; /* typedef'd to XXH32_state_t */ + + +#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */ + +/*! + * @internal + * @brief Structure for XXH64 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. Otherwise it is + * an opaque type. This allows fields to safely be changed. + * + * Typedef'd to @ref XXH64_state_t. + * Do not access the members of this struct directly. + * @see XXH32_state_s, XXH3_state_s + */ +struct XXH64_state_s { + XXH64_hash_t total_len; /*!< Total length hashed. This is always 64-bit. */ + XXH64_hash_t v[4]; /*!< Accumulator lanes */ + XXH64_hash_t mem64[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[32]. */ + XXH32_hash_t memsize; /*!< Amount of data in @ref mem64 */ + XXH32_hash_t reserved32; /*!< Reserved field, needed for padding anyways*/ + XXH64_hash_t reserved64; /*!< Reserved field. Do not read or write to it, it may be removed. */ +}; /* typedef'd to XXH64_state_t */ + +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */ +# include +# define XXH_ALIGN(n) alignas(n) +#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */ +/* In C++ alignas() is a keyword */ +# define XXH_ALIGN(n) alignas(n) +#elif defined(__GNUC__) +# define XXH_ALIGN(n) __attribute__ ((aligned(n))) +#elif defined(_MSC_VER) +# define XXH_ALIGN(n) __declspec(align(n)) +#else +# define XXH_ALIGN(n) /* disabled */ +#endif + +/* Old GCC versions only accept the attribute after the type in structures. */ +#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \ + && ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \ + && defined(__GNUC__) +# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align) +#else +# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type +#endif + +/*! + * @brief The size of the internal XXH3 buffer. + * + * This is the optimal update size for incremental hashing. + * + * @see XXH3_64b_update(), XXH3_128b_update(). + */ +#define XXH3_INTERNALBUFFER_SIZE 256 + +/*! + * @brief Default size of the secret buffer (and @ref XXH3_kSecret). + * + * This is the size used in @ref XXH3_kSecret and the seeded functions. + * + * Not to be confused with @ref XXH3_SECRET_SIZE_MIN. + */ +#define XXH3_SECRET_DEFAULT_SIZE 192 + +/*! + * @internal + * @brief Structure for XXH3 streaming API. + * + * @note This is only defined when @ref XXH_STATIC_LINKING_ONLY, + * @ref XXH_INLINE_ALL, or @ref XXH_IMPLEMENTATION is defined. + * Otherwise it is an opaque type. + * Never use this definition in combination with dynamic library. + * This allows fields to safely be changed in the future. + * + * @note ** This structure has a strict alignment requirement of 64 bytes!! ** + * Do not allocate this with `malloc()` or `new`, + * it will not be sufficiently aligned. + * Use @ref XXH3_createState() and @ref XXH3_freeState(), or stack allocation. + * + * Typedef'd to @ref XXH3_state_t. + * Do never access the members of this struct directly. + * + * @see XXH3_INITSTATE() for stack initialization. + * @see XXH3_createState(), XXH3_freeState(). + * @see XXH32_state_s, XXH64_state_s + */ +struct XXH3_state_s { + XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]); + /*!< The 8 accumulators. Similar to `vN` in @ref XXH32_state_s::v1 and @ref XXH64_state_s */ + XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]); + /*!< Used to store a custom secret generated from a seed. */ + XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]); + /*!< The internal buffer. @see XXH32_state_s::mem32 */ + XXH32_hash_t bufferedSize; + /*!< The amount of memory in @ref buffer, @see XXH32_state_s::memsize */ + XXH32_hash_t useSeed; + /*!< Reserved field. Needed for padding on 64-bit. */ + size_t nbStripesSoFar; + /*!< Number or stripes processed. */ + XXH64_hash_t totalLen; + /*!< Total length hashed. 64-bit even on 32-bit targets. */ + size_t nbStripesPerBlock; + /*!< Number of stripes per block. */ + size_t secretLimit; + /*!< Size of @ref customSecret or @ref extSecret */ + XXH64_hash_t seed; + /*!< Seed for _withSeed variants. Must be zero otherwise, @see XXH3_INITSTATE() */ + XXH64_hash_t reserved64; + /*!< Reserved field. */ + const unsigned char* extSecret; + /*!< Reference to an external secret for the _withSecret variants, NULL + * for other variants. */ + /* note: there may be some padding at the end due to alignment on 64 bytes */ +}; /* typedef'd to XXH3_state_t */ + +#undef XXH_ALIGN_MEMBER + +/*! + * @brief Initializes a stack-allocated `XXH3_state_s`. + * + * When the @ref XXH3_state_t structure is merely emplaced on stack, + * it should be initialized with XXH3_INITSTATE() or a memset() + * in case its first reset uses XXH3_NNbits_reset_withSeed(). + * This init can be omitted if the first reset uses default or _withSecret mode. + * This operation isn't necessary when the state is created with XXH3_createState(). + * Note that this doesn't prepare the state for a streaming operation, + * it's still necessary to use XXH3_NNbits_reset*() afterwards. + */ +#define XXH3_INITSTATE(XXH3_state_ptr) { (XXH3_state_ptr)->seed = 0; } + + +/* XXH128() : + * simple alias to pre-selected XXH3_128bits variant + */ +XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t seed); + + +/* === Experimental API === */ +/* Symbols defined below must be considered tied to a specific library version. */ + +/* + * XXH3_generateSecret(): + * + * Derive a high-entropy secret from any user-defined content, named customSeed. + * The generated secret can be used in combination with `*_withSecret()` functions. + * The `_withSecret()` variants are useful to provide a higher level of protection than 64-bit seed, + * as it becomes much more difficult for an external actor to guess how to impact the calculation logic. + * + * The function accepts as input a custom seed of any length and any content, + * and derives from it a high-entropy secret of length @secretSize + * into an already allocated buffer @secretBuffer. + * @secretSize must be >= XXH3_SECRET_SIZE_MIN + * + * The generated secret can then be used with any `*_withSecret()` variant. + * Functions `XXH3_128bits_withSecret()`, `XXH3_64bits_withSecret()`, + * `XXH3_128bits_reset_withSecret()` and `XXH3_64bits_reset_withSecret()` + * are part of this list. They all accept a `secret` parameter + * which must be large enough for implementation reasons (>= XXH3_SECRET_SIZE_MIN) + * _and_ feature very high entropy (consist of random-looking bytes). + * These conditions can be a high bar to meet, so + * XXH3_generateSecret() can be employed to ensure proper quality. + * + * customSeed can be anything. It can have any size, even small ones, + * and its content can be anything, even "poor entropy" sources such as a bunch of zeroes. + * The resulting `secret` will nonetheless provide all required qualities. + * + * When customSeedSize > 0, supplying NULL as customSeed is undefined behavior. + */ +XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(void* secretBuffer, size_t secretSize, const void* customSeed, size_t customSeedSize); + + +/* + * XXH3_generateSecret_fromSeed(): + * + * Generate the same secret as the _withSeed() variants. + * + * The resulting secret has a length of XXH3_SECRET_DEFAULT_SIZE (necessarily). + * @secretBuffer must be already allocated, of size at least XXH3_SECRET_DEFAULT_SIZE bytes. + * + * The generated secret can be used in combination with + *`*_withSecret()` and `_withSecretandSeed()` variants. + * This generator is notably useful in combination with `_withSecretandSeed()`, + * as a way to emulate a faster `_withSeed()` variant. + */ +XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_t seed); + +/* + * *_withSecretandSeed() : + * These variants generate hash values using either + * @seed for "short" keys (< XXH3_MIDSIZE_MAX = 240 bytes) + * or @secret for "large" keys (>= XXH3_MIDSIZE_MAX). + * + * This generally benefits speed, compared to `_withSeed()` or `_withSecret()`. + * `_withSeed()` has to generate the secret on the fly for "large" keys. + * It's fast, but can be perceptible for "not so large" keys (< 1 KB). + * `_withSecret()` has to generate the masks on the fly for "small" keys, + * which requires more instructions than _withSeed() variants. + * Therefore, _withSecretandSeed variant combines the best of both worlds. + * + * When @secret has been generated by XXH3_generateSecret_fromSeed(), + * this variant produces *exactly* the same results as `_withSeed()` variant, + * hence offering only a pure speed benefit on "large" input, + * by skipping the need to regenerate the secret for every large input. + * + * Another usage scenario is to hash the secret to a 64-bit hash value, + * for example with XXH3_64bits(), which then becomes the seed, + * and then employ both the seed and the secret in _withSecretandSeed(). + * On top of speed, an added benefit is that each bit in the secret + * has a 50% chance to swap each bit in the output, + * via its impact to the seed. + * This is not guaranteed when using the secret directly in "small data" scenarios, + * because only portions of the secret are employed for small data. + */ +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecretandSeed(const void* data, size_t len, + const void* secret, size_t secretSize, + XXH64_hash_t seed); + +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecretandSeed(const void* data, size_t len, + const void* secret, size_t secretSize, + XXH64_hash_t seed64); + +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecretandSeed(XXH3_state_t* statePtr, + const void* secret, size_t secretSize, + XXH64_hash_t seed64); + +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, + const void* secret, size_t secretSize, + XXH64_hash_t seed64); + + +#endif /* XXH_NO_LONG_LONG */ +#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) +# define XXH_IMPLEMENTATION +#endif + +#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */ + + +/* ======================================================================== */ +/* ======================================================================== */ +/* ======================================================================== */ + + +/*-********************************************************************** + * xxHash implementation + *-********************************************************************** + * xxHash's implementation used to be hosted inside xxhash.c. + * + * However, inlining requires implementation to be visible to the compiler, + * hence be included alongside the header. + * Previously, implementation was hosted inside xxhash.c, + * which was then #included when inlining was activated. + * This construction created issues with a few build and install systems, + * as it required xxhash.c to be stored in /include directory. + * + * xxHash implementation is now directly integrated within xxhash.h. + * As a consequence, xxhash.c is no longer needed in /include. + * + * xxhash.c is still available and is still useful. + * In a "normal" setup, when xxhash is not inlined, + * xxhash.h only exposes the prototypes and public symbols, + * while xxhash.c can be built into an object file xxhash.o + * which can then be linked into the final binary. + ************************************************************************/ + +#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \ + || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387) +# define XXH_IMPLEM_13a8737387 + +/* ************************************* +* Tuning parameters +***************************************/ + +/*! + * @defgroup tuning Tuning parameters + * @{ + * + * Various macros to control xxHash's behavior. + */ +#ifdef XXH_DOXYGEN +/*! + * @brief Define this to disable 64-bit code. + * + * Useful if only using the @ref xxh32_family and you have a strict C90 compiler. + */ +# define XXH_NO_LONG_LONG +# undef XXH_NO_LONG_LONG /* don't actually */ +/*! + * @brief Controls how unaligned memory is accessed. + * + * By default, access to unaligned memory is controlled by `memcpy()`, which is + * safe and portable. + * + * Unfortunately, on some target/compiler combinations, the generated assembly + * is sub-optimal. + * + * The below switch allow selection of a different access method + * in the search for improved performance. + * + * @par Possible options: + * + * - `XXH_FORCE_MEMORY_ACCESS=0` (default): `memcpy` + * @par + * Use `memcpy()`. Safe and portable. Note that most modern compilers will + * eliminate the function call and treat it as an unaligned access. + * + * - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((packed))` + * @par + * Depends on compiler extensions and is therefore not portable. + * This method is safe _if_ your compiler supports it, + * and *generally* as fast or faster than `memcpy`. + * + * - `XXH_FORCE_MEMORY_ACCESS=2`: Direct cast + * @par + * Casts directly and dereferences. This method doesn't depend on the + * compiler, but it violates the C standard as it directly dereferences an + * unaligned pointer. It can generate buggy code on targets which do not + * support unaligned memory accesses, but in some circumstances, it's the + * only known way to get the most performance. + * + * - `XXH_FORCE_MEMORY_ACCESS=3`: Byteshift + * @par + * Also portable. This can generate the best code on old compilers which don't + * inline small `memcpy()` calls, and it might also be faster on big-endian + * systems which lack a native byteswap instruction. However, some compilers + * will emit literal byteshifts even if the target supports unaligned access. + * . + * + * @warning + * Methods 1 and 2 rely on implementation-defined behavior. Use these with + * care, as what works on one compiler/platform/optimization level may cause + * another to read garbage data or even crash. + * + * See http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details. + * + * Prefer these methods in priority order (0 > 3 > 1 > 2) + */ +# define XXH_FORCE_MEMORY_ACCESS 0 + +/*! + * @def XXH_FORCE_ALIGN_CHECK + * @brief If defined to non-zero, adds a special path for aligned inputs (XXH32() + * and XXH64() only). + * + * This is an important performance trick for architectures without decent + * unaligned memory access performance. + * + * It checks for input alignment, and when conditions are met, uses a "fast + * path" employing direct 32-bit/64-bit reads, resulting in _dramatically + * faster_ read speed. + * + * The check costs one initial branch per hash, which is generally negligible, + * but not zero. + * + * Moreover, it's not useful to generate an additional code path if memory + * access uses the same instruction for both aligned and unaligned + * addresses (e.g. x86 and aarch64). + * + * In these cases, the alignment check can be removed by setting this macro to 0. + * Then the code will always use unaligned memory access. + * Align check is automatically disabled on x86, x64 & arm64, + * which are platforms known to offer good unaligned memory accesses performance. + * + * This option does not affect XXH3 (only XXH32 and XXH64). + */ +# define XXH_FORCE_ALIGN_CHECK 0 + +/*! + * @def XXH_NO_INLINE_HINTS + * @brief When non-zero, sets all functions to `static`. + * + * By default, xxHash tries to force the compiler to inline almost all internal + * functions. + * + * This can usually improve performance due to reduced jumping and improved + * constant folding, but significantly increases the size of the binary which + * might not be favorable. + * + * Additionally, sometimes the forced inlining can be detrimental to performance, + * depending on the architecture. + * + * XXH_NO_INLINE_HINTS marks all internal functions as static, giving the + * compiler full control on whether to inline or not. + * + * When not optimizing (-O0), optimizing for size (-Os, -Oz), or using + * -fno-inline with GCC or Clang, this will automatically be defined. + */ +# define XXH_NO_INLINE_HINTS 0 + +/*! + * @def XXH32_ENDJMP + * @brief Whether to use a jump for `XXH32_finalize`. + * + * For performance, `XXH32_finalize` uses multiple branches in the finalizer. + * This is generally preferable for performance, + * but depending on exact architecture, a jmp may be preferable. + * + * This setting is only possibly making a difference for very small inputs. + */ +# define XXH32_ENDJMP 0 + +/*! + * @internal + * @brief Redefines old internal names. + * + * For compatibility with code that uses xxHash's internals before the names + * were changed to improve namespacing. There is no other reason to use this. + */ +# define XXH_OLD_NAMES +# undef XXH_OLD_NAMES /* don't actually use, it is ugly. */ +#endif /* XXH_DOXYGEN */ +/*! + * @} + */ + +#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ + /* prefer __packed__ structures (method 1) for gcc on armv7+ and mips */ +# if !defined(__clang__) && \ +( \ + (defined(__INTEL_COMPILER) && !defined(_WIN32)) || \ + ( \ + defined(__GNUC__) && ( \ + (defined(__ARM_ARCH) && __ARM_ARCH >= 7) || \ + ( \ + defined(__mips__) && \ + (__mips <= 5 || __mips_isa_rev < 6) && \ + (!defined(__mips16) || defined(__mips_mips16e2)) \ + ) \ + ) \ + ) \ +) +# define XXH_FORCE_MEMORY_ACCESS 1 +# endif +#endif + +#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ +# if defined(__i386) || defined(__x86_64__) || defined(__aarch64__) \ + || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) /* visual */ +# define XXH_FORCE_ALIGN_CHECK 0 +# else +# define XXH_FORCE_ALIGN_CHECK 1 +# endif +#endif + +#ifndef XXH_NO_INLINE_HINTS +# if defined(__OPTIMIZE_SIZE__) /* -Os, -Oz */ \ + || defined(__NO_INLINE__) /* -O0, -fno-inline */ +# define XXH_NO_INLINE_HINTS 1 +# else +# define XXH_NO_INLINE_HINTS 0 +# endif +#endif + +#ifndef XXH32_ENDJMP +/* generally preferable for performance */ +# define XXH32_ENDJMP 0 +#endif + +/*! + * @defgroup impl Implementation + * @{ + */ + + +/* ************************************* +* Includes & Memory related functions +***************************************/ +/* + * Modify the local functions below should you wish to use + * different memory routines for malloc() and free() + */ +#include + +/*! + * @internal + * @brief Modify this function to use a different routine than malloc(). + */ +static void* XXH_malloc(size_t s) { return malloc(s); } + +/*! + * @internal + * @brief Modify this function to use a different routine than free(). + */ +static void XXH_free(void* p) { free(p); } + +#include + +/*! + * @internal + * @brief Modify this function to use a different routine than memcpy(). + */ +static void* XXH_memcpy(void* dest, const void* src, size_t size) +{ + return memcpy(dest,src,size); +} + +#include /* ULLONG_MAX */ + + +/* ************************************* +* Compiler Specific Options +***************************************/ +#ifdef _MSC_VER /* Visual Studio warning fix */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif + +#if XXH_NO_INLINE_HINTS /* disable inlining hints */ +# if defined(__GNUC__) || defined(__clang__) +# define XXH_FORCE_INLINE static __attribute__((unused)) +# else +# define XXH_FORCE_INLINE static +# endif +# define XXH_NO_INLINE static +/* enable inlining hints */ +#elif defined(__GNUC__) || defined(__clang__) +# define XXH_FORCE_INLINE static __inline__ __attribute__((always_inline, unused)) +# define XXH_NO_INLINE static __attribute__((noinline)) +#elif defined(_MSC_VER) /* Visual Studio */ +# define XXH_FORCE_INLINE static __forceinline +# define XXH_NO_INLINE static __declspec(noinline) +#elif defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */ +# define XXH_FORCE_INLINE static inline +# define XXH_NO_INLINE static +#else +# define XXH_FORCE_INLINE static +# define XXH_NO_INLINE static +#endif + + + +/* ************************************* +* Debug +***************************************/ +/*! + * @ingroup tuning + * @def XXH_DEBUGLEVEL + * @brief Sets the debugging level. + * + * XXH_DEBUGLEVEL is expected to be defined externally, typically via the + * compiler's command line options. The value must be a number. + */ +#ifndef XXH_DEBUGLEVEL +# ifdef DEBUGLEVEL /* backwards compat */ +# define XXH_DEBUGLEVEL DEBUGLEVEL +# else +# define XXH_DEBUGLEVEL 0 +# endif +#endif + +#if (XXH_DEBUGLEVEL>=1) +# include /* note: can still be disabled with NDEBUG */ +# define XXH_ASSERT(c) assert(c) +#else +# define XXH_ASSERT(c) ((void)0) +#endif + +/* note: use after variable declarations */ +#ifndef XXH_STATIC_ASSERT +# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ +# include +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) +# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) +# else +# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0) +# endif +# define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c) +#endif + +/*! + * @internal + * @def XXH_COMPILER_GUARD(var) + * @brief Used to prevent unwanted optimizations for @p var. + * + * It uses an empty GCC inline assembly statement with a register constraint + * which forces @p var into a general purpose register (eg eax, ebx, ecx + * on x86) and marks it as modified. + * + * This is used in a few places to avoid unwanted autovectorization (e.g. + * XXH32_round()). All vectorization we want is explicit via intrinsics, + * and _usually_ isn't wanted elsewhere. + * + * We also use it to prevent unwanted constant folding for AArch64 in + * XXH3_initCustomSecret_scalar(). + */ +#if defined(__GNUC__) || defined(__clang__) +# define XXH_COMPILER_GUARD(var) __asm__ __volatile__("" : "+r" (var)) +#else +# define XXH_COMPILER_GUARD(var) ((void)0) +#endif + +/* ************************************* +* Basic Types +***************************************/ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) +# include + typedef uint8_t xxh_u8; +#else + typedef unsigned char xxh_u8; +#endif +typedef XXH32_hash_t xxh_u32; + +#ifdef XXH_OLD_NAMES +# define BYTE xxh_u8 +# define U8 xxh_u8 +# define U32 xxh_u32 +#endif + +/* *** Memory access *** */ + +/*! + * @internal + * @fn xxh_u32 XXH_read32(const void* ptr) + * @brief Reads an unaligned 32-bit integer from @p ptr in native endianness. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit native endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readLE32(const void* ptr) + * @brief Reads an unaligned 32-bit little endian integer from @p ptr. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit little endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readBE32(const void* ptr) + * @brief Reads an unaligned 32-bit big endian integer from @p ptr. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * + * @param ptr The pointer to read from. + * @return The 32-bit big endian integer from the bytes at @p ptr. + */ + +/*! + * @internal + * @fn xxh_u32 XXH_readLE32_align(const void* ptr, XXH_alignment align) + * @brief Like @ref XXH_readLE32(), but has an option for aligned reads. + * + * Affected by @ref XXH_FORCE_MEMORY_ACCESS. + * Note that when @ref XXH_FORCE_ALIGN_CHECK == 0, the @p align parameter is + * always @ref XXH_alignment::XXH_unaligned. + * + * @param ptr The pointer to read from. + * @param align Whether @p ptr is aligned. + * @pre + * If @p align == @ref XXH_alignment::XXH_aligned, @p ptr must be 4 byte + * aligned. + * @return The 32-bit little endian integer from the bytes at @p ptr. + */ + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE32 and XXH_readBE32. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* + * Force direct memory access. Only works on CPU which support unaligned memory + * access in hardware. + */ +static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; } + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __pack instructions are safer but compiler specific, hence potentially + * problematic for some compilers. + * + * Currently only defined for GCC and ICC. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; } __attribute__((packed)) unalign; +#endif +static xxh_u32 XXH_read32(const void* ptr) +{ + typedef union { xxh_u32 u32; } __attribute__((packed)) xxh_unalign; + return ((const xxh_unalign*)ptr)->u32; +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html + */ +static xxh_u32 XXH_read32(const void* memPtr) +{ + xxh_u32 val; + XXH_memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + + +/* *** Endianness *** */ + +/*! + * @ingroup tuning + * @def XXH_CPU_LITTLE_ENDIAN + * @brief Whether the target is little endian. + * + * Defined to 1 if the target is little endian, or 0 if it is big endian. + * It can be defined externally, for example on the compiler command line. + * + * If it is not defined, + * a runtime check (which is usually constant folded) is used instead. + * + * @note + * This is not necessarily defined to an integer constant. + * + * @see XXH_isLittleEndian() for the runtime check. + */ +#ifndef XXH_CPU_LITTLE_ENDIAN +/* + * Try to detect endianness automatically, to avoid the nonstandard behavior + * in `XXH_isLittleEndian()` + */ +# if defined(_WIN32) /* Windows is always little endian */ \ + || defined(__LITTLE_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 1 +# elif defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_CPU_LITTLE_ENDIAN 0 +# else +/*! + * @internal + * @brief Runtime check for @ref XXH_CPU_LITTLE_ENDIAN. + * + * Most compilers will constant fold this. + */ +static int XXH_isLittleEndian(void) +{ + /* + * Portable and well-defined behavior. + * Don't use static: it is detrimental to performance. + */ + const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 }; + return one.c[0]; +} +# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian() +# endif +#endif + + + + +/* **************************************** +* Compiler-specific Functions and Macros +******************************************/ +#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#ifdef __has_builtin +# define XXH_HAS_BUILTIN(x) __has_builtin(x) +#else +# define XXH_HAS_BUILTIN(x) 0 +#endif + +/*! + * @internal + * @def XXH_rotl32(x,r) + * @brief 32-bit rotate left. + * + * @param x The 32-bit integer to be rotated. + * @param r The number of bits to rotate. + * @pre + * @p r > 0 && @p r < 32 + * @note + * @p x and @p r may be evaluated multiple times. + * @return The rotated result. + */ +#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \ + && XXH_HAS_BUILTIN(__builtin_rotateleft64) +# define XXH_rotl32 __builtin_rotateleft32 +# define XXH_rotl64 __builtin_rotateleft64 +/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */ +#elif defined(_MSC_VER) +# define XXH_rotl32(x,r) _rotl(x,r) +# define XXH_rotl64(x,r) _rotl64(x,r) +#else +# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r)))) +#endif + +/*! + * @internal + * @fn xxh_u32 XXH_swap32(xxh_u32 x) + * @brief A 32-bit byteswap. + * + * @param x The 32-bit integer to byteswap. + * @return @p x, byteswapped. + */ +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap32 _byteswap_ulong +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap32 __builtin_bswap32 +#else +static xxh_u32 XXH_swap32 (xxh_u32 x) +{ + return ((x << 24) & 0xff000000 ) | + ((x << 8) & 0x00ff0000 ) | + ((x >> 8) & 0x0000ff00 ) | + ((x >> 24) & 0x000000ff ); +} +#endif + + +/* *************************** +* Memory reads +*****************************/ + +/*! + * @internal + * @brief Enum to indicate whether a pointer is aligned. + */ +typedef enum { + XXH_aligned, /*!< Aligned */ + XXH_unaligned /*!< Possibly unaligned */ +} XXH_alignment; + +/* + * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. + * + * This is ideal for older compilers which don't inline memcpy. + */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u32)bytePtr[1] << 8) + | ((xxh_u32)bytePtr[2] << 16) + | ((xxh_u32)bytePtr[3] << 24); +} + +XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[3] + | ((xxh_u32)bytePtr[2] << 8) + | ((xxh_u32)bytePtr[1] << 16) + | ((xxh_u32)bytePtr[0] << 24); +} + +#else +XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); +} + +static xxh_u32 XXH_readBE32(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u32 +XXH_readLE32_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) { + return XXH_readLE32(ptr); + } else { + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr); + } +} + + +/* ************************************* +* Misc +***************************************/ +/*! @ingroup public */ +XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } + + +/* ******************************************************************* +* 32-bit hash functions +*********************************************************************/ +/*! + * @} + * @defgroup xxh32_impl XXH32 implementation + * @ingroup impl + * @{ + */ + /* #define instead of static const, to be used as initializers */ +#define XXH_PRIME32_1 0x9E3779B1U /*!< 0b10011110001101110111100110110001 */ +#define XXH_PRIME32_2 0x85EBCA77U /*!< 0b10000101111010111100101001110111 */ +#define XXH_PRIME32_3 0xC2B2AE3DU /*!< 0b11000010101100101010111000111101 */ +#define XXH_PRIME32_4 0x27D4EB2FU /*!< 0b00100111110101001110101100101111 */ +#define XXH_PRIME32_5 0x165667B1U /*!< 0b00010110010101100110011110110001 */ + +#ifdef XXH_OLD_NAMES +# define PRIME32_1 XXH_PRIME32_1 +# define PRIME32_2 XXH_PRIME32_2 +# define PRIME32_3 XXH_PRIME32_3 +# define PRIME32_4 XXH_PRIME32_4 +# define PRIME32_5 XXH_PRIME32_5 +#endif + +/*! + * @internal + * @brief Normal stripe processing routine. + * + * This shuffles the bits so that any bit from @p input impacts several bits in + * @p acc. + * + * @param acc The accumulator lane. + * @param input The stripe of input to mix. + * @return The mixed accumulator lane. + */ +static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input) +{ + acc += input * XXH_PRIME32_2; + acc = XXH_rotl32(acc, 13); + acc *= XXH_PRIME32_1; +#if (defined(__SSE4_1__) || defined(__aarch64__)) && !defined(XXH_ENABLE_AUTOVECTORIZE) + /* + * UGLY HACK: + * A compiler fence is the only thing that prevents GCC and Clang from + * autovectorizing the XXH32 loop (pragmas and attributes don't work for some + * reason) without globally disabling SSE4.1. + * + * The reason we want to avoid vectorization is because despite working on + * 4 integers at a time, there are multiple factors slowing XXH32 down on + * SSE4: + * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on + * newer chips!) making it slightly slower to multiply four integers at + * once compared to four integers independently. Even when pmulld was + * fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE + * just to multiply unless doing a long operation. + * + * - Four instructions are required to rotate, + * movqda tmp, v // not required with VEX encoding + * pslld tmp, 13 // tmp <<= 13 + * psrld v, 19 // x >>= 19 + * por v, tmp // x |= tmp + * compared to one for scalar: + * roll v, 13 // reliably fast across the board + * shldl v, v, 13 // Sandy Bridge and later prefer this for some reason + * + * - Instruction level parallelism is actually more beneficial here because + * the SIMD actually serializes this operation: While v1 is rotating, v2 + * can load data, while v3 can multiply. SSE forces them to operate + * together. + * + * This is also enabled on AArch64, as Clang autovectorizes it incorrectly + * and it is pointless writing a NEON implementation that is basically the + * same speed as scalar for XXH32. + */ + XXH_COMPILER_GUARD(acc); +#endif + return acc; +} + +/*! + * @internal + * @brief Mixes all bits to finalize the hash. + * + * The final mix ensures that all input bits have a chance to impact any bit in + * the output digest, resulting in an unbiased distribution. + * + * @param h32 The hash to avalanche. + * @return The avalanched hash. + */ +static xxh_u32 XXH32_avalanche(xxh_u32 h32) +{ + h32 ^= h32 >> 15; + h32 *= XXH_PRIME32_2; + h32 ^= h32 >> 13; + h32 *= XXH_PRIME32_3; + h32 ^= h32 >> 16; + return(h32); +} + +#define XXH_get32bits(p) XXH_readLE32_align(p, align) + +/*! + * @internal + * @brief Processes the last 0-15 bytes of @p ptr. + * + * There may be up to 15 bytes remaining to consume from the input. + * This final stage will digest them to ensure that all input bytes are present + * in the final mix. + * + * @param h32 The hash to finalize. + * @param ptr The pointer to the remaining input. + * @param len The remaining length, modulo 16. + * @param align Whether @p ptr is aligned. + * @return The finalized hash. + */ +static xxh_u32 +XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ +#define XXH_PROCESS1 do { \ + h32 += (*ptr++) * XXH_PRIME32_5; \ + h32 = XXH_rotl32(h32, 11) * XXH_PRIME32_1; \ +} while (0) + +#define XXH_PROCESS4 do { \ + h32 += XXH_get32bits(ptr) * XXH_PRIME32_3; \ + ptr += 4; \ + h32 = XXH_rotl32(h32, 17) * XXH_PRIME32_4; \ +} while (0) + + if (ptr==NULL) XXH_ASSERT(len == 0); + + /* Compact rerolled version; generally faster */ + if (!XXH32_ENDJMP) { + len &= 15; + while (len >= 4) { + XXH_PROCESS4; + len -= 4; + } + while (len > 0) { + XXH_PROCESS1; + --len; + } + return XXH32_avalanche(h32); + } else { + switch(len&15) /* or switch(bEnd - p) */ { + case 12: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 8: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 4: XXH_PROCESS4; + return XXH32_avalanche(h32); + + case 13: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 9: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 5: XXH_PROCESS4; + XXH_PROCESS1; + return XXH32_avalanche(h32); + + case 14: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 10: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 6: XXH_PROCESS4; + XXH_PROCESS1; + XXH_PROCESS1; + return XXH32_avalanche(h32); + + case 15: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 11: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 7: XXH_PROCESS4; + XXH_FALLTHROUGH; + case 3: XXH_PROCESS1; + XXH_FALLTHROUGH; + case 2: XXH_PROCESS1; + XXH_FALLTHROUGH; + case 1: XXH_PROCESS1; + XXH_FALLTHROUGH; + case 0: return XXH32_avalanche(h32); + } + XXH_ASSERT(0); + return h32; /* reaching this point is deemed impossible */ + } +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1 XXH_PROCESS1 +# define PROCESS4 XXH_PROCESS4 +#else +# undef XXH_PROCESS1 +# undef XXH_PROCESS4 +#endif + +/*! + * @internal + * @brief The implementation for @ref XXH32(). + * + * @param input , len , seed Directly passed from @ref XXH32(). + * @param align Whether @p input is aligned. + * @return The calculated hash. + */ +XXH_FORCE_INLINE xxh_u32 +XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align) +{ + xxh_u32 h32; + + if (input==NULL) XXH_ASSERT(len == 0); + + if (len>=16) { + const xxh_u8* const bEnd = input + len; + const xxh_u8* const limit = bEnd - 15; + xxh_u32 v1 = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + xxh_u32 v2 = seed + XXH_PRIME32_2; + xxh_u32 v3 = seed + 0; + xxh_u32 v4 = seed - XXH_PRIME32_1; + + do { + v1 = XXH32_round(v1, XXH_get32bits(input)); input += 4; + v2 = XXH32_round(v2, XXH_get32bits(input)); input += 4; + v3 = XXH32_round(v3, XXH_get32bits(input)); input += 4; + v4 = XXH32_round(v4, XXH_get32bits(input)); input += 4; + } while (input < limit); + + h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); + } else { + h32 = seed + XXH_PRIME32_5; + } + + h32 += (xxh_u32)len; + + return XXH32_finalize(h32, input, len&15, align); +} + +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed) +{ +#if 0 + /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ + XXH32_state_t state; + XXH32_reset(&state, seed); + XXH32_update(&state, (const xxh_u8*)input, len); + return XXH32_digest(&state); +#else + if (XXH_FORCE_ALIGN_CHECK) { + if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned); + } } + + return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned); +#endif +} + + + +/******* Hash streaming *******/ +/*! + * @ingroup xxh32_family + */ +XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) +{ + return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); +} +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) +{ + XXH_free(statePtr); + return XXH_OK; +} + +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) +{ + XXH_memcpy(dstState, srcState, sizeof(*dstState)); +} + +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed) +{ + XXH32_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ + memset(&state, 0, sizeof(state)); + state.v[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2; + state.v[1] = seed + XXH_PRIME32_2; + state.v[2] = seed + 0; + state.v[3] = seed - XXH_PRIME32_1; + /* do not write into reserved, planned to be removed in a future version */ + XXH_memcpy(statePtr, &state, sizeof(state) - sizeof(state.reserved)); + return XXH_OK; +} + + +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH_errorcode +XXH32_update(XXH32_state_t* state, const void* input, size_t len) +{ + if (input==NULL) { + XXH_ASSERT(len == 0); + return XXH_OK; + } + + { const xxh_u8* p = (const xxh_u8*)input; + const xxh_u8* const bEnd = p + len; + + state->total_len_32 += (XXH32_hash_t)len; + state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16)); + + if (state->memsize + len < 16) { /* fill in tmp buffer */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, len); + state->memsize += (XXH32_hash_t)len; + return XXH_OK; + } + + if (state->memsize) { /* some data left from previous update */ + XXH_memcpy((xxh_u8*)(state->mem32) + state->memsize, input, 16-state->memsize); + { const xxh_u32* p32 = state->mem32; + state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p32)); p32++; + state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p32)); p32++; + state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p32)); p32++; + state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p32)); + } + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= bEnd-16) { + const xxh_u8* const limit = bEnd - 16; + + do { + state->v[0] = XXH32_round(state->v[0], XXH_readLE32(p)); p+=4; + state->v[1] = XXH32_round(state->v[1], XXH_readLE32(p)); p+=4; + state->v[2] = XXH32_round(state->v[2], XXH_readLE32(p)); p+=4; + state->v[3] = XXH32_round(state->v[3], XXH_readLE32(p)); p+=4; + } while (p<=limit); + + } + + if (p < bEnd) { + XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state) +{ + xxh_u32 h32; + + if (state->large_len) { + h32 = XXH_rotl32(state->v[0], 1) + + XXH_rotl32(state->v[1], 7) + + XXH_rotl32(state->v[2], 12) + + XXH_rotl32(state->v[3], 18); + } else { + h32 = state->v[2] /* == seed */ + XXH_PRIME32_5; + } + + h32 += state->total_len_32; + + return XXH32_finalize(h32, (const xxh_u8*)state->mem32, state->memsize, XXH_aligned); +} + + +/******* Canonical representation *******/ + +/*! + * @ingroup xxh32_family + * The default return values from XXH functions are unsigned 32 and 64 bit + * integers. + * + * The canonical representation uses big endian convention, the same convention + * as human-readable numbers (large digits first). + * + * This way, hash values can be written into a file or buffer, remaining + * comparable across different systems. + * + * The following functions allow transformation of hash values to and from their + * canonical format. + */ +XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); + XXH_memcpy(dst, &hash, sizeof(*dst)); +} +/*! @ingroup xxh32_family */ +XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) +{ + return XXH_readBE32(src); +} + + +#ifndef XXH_NO_LONG_LONG + +/* ******************************************************************* +* 64-bit hash functions +*********************************************************************/ +/*! + * @} + * @ingroup impl + * @{ + */ +/******* Memory access *******/ + +typedef XXH64_hash_t xxh_u64; + +#ifdef XXH_OLD_NAMES +# define U64 xxh_u64 +#endif + +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) +/* + * Manual byteshift. Best for old compilers which don't inline memcpy. + * We actually directly use XXH_readLE64 and XXH_readBE64. + */ +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) + +/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ +static xxh_u64 XXH_read64(const void* memPtr) +{ + return *(const xxh_u64*) memPtr; +} + +#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) + +/* + * __pack instructions are safer, but compiler specific, hence potentially + * problematic for some compilers. + * + * Currently only defined for GCC and ICC. + */ +#ifdef XXH_OLD_NAMES +typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unalign64; +#endif +static xxh_u64 XXH_read64(const void* ptr) +{ + typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) xxh_unalign64; + return ((const xxh_unalign64*)ptr)->u64; +} + +#else + +/* + * Portable and safe solution. Generally efficient. + * see: http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html + */ +static xxh_u64 XXH_read64(const void* memPtr) +{ + xxh_u64 val; + XXH_memcpy(&val, memPtr, sizeof(val)); + return val; +} + +#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ + +#if defined(_MSC_VER) /* Visual Studio */ +# define XXH_swap64 _byteswap_uint64 +#elif XXH_GCC_VERSION >= 403 +# define XXH_swap64 __builtin_bswap64 +#else +static xxh_u64 XXH_swap64(xxh_u64 x) +{ + return ((x << 56) & 0xff00000000000000ULL) | + ((x << 40) & 0x00ff000000000000ULL) | + ((x << 24) & 0x0000ff0000000000ULL) | + ((x << 8) & 0x000000ff00000000ULL) | + ((x >> 8) & 0x00000000ff000000ULL) | + ((x >> 24) & 0x0000000000ff0000ULL) | + ((x >> 40) & 0x000000000000ff00ULL) | + ((x >> 56) & 0x00000000000000ffULL); +} +#endif + + +/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */ +#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3)) + +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[0] + | ((xxh_u64)bytePtr[1] << 8) + | ((xxh_u64)bytePtr[2] << 16) + | ((xxh_u64)bytePtr[3] << 24) + | ((xxh_u64)bytePtr[4] << 32) + | ((xxh_u64)bytePtr[5] << 40) + | ((xxh_u64)bytePtr[6] << 48) + | ((xxh_u64)bytePtr[7] << 56); +} + +XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr) +{ + const xxh_u8* bytePtr = (const xxh_u8 *)memPtr; + return bytePtr[7] + | ((xxh_u64)bytePtr[6] << 8) + | ((xxh_u64)bytePtr[5] << 16) + | ((xxh_u64)bytePtr[4] << 24) + | ((xxh_u64)bytePtr[3] << 32) + | ((xxh_u64)bytePtr[2] << 40) + | ((xxh_u64)bytePtr[1] << 48) + | ((xxh_u64)bytePtr[0] << 56); +} + +#else +XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); +} + +static xxh_u64 XXH_readBE64(const void* ptr) +{ + return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); +} +#endif + +XXH_FORCE_INLINE xxh_u64 +XXH_readLE64_align(const void* ptr, XXH_alignment align) +{ + if (align==XXH_unaligned) + return XXH_readLE64(ptr); + else + return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr); +} + + +/******* xxh64 *******/ +/*! + * @} + * @defgroup xxh64_impl XXH64 implementation + * @ingroup impl + * @{ + */ +/* #define rather that static const, to be used as initializers */ +#define XXH_PRIME64_1 0x9E3779B185EBCA87ULL /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */ +#define XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */ +#define XXH_PRIME64_3 0x165667B19E3779F9ULL /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */ +#define XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */ +#define XXH_PRIME64_5 0x27D4EB2F165667C5ULL /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */ + +#ifdef XXH_OLD_NAMES +# define PRIME64_1 XXH_PRIME64_1 +# define PRIME64_2 XXH_PRIME64_2 +# define PRIME64_3 XXH_PRIME64_3 +# define PRIME64_4 XXH_PRIME64_4 +# define PRIME64_5 XXH_PRIME64_5 +#endif + +static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input) +{ + acc += input * XXH_PRIME64_2; + acc = XXH_rotl64(acc, 31); + acc *= XXH_PRIME64_1; + return acc; +} + +static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val) +{ + val = XXH64_round(0, val); + acc ^= val; + acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4; + return acc; +} + +static xxh_u64 XXH64_avalanche(xxh_u64 h64) +{ + h64 ^= h64 >> 33; + h64 *= XXH_PRIME64_2; + h64 ^= h64 >> 29; + h64 *= XXH_PRIME64_3; + h64 ^= h64 >> 32; + return h64; +} + + +#define XXH_get64bits(p) XXH_readLE64_align(p, align) + +static xxh_u64 +XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align) +{ + if (ptr==NULL) XXH_ASSERT(len == 0); + len &= 31; + while (len >= 8) { + xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); + ptr += 8; + h64 ^= k1; + h64 = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4; + len -= 8; + } + if (len >= 4) { + h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1; + ptr += 4; + h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3; + len -= 4; + } + while (len > 0) { + h64 ^= (*ptr++) * XXH_PRIME64_5; + h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1; + --len; + } + return XXH64_avalanche(h64); +} + +#ifdef XXH_OLD_NAMES +# define PROCESS1_64 XXH_PROCESS1_64 +# define PROCESS4_64 XXH_PROCESS4_64 +# define PROCESS8_64 XXH_PROCESS8_64 +#else +# undef XXH_PROCESS1_64 +# undef XXH_PROCESS4_64 +# undef XXH_PROCESS8_64 +#endif + +XXH_FORCE_INLINE xxh_u64 +XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align) +{ + xxh_u64 h64; + if (input==NULL) XXH_ASSERT(len == 0); + + if (len>=32) { + const xxh_u8* const bEnd = input + len; + const xxh_u8* const limit = bEnd - 31; + xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2; + xxh_u64 v2 = seed + XXH_PRIME64_2; + xxh_u64 v3 = seed + 0; + xxh_u64 v4 = seed - XXH_PRIME64_1; + + do { + v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8; + v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8; + v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8; + v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8; + } while (inputtotal_len += len; + + if (state->memsize + len < 32) { /* fill in tmp buffer */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, len); + state->memsize += (xxh_u32)len; + return XXH_OK; + } + + if (state->memsize) { /* tmp buffer is full */ + XXH_memcpy(((xxh_u8*)state->mem64) + state->memsize, input, 32-state->memsize); + state->v[0] = XXH64_round(state->v[0], XXH_readLE64(state->mem64+0)); + state->v[1] = XXH64_round(state->v[1], XXH_readLE64(state->mem64+1)); + state->v[2] = XXH64_round(state->v[2], XXH_readLE64(state->mem64+2)); + state->v[3] = XXH64_round(state->v[3], XXH_readLE64(state->mem64+3)); + p += 32 - state->memsize; + state->memsize = 0; + } + + if (p+32 <= bEnd) { + const xxh_u8* const limit = bEnd - 32; + + do { + state->v[0] = XXH64_round(state->v[0], XXH_readLE64(p)); p+=8; + state->v[1] = XXH64_round(state->v[1], XXH_readLE64(p)); p+=8; + state->v[2] = XXH64_round(state->v[2], XXH_readLE64(p)); p+=8; + state->v[3] = XXH64_round(state->v[3], XXH_readLE64(p)); p+=8; + } while (p<=limit); + + } + + if (p < bEnd) { + XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); + state->memsize = (unsigned)(bEnd-p); + } + } + + return XXH_OK; +} + + +/*! @ingroup xxh64_family */ +XXH_PUBLIC_API XXH64_hash_t XXH64_digest(const XXH64_state_t* state) +{ + xxh_u64 h64; + + if (state->total_len >= 32) { + h64 = XXH_rotl64(state->v[0], 1) + XXH_rotl64(state->v[1], 7) + XXH_rotl64(state->v[2], 12) + XXH_rotl64(state->v[3], 18); + h64 = XXH64_mergeRound(h64, state->v[0]); + h64 = XXH64_mergeRound(h64, state->v[1]); + h64 = XXH64_mergeRound(h64, state->v[2]); + h64 = XXH64_mergeRound(h64, state->v[3]); + } else { + h64 = state->v[2] /*seed*/ + XXH_PRIME64_5; + } + + h64 += (xxh_u64) state->total_len; + + return XXH64_finalize(h64, (const xxh_u8*)state->mem64, (size_t)state->total_len, XXH_aligned); +} + + +/******* Canonical representation *******/ + +/*! @ingroup xxh64_family */ +XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); + XXH_memcpy(dst, &hash, sizeof(*dst)); +} + +/*! @ingroup xxh64_family */ +XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src) +{ + return XXH_readBE64(src); +} + +#ifndef XXH_NO_XXH3 + +/* ********************************************************************* +* XXH3 +* New generation hash designed for speed on small keys and vectorization +************************************************************************ */ +/*! + * @} + * @defgroup xxh3_impl XXH3 implementation + * @ingroup impl + * @{ + */ + +/* === Compiler specifics === */ + +#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */ +# define XXH_RESTRICT /* disable */ +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */ +# define XXH_RESTRICT restrict +#else +/* Note: it might be useful to define __restrict or __restrict__ for some C++ compilers */ +# define XXH_RESTRICT /* disable */ +#endif + +#if (defined(__GNUC__) && (__GNUC__ >= 3)) \ + || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \ + || defined(__clang__) +# define XXH_likely(x) __builtin_expect(x, 1) +# define XXH_unlikely(x) __builtin_expect(x, 0) +#else +# define XXH_likely(x) (x) +# define XXH_unlikely(x) (x) +#endif + +#if defined(__GNUC__) +# if defined(__AVX2__) +# include +# elif defined(__SSE2__) +# include +# elif defined(__ARM_NEON__) || defined(__ARM_NEON) +# define inline __inline__ /* circumvent a clang bug */ +# include +# undef inline +# endif +#elif defined(_MSC_VER) +# include +#endif + +/* + * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while + * remaining a true 64-bit/128-bit hash function. + * + * This is done by prioritizing a subset of 64-bit operations that can be + * emulated without too many steps on the average 32-bit machine. + * + * For example, these two lines seem similar, and run equally fast on 64-bit: + * + * xxh_u64 x; + * x ^= (x >> 47); // good + * x ^= (x >> 13); // bad + * + * However, to a 32-bit machine, there is a major difference. + * + * x ^= (x >> 47) looks like this: + * + * x.lo ^= (x.hi >> (47 - 32)); + * + * while x ^= (x >> 13) looks like this: + * + * // note: funnel shifts are not usually cheap. + * x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13)); + * x.hi ^= (x.hi >> 13); + * + * The first one is significantly faster than the second, simply because the + * shift is larger than 32. This means: + * - All the bits we need are in the upper 32 bits, so we can ignore the lower + * 32 bits in the shift. + * - The shift result will always fit in the lower 32 bits, and therefore, + * we can ignore the upper 32 bits in the xor. + * + * Thanks to this optimization, XXH3 only requires these features to be efficient: + * + * - Usable unaligned access + * - A 32-bit or 64-bit ALU + * - If 32-bit, a decent ADC instruction + * - A 32 or 64-bit multiply with a 64-bit result + * - For the 128-bit variant, a decent byteswap helps short inputs. + * + * The first two are already required by XXH32, and almost all 32-bit and 64-bit + * platforms which can run XXH32 can run XXH3 efficiently. + * + * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one + * notable exception. + * + * First of all, Thumb-1 lacks support for the UMULL instruction which + * performs the important long multiply. This means numerous __aeabi_lmul + * calls. + * + * Second of all, the 8 functional registers are just not enough. + * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need + * Lo registers, and this shuffling results in thousands more MOVs than A32. + * + * A32 and T32 don't have this limitation. They can access all 14 registers, + * do a 32->64 multiply with UMULL, and the flexible operand allowing free + * shifts is helpful, too. + * + * Therefore, we do a quick sanity check. + * + * If compiling Thumb-1 for a target which supports ARM instructions, we will + * emit a warning, as it is not a "sane" platform to compile for. + * + * Usually, if this happens, it is because of an accident and you probably need + * to specify -march, as you likely meant to compile for a newer architecture. + * + * Credit: large sections of the vectorial and asm source code paths + * have been contributed by @easyaspi314 + */ +#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM) +# warning "XXH3 is highly inefficient without ARM or Thumb-2." +#endif + +/* ========================================== + * Vectorization detection + * ========================================== */ + +#ifdef XXH_DOXYGEN +/*! + * @ingroup tuning + * @brief Overrides the vectorization implementation chosen for XXH3. + * + * Can be defined to 0 to disable SIMD or any of the values mentioned in + * @ref XXH_VECTOR_TYPE. + * + * If this is not defined, it uses predefined macros to determine the best + * implementation. + */ +# define XXH_VECTOR XXH_SCALAR +/*! + * @ingroup tuning + * @brief Possible values for @ref XXH_VECTOR. + * + * Note that these are actually implemented as macros. + * + * If this is not defined, it is detected automatically. + * @ref XXH_X86DISPATCH overrides this. + */ +enum XXH_VECTOR_TYPE /* fake enum */ { + XXH_SCALAR = 0, /*!< Portable scalar version */ + XXH_SSE2 = 1, /*!< + * SSE2 for Pentium 4, Opteron, all x86_64. + * + * @note SSE2 is also guaranteed on Windows 10, macOS, and + * Android x86. + */ + XXH_AVX2 = 2, /*!< AVX2 for Haswell and Bulldozer */ + XXH_AVX512 = 3, /*!< AVX512 for Skylake and Icelake */ + XXH_NEON = 4, /*!< NEON for most ARMv7-A and all AArch64 */ + XXH_VSX = 5, /*!< VSX and ZVector for POWER8/z13 (64-bit) */ +}; +/*! + * @ingroup tuning + * @brief Selects the minimum alignment for XXH3's accumulators. + * + * When using SIMD, this should match the alignment reqired for said vector + * type, so, for example, 32 for AVX2. + * + * Default: Auto detected. + */ +# define XXH_ACC_ALIGN 8 +#endif + +/* Actual definition */ +#ifndef XXH_DOXYGEN +# define XXH_SCALAR 0 +# define XXH_SSE2 1 +# define XXH_AVX2 2 +# define XXH_AVX512 3 +# define XXH_NEON 4 +# define XXH_VSX 5 +#endif + +#ifndef XXH_VECTOR /* can be defined on command line */ +# if defined(__AVX512F__) +# define XXH_VECTOR XXH_AVX512 +# elif defined(__AVX2__) +# define XXH_VECTOR XXH_AVX2 +# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) +# define XXH_VECTOR XXH_SSE2 +# elif ( \ + defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \ + || defined(_M_ARM64) || defined(_M_ARM_ARMV7VE) /* msvc */ \ + ) && ( \ + defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \ + ) +# define XXH_VECTOR XXH_NEON +# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \ + || (defined(__s390x__) && defined(__VEC__)) \ + && defined(__GNUC__) /* TODO: IBM XL */ +# define XXH_VECTOR XXH_VSX +# else +# define XXH_VECTOR XXH_SCALAR +# endif +#endif + +/* + * Controls the alignment of the accumulator, + * for compatibility with aligned vector loads, which are usually faster. + */ +#ifndef XXH_ACC_ALIGN +# if defined(XXH_X86DISPATCH) +# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */ +# elif XXH_VECTOR == XXH_SCALAR /* scalar */ +# define XXH_ACC_ALIGN 8 +# elif XXH_VECTOR == XXH_SSE2 /* sse2 */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX2 /* avx2 */ +# define XXH_ACC_ALIGN 32 +# elif XXH_VECTOR == XXH_NEON /* neon */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_VSX /* vsx */ +# define XXH_ACC_ALIGN 16 +# elif XXH_VECTOR == XXH_AVX512 /* avx512 */ +# define XXH_ACC_ALIGN 64 +# endif +#endif + +#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \ + || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512 +# define XXH_SEC_ALIGN XXH_ACC_ALIGN +#else +# define XXH_SEC_ALIGN 8 +#endif + +/* + * UGLY HACK: + * GCC usually generates the best code with -O3 for xxHash. + * + * However, when targeting AVX2, it is overzealous in its unrolling resulting + * in code roughly 3/4 the speed of Clang. + * + * There are other issues, such as GCC splitting _mm256_loadu_si256 into + * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which + * only applies to Sandy and Ivy Bridge... which don't even support AVX2. + * + * That is why when compiling the AVX2 version, it is recommended to use either + * -O2 -mavx2 -march=haswell + * or + * -O2 -mavx2 -mno-avx256-split-unaligned-load + * for decent performance, or to use Clang instead. + * + * Fortunately, we can control the first one with a pragma that forces GCC into + * -O2, but the other one we can't control without "failed to inline always + * inline function due to target mismatch" warnings. + */ +#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \ + && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */ +# pragma GCC push_options +# pragma GCC optimize("-O2") +#endif + + +#if XXH_VECTOR == XXH_NEON +/* + * NEON's setup for vmlal_u32 is a little more complicated than it is on + * SSE2, AVX2, and VSX. + * + * While PMULUDQ and VMULEUW both perform a mask, VMLAL.U32 performs an upcast. + * + * To do the same operation, the 128-bit 'Q' register needs to be split into + * two 64-bit 'D' registers, performing this operation:: + * + * [ a | b ] + * | '---------. .--------' | + * | x | + * | .---------' '--------. | + * [ a & 0xFFFFFFFF | b & 0xFFFFFFFF ],[ a >> 32 | b >> 32 ] + * + * Due to significant changes in aarch64, the fastest method for aarch64 is + * completely different than the fastest method for ARMv7-A. + * + * ARMv7-A treats D registers as unions overlaying Q registers, so modifying + * D11 will modify the high half of Q5. This is similar to how modifying AH + * will only affect bits 8-15 of AX on x86. + * + * VZIP takes two registers, and puts even lanes in one register and odd lanes + * in the other. + * + * On ARMv7-A, this strangely modifies both parameters in place instead of + * taking the usual 3-operand form. + * + * Therefore, if we want to do this, we can simply use a D-form VZIP.32 on the + * lower and upper halves of the Q register to end up with the high and low + * halves where we want - all in one instruction. + * + * vzip.32 d10, d11 @ d10 = { d10[0], d11[0] }; d11 = { d10[1], d11[1] } + * + * Unfortunately we need inline assembly for this: Instructions modifying two + * registers at once is not possible in GCC or Clang's IR, and they have to + * create a copy. + * + * aarch64 requires a different approach. + * + * In order to make it easier to write a decent compiler for aarch64, many + * quirks were removed, such as conditional execution. + * + * NEON was also affected by this. + * + * aarch64 cannot access the high bits of a Q-form register, and writes to a + * D-form register zero the high bits, similar to how writes to W-form scalar + * registers (or DWORD registers on x86_64) work. + * + * The formerly free vget_high intrinsics now require a vext (with a few + * exceptions) + * + * Additionally, VZIP was replaced by ZIP1 and ZIP2, which are the equivalent + * of PUNPCKL* and PUNPCKH* in SSE, respectively, in order to only modify one + * operand. + * + * The equivalent of the VZIP.32 on the lower and upper halves would be this + * mess: + * + * ext v2.4s, v0.4s, v0.4s, #2 // v2 = { v0[2], v0[3], v0[0], v0[1] } + * zip1 v1.2s, v0.2s, v2.2s // v1 = { v0[0], v2[0] } + * zip2 v0.2s, v0.2s, v1.2s // v0 = { v0[1], v2[1] } + * + * Instead, we use a literal downcast, vmovn_u64 (XTN), and vshrn_n_u64 (SHRN): + * + * shrn v1.2s, v0.2d, #32 // v1 = (uint32x2_t)(v0 >> 32); + * xtn v0.2s, v0.2d // v0 = (uint32x2_t)(v0 & 0xFFFFFFFF); + * + * This is available on ARMv7-A, but is less efficient than a single VZIP.32. + */ + +/*! + * Function-like macro: + * void XXH_SPLIT_IN_PLACE(uint64x2_t &in, uint32x2_t &outLo, uint32x2_t &outHi) + * { + * outLo = (uint32x2_t)(in & 0xFFFFFFFF); + * outHi = (uint32x2_t)(in >> 32); + * in = UNDEFINED; + * } + */ +# if !defined(XXH_NO_VZIP_HACK) /* define to disable */ \ + && defined(__GNUC__) \ + && !defined(__aarch64__) && !defined(__arm64__) && !defined(_M_ARM64) +# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \ + do { \ + /* Undocumented GCC/Clang operand modifier: %e0 = lower D half, %f0 = upper D half */ \ + /* https://github.com/gcc-mirror/gcc/blob/38cf91e5/gcc/config/arm/arm.c#L22486 */ \ + /* https://github.com/llvm-mirror/llvm/blob/2c4ca683/lib/Target/ARM/ARMAsmPrinter.cpp#L399 */ \ + __asm__("vzip.32 %e0, %f0" : "+w" (in)); \ + (outLo) = vget_low_u32 (vreinterpretq_u32_u64(in)); \ + (outHi) = vget_high_u32(vreinterpretq_u32_u64(in)); \ + } while (0) +# else +# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \ + do { \ + (outLo) = vmovn_u64 (in); \ + (outHi) = vshrn_n_u64 ((in), 32); \ + } while (0) +# endif +#endif /* XXH_VECTOR == XXH_NEON */ + +/* + * VSX and Z Vector helpers. + * + * This is very messy, and any pull requests to clean this up are welcome. + * + * There are a lot of problems with supporting VSX and s390x, due to + * inconsistent intrinsics, spotty coverage, and multiple endiannesses. + */ +#if XXH_VECTOR == XXH_VSX +# if defined(__s390x__) +# include +# else +/* gcc's altivec.h can have the unwanted consequence to unconditionally + * #define bool, vector, and pixel keywords, + * with bad consequences for programs already using these keywords for other purposes. + * The paragraph defining these macros is skipped when __APPLE_ALTIVEC__ is defined. + * __APPLE_ALTIVEC__ is _generally_ defined automatically by the compiler, + * but it seems that, in some cases, it isn't. + * Force the build macro to be defined, so that keywords are not altered. + */ +# if defined(__GNUC__) && !defined(__APPLE_ALTIVEC__) +# define __APPLE_ALTIVEC__ +# endif +# include +# endif + +typedef __vector unsigned long long xxh_u64x2; +typedef __vector unsigned char xxh_u8x16; +typedef __vector unsigned xxh_u32x4; + +# ifndef XXH_VSX_BE +# if defined(__BIG_ENDIAN__) \ + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define XXH_VSX_BE 1 +# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__ +# warning "-maltivec=be is not recommended. Please use native endianness." +# define XXH_VSX_BE 1 +# else +# define XXH_VSX_BE 0 +# endif +# endif /* !defined(XXH_VSX_BE) */ + +# if XXH_VSX_BE +# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__)) +# define XXH_vec_revb vec_revb +# else +/*! + * A polyfill for POWER9's vec_revb(). + */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val) +{ + xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 }; + return vec_perm(val, val, vByteSwap); +} +# endif +# endif /* XXH_VSX_BE */ + +/*! + * Performs an unaligned vector load and byte swaps it on big endian. + */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr) +{ + xxh_u64x2 ret; + XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2)); +# if XXH_VSX_BE + ret = XXH_vec_revb(ret); +# endif + return ret; +} + +/* + * vec_mulo and vec_mule are very problematic intrinsics on PowerPC + * + * These intrinsics weren't added until GCC 8, despite existing for a while, + * and they are endian dependent. Also, their meaning swap depending on version. + * */ +# if defined(__s390x__) + /* s390x is always big endian, no issue on this platform */ +# define XXH_vec_mulo vec_mulo +# define XXH_vec_mule vec_mule +# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) +/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */ +# define XXH_vec_mulo __builtin_altivec_vmulouw +# define XXH_vec_mule __builtin_altivec_vmuleuw +# else +/* gcc needs inline assembly */ +/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */ +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmulouw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b) +{ + xxh_u64x2 result; + __asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b)); + return result; +} +# endif /* XXH_vec_mulo, XXH_vec_mule */ +#endif /* XXH_VECTOR == XXH_VSX */ + + +/* prefetch + * can be disabled, by declaring XXH_NO_PREFETCH build macro */ +#if defined(XXH_NO_PREFETCH) +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +#else +# if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */ +# include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ +# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) +# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) +# define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) +# else +# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */ +# endif +#endif /* XXH_NO_PREFETCH */ + + +/* ========================================== + * XXH3 default settings + * ========================================== */ + +#define XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */ + +#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN) +# error "default keyset is not large enough" +#endif + +/*! Pseudorandom secret taken directly from FARSH. */ +XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = { + 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c, + 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, + 0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21, + 0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c, + 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3, + 0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8, + 0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d, + 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64, + 0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb, + 0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e, + 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce, + 0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e, +}; + + +#ifdef XXH_OLD_NAMES +# define kSecret XXH3_kSecret +#endif + +#ifdef XXH_DOXYGEN +/*! + * @brief Calculates a 32-bit to 64-bit long multiply. + * + * Implemented as a macro. + * + * Wraps `__emulu` on MSVC x86 because it tends to call `__allmul` when it doesn't + * need to (but it shouldn't need to anyways, it is about 7 instructions to do + * a 64x64 multiply...). Since we know that this will _always_ emit `MULL`, we + * use that instead of the normal method. + * + * If you are compiling for platforms like Thumb-1 and don't have a better option, + * you may also want to write your own long multiply routine here. + * + * @param x, y Numbers to be multiplied + * @return 64-bit product of the low 32 bits of @p x and @p y. + */ +XXH_FORCE_INLINE xxh_u64 +XXH_mult32to64(xxh_u64 x, xxh_u64 y) +{ + return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF); +} +#elif defined(_MSC_VER) && defined(_M_IX86) +# include +# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y)) +#else +/* + * Downcast + upcast is usually better than masking on older compilers like + * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers. + * + * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands + * and perform a full 64x64 multiply -- entirely redundant on 32-bit. + */ +# define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y)) +#endif + +/*! + * @brief Calculates a 64->128-bit long multiply. + * + * Uses `__uint128_t` and `_umul128` if available, otherwise uses a scalar + * version. + * + * @param lhs , rhs The 64-bit integers to be multiplied + * @return The 128-bit result represented in an @ref XXH128_hash_t. + */ +static XXH128_hash_t +XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs) +{ + /* + * GCC/Clang __uint128_t method. + * + * On most 64-bit targets, GCC and Clang define a __uint128_t type. + * This is usually the best way as it usually uses a native long 64-bit + * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64. + * + * Usually. + * + * Despite being a 32-bit platform, Clang (and emscripten) define this type + * despite not having the arithmetic for it. This results in a laggy + * compiler builtin call which calculates a full 128-bit multiply. + * In that case it is best to use the portable one. + * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677 + */ +#if defined(__GNUC__) && !defined(__wasm__) \ + && defined(__SIZEOF_INT128__) \ + || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128) + + __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs; + XXH128_hash_t r128; + r128.low64 = (xxh_u64)(product); + r128.high64 = (xxh_u64)(product >> 64); + return r128; + + /* + * MSVC for x64's _umul128 method. + * + * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct); + * + * This compiles to single operand MUL on x64. + */ +#elif defined(_M_X64) || defined(_M_IA64) + +#ifndef _MSC_VER +# pragma intrinsic(_umul128) +#endif + xxh_u64 product_high; + xxh_u64 const product_low = _umul128(lhs, rhs, &product_high); + XXH128_hash_t r128; + r128.low64 = product_low; + r128.high64 = product_high; + return r128; + + /* + * MSVC for ARM64's __umulh method. + * + * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method. + */ +#elif defined(_M_ARM64) + +#ifndef _MSC_VER +# pragma intrinsic(__umulh) +#endif + XXH128_hash_t r128; + r128.low64 = lhs * rhs; + r128.high64 = __umulh(lhs, rhs); + return r128; + +#else + /* + * Portable scalar method. Optimized for 32-bit and 64-bit ALUs. + * + * This is a fast and simple grade school multiply, which is shown below + * with base 10 arithmetic instead of base 0x100000000. + * + * 9 3 // D2 lhs = 93 + * x 7 5 // D2 rhs = 75 + * ---------- + * 1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15 + * 4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45 + * 2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21 + * + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63 + * --------- + * 2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27 + * + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67 + * --------- + * 6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975 + * + * The reasons for adding the products like this are: + * 1. It avoids manual carry tracking. Just like how + * (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX. + * This avoids a lot of complexity. + * + * 2. It hints for, and on Clang, compiles to, the powerful UMAAL + * instruction available in ARM's Digital Signal Processing extension + * in 32-bit ARMv6 and later, which is shown below: + * + * void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm) + * { + * xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm; + * *RdLo = (xxh_u32)(product & 0xFFFFFFFF); + * *RdHi = (xxh_u32)(product >> 32); + * } + * + * This instruction was designed for efficient long multiplication, and + * allows this to be calculated in only 4 instructions at speeds + * comparable to some 64-bit ALUs. + * + * 3. It isn't terrible on other platforms. Usually this will be a couple + * of 32-bit ADD/ADCs. + */ + + /* First calculate all of the cross products. */ + xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF); + xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32, rhs & 0xFFFFFFFF); + xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32); + xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32, rhs >> 32); + + /* Now add the products together. These will never overflow. */ + xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi; + xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32) + hi_hi; + xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF); + + XXH128_hash_t r128; + r128.low64 = lower; + r128.high64 = upper; + return r128; +#endif +} + +/*! + * @brief Calculates a 64-bit to 128-bit multiply, then XOR folds it. + * + * The reason for the separate function is to prevent passing too many structs + * around by value. This will hopefully inline the multiply, but we don't force it. + * + * @param lhs , rhs The 64-bit integers to multiply + * @return The low 64 bits of the product XOR'd by the high 64 bits. + * @see XXH_mult64to128() + */ +static xxh_u64 +XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs) +{ + XXH128_hash_t product = XXH_mult64to128(lhs, rhs); + return product.low64 ^ product.high64; +} + +/*! Seems to produce slightly better code on GCC for some reason. */ +XXH_FORCE_INLINE xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift) +{ + XXH_ASSERT(0 <= shift && shift < 64); + return v64 ^ (v64 >> shift); +} + +/* + * This is a fast avalanche stage, + * suitable when input bits are already partially mixed + */ +static XXH64_hash_t XXH3_avalanche(xxh_u64 h64) +{ + h64 = XXH_xorshift64(h64, 37); + h64 *= 0x165667919E3779F9ULL; + h64 = XXH_xorshift64(h64, 32); + return h64; +} + +/* + * This is a stronger avalanche, + * inspired by Pelle Evensen's rrmxmx + * preferable when input has not been previously mixed + */ +static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len) +{ + /* this mix is inspired by Pelle Evensen's rrmxmx */ + h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24); + h64 *= 0x9FB21C651E98DF25ULL; + h64 ^= (h64 >> 35) + len ; + h64 *= 0x9FB21C651E98DF25ULL; + return XXH_xorshift64(h64, 28); +} + + +/* ========================================== + * Short keys + * ========================================== + * One of the shortcomings of XXH32 and XXH64 was that their performance was + * sub-optimal on short lengths. It used an iterative algorithm which strongly + * favored lengths that were a multiple of 4 or 8. + * + * Instead of iterating over individual inputs, we use a set of single shot + * functions which piece together a range of lengths and operate in constant time. + * + * Additionally, the number of multiplies has been significantly reduced. This + * reduces latency, especially when emulating 64-bit multiplies on 32-bit. + * + * Depending on the platform, this may or may not be faster than XXH32, but it + * is almost guaranteed to be faster than XXH64. + */ + +/* + * At very short lengths, there isn't enough input to fully hide secrets, or use + * the entire secret. + * + * There is also only a limited amount of mixing we can do before significantly + * impacting performance. + * + * Therefore, we use different sections of the secret and always mix two secret + * samples with an XOR. This should have no effect on performance on the + * seedless or withSeed variants because everything _should_ be constant folded + * by modern compilers. + * + * The XOR mixing hides individual parts of the secret and increases entropy. + * + * This adds an extra layer of strength for custom secrets. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combined = { input[0], 0x01, input[0], input[0] } + * len = 2: combined = { input[1], 0x02, input[0], input[1] } + * len = 3: combined = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const keyed = (xxh_u64)combined ^ bitflip; + return XXH64_avalanche(keyed); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len <= 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input1 = XXH_readLE32(input); + xxh_u32 const input2 = XXH_readLE32(input + len - 4); + xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed; + xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32); + xxh_u64 const keyed = input64 ^ bitflip; + return XXH3_rrmxmx(keyed, len); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(9 <= len && len <= 16); + { xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed; + xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed; + xxh_u64 const input_lo = XXH_readLE64(input) ^ bitflip1; + xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2; + xxh_u64 const acc = len + + XXH_swap64(input_lo) + input_hi + + XXH3_mul128_fold64(input_lo, input_hi); + return XXH3_avalanche(acc); + } +} + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (XXH_likely(len > 8)) return XXH3_len_9to16_64b(input, len, secret, seed); + if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed); + if (len) return XXH3_len_1to3_64b(input, len, secret, seed); + return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64))); + } +} + +/* + * DISCLAIMER: There are known *seed-dependent* multicollisions here due to + * multiplication by zero, affecting hashes of lengths 17 to 240. + * + * However, they are very unlikely. + * + * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all + * unseeded non-cryptographic hashes, it does not attempt to defend itself + * against specially crafted inputs, only random inputs. + * + * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes + * cancelling out the secret is taken an arbitrary number of times (addressed + * in XXH3_accumulate_512), this collision is very unlikely with random inputs + * and/or proper seeding: + * + * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a + * function that is only called up to 16 times per hash with up to 240 bytes of + * input. + * + * This is not too bad for a non-cryptographic hash function, especially with + * only 64 bit outputs. + * + * The 128-bit variant (which trades some speed for strength) is NOT affected + * by this, although it is always a good idea to use a proper seed if you care + * about strength. + */ +XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64) +{ +#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \ + && defined(__i386__) && defined(__SSE2__) /* x86 + SSE2 */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable like XXH32 hack */ + /* + * UGLY HACK: + * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in + * slower code. + * + * By forcing seed64 into a register, we disrupt the cost model and + * cause it to scalarize. See `XXH32_round()` + * + * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600, + * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on + * GCC 9.2, despite both emitting scalar code. + * + * GCC generates much better scalar code than Clang for the rest of XXH3, + * which is why finding a more optimal codepath is an interest. + */ + XXH_COMPILER_GUARD(seed64); +#endif + { xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 const input_hi = XXH_readLE64(input+8); + return XXH3_mul128_fold64( + input_lo ^ (XXH_readLE64(secret) + seed64), + input_hi ^ (XXH_readLE64(secret+8) - seed64) + ); + } +} + +/* For mid range keys, XXH3 uses a Mum-hash variant. */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { xxh_u64 acc = len * XXH_PRIME64_1; + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc += XXH3_mix16B(input+48, secret+96, seed); + acc += XXH3_mix16B(input+len-64, secret+112, seed); + } + acc += XXH3_mix16B(input+32, secret+64, seed); + acc += XXH3_mix16B(input+len-48, secret+80, seed); + } + acc += XXH3_mix16B(input+16, secret+32, seed); + acc += XXH3_mix16B(input+len-32, secret+48, seed); + } + acc += XXH3_mix16B(input+0, secret+0, seed); + acc += XXH3_mix16B(input+len-16, secret+16, seed); + + return XXH3_avalanche(acc); + } +} + +#define XXH3_MIDSIZE_MAX 240 + +XXH_NO_INLINE XXH64_hash_t +XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + #define XXH3_MIDSIZE_STARTOFFSET 3 + #define XXH3_MIDSIZE_LASTOFFSET 17 + + { xxh_u64 acc = len * XXH_PRIME64_1; + int const nbRounds = (int)len / 16; + int i; + for (i=0; i<8; i++) { + acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed); + } + acc = XXH3_avalanche(acc); + XXH_ASSERT(nbRounds >= 8); +#if defined(__clang__) /* Clang */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86. + * In everywhere else, it uses scalar code. + * + * For 64->128-bit multiplies, even if the NEON was 100% optimal, it + * would still be slower than UMAAL (see XXH_mult64to128). + * + * Unfortunately, Clang doesn't handle the long multiplies properly and + * converts them to the nonexistent "vmulq_u64" intrinsic, which is then + * scalarized into an ugly mess of VMOV.32 instructions. + * + * This mess is difficult to avoid without turning autovectorization + * off completely, but they are usually relatively minor and/or not + * worth it to fix. + * + * This loop is the easiest to fix, as unlike XXH32, this pragma + * _actually works_ because it is a loop vectorization instead of an + * SLP vectorization. + */ + #pragma clang loop vectorize(disable) +#endif + for (i=8 ; i < nbRounds; i++) { + acc += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed); + } + /* last bytes */ + acc += XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed); + return XXH3_avalanche(acc); + } +} + + +/* ======= Long Keys ======= */ + +#define XXH_STRIPE_LEN 64 +#define XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */ +#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64)) + +#ifdef XXH_OLD_NAMES +# define STRIPE_LEN XXH_STRIPE_LEN +# define ACC_NB XXH_ACC_NB +#endif + +XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64) +{ + if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64); + XXH_memcpy(dst, &v64, sizeof(v64)); +} + +/* Several intrinsic functions below are supposed to accept __int64 as argument, + * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ . + * However, several environments do not define __int64 type, + * requiring a workaround. + */ +#if !defined (__VMS) \ + && (defined (__cplusplus) \ + || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) + typedef int64_t xxh_i64; +#else + /* the following type must have a width of 64-bit */ + typedef long long xxh_i64; +#endif + +/* + * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized. + * + * It is a hardened version of UMAC, based off of FARSH's implementation. + * + * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD + * implementations, and it is ridiculously fast. + * + * We harden it by mixing the original input to the accumulators as well as the product. + * + * This means that in the (relatively likely) case of a multiply by zero, the + * original input is preserved. + * + * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve + * cross-pollination, as otherwise the upper and lower halves would be + * essentially independent. + * + * This doesn't matter on 64-bit hashes since they all get merged together in + * the end, so we skip the extra step. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +#if (XXH_VECTOR == XXH_AVX512) \ + || (defined(XXH_DISPATCH_AVX512) && XXH_DISPATCH_AVX512 != 0) + +#ifndef XXH_TARGET_AVX512 +# define XXH_TARGET_AVX512 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + __m512i* const xacc = (__m512i *) acc; + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + + { + /* data_vec = input[0]; */ + __m512i const data_vec = _mm512_loadu_si512 (input); + /* key_vec = secret[0]; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + /* data_key = data_vec ^ key_vec; */ + __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m512i const data_key_lo = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m512i const product = _mm512_mul_epu32 (data_key, data_key_lo); + /* xacc[0] += swap(data_vec); */ + __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2)); + __m512i const sum = _mm512_add_epi64(*xacc, data_swap); + /* xacc[0] += product; */ + *xacc = _mm512_add_epi64(product, sum); + } +} + +/* + * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing. + * + * Multiplication isn't perfect, as explained by Google in HighwayHash: + * + * // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to + * // varying degrees. In descending order of goodness, bytes + * // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32. + * // As expected, the upper and lower bytes are much worse. + * + * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291 + * + * Since our algorithm uses a pseudorandom secret to add some variance into the + * mix, we don't need to (or want to) mix as often or as much as HighwayHash does. + * + * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid + * extraction. + * + * Both XXH3_64bits and XXH3_128bits use this subroutine. + */ + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 63) == 0); + XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i)); + { __m512i* const xacc = (__m512i*) acc; + const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1); + + /* xacc[0] ^= (xacc[0] >> 47) */ + __m512i const acc_vec = *xacc; + __m512i const shifted = _mm512_srli_epi64 (acc_vec, 47); + __m512i const data_vec = _mm512_xor_si512 (acc_vec, shifted); + /* xacc[0] ^= secret; */ + __m512i const key_vec = _mm512_loadu_si512 (secret); + __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec); + + /* xacc[0] *= XXH_PRIME32_1; */ + __m512i const data_key_hi = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1)); + __m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32); + __m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32); + *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32)); + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX512 void +XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64); + XXH_ASSERT(((size_t)customSecret & 63) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i); + __m512i const seed = _mm512_mask_set1_epi64(_mm512_set1_epi64((xxh_i64)seed64), 0xAA, (xxh_i64)(0U - seed64)); + + const __m512i* const src = (const __m512i*) ((const void*) XXH3_kSecret); + __m512i* const dest = ( __m512i*) customSecret; + int i; + XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dest & 63) == 0); + for (i=0; i < nbRounds; ++i) { + /* GCC has a bug, _mm512_stream_load_si512 accepts 'void*', not 'void const*', + * this will warn "discards 'const' qualifier". */ + union { + const __m512i* cp; + void* p; + } remote_const_void; + remote_const_void.cp = src + i; + dest[i] = _mm512_add_epi64(_mm512_stream_load_si512(remote_const_void.p), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_AVX2) \ + || (defined(XXH_DISPATCH_AVX2) && XXH_DISPATCH_AVX2 != 0) + +#ifndef XXH_TARGET_AVX2 +# define XXH_TARGET_AVX2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { __m256i* const xacc = (__m256i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xinput = (const __m256i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* data_vec = xinput[i]; */ + __m256i const data_vec = _mm256_loadu_si256 (xinput+i); + /* key_vec = xsecret[i]; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m256i const data_key_lo = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m256i const product = _mm256_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2)); + __m256i const sum = _mm256_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm256_add_epi64(product, sum); + } } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void +XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 31) == 0); + { __m256i* const xacc = (__m256i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */ + const __m256i* const xsecret = (const __m256i *) secret; + const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m256i const acc_vec = xacc[i]; + __m256i const shifted = _mm256_srli_epi64 (acc_vec, 47); + __m256i const data_vec = _mm256_xor_si256 (acc_vec, shifted); + /* xacc[i] ^= xsecret; */ + __m256i const key_vec = _mm256_loadu_si256 (xsecret+i); + __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m256i const data_key_hi = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + __m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32); + __m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0); + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6); + XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64); + (void)(&XXH_writeLE64); + XXH_PREFETCH(customSecret); + { __m256i const seed = _mm256_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64, (xxh_i64)(0U - seed64), (xxh_i64)seed64); + + const __m256i* const src = (const __m256i*) ((const void*) XXH3_kSecret); + __m256i* dest = ( __m256i*) customSecret; + +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + */ + XXH_COMPILER_GUARD(dest); +# endif + XXH_ASSERT(((size_t)src & 31) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dest & 31) == 0); + + /* GCC -O2 need unroll loop manually */ + dest[0] = _mm256_add_epi64(_mm256_stream_load_si256(src+0), seed); + dest[1] = _mm256_add_epi64(_mm256_stream_load_si256(src+1), seed); + dest[2] = _mm256_add_epi64(_mm256_stream_load_si256(src+2), seed); + dest[3] = _mm256_add_epi64(_mm256_stream_load_si256(src+3), seed); + dest[4] = _mm256_add_epi64(_mm256_stream_load_si256(src+4), seed); + dest[5] = _mm256_add_epi64(_mm256_stream_load_si256(src+5), seed); + } +} + +#endif + +/* x86dispatch always generates SSE2 */ +#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH) + +#ifndef XXH_TARGET_SSE2 +# define XXH_TARGET_SSE2 /* disable attribute target */ +#endif + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + /* SSE2 is just a half-scale version of the AVX2 version. */ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { __m128i* const xacc = (__m128i *) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xinput = (const __m128i *) input; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* data_vec = xinput[i]; */ + __m128i const data_vec = _mm_loadu_si128 (xinput+i); + /* key_vec = xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + /* data_key = data_vec ^ key_vec; */ + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + /* data_key_lo = data_key >> 32; */ + __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ + __m128i const product = _mm_mul_epu32 (data_key, data_key_lo); + /* xacc[i] += swap(data_vec); */ + __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2)); + __m128i const sum = _mm_add_epi64(xacc[i], data_swap); + /* xacc[i] += product; */ + xacc[i] = _mm_add_epi64(product, sum); + } } +} + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void +XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { __m128i* const xacc = (__m128i*) acc; + /* Unaligned. This is mainly for pointer arithmetic, and because + * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */ + const __m128i* const xsecret = (const __m128i *) secret; + const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ + __m128i const acc_vec = xacc[i]; + __m128i const shifted = _mm_srli_epi64 (acc_vec, 47); + __m128i const data_vec = _mm_xor_si128 (acc_vec, shifted); + /* xacc[i] ^= xsecret[i]; */ + __m128i const key_vec = _mm_loadu_si128 (xsecret+i); + __m128i const data_key = _mm_xor_si128 (data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ + __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1)); + __m128i const prod_lo = _mm_mul_epu32 (data_key, prime32); + __m128i const prod_hi = _mm_mul_epu32 (data_key_hi, prime32); + xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32)); + } + } +} + +XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i); + +# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900 + /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */ + XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) }; + __m128i const seed = _mm_load_si128((__m128i const*)seed64x2); +# else + __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64); +# endif + int i; + + const void* const src16 = XXH3_kSecret; + __m128i* dst16 = (__m128i*) customSecret; +# if defined(__GNUC__) || defined(__clang__) + /* + * On GCC & Clang, marking 'dest' as modified will cause the compiler: + * - do not extract the secret from sse registers in the internal loop + * - use less common registers, and avoid pushing these reg into stack + */ + XXH_COMPILER_GUARD(dst16); +# endif + XXH_ASSERT(((size_t)src16 & 15) == 0); /* control alignment */ + XXH_ASSERT(((size_t)dst16 & 15) == 0); + + for (i=0; i < nbRounds; ++i) { + dst16[i] = _mm_add_epi64(_mm_load_si128((const __m128i *)src16+i), seed); + } } +} + +#endif + +#if (XXH_VECTOR == XXH_NEON) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_neon( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + { + uint64x2_t* const xacc = (uint64x2_t *) acc; + /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */ + uint8_t const* const xinput = (const uint8_t *) input; + uint8_t const* const xsecret = (const uint8_t *) secret; + + size_t i; + for (i=0; i < XXH_STRIPE_LEN / sizeof(uint64x2_t); i++) { + /* data_vec = xinput[i]; */ + uint8x16_t data_vec = vld1q_u8(xinput + (i * 16)); + /* key_vec = xsecret[i]; */ + uint8x16_t key_vec = vld1q_u8(xsecret + (i * 16)); + uint64x2_t data_key; + uint32x2_t data_key_lo, data_key_hi; + /* xacc[i] += swap(data_vec); */ + uint64x2_t const data64 = vreinterpretq_u64_u8(data_vec); + uint64x2_t const swapped = vextq_u64(data64, data64, 1); + xacc[i] = vaddq_u64 (xacc[i], swapped); + /* data_key = data_vec ^ key_vec; */ + data_key = vreinterpretq_u64_u8(veorq_u8(data_vec, key_vec)); + /* data_key_lo = (uint32x2_t) (data_key & 0xFFFFFFFF); + * data_key_hi = (uint32x2_t) (data_key >> 32); + * data_key = UNDEFINED; */ + XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi); + /* xacc[i] += (uint64x2_t) data_key_lo * (uint64x2_t) data_key_hi; */ + xacc[i] = vmlal_u32 (xacc[i], data_key_lo, data_key_hi); + + } + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { uint64x2_t* xacc = (uint64x2_t*) acc; + uint8_t const* xsecret = (uint8_t const*) secret; + uint32x2_t prime = vdup_n_u32 (XXH_PRIME32_1); + + size_t i; + for (i=0; i < XXH_STRIPE_LEN/sizeof(uint64x2_t); i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + uint64x2_t acc_vec = xacc[i]; + uint64x2_t shifted = vshrq_n_u64 (acc_vec, 47); + uint64x2_t data_vec = veorq_u64 (acc_vec, shifted); + + /* xacc[i] ^= xsecret[i]; */ + uint8x16_t key_vec = vld1q_u8 (xsecret + (i * 16)); + uint64x2_t data_key = veorq_u64 (data_vec, vreinterpretq_u64_u8(key_vec)); + + /* xacc[i] *= XXH_PRIME32_1 */ + uint32x2_t data_key_lo, data_key_hi; + /* data_key_lo = (uint32x2_t) (xacc[i] & 0xFFFFFFFF); + * data_key_hi = (uint32x2_t) (xacc[i] >> 32); + * xacc[i] = UNDEFINED; */ + XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi); + { /* + * prod_hi = (data_key >> 32) * XXH_PRIME32_1; + * + * Avoid vmul_u32 + vshll_n_u32 since Clang 6 and 7 will + * incorrectly "optimize" this: + * tmp = vmul_u32(vmovn_u64(a), vmovn_u64(b)); + * shifted = vshll_n_u32(tmp, 32); + * to this: + * tmp = "vmulq_u64"(a, b); // no such thing! + * shifted = vshlq_n_u64(tmp, 32); + * + * However, unlike SSE, Clang lacks a 64-bit multiply routine + * for NEON, and it scalarizes two 64-bit multiplies instead. + * + * vmull_u32 has the same timing as vmul_u32, and it avoids + * this bug completely. + * See https://bugs.llvm.org/show_bug.cgi?id=39967 + */ + uint64x2_t prod_hi = vmull_u32 (data_key_hi, prime); + /* xacc[i] = prod_hi << 32; */ + xacc[i] = vshlq_n_u64(prod_hi, 32); + /* xacc[i] += (prod_hi & 0xFFFFFFFF) * XXH_PRIME32_1; */ + xacc[i] = vmlal_u32(xacc[i], data_key_lo, prime); + } + } } +} + +#endif + +#if (XXH_VECTOR == XXH_VSX) + +XXH_FORCE_INLINE void +XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + /* presumed aligned */ + unsigned long long* const xacc = (unsigned long long*) acc; + xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */ + xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */ + xxh_u64x2 const v32 = { 32, 32 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* data_vec = xinput[i]; */ + xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + i); + /* key_vec = xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + /* shuffled = (data_key << 32) | (data_key >> 32); */ + xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32); + /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */ + xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled); + /* acc_vec = xacc[i]; */ + xxh_u64x2 acc_vec = vec_xl(0, xacc + 2 * i); + acc_vec += product; + + /* swap high and low halves */ +#ifdef __s390x__ + acc_vec += vec_permi(data_vec, data_vec, 2); +#else + acc_vec += vec_xxpermdi(data_vec, data_vec, 2); +#endif + /* xacc[i] = acc_vec; */ + vec_xst(acc_vec, 0, xacc + 2 * i); + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + XXH_ASSERT((((size_t)acc) & 15) == 0); + + { xxh_u64x2* const xacc = (xxh_u64x2*) acc; + const xxh_u64x2* const xsecret = (const xxh_u64x2*) secret; + /* constants */ + xxh_u64x2 const v32 = { 32, 32 }; + xxh_u64x2 const v47 = { 47, 47 }; + xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }; + size_t i; + for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) { + /* xacc[i] ^= (xacc[i] >> 47); */ + xxh_u64x2 const acc_vec = xacc[i]; + xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47); + + /* xacc[i] ^= xsecret[i]; */ + xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i); + xxh_u64x2 const data_key = data_vec ^ key_vec; + + /* xacc[i] *= XXH_PRIME32_1 */ + /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF); */ + xxh_u64x2 const prod_even = XXH_vec_mule((xxh_u32x4)data_key, prime); + /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32); */ + xxh_u64x2 const prod_odd = XXH_vec_mulo((xxh_u32x4)data_key, prime); + xacc[i] = prod_odd + (prod_even << v32); + } } +} + +#endif + +/* scalar variants - universal */ + +XXH_FORCE_INLINE void +XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc, + const void* XXH_RESTRICT input, + const void* XXH_RESTRICT secret) +{ + xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ + const xxh_u8* const xinput = (const xxh_u8*) input; /* no alignment restriction */ + const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ + size_t i; + XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0); + for (i=0; i < XXH_ACC_NB; i++) { + xxh_u64 const data_val = XXH_readLE64(xinput + 8*i); + xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + i*8); + xacc[i ^ 1] += data_val; /* swap adjacent lanes */ + xacc[i] += XXH_mult32to64(data_key & 0xFFFFFFFF, data_key >> 32); + } +} + +XXH_FORCE_INLINE void +XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) +{ + xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */ + const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */ + size_t i; + XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0); + for (i=0; i < XXH_ACC_NB; i++) { + xxh_u64 const key64 = XXH_readLE64(xsecret + 8*i); + xxh_u64 acc64 = xacc[i]; + acc64 = XXH_xorshift64(acc64, 47); + acc64 ^= key64; + acc64 *= XXH_PRIME32_1; + xacc[i] = acc64; + } +} + +XXH_FORCE_INLINE void +XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64) +{ + /* + * We need a separate pointer for the hack below, + * which requires a non-const pointer. + * Any decent compiler will optimize this out otherwise. + */ + const xxh_u8* kSecretPtr = XXH3_kSecret; + XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0); + +#if defined(__clang__) && defined(__aarch64__) + /* + * UGLY HACK: + * Clang generates a bunch of MOV/MOVK pairs for aarch64, and they are + * placed sequentially, in order, at the top of the unrolled loop. + * + * While MOVK is great for generating constants (2 cycles for a 64-bit + * constant compared to 4 cycles for LDR), long MOVK chains stall the + * integer pipelines: + * I L S + * MOVK + * MOVK + * MOVK + * MOVK + * ADD + * SUB STR + * STR + * By forcing loads from memory (as the asm line causes Clang to assume + * that XXH3_kSecretPtr has been changed), the pipelines are used more + * efficiently: + * I L S + * LDR + * ADD LDR + * SUB STR + * STR + * XXH3_64bits_withSeed, len == 256, Snapdragon 835 + * without hack: 2654.4 MB/s + * with hack: 3202.9 MB/s + */ + XXH_COMPILER_GUARD(kSecretPtr); +#endif + /* + * Note: in debug mode, this overrides the asm optimization + * and Clang will emit MOVK chains again. + */ + XXH_ASSERT(kSecretPtr == XXH3_kSecret); + + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16; + int i; + for (i=0; i < nbRounds; i++) { + /* + * The asm hack causes Clang to assume that kSecretPtr aliases with + * customSecret, and on aarch64, this prevented LDP from merging two + * loads together for free. Putting the loads together before the stores + * properly generates LDP. + */ + xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i) + seed64; + xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64; + XXH_writeLE64((xxh_u8*)customSecret + 16*i, lo); + XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi); + } } +} + + +typedef void (*XXH3_f_accumulate_512)(void* XXH_RESTRICT, const void*, const void*); +typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*); +typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64); + + +#if (XXH_VECTOR == XXH_AVX512) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx512 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512 + +#elif (XXH_VECTOR == XXH_AVX2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_avx2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2 + +#elif (XXH_VECTOR == XXH_SSE2) + +#define XXH3_accumulate_512 XXH3_accumulate_512_sse2 +#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2 +#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2 + +#elif (XXH_VECTOR == XXH_NEON) + +#define XXH3_accumulate_512 XXH3_accumulate_512_neon +#define XXH3_scrambleAcc XXH3_scrambleAcc_neon +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#elif (XXH_VECTOR == XXH_VSX) + +#define XXH3_accumulate_512 XXH3_accumulate_512_vsx +#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#else /* scalar */ + +#define XXH3_accumulate_512 XXH3_accumulate_512_scalar +#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar +#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + +#endif + + + +#ifndef XXH_PREFETCH_DIST +# ifdef __clang__ +# define XXH_PREFETCH_DIST 320 +# else +# if (XXH_VECTOR == XXH_AVX512) +# define XXH_PREFETCH_DIST 512 +# else +# define XXH_PREFETCH_DIST 384 +# endif +# endif /* __clang__ */ +#endif /* XXH_PREFETCH_DIST */ + +/* + * XXH3_accumulate() + * Loops over XXH3_accumulate_512(). + * Assumption: nbStripes will not overflow the secret size + */ +XXH_FORCE_INLINE void +XXH3_accumulate( xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, + const xxh_u8* XXH_RESTRICT secret, + size_t nbStripes, + XXH3_f_accumulate_512 f_acc512) +{ + size_t n; + for (n = 0; n < nbStripes; n++ ) { + const xxh_u8* const in = input + n*XXH_STRIPE_LEN; + XXH_PREFETCH(in + XXH_PREFETCH_DIST); + f_acc512(acc, + in, + secret + n*XXH_SECRET_CONSUME_RATE); + } +} + +XXH_FORCE_INLINE void +XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc, + const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE; + size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock; + size_t const nb_blocks = (len - 1) / block_len; + + size_t n; + + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + + for (n = 0; n < nb_blocks; n++) { + XXH3_accumulate(acc, input + n*block_len, secret, nbStripesPerBlock, f_acc512); + f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN); + } + + /* last partial block */ + XXH_ASSERT(len > XXH_STRIPE_LEN); + { size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN; + XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE)); + XXH3_accumulate(acc, input + nb_blocks*block_len, secret, nbStripes, f_acc512); + + /* last stripe */ + { const xxh_u8* const p = input + len - XXH_STRIPE_LEN; +#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */ + f_acc512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START); + } } +} + +XXH_FORCE_INLINE xxh_u64 +XXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret) +{ + return XXH3_mul128_fold64( + acc[0] ^ XXH_readLE64(secret), + acc[1] ^ XXH_readLE64(secret+8) ); +} + +static XXH64_hash_t +XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start) +{ + xxh_u64 result64 = start; + size_t i = 0; + + for (i = 0; i < 4; i++) { + result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i); +#if defined(__clang__) /* Clang */ \ + && (defined(__arm__) || defined(__thumb__)) /* ARMv7 */ \ + && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \ + && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */ + /* + * UGLY HACK: + * Prevent autovectorization on Clang ARMv7-a. Exact same problem as + * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b. + * XXH3_64bits, len == 256, Snapdragon 835: + * without hack: 2063.7 MB/s + * with hack: 2560.7 MB/s + */ + XXH_COMPILER_GUARD(result64); +#endif + } + + return XXH3_avalanche(result64); +} + +#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \ + XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 } + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len, + const void* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc512, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + /* do not align on 8, so that the secret is different from the accumulator */ +#define XXH_SECRET_MERGEACCS_START 11 + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1); +} + +/* + * It's important for performance to transmit secret's size (when it's static) + * so that the compiler can properly optimize the vectorized loop. + * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * It's preferable for performance that XXH3_hashLong is not inlined, + * as it results in a smaller function for small data, easier to the instruction cache. + * Note that inside this no_inline function, we do inline the internal loop, + * and provide a statically defined secret size to allow optimization of vector loop. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * XXH3_hashLong_64b_withSeed(): + * Generate a custom key based on alteration of default XXH3_kSecret with the seed, + * and then use this key for long mode hashing. + * + * This operation is decently fast but nonetheless costs a little bit of time. + * Try to avoid it whenever possible (typically when seed==0). + * + * It's important for performance that XXH3_hashLong is not inlined. Not sure + * why (uop cache maybe?), but the difference is large and easily measurable. + */ +XXH_FORCE_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len, + XXH64_hash_t seed, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ + if (seed == 0) + return XXH3_hashLong_64b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc512, f_scramble); + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed); + return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret), + f_acc512, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH64_hash_t +XXH3_hashLong_64b_withSeed(const void* input, size_t len, + XXH64_hash_t seed, const xxh_u8* secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_64b_withSeed_internal(input, len, seed, + XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + + +typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH64_hash_t +XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong64_f f_hashLong) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secretLen` condition is not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + * Also, note that function signature doesn't offer room to return an error. + */ + if (len <= 16) + return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen); +} + + +/* === Public entry point === */ + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* input, size_t len) +{ + return XXH3_64bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize) +{ + return XXH3_64bits_internal(input, len, 0, secret, secretSize, XXH3_hashLong_64b_withSecret); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSeed(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed); +} + +XXH_PUBLIC_API XXH64_hash_t +XXH3_64bits_withSecretandSeed(const void* input, size_t len, const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); + return XXH3_hashLong_64b_withSecret(input, len, seed, (const xxh_u8*)secret, secretSize); +} + + +/* === XXH3 streaming === */ + +/* + * Malloc's a pointer that is always aligned to align. + * + * This must be freed with `XXH_alignedFree()`. + * + * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte + * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2 + * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON. + * + * This underalignment previously caused a rather obvious crash which went + * completely unnoticed due to XXH3_createState() not actually being tested. + * Credit to RedSpah for noticing this bug. + * + * The alignment is done manually: Functions like posix_memalign or _mm_malloc + * are avoided: To maintain portability, we would have to write a fallback + * like this anyways, and besides, testing for the existence of library + * functions without relying on external build tools is impossible. + * + * The method is simple: Overallocate, manually align, and store the offset + * to the original behind the returned pointer. + * + * Align must be a power of 2 and 8 <= align <= 128. + */ +static void* XXH_alignedMalloc(size_t s, size_t align) +{ + XXH_ASSERT(align <= 128 && align >= 8); /* range check */ + XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */ + XXH_ASSERT(s != 0 && s < (s + align)); /* empty/overflow */ + { /* Overallocate to make room for manual realignment and an offset byte */ + xxh_u8* base = (xxh_u8*)XXH_malloc(s + align); + if (base != NULL) { + /* + * Get the offset needed to align this pointer. + * + * Even if the returned pointer is aligned, there will always be + * at least one byte to store the offset to the original pointer. + */ + size_t offset = align - ((size_t)base & (align - 1)); /* base % align */ + /* Add the offset for the now-aligned pointer */ + xxh_u8* ptr = base + offset; + + XXH_ASSERT((size_t)ptr % align == 0); + + /* Store the offset immediately before the returned pointer. */ + ptr[-1] = (xxh_u8)offset; + return ptr; + } + return NULL; + } +} +/* + * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass + * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout. + */ +static void XXH_alignedFree(void* p) +{ + if (p != NULL) { + xxh_u8* ptr = (xxh_u8*)p; + /* Get the offset byte we added in XXH_malloc. */ + xxh_u8 offset = ptr[-1]; + /* Free the original malloc'd pointer */ + xxh_u8* base = ptr - offset; + XXH_free(base); + } +} +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void) +{ + XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64); + if (state==NULL) return NULL; + XXH3_INITSTATE(state); + return state; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr) +{ + XXH_alignedFree(statePtr); + return XXH_OK; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API void +XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state) +{ + XXH_memcpy(dst_state, src_state, sizeof(*dst_state)); +} + +static void +XXH3_reset_internal(XXH3_state_t* statePtr, + XXH64_hash_t seed, + const void* secret, size_t secretSize) +{ + size_t const initStart = offsetof(XXH3_state_t, bufferedSize); + size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart; + XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart); + XXH_ASSERT(statePtr != NULL); + /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */ + memset((char*)statePtr + initStart, 0, initLength); + statePtr->acc[0] = XXH_PRIME32_3; + statePtr->acc[1] = XXH_PRIME64_1; + statePtr->acc[2] = XXH_PRIME64_2; + statePtr->acc[3] = XXH_PRIME64_3; + statePtr->acc[4] = XXH_PRIME64_4; + statePtr->acc[5] = XXH_PRIME32_2; + statePtr->acc[6] = XXH_PRIME64_5; + statePtr->acc[7] = XXH_PRIME32_1; + statePtr->seed = seed; + statePtr->useSeed = (seed != 0); + statePtr->extSecret = (const unsigned char*)secret; + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + statePtr->secretLimit = secretSize - XXH_STRIPE_LEN; + statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset(XXH3_state_t* statePtr) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize) +{ + if (statePtr == NULL) return XXH_ERROR; + XXH3_reset_internal(statePtr, 0, secret, secretSize); + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + return XXH_OK; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + if (statePtr == NULL) return XXH_ERROR; + if (seed==0) return XXH3_64bits_reset(statePtr); + if ((seed != statePtr->seed) || (statePtr->extSecret != NULL)) + XXH3_initCustomSecret(statePtr->customSecret, seed); + XXH3_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE); + return XXH_OK; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_reset_withSecretandSeed(XXH3_state_t* statePtr, const void* secret, size_t secretSize, XXH64_hash_t seed64) +{ + if (statePtr == NULL) return XXH_ERROR; + if (secret == NULL) return XXH_ERROR; + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + XXH3_reset_internal(statePtr, seed64, secret, secretSize); + statePtr->useSeed = 1; /* always, even if seed64==0 */ + return XXH_OK; +} + +/* Note : when XXH3_consumeStripes() is invoked, + * there must be a guarantee that at least one more byte must be consumed from input + * so that the function can blindly consume all stripes using the "normal" secret segment */ +XXH_FORCE_INLINE void +XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc, + size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock, + const xxh_u8* XXH_RESTRICT input, size_t nbStripes, + const xxh_u8* XXH_RESTRICT secret, size_t secretLimit, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ASSERT(nbStripes <= nbStripesPerBlock); /* can handle max 1 scramble per invocation */ + XXH_ASSERT(*nbStripesSoFarPtr < nbStripesPerBlock); + if (nbStripesPerBlock - *nbStripesSoFarPtr <= nbStripes) { + /* need a scrambling operation */ + size_t const nbStripesToEndofBlock = nbStripesPerBlock - *nbStripesSoFarPtr; + size_t const nbStripesAfterBlock = nbStripes - nbStripesToEndofBlock; + XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripesToEndofBlock, f_acc512); + f_scramble(acc, secret + secretLimit); + XXH3_accumulate(acc, input + nbStripesToEndofBlock * XXH_STRIPE_LEN, secret, nbStripesAfterBlock, f_acc512); + *nbStripesSoFarPtr = nbStripesAfterBlock; + } else { + XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripes, f_acc512); + *nbStripesSoFarPtr += nbStripes; + } +} + +#ifndef XXH3_STREAM_USE_STACK +# ifndef __clang__ /* clang doesn't need additional stack space */ +# define XXH3_STREAM_USE_STACK 1 +# endif +#endif +/* + * Both XXH3_64bits_update and XXH3_128bits_update use this routine. + */ +XXH_FORCE_INLINE XXH_errorcode +XXH3_update(XXH3_state_t* XXH_RESTRICT const state, + const xxh_u8* XXH_RESTRICT input, size_t len, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + if (input==NULL) { + XXH_ASSERT(len == 0); + return XXH_OK; + } + + XXH_ASSERT(state != NULL); + { const xxh_u8* const bEnd = input + len; + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; +#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 + /* For some reason, gcc and MSVC seem to suffer greatly + * when operating accumulators directly into state. + * Operating into stack space seems to enable proper optimization. + * clang, on the other hand, doesn't seem to need this trick */ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8]; memcpy(acc, state->acc, sizeof(acc)); +#else + xxh_u64* XXH_RESTRICT const acc = state->acc; +#endif + state->totalLen += len; + XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE); + + /* small input : just fill in tmp buffer */ + if (state->bufferedSize + len <= XXH3_INTERNALBUFFER_SIZE) { + XXH_memcpy(state->buffer + state->bufferedSize, input, len); + state->bufferedSize += (XXH32_hash_t)len; + return XXH_OK; + } + + /* total input is now > XXH3_INTERNALBUFFER_SIZE */ + #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) + XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0); /* clean multiple */ + + /* + * Internal buffer is partially filled (always, except at beginning) + * Complete it, then consume it. + */ + if (state->bufferedSize) { + size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize; + XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize); + input += loadSize; + XXH3_consumeStripes(acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, XXH3_INTERNALBUFFER_STRIPES, + secret, state->secretLimit, + f_acc512, f_scramble); + state->bufferedSize = 0; + } + XXH_ASSERT(input < bEnd); + + /* large input to consume : ingest per full block */ + if ((size_t)(bEnd - input) > state->nbStripesPerBlock * XXH_STRIPE_LEN) { + size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN; + XXH_ASSERT(state->nbStripesPerBlock >= state->nbStripesSoFar); + /* join to current block's end */ + { size_t const nbStripesToEnd = state->nbStripesPerBlock - state->nbStripesSoFar; + XXH_ASSERT(nbStripes <= nbStripes); + XXH3_accumulate(acc, input, secret + state->nbStripesSoFar * XXH_SECRET_CONSUME_RATE, nbStripesToEnd, f_acc512); + f_scramble(acc, secret + state->secretLimit); + state->nbStripesSoFar = 0; + input += nbStripesToEnd * XXH_STRIPE_LEN; + nbStripes -= nbStripesToEnd; + } + /* consume per entire blocks */ + while(nbStripes >= state->nbStripesPerBlock) { + XXH3_accumulate(acc, input, secret, state->nbStripesPerBlock, f_acc512); + f_scramble(acc, secret + state->secretLimit); + input += state->nbStripesPerBlock * XXH_STRIPE_LEN; + nbStripes -= state->nbStripesPerBlock; + } + /* consume last partial block */ + XXH3_accumulate(acc, input, secret, nbStripes, f_acc512); + input += nbStripes * XXH_STRIPE_LEN; + XXH_ASSERT(input < bEnd); /* at least some bytes left */ + state->nbStripesSoFar = nbStripes; + /* buffer predecessor of last partial stripe */ + XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN); + XXH_ASSERT(bEnd - input <= XXH_STRIPE_LEN); + } else { + /* content to consume <= block size */ + /* Consume input by a multiple of internal buffer size */ + if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) { + const xxh_u8* const limit = bEnd - XXH3_INTERNALBUFFER_SIZE; + do { + XXH3_consumeStripes(acc, + &state->nbStripesSoFar, state->nbStripesPerBlock, + input, XXH3_INTERNALBUFFER_STRIPES, + secret, state->secretLimit, + f_acc512, f_scramble); + input += XXH3_INTERNALBUFFER_SIZE; + } while (inputbuffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN); + } + } + + /* Some remaining input (always) : buffer it */ + XXH_ASSERT(input < bEnd); + XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE); + XXH_ASSERT(state->bufferedSize == 0); + XXH_memcpy(state->buffer, input, (size_t)(bEnd-input)); + state->bufferedSize = (XXH32_hash_t)(bEnd-input); +#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 + /* save stack accumulators into state */ + memcpy(state->acc, acc, sizeof(acc)); +#endif + } + + return XXH_OK; +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_64bits_update(XXH3_state_t* state, const void* input, size_t len) +{ + return XXH3_update(state, (const xxh_u8*)input, len, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + + +XXH_FORCE_INLINE void +XXH3_digest_long (XXH64_hash_t* acc, + const XXH3_state_t* state, + const unsigned char* secret) +{ + /* + * Digest on a local copy. This way, the state remains unaltered, and it can + * continue ingesting more input afterwards. + */ + XXH_memcpy(acc, state->acc, sizeof(state->acc)); + if (state->bufferedSize >= XXH_STRIPE_LEN) { + size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN; + size_t nbStripesSoFar = state->nbStripesSoFar; + XXH3_consumeStripes(acc, + &nbStripesSoFar, state->nbStripesPerBlock, + state->buffer, nbStripes, + secret, state->secretLimit, + XXH3_accumulate_512, XXH3_scrambleAcc); + /* last stripe */ + XXH3_accumulate_512(acc, + state->buffer + state->bufferedSize - XXH_STRIPE_LEN, + secret + state->secretLimit - XXH_SECRET_LASTACC_START); + } else { /* bufferedSize < XXH_STRIPE_LEN */ + xxh_u8 lastStripe[XXH_STRIPE_LEN]; + size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize; + XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */ + XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize); + XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize); + XXH3_accumulate_512(acc, + lastStripe, + secret + state->secretLimit - XXH_SECRET_LASTACC_START); + } +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + return XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + } + /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */ + if (state->useSeed) + return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} + + + +/* ========================================== + * XXH3 128 bits (a.k.a XXH128) + * ========================================== + * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant, + * even without counting the significantly larger output size. + * + * For example, extra steps are taken to avoid the seed-dependent collisions + * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B). + * + * This strength naturally comes at the cost of some speed, especially on short + * lengths. Note that longer hashes are about as fast as the 64-bit version + * due to it using only a slight modification of the 64-bit loop. + * + * XXH128 is also more oriented towards 64-bit machines. It is still extremely + * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64). + */ + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + /* A doubled version of 1to3_64b with different constants. */ + XXH_ASSERT(input != NULL); + XXH_ASSERT(1 <= len && len <= 3); + XXH_ASSERT(secret != NULL); + /* + * len = 1: combinedl = { input[0], 0x01, input[0], input[0] } + * len = 2: combinedl = { input[1], 0x02, input[0], input[1] } + * len = 3: combinedl = { input[2], 0x03, input[0], input[1] } + */ + { xxh_u8 const c1 = input[0]; + xxh_u8 const c2 = input[len >> 1]; + xxh_u8 const c3 = input[len - 1]; + xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24) + | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8); + xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13); + xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed; + xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed; + xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl; + xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph; + XXH128_hash_t h128; + h128.low64 = XXH64_avalanche(keyed_lo); + h128.high64 = XXH64_avalanche(keyed_hi); + return h128; + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(4 <= len && len <= 8); + seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; + { xxh_u32 const input_lo = XXH_readLE32(input); + xxh_u32 const input_hi = XXH_readLE32(input + len - 4); + xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32); + xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed; + xxh_u64 const keyed = input_64 ^ bitflip; + + /* Shift len to the left to ensure it is even, this avoids even multiplies. */ + XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2)); + + m128.high64 += (m128.low64 << 1); + m128.low64 ^= (m128.high64 >> 3); + + m128.low64 = XXH_xorshift64(m128.low64, 35); + m128.low64 *= 0x9FB21C651E98DF25ULL; + m128.low64 = XXH_xorshift64(m128.low64, 28); + m128.high64 = XXH3_avalanche(m128.high64); + return m128; + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(input != NULL); + XXH_ASSERT(secret != NULL); + XXH_ASSERT(9 <= len && len <= 16); + { xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed; + xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed; + xxh_u64 const input_lo = XXH_readLE64(input); + xxh_u64 input_hi = XXH_readLE64(input + len - 8); + XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1); + /* + * Put len in the middle of m128 to ensure that the length gets mixed to + * both the low and high bits in the 128x64 multiply below. + */ + m128.low64 += (xxh_u64)(len - 1) << 54; + input_hi ^= bitfliph; + /* + * Add the high 32 bits of input_hi to the high 32 bits of m128, then + * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to + * the high 64 bits of m128. + * + * The best approach to this operation is different on 32-bit and 64-bit. + */ + if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */ + /* + * 32-bit optimized version, which is more readable. + * + * On 32-bit, it removes an ADC and delays a dependency between the two + * halves of m128.high64, but it generates an extra mask on 64-bit. + */ + m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2); + } else { + /* + * 64-bit optimized (albeit more confusing) version. + * + * Uses some properties of addition and multiplication to remove the mask: + * + * Let: + * a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF) + * b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000) + * c = XXH_PRIME32_2 + * + * a + (b * c) + * Inverse Property: x + y - x == y + * a + (b * (1 + c - 1)) + * Distributive Property: x * (y + z) == (x * y) + (x * z) + * a + (b * 1) + (b * (c - 1)) + * Identity Property: x * 1 == x + * a + b + (b * (c - 1)) + * + * Substitute a, b, and c: + * input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + * + * Since input_hi.hi + input_hi.lo == input_hi, we get this: + * input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1)) + */ + m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1); + } + /* m128 ^= XXH_swap64(m128 >> 64); */ + m128.low64 ^= XXH_swap64(m128.high64); + + { /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */ + XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2); + h128.high64 += m128.high64 * XXH_PRIME64_2; + + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = XXH3_avalanche(h128.high64); + return h128; + } } +} + +/* + * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed) +{ + XXH_ASSERT(len <= 16); + { if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed); + if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed); + if (len) return XXH3_len_1to3_128b(input, len, secret, seed); + { XXH128_hash_t h128; + xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72); + xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88); + h128.low64 = XXH64_avalanche(seed ^ bitflipl); + h128.high64 = XXH64_avalanche( seed ^ bitfliph); + return h128; + } } +} + +/* + * A bit slower than XXH3_mix16B, but handles multiply by zero better. + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2, + const xxh_u8* secret, XXH64_hash_t seed) +{ + acc.low64 += XXH3_mix16B (input_1, secret+0, seed); + acc.low64 ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8); + acc.high64 += XXH3_mix16B (input_2, secret+16, seed); + acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8); + return acc; +} + + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(16 < len && len <= 128); + + { XXH128_hash_t acc; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + if (len > 32) { + if (len > 64) { + if (len > 96) { + acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed); + } + acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed); + } + acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed); + } + acc = XXH128_mix32B(acc, input, input+len-16, secret, seed); + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_NO_INLINE XXH128_hash_t +XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH64_hash_t seed) +{ + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize; + XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX); + + { XXH128_hash_t acc; + int const nbRounds = (int)len / 32; + int i; + acc.low64 = len * XXH_PRIME64_1; + acc.high64 = 0; + for (i=0; i<4; i++) { + acc = XXH128_mix32B(acc, + input + (32 * i), + input + (32 * i) + 16, + secret + (32 * i), + seed); + } + acc.low64 = XXH3_avalanche(acc.low64); + acc.high64 = XXH3_avalanche(acc.high64); + XXH_ASSERT(nbRounds >= 4); + for (i=4 ; i < nbRounds; i++) { + acc = XXH128_mix32B(acc, + input + (32 * i), + input + (32 * i) + 16, + secret + XXH3_MIDSIZE_STARTOFFSET + (32 * (i - 4)), + seed); + } + /* last bytes */ + acc = XXH128_mix32B(acc, + input + len - 16, + input + len - 32, + secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16, + 0ULL - seed); + + { XXH128_hash_t h128; + h128.low64 = acc.low64 + acc.high64; + h128.high64 = (acc.low64 * XXH_PRIME64_1) + + (acc.high64 * XXH_PRIME64_4) + + ((len - seed) * XXH_PRIME64_2); + h128.low64 = XXH3_avalanche(h128.low64); + h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64); + return h128; + } + } +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len, + const xxh_u8* XXH_RESTRICT secret, size_t secretSize, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble) +{ + XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC; + + XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc512, f_scramble); + + /* converge into final hash */ + XXH_STATIC_ASSERT(sizeof(acc) == 64); + XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)len * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + secretSize + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)len * XXH_PRIME64_2)); + return h128; + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; (void)secret; (void)secretLen; + return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/* + * It's important for performance to pass @secretLen (when it's static) + * to the compiler, so that it can properly optimize the vectorized loop. + */ +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)seed64; + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len, + XXH64_hash_t seed64, + XXH3_f_accumulate_512 f_acc512, + XXH3_f_scrambleAcc f_scramble, + XXH3_f_initCustomSecret f_initSec) +{ + if (seed64 == 0) + return XXH3_hashLong_128b_internal(input, len, + XXH3_kSecret, sizeof(XXH3_kSecret), + f_acc512, f_scramble); + { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + f_initSec(secret, seed64); + return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret), + f_acc512, f_scramble); + } +} + +/* + * It's important for performance that XXH3_hashLong is not inlined. + */ +XXH_NO_INLINE XXH128_hash_t +XXH3_hashLong_128b_withSeed(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen) +{ + (void)secret; (void)secretLen; + return XXH3_hashLong_128b_withSeed_internal(input, len, seed64, + XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret); +} + +typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t, + XXH64_hash_t, const void* XXH_RESTRICT, size_t); + +XXH_FORCE_INLINE XXH128_hash_t +XXH3_128bits_internal(const void* input, size_t len, + XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen, + XXH3_hashLong128_f f_hl128) +{ + XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN); + /* + * If an action is to be taken if `secret` conditions are not respected, + * it should be done here. + * For now, it's a contract pre-condition. + * Adding a check and a branch here would cost performance at every hash. + */ + if (len <= 16) + return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64); + if (len <= 128) + return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64); + return f_hl128(input, len, seed64, secret, secretLen); +} + + +/* === Public XXH128 API === */ + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* input, size_t len) +{ + return XXH3_128bits_internal(input, len, 0, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_default); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize) +{ + return XXH3_128bits_internal(input, len, 0, + (const xxh_u8*)secret, secretSize, + XXH3_hashLong_128b_withSecret); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSeed(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_internal(input, len, seed, + XXH3_kSecret, sizeof(XXH3_kSecret), + XXH3_hashLong_128b_withSeed); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH3_128bits_withSecretandSeed(const void* input, size_t len, const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + if (len <= XXH3_MIDSIZE_MAX) + return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL); + return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH128(const void* input, size_t len, XXH64_hash_t seed) +{ + return XXH3_128bits_withSeed(input, len, seed); +} + + +/* === XXH3 128-bit streaming === */ + +/* + * All initialization and update functions are identical to 64-bit streaming variant. + * The only difference is the finalization routine. + */ + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset(XXH3_state_t* statePtr) +{ + return XXH3_64bits_reset(statePtr); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize) +{ + return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed) +{ + return XXH3_64bits_reset_withSeed(statePtr, seed); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, const void* secret, size_t secretSize, XXH64_hash_t seed) +{ + return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_128bits_update(XXH3_state_t* state, const void* input, size_t len) +{ + return XXH3_update(state, (const xxh_u8*)input, len, + XXH3_accumulate_512, XXH3_scrambleAcc); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* state) +{ + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + if (state->totalLen > XXH3_MIDSIZE_MAX) { + XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB]; + XXH3_digest_long(acc, state, secret); + XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START); + { XXH128_hash_t h128; + h128.low64 = XXH3_mergeAccs(acc, + secret + XXH_SECRET_MERGEACCS_START, + (xxh_u64)state->totalLen * XXH_PRIME64_1); + h128.high64 = XXH3_mergeAccs(acc, + secret + state->secretLimit + XXH_STRIPE_LEN + - sizeof(acc) - XXH_SECRET_MERGEACCS_START, + ~((xxh_u64)state->totalLen * XXH_PRIME64_2)); + return h128; + } + } + /* len <= XXH3_MIDSIZE_MAX : short code */ + if (state->seed) + return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed); + return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen), + secret, state->secretLimit + XXH_STRIPE_LEN); +} + +/* 128-bit utility functions */ + +#include /* memcmp, memcpy */ + +/* return : 1 is equal, 0 if different */ +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2) +{ + /* note : XXH128_hash_t is compact, it has no padding byte */ + return !(memcmp(&h1, &h2, sizeof(h1))); +} + +/* This prototype is compatible with stdlib's qsort(). + * return : >0 if *h128_1 > *h128_2 + * <0 if *h128_1 < *h128_2 + * =0 if *h128_1 == *h128_2 */ +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2) +{ + XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1; + XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2; + int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64); + /* note : bets that, in most cases, hash values are different */ + if (hcmp) return hcmp; + return (h1.low64 > h2.low64) - (h2.low64 > h1.low64); +} + + +/*====== Canonical representation ======*/ +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API void +XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash) +{ + XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t)); + if (XXH_CPU_LITTLE_ENDIAN) { + hash.high64 = XXH_swap64(hash.high64); + hash.low64 = XXH_swap64(hash.low64); + } + XXH_memcpy(dst, &hash.high64, sizeof(hash.high64)); + XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64)); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH128_hash_t +XXH128_hashFromCanonical(const XXH128_canonical_t* src) +{ + XXH128_hash_t h; + h.high64 = XXH_readBE64(src); + h.low64 = XXH_readBE64(src->digest + 8); + return h; +} + + + +/* ========================================== + * Secret generators + * ========================================== + */ +#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x)) + +static void XXH3_combine16(void* dst, XXH128_hash_t h128) +{ + XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 ); + XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 ); +} + +/*! @ingroup xxh3_family */ +XXH_PUBLIC_API XXH_errorcode +XXH3_generateSecret(void* secretBuffer, size_t secretSize, const void* customSeed, size_t customSeedSize) +{ + XXH_ASSERT(secretBuffer != NULL); + if (secretBuffer == NULL) return XXH_ERROR; + XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); + if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR; + if (customSeedSize == 0) { + customSeed = XXH3_kSecret; + customSeedSize = XXH_SECRET_DEFAULT_SIZE; + } + XXH_ASSERT(customSeed != NULL); + if (customSeed == NULL) return XXH_ERROR; + + /* Fill secretBuffer with a copy of customSeed - repeat as needed */ + { size_t pos = 0; + while (pos < secretSize) { + size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize); + memcpy((char*)secretBuffer + pos, customSeed, toCopy); + pos += toCopy; + } } + + { size_t const nbSeg16 = secretSize / 16; + size_t n; + XXH128_canonical_t scrambler; + XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0)); + for (n=0; n +#include +#include + +struct cfl_array *cfl_array_create(size_t slot_count) +{ + struct cfl_array *array; + + array = malloc(sizeof(struct cfl_array)); + if (array == NULL) { + cfl_errno(); + return NULL; + } + + /* by default arrays are not resizable */ + array->resizable = CFL_FALSE; + + /* allocate fixed number of entries */ + array->entries = calloc(slot_count, sizeof(void *)); + if (array->entries == NULL) { + cfl_errno(); + free(array); + return NULL; + } + + array->entry_count = 0; + array->slot_count = slot_count; + + return array; +} + +void cfl_array_destroy(struct cfl_array *array) +{ + size_t index; + + if (!array) { + return; + } + + if (array->entries != NULL) { + for (index = 0 ; index < array->entry_count ; index++) { + if(array->entries[index] != NULL) { + cfl_variant_destroy(array->entries[index]); + } + } + + free(array->entries); + } + free(array); +} + +int cfl_array_resizable(struct cfl_array *array, int v) +{ + if (v != CFL_TRUE && v != CFL_FALSE) { + return -1; + } + + array->resizable = v; + return 0; +} + +int cfl_array_remove_by_index(struct cfl_array *array, + size_t position) +{ + if (position >= array->entry_count) { + return -1; + } + + cfl_variant_destroy(array->entries[position]); + + if (position != array->entry_count - 1) { + memcpy(&array->entries[position], + &array->entries[position + 1], + sizeof(void *) * (array->entry_count - (position + 1))); + } + else { + array->entries[position] = NULL; + } + array->entry_count--; + + return 0; +} + +int cfl_array_remove_by_reference(struct cfl_array *array, + struct cfl_variant *value) +{ + size_t index; + + for (index = 0 ; index < array->entry_count ; index++) { + if (array->entries[index] == value) { + return cfl_array_remove_by_index(array, index); + } + } + + return 0; +} + +int cfl_array_append(struct cfl_array *array, + struct cfl_variant *value) +{ + void *tmp; + size_t new_slot_count; + size_t new_size; + + if (array->entry_count >= array->slot_count) { + /* + * if there is no more space but the caller allowed to resize + * the array, just double the size. Yeah, this is scary and should + * be used only when the caller 'knows this is safe to do' because + * it controls the input data. + */ + if (array->resizable) { + /* set new number of slots and total size */ + new_slot_count = (array->slot_count * 2); + new_size = (new_slot_count * sizeof(void *)); + + tmp = realloc(array->entries, new_size); + if (!tmp) { + cfl_report_runtime_error(); + return -1; + } + array->slot_count = new_slot_count; + } + else { + return -1; + } + } + array->entries[array->entry_count++] = value; + + return 0; +} + +int cfl_array_append_string(struct cfl_array *array, + char *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_string(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_array_append_bytes(struct cfl_array *array, + char *value, + size_t length) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_bytes(value, length); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_array_append_reference(struct cfl_array *array, void *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_reference(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_array_append_bool(struct cfl_array *array, int value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_bool(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_array_append_int64(struct cfl_array *array, int64_t value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_int64(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + return -2; + } + + return 0; +} + + +int cfl_array_append_double(struct cfl_array *array, double value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_double(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + + +int cfl_array_append_array(struct cfl_array *array, struct cfl_array *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_array(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_array_append(array, value_instance); + if (result) { + cfl_variant_destroy(value_instance); + return -2; + } + + return 0; +} + + +int cfl_array_append_new_array(struct cfl_array *array, size_t size) +{ + int result; + struct cfl_array *value; + + value = cfl_array_create(size); + + if (value == NULL) { + return -1; + } + + result = cfl_array_append_array(array, value); + + if (result) { + cfl_array_destroy(value); + } + + return result; +} + +int cfl_array_append_kvlist(struct cfl_array *array, struct +cfl_kvlist *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_kvlist(value); + if (value_instance == NULL) { + return -1; + } + result = cfl_array_append(array, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + + +int cfl_array_print(FILE *fp, struct cfl_array *array) +{ + size_t size; + size_t i; + int ret; + + if (fp == NULL || array == NULL) { + return -1; + } + + size = array->entry_count; + if (size == 0) { + fputs("[]", fp); + return 0; + } + + fputs("[", fp); + for (i=0; ientries[i]); + fputs(",", fp); + } + ret = cfl_variant_print(fp, array->entries[size-1]); + fputs("]", fp); + + return ret; +} diff --git a/lib/cfl/src/cfl_kv.c b/lib/cfl/src/cfl_kv.c new file mode 100644 index 00000000000..23d3c4d958c --- /dev/null +++ b/lib/cfl/src/cfl_kv.c @@ -0,0 +1,147 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + + +void cfl_kv_init(struct cfl_list *list) +{ + cfl_list_init(list); +} + +struct cfl_kv *cfl_kv_item_create_len(struct cfl_list *list, + char *k_buf, size_t k_len, + char *v_buf, size_t v_len) +{ + struct cfl_kv *kv; + + kv = calloc(1, sizeof(struct cfl_kv)); + + if (kv == NULL) { + cfl_report_runtime_error(); + + return NULL; + } + + kv->key = cfl_sds_create_len(k_buf, k_len); + + if (kv->key == NULL) { + free(kv); + + return NULL; + } + + if (v_len > 0) { + kv->val = cfl_sds_create_len(v_buf, v_len); + + if (kv->val == NULL) { + cfl_sds_destroy(kv->key); + free(kv); + + return NULL; + } + } + + cfl_list_add(&kv->_head, list); + + return kv; +} + +struct cfl_kv *cfl_kv_item_create(struct cfl_list *list, + char *k_buf, char *v_buf) +{ + int k_len; + int v_len; + + if (k_buf == NULL) { + return NULL; + } + + k_len = strlen(k_buf); + + if (v_buf != NULL) { + v_len = strlen(v_buf); + } + else { + v_len = 0; + } + + return cfl_kv_item_create_len(list, k_buf, k_len, v_buf, v_len); +} + +void cfl_kv_item_destroy(struct cfl_kv *kv) +{ + if (kv->key != NULL) { + cfl_sds_destroy(kv->key); + } + + if (kv->val != NULL) { + cfl_sds_destroy(kv->val); + } + + cfl_list_del(&kv->_head); + + free(kv); +} + +void cfl_kv_release(struct cfl_list *list) +{ + struct cfl_list *head; + struct cfl_list *tmp; + struct cfl_kv *kv; + + cfl_list_foreach_safe(head, tmp, list) { + kv = cfl_list_entry(head, struct cfl_kv, _head); + + cfl_kv_item_destroy(kv); + } +} + +const char *cfl_kv_get_key_value(const char *key, struct cfl_list *list) +{ + struct cfl_list *head; + int len; + struct cfl_kv *kv; + + if (key == NULL) { + return NULL; + } + + len = strlen(key); + + if (len == 0) { + return NULL; + } + + cfl_list_foreach(head, list) { + kv = cfl_list_entry(head, struct cfl_kv, _head); + + if (cfl_sds_len(kv->key) != len) { + continue; + } + + if (strncasecmp(kv->key, key, len) == 0) { + return kv->val; + } + } + + return NULL; +} diff --git a/lib/cfl/src/cfl_kvlist.c b/lib/cfl/src/cfl_kvlist.c new file mode 100644 index 00000000000..56139b87cdd --- /dev/null +++ b/lib/cfl/src/cfl_kvlist.c @@ -0,0 +1,390 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +struct cfl_kvlist *cfl_kvlist_create() +{ + struct cfl_kvlist *list; + + list = malloc(sizeof(struct cfl_kvlist)); + if (list == NULL) { + cfl_report_runtime_error(); + return NULL; + } + + cfl_list_init(&list->list); + return list; +} + +void cfl_kvlist_destroy(struct cfl_kvlist *list) +{ + struct cfl_list *tmp; + struct cfl_list *head; + struct cfl_kvpair *pair; + + cfl_list_foreach_safe(head, tmp, &list->list) { + pair = cfl_list_entry(head, struct cfl_kvpair, _head); + + if (pair->key) { + cfl_sds_destroy(pair->key); + } + + if (pair->val) { + cfl_variant_destroy(pair->val); + } + cfl_list_del(&pair->_head); + free(pair); + } + + free(list); +} + +/* +int cfl_kvlist_insert(struct cfl_kvlist *list, + char *key, void *value, + size_t value_length, + int value_type) +{ + struct cfl_kvpair *pair; + + pair = malloc(sizeof(struct cfl_kvpair)); + + if (pair == NULL) { + cfl_errno(); + + return -1; + } + + pair->key = cfl_sds_create(key); + + if (pair->key == NULL) { + free(pair); + + return -2; + } + + pair->val = cfl_variant_create(value, value_length, value_type); + + if (pair->val == NULL) { + cfl_sds_destroy(pair->key); + free(pair); + + return -3; + } + + cfl_list_add(&pair->_head, &list->list); + + return 0; +} +*/ + +int cfl_kvlist_insert_string(struct cfl_kvlist *list, + char *key, char *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_string(value); + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_bytes(struct cfl_kvlist *list, + char *key, char *value, + size_t length) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_bytes(value, length); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_reference(struct cfl_kvlist *list, + char *key, void *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_reference(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_bool(struct cfl_kvlist *list, + char *key, int value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_bool(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_int64(struct cfl_kvlist *list, + char *key, int64_t value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_int64(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_double(struct cfl_kvlist *list, + char *key, double value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_double(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_array(struct cfl_kvlist *list, + char *key, struct cfl_array *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_array(value); + + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert_new_array(struct cfl_kvlist *list, + char *key, size_t size) +{ + int result; + struct cfl_array *value; + + value = cfl_array_create(size); + + if (value == NULL) { + return -1; + } + + result = cfl_kvlist_insert_array(list, key, value); + + if (result) { + cfl_array_destroy(value); + } + + return result; +} + +int cfl_kvlist_insert_kvlist(struct cfl_kvlist *list, + char *key, struct cfl_kvlist *value) +{ + struct cfl_variant *value_instance; + int result; + + value_instance = cfl_variant_create_from_kvlist(value); + if (value_instance == NULL) { + return -1; + } + + result = cfl_kvlist_insert(list, key, value_instance); + + if (result) { + cfl_variant_destroy(value_instance); + + return -2; + } + + return 0; +} + +int cfl_kvlist_insert(struct cfl_kvlist *list, + char *key, struct cfl_variant *value) +{ + struct cfl_kvpair *pair; + + pair = malloc(sizeof(struct cfl_kvpair)); + if (pair == NULL) { + cfl_report_runtime_error(); + return -1; + } + + pair->key = cfl_sds_create(key); + + if (pair->key == NULL) { + free(pair); + + return -2; + } + + pair->val = value; + + cfl_list_add(&pair->_head, &list->list); + return 0; +} + +int cfl_kvlist_count(struct cfl_kvlist *list) +{ + return cfl_list_size(&list->list); +} + +struct cfl_variant *cfl_kvlist_fetch(struct cfl_kvlist *list, char *key) +{ + int len; + struct cfl_list *head; + struct cfl_kvpair *pair; + + len = strlen(key); + + cfl_list_foreach(head, &list->list) { + pair = cfl_list_entry(head, struct cfl_kvpair, _head); + + if (cfl_sds_len(pair->key) != len) { + continue; + } + + if (strcmp(pair->key, key) == 0) { + return pair->val; + } + } + + return NULL; +} + +int cfl_kvlist_print(FILE *fp, struct cfl_kvlist *list) +{ + size_t size; + size_t i; + int ret = -1; + + struct cfl_list *head = NULL; + struct cfl_kvpair *pair = NULL; + + if (fp == NULL || list == NULL) { + return -1; + } + + size = (size_t)cfl_kvlist_count(list); + i = 0; + fputs("{", fp); + cfl_list_foreach(head, &list->list) { + pair = cfl_list_entry(head, struct cfl_kvpair, _head); + if (pair == NULL || pair->key == NULL || pair->val == NULL) { + continue; + } + + fprintf(fp, "\"%s\":", pair->key); + ret = cfl_variant_print(fp, pair->val); + + i++; + if (i != size) { + fputs(",", fp); + } + } + fputs("}", fp); + + return ret; +} diff --git a/lib/cfl/src/cfl_log.c b/lib/cfl/src/cfl_log.c new file mode 100644 index 00000000000..5918a71c30e --- /dev/null +++ b/lib/cfl/src/cfl_log.c @@ -0,0 +1,40 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#include + +#ifdef _WIN32 + #define strerror_r(errnum, buf, buf_size) strerror_s(buf, buf_size, errnum) +#endif + +int cfl_report_runtime_error_impl(int errnum, char *file, int line) +{ + char buf[256]; + + strerror_r(errnum, buf, sizeof(buf) - 1); + + fprintf(stderr, "[%s:%i errno=%i] %s\n", + file, line, errnum, buf); + + return 0; +} diff --git a/lib/cfl/src/cfl_sds.c b/lib/cfl/src/cfl_sds.c new file mode 100644 index 00000000000..eff66fe3fd6 --- /dev/null +++ b/lib/cfl/src/cfl_sds.c @@ -0,0 +1,236 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * This interface is a minimized version of Fluent Bit SDS just for easily + * string storage + */ + +#include +#include +#include +#include +#include + +#include + +size_t cfl_sds_avail(cfl_sds_t s) +{ + struct cfl_sds *h; + + h = CFL_SDS_HEADER(s); + return (size_t) (h->alloc - h->len); +} + +cfl_sds_t sds_alloc(size_t size) +{ + void *buf; + cfl_sds_t s; + struct cfl_sds *head; + + buf = malloc(CFL_SDS_HEADER_SIZE + size + 1); + if (!buf) { + return NULL; + } + + head = buf; + head->len = 0; + head->alloc = size; + + s = head->buf; + *s = '\0'; + + return s; +} + +size_t cfl_sds_alloc(cfl_sds_t s) +{ + return (size_t) CFL_SDS_HEADER(s)->alloc; +} + +cfl_sds_t cfl_sds_increase(cfl_sds_t s, size_t len) +{ + size_t new_size; + struct cfl_sds *head; + cfl_sds_t out; + void *tmp; + + out = s; + new_size = (CFL_SDS_HEADER_SIZE + cfl_sds_alloc(s) + len + 1); + head = CFL_SDS_HEADER(s); + tmp = realloc(head, new_size); + if (!tmp) { + return NULL; + } + head = (struct cfl_sds *) tmp; + head->alloc += len; + out = head->buf; + + return out; +} + +size_t cfl_sds_len(cfl_sds_t s) +{ + return (size_t) CFL_SDS_HEADER(s)->len; +} + +cfl_sds_t cfl_sds_create_len(const char *str, int len) +{ + cfl_sds_t s; + struct cfl_sds *head; + + s = sds_alloc(len); + if (!s) { + return NULL; + } + + if (str) { + memcpy(s, str, len); + s[len] = '\0'; + + head = CFL_SDS_HEADER(s); + head->len = len; + } + return s; +} + +cfl_sds_t cfl_sds_create(const char *str) +{ + size_t len; + + if (!str) { + len = 0; + } + else { + len = strlen(str); + } + + return cfl_sds_create_len(str, len); +} + +void cfl_sds_destroy(cfl_sds_t s) +{ + struct cfl_sds *head; + + if (!s) { + return; + } + + head = CFL_SDS_HEADER(s); + free(head); +} + +cfl_sds_t cfl_sds_cat(cfl_sds_t s, const char *str, int len) +{ + size_t avail; + struct cfl_sds *head; + cfl_sds_t tmp = NULL; + + avail = cfl_sds_avail(s); + if (avail < len) { + tmp = cfl_sds_increase(s, len); + if (!tmp) { + return NULL; + } + s = tmp; + } + memcpy((char *) (s + cfl_sds_len(s)), str, len); + + head = CFL_SDS_HEADER(s); + head->len += len; + s[head->len] = '\0'; + + return s; +} + +cfl_sds_t cfl_sds_create_size(size_t size) +{ + return sds_alloc(size); +} + +void cfl_sds_set_len(cfl_sds_t s, size_t len) +{ + struct cfl_sds *head; + + head = CFL_SDS_HEADER(s); + head->len = len; +} + +void cfl_sds_cat_safe(cfl_sds_t *buf, const char *str, int len) +{ + cfl_sds_t tmp; + + tmp = cfl_sds_cat(*buf, str, len); + if (!tmp) { + return; + } + *buf = tmp; +} + +cfl_sds_t cfl_sds_printf(cfl_sds_t *sds, const char *fmt, ...) +{ + va_list ap; + int len = strlen(fmt)*2; + int size; + cfl_sds_t tmp = NULL; + cfl_sds_t s; + struct cfl_sds *head; + + if (len < 64) len = 64; + + s = *sds; + if (cfl_sds_avail(s)< len) { + tmp = cfl_sds_increase(s, len); + if (!tmp) { + return NULL; + } + *sds = s = tmp; + } + + va_start(ap, fmt); + size = vsnprintf((char *) (s + cfl_sds_len(s)), cfl_sds_avail(s), fmt, ap); + if (size < 0) { + va_end(ap); + return NULL; + } + va_end(ap); + + if (size >= cfl_sds_avail(s)) { + tmp = cfl_sds_increase(s, size - cfl_sds_avail(s) + 1); + if (!tmp) { + return NULL; + } + *sds = s = tmp; + + va_start(ap, fmt); + size = vsnprintf((char *) (s + cfl_sds_len(s)), cfl_sds_avail(s), fmt, ap); + if (size > cfl_sds_avail(s)) { + va_end(ap); + return NULL; + } + va_end(ap); + } + + head = CFL_SDS_HEADER(s); + head->len += size; + s[head->len] = '\0'; + + return s; +} + diff --git a/lib/cfl/src/cfl_time.c b/lib/cfl/src/cfl_time.c new file mode 100644 index 00000000000..262cf744402 --- /dev/null +++ b/lib/cfl/src/cfl_time.c @@ -0,0 +1,62 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +/* MacOS */ +#ifdef CFL_HAVE_CLOCK_GET_TIME +#include +#include +#endif + +#include +#include + +uint64_t cfl_time_now() +{ + struct timespec tm = {0}; + + /* + * macOS note: newer versions of macOS provides a timespec_get() function, but for + * some reason it does not provide full nanoseconds resolution, last 3 digits are + * always zeros. + * + * if CFL_HAVE_CLOCK_GET_TIME and CFL_HAVE_TIMESPEC_GET are defined, let's + * prioritize CFL_HAVE_CLOCK_GET_TIME. + */ + +#if defined CFL_HAVE_CLOCK_GET_TIME + /* MacOS */ + clock_serv_t cclock; + mach_timespec_t mts; + host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); + clock_get_time(cclock, &mts); + tm.tv_sec = mts.tv_sec; + tm.tv_nsec = mts.tv_nsec; + mach_port_deallocate(mach_task_self(), cclock); +#elif defined CFL_HAVE_TIMESPEC_GET + /* C11 supported */ + timespec_get(&tm, TIME_UTC); + +#else /* __STDC_VERSION__ */ + clock_gettime(CLOCK_REALTIME, &tm); +#endif + + return (((uint64_t) tm.tv_sec * 1000000000L) + tm.tv_nsec); +} diff --git a/lib/cfl/src/cfl_variant.c b/lib/cfl/src/cfl_variant.c new file mode 100644 index 00000000000..6181066ef57 --- /dev/null +++ b/lib/cfl/src/cfl_variant.c @@ -0,0 +1,234 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#if defined(__MINGW32__) || defined(__MINGW64__) +#define HEXDUMPFORMAT "%#x" +#else +#define HEXDUMPFORMAT "%p" +#endif + +int cfl_variant_print(FILE *fp, struct cfl_variant *val) +{ + int ret = -1; + size_t size; + size_t i; + + if (fp == NULL || val == NULL) { + return -1; + } + + switch (val->type) { + case CFL_VARIANT_STRING: + ret = fprintf(fp, "\"%s\"", val->data.as_string); + break; + case CFL_VARIANT_BOOL: + if (val->data.as_bool) { + ret = fputs("true",fp); + } + else { + ret = fputs("false", fp); + } + break; + case CFL_VARIANT_INT: + ret = fprintf(fp, "%" PRId64, val->data.as_int64); + break; + case CFL_VARIANT_DOUBLE: + ret = fprintf(fp, "%lf", val->data.as_double); + break; + case CFL_VARIANT_BYTES: + size = cfl_sds_len(val->data.as_bytes); + for (i=0; idata.as_bytes[i]); + } + break; + + case CFL_VARIANT_REFERENCE: + ret = fprintf(fp, HEXDUMPFORMAT, val->data.as_reference); + break; + case CFL_VARIANT_ARRAY: + ret = cfl_array_print(fp, val->data.as_array); + break; + + case CFL_VARIANT_KVLIST: + ret = cfl_kvlist_print(fp, val->data.as_kvlist); + break; + + default: + ret = fputs("!Unknown Type", fp); + } + return ret; +} + +struct cfl_variant *cfl_variant_create_from_string(char *value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + + if (instance != NULL) { + instance->data.as_string = cfl_sds_create(value); + if (instance->data.as_string == NULL) { + free(instance); + instance = NULL; + } + else { + instance->type = CFL_VARIANT_STRING; + } + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_bytes(char *value, size_t length) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + + if (instance != NULL) { + instance->data.as_bytes = cfl_sds_create_len(value, length); + if (instance->data.as_bytes == NULL) { + free(instance); + instance = NULL; + } + else { + instance->type = CFL_VARIANT_BYTES; + } + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_bool(int value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_bool = value; + instance->type = CFL_VARIANT_BOOL; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_int64(int64_t value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_int64 = value; + instance->type = CFL_VARIANT_INT; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_double(double value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_double = value; + instance->type = CFL_VARIANT_DOUBLE; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_array(struct cfl_array *value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_array = value; + instance->type = CFL_VARIANT_ARRAY; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_kvlist(struct cfl_kvlist *value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_kvlist = value; + instance->type = CFL_VARIANT_KVLIST; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create_from_reference(void *value) +{ + struct cfl_variant *instance; + + instance = cfl_variant_create(); + if (instance != NULL) { + instance->data.as_reference = value; + instance->type = CFL_VARIANT_REFERENCE; + } + + return instance; +} + +struct cfl_variant *cfl_variant_create() +{ + struct cfl_variant *instance; + + instance = calloc(1, sizeof(struct cfl_variant)); + if (instance == NULL) { + cfl_errno(); + return NULL; + } + + return instance; +} + +void cfl_variant_destroy(struct cfl_variant *instance) +{ + if (!instance) { + return; + } + + if (instance->type == CFL_VARIANT_STRING || + instance->type == CFL_VARIANT_BYTES) { + if (instance->data.as_string != NULL) { + cfl_sds_destroy(instance->data.as_string); + } + } + else if (instance->type == CFL_VARIANT_ARRAY) { + cfl_array_destroy(instance->data.as_array); + } + else if (instance->type == CFL_VARIANT_KVLIST) { + cfl_kvlist_destroy(instance->data.as_kvlist); + } + + free(instance); +} diff --git a/lib/cfl/tests/CMakeLists.txt b/lib/cfl/tests/CMakeLists.txt new file mode 100644 index 00000000000..0fac328ca72 --- /dev/null +++ b/lib/cfl/tests/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories(lib/acutest) + +set(UNIT_TESTS_FILES + kv.c + sds.c + hash.c + list.c + variant.c + ) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cfl_tests_internal.h.in" + "${CMAKE_CURRENT_SOURCE_DIR}/cfl_tests_internal.h" + ) + +# Prepare list of unit tests +foreach(source_file ${UNIT_TESTS_FILES}) + get_filename_component(source_file_we ${source_file} NAME_WE) + set(source_file_we cfl-test-${source_file_we}) + add_executable( + ${source_file_we} + ${source_file} + ) + target_link_libraries(${source_file_we} cfl-static) + + if (CFL_SANITIZE_ADDRESS) + add_sanitizers(${source_file_we}) + endif() + + add_test(${source_file_we} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source_file_we}) +endforeach() diff --git a/lib/cfl/tests/cfl_tests_internal.h.in b/lib/cfl/tests/cfl_tests_internal.h.in new file mode 100644 index 00000000000..b14ef012114 --- /dev/null +++ b/lib/cfl/tests/cfl_tests_internal.h.in @@ -0,0 +1,25 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CFL_TEST_INTERNAL_H +#define CFL_TEST_INTERNAL_H + +#include "lib/acutest/include/acutest.h" + +#endif diff --git a/lib/cfl/tests/hash.c b/lib/cfl/tests/hash.c new file mode 100644 index 00000000000..afc7311f6e7 --- /dev/null +++ b/lib/cfl/tests/hash.c @@ -0,0 +1,57 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "cfl_tests_internal.h" + +static void checks() +{ + int len; + uint64_t cfl_hash; + uint64_t xxh_hash; + XXH3_state_t xxh_state; + cfl_hash_state_t cfl_state; + char *str = "this is a test"; + + len = strlen(str); + + /* a dummy test, we just need to make sure the wrapper is working */ + cfl_hash = cfl_hash_64bits(str, len); + xxh_hash = XXH3_64bits(str, len); + TEST_CHECK(cfl_hash == xxh_hash); + + /* state and updates */ + cfl_hash_64bits_reset(&cfl_state); + cfl_hash_64bits_update(&cfl_state, str, len); + cfl_hash_64bits_update(&cfl_state, str, len); + cfl_hash = cfl_hash_64bits_digest(&cfl_state); + + XXH3_64bits_reset(&xxh_state); + XXH3_64bits_update(&xxh_state, str, len); + XXH3_64bits_update(&xxh_state, str, len); + xxh_hash = XXH3_64bits_digest(&xxh_state); + + TEST_CHECK(cfl_hash == xxh_hash); +} + +TEST_LIST = { + {"checks", checks}, + { 0 } +}; diff --git a/lib/cfl/tests/kv.c b/lib/cfl/tests/kv.c new file mode 100644 index 00000000000..f49ade9d63c --- /dev/null +++ b/lib/cfl/tests/kv.c @@ -0,0 +1,82 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "cfl_tests_internal.h" + + +static void regular_operation() +{ + struct cfl_list *entry_iterator; + size_t entry_index; + struct cfl_list entry_list; + struct cfl_kv *entry; + + cfl_kv_init(&entry_list); + + entry = cfl_kv_item_create(&entry_list, "first entry", "dummy value"); + TEST_CHECK(entry != NULL); + + entry = cfl_kv_item_create(&entry_list, "second entry", NULL); + TEST_CHECK(entry != NULL); + + entry = cfl_kv_item_create(&entry_list, NULL, NULL); + TEST_CHECK(entry == NULL); + + entry = cfl_kv_item_create_len(&entry_list, "third entry", 0, "dummy value", 12); + TEST_CHECK(entry != NULL); + + entry = cfl_kv_item_create_len(&entry_list, "fourth entry", 13, "dummy value", 0); + TEST_CHECK(entry != NULL); + + entry_index = 0; + + cfl_list_foreach(entry_iterator, &entry_list) { + entry = cfl_list_entry(entry_iterator, struct cfl_kv, _head); + + switch (entry_index) { + case 0: + TEST_CHECK(strcmp(entry->key, "first entry") == 0); + TEST_CHECK(strcmp(entry->val, "dummy value") == 0); + break; + case 1: + TEST_CHECK(strcmp(entry->key, "second entry") == 0); + TEST_CHECK(entry->val == NULL); + break; + case 2: + TEST_CHECK(strlen(entry->key) == 0); + TEST_CHECK(strcmp(entry->val, "dummy value") == 0); + break; + case 3: + TEST_CHECK(strcmp(entry->key, "fourth entry") == 0); + TEST_CHECK(entry->val == NULL); + break; + } + + entry_index++; + } + + cfl_kv_release(&entry_list); +} + +TEST_LIST = { + {"regular_operation", regular_operation}, + { 0 } +}; diff --git a/lib/cfl/tests/lib/acutest/.travis.yml b/lib/cfl/tests/lib/acutest/.travis.yml new file mode 100644 index 00000000000..920821985e7 --- /dev/null +++ b/lib/cfl/tests/lib/acutest/.travis.yml @@ -0,0 +1,34 @@ +# YAML definition for travis-ci.com continuous integration. +# See https://docs.travis-ci.com/user/languages/c + +# Container-based infrastructure (Linux) +# * https://docs.travis-ci.com/user/migrating-from-legacy/#How-can-I-use-container-based-infrastructure%3F +sudo: +- false + +language: c++ + +compiler: + - gcc + - clang + +env: + - CFLAGS="-std=c99 -pedantic" CONFIG=Debug # C99 + - CFLAGS="-std=c99 -pedantic" CONFIG=Release + - CFLAGS="-std=c11 -pedantic" CONFIG=Debug # C11 + - CFLAGS="-std=c11 -pedantic" CONFIG=Release + - CXXFLAGS="-std=c++11 -pedantic" CONFIG=Debug # C++11 + - CXXFLAGS="-std=c++11 -pedantic" CONFIG=Release + # Too old compilers on travis-ci.org for these: + #- CXXFLAGS="-std=c++14 -pedantic" CONFIG=Debug # C++14 + #- CXXFLAGS="-std=c++14 -pedantic" CONFIG=Release + #- CXXFLAGS="-std=c++17 -pedantic" CONFIG=Debug # C++17 + #- CXXFLAGS="-std=c++17 -pedantic" CONFIG=Release + +before_script: + - mkdir build + - cd build + - cmake -DCMAKE_BUILD_TYPE=$CONFIG -G 'Unix Makefiles' .. + +script: + - make VERBOSE=1 diff --git a/lib/cfl/tests/lib/acutest/CMakeLists.txt b/lib/cfl/tests/lib/acutest/CMakeLists.txt new file mode 100644 index 00000000000..4a741a424dd --- /dev/null +++ b/lib/cfl/tests/lib/acutest/CMakeLists.txt @@ -0,0 +1,44 @@ + +cmake_minimum_required(VERSION 2.8) +project(Acutest C CXX) + + +set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo MinSizeRel) +if("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE}) + + if("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE "Release") + endif() +endif() + + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + + +if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") +elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") +elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + # Specify proper C runtime library: + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") + set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + # Specify proper C runtime library: + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /MT") + set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} /MT") +endif() + + +add_subdirectory(examples) diff --git a/lib/cfl/tests/lib/acutest/GIT b/lib/cfl/tests/lib/acutest/GIT new file mode 100644 index 00000000000..379ff1483c5 --- /dev/null +++ b/lib/cfl/tests/lib/acutest/GIT @@ -0,0 +1 @@ +03885e23ea27535251b91abf681257d3d4241eae (git master) \ No newline at end of file diff --git a/lib/cfl/tests/lib/acutest/LICENSE.md b/lib/cfl/tests/lib/acutest/LICENSE.md new file mode 100644 index 00000000000..973092017e2 --- /dev/null +++ b/lib/cfl/tests/lib/acutest/LICENSE.md @@ -0,0 +1,22 @@ + +# The MIT License (MIT) + +Copyright © 2013-2017 Martin Mitáš + +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/lib/cfl/tests/lib/acutest/README.md b/lib/cfl/tests/lib/acutest/README.md new file mode 100644 index 00000000000..e7f75b652aa --- /dev/null +++ b/lib/cfl/tests/lib/acutest/README.md @@ -0,0 +1,4 @@ +Taken from https://github.com/mity/acutest + +MIT License + diff --git a/lib/cfl/tests/lib/acutest/appveyor.yml b/lib/cfl/tests/lib/acutest/appveyor.yml new file mode 100644 index 00000000000..6e85c7a001f --- /dev/null +++ b/lib/cfl/tests/lib/acutest/appveyor.yml @@ -0,0 +1,26 @@ +# YAML definition for Appveyor.com continuous integration. +# See http://www.appveyor.com/docs/appveyor-yml + +version: '{branch}-{build}' + +before_build: + - 'cmake --version' + - 'if "%PLATFORM%"=="x64" cmake -G "Visual Studio 12 Win64"' + - 'if not "%PLATFORM%"=="x64" cmake -G "Visual Studio 12"' + +build: + project: Acutest.sln + verbosity: minimal + +skip_tags: true + +os: + - Windows Server 2012 R2 + +configuration: + - Debug + - Release + +platform: + - x64 # 64-bit build + - win32 # 32-bit build diff --git a/lib/cfl/tests/lib/acutest/include/acutest.h b/lib/cfl/tests/lib/acutest/include/acutest.h new file mode 100644 index 00000000000..cd5ffb2c703 --- /dev/null +++ b/lib/cfl/tests/lib/acutest/include/acutest.h @@ -0,0 +1,864 @@ +/* + * Acutest -- Another C/C++ Unit Test facility + * + * + * Copyright (c) 2013-2017 Martin Mitas + * + * 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. + */ + +#ifndef ACUTEST_H__ +#define ACUTEST_H__ + + +/************************ + *** Public interface *** + ************************/ + +/* By default, "acutest.h" provides the main program entry point (function + * main()). However, if the test suite is composed of multiple source files + * which include "acutest.h", then this causes a problem of multiple main() + * definitions. To avoid this problem, #define macro TEST_NO_MAIN in all + * compilation units but one. + */ + +/* Macro to specify list of unit tests in the suite. + * The unit test implementation MUST provide list of unit tests it implements + * with this macro: + * + * TEST_LIST = { + * { "test1_name", test1_func_ptr }, + * { "test2_name", test2_func_ptr }, + * ... + * { 0 } + * }; + * + * The list specifies names of each test (must be unique) and pointer to + * a function implementing it. The function does not take any arguments + * and has no return values, i.e. every test function has to be compatible + * with this prototype: + * + * void test_func(void); + */ +#define TEST_LIST const struct test__ test_list__[] + + +/* Macros for testing whether an unit test succeeds or fails. These macros + * can be used arbitrarily in functions implementing the unit tests. + * + * If any condition fails throughout execution of a test, the test fails. + * + * TEST_CHECK takes only one argument (the condition), TEST_CHECK_ allows + * also to specify an error message to print out if the condition fails. + * (It expects printf-like format string and its parameters). The macros + * return non-zero (condition passes) or 0 (condition fails). + * + * That can be useful when more conditions should be checked only if some + * preceding condition passes, as illustrated in this code snippet: + * + * SomeStruct* ptr = allocate_some_struct(); + * if(TEST_CHECK(ptr != NULL)) { + * TEST_CHECK(ptr->member1 < 100); + * TEST_CHECK(ptr->member2 > 200); + * } + */ +#define TEST_CHECK_(cond,...) test_check__((cond), __FILE__, __LINE__, __VA_ARGS__) +#define TEST_CHECK(cond) test_check__((cond), __FILE__, __LINE__, "%s", #cond) + + +/* printf-like macro for outputting an extra information about a failure. + * + * Note it does not output anything if there was not (yet) failed condition + * in the current test. Intended use is to output some computed output + * versus the expected value, e.g. like this: + * + * if(!TEST_CHECK(produced == expected)) { + * TEST_MSG("Expected: %d", expected); + * TEST_MSG("Produced: %d", produced); + * } + * + * The macro can deal with multi-line output fairly well. It also automatically + * adds a final new-line if there is none present. + */ +#define TEST_MSG(...) test_message__(__VA_ARGS__) + +/* Maximal output per TEST_MSG call. Longer messages are cut. + * You may define another limit prior including "acutest.h" + */ +#ifndef TEST_MSG_MAXSIZE + #define TEST_MSG_MAXSIZE 1024 +#endif + + +/********************** + *** Implementation *** + **********************/ + +/* The unit test files should not rely on anything below. */ + +#include +#include +#include +#include + +#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) + #define ACUTEST_UNIX__ 1 + #include + #include + #include + #include + #include +#endif + +#if defined(__gnu_linux__) + #define ACUTEST_LINUX__ 1 + #include + #include +#endif + +#if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__) + #define ACUTEST_WIN__ 1 + #include + #include +#endif + +#ifdef __cplusplus + #include +#endif + + +/* Note our global private identifiers end with '__' to mitigate risk of clash + * with the unit tests implementation. */ + + +#ifdef __cplusplus + extern "C" { +#endif + + +struct test__ { + const char* name; + void (*func)(void); +}; + +extern const struct test__ test_list__[]; + +int test_check__(int cond, const char* file, int line, const char* fmt, ...); +void test_message__(const char* fmt, ...); + + +#ifndef TEST_NO_MAIN + +static char* test_argv0__ = NULL; +static size_t test_list_size__ = 0; +static const struct test__** tests__ = NULL; +static char* test_flags__ = NULL; +static size_t test_count__ = 0; +static int test_no_exec__ = -1; +static int test_no_summary__ = 0; +static int test_skip_mode__ = 0; + +static int test_stat_failed_units__ = 0; +static int test_stat_run_units__ = 0; + +static const struct test__* test_current_unit__ = NULL; +static int test_current_already_logged__ = 0; +static int test_verbose_level__ = 2; +static int test_current_failures__ = 0; +static int test_colorize__ = 0; + +#define TEST_COLOR_DEFAULT__ 0 +#define TEST_COLOR_GREEN__ 1 +#define TEST_COLOR_RED__ 2 +#define TEST_COLOR_DEFAULT_INTENSIVE__ 3 +#define TEST_COLOR_GREEN_INTENSIVE__ 4 +#define TEST_COLOR_RED_INTENSIVE__ 5 + +static int +test_print_in_color__(int color, const char* fmt, ...) +{ + va_list args; + char buffer[256]; + int n; + + va_start(args, fmt); + vsnprintf(buffer, sizeof(buffer), fmt, args); + va_end(args); + buffer[sizeof(buffer)-1] = '\0'; + + if(!test_colorize__) { + return printf("%s", buffer); + } + +#if defined ACUTEST_UNIX__ + { + const char* col_str; + switch(color) { + case TEST_COLOR_GREEN__: col_str = "\033[0;32m"; break; + case TEST_COLOR_RED__: col_str = "\033[0;31m"; break; + case TEST_COLOR_GREEN_INTENSIVE__: col_str = "\033[1;32m"; break; + case TEST_COLOR_RED_INTENSIVE__: col_str = "\033[1;31m"; break; + case TEST_COLOR_DEFAULT_INTENSIVE__: col_str = "\033[1m"; break; + default: col_str = "\033[0m"; break; + } + printf("%s", col_str); + n = printf("%s", buffer); + printf("\033[0m"); + return n; + } +#elif defined ACUTEST_WIN__ + { + HANDLE h; + CONSOLE_SCREEN_BUFFER_INFO info; + WORD attr; + + h = GetStdHandle(STD_OUTPUT_HANDLE); + GetConsoleScreenBufferInfo(h, &info); + + switch(color) { + case TEST_COLOR_GREEN__: attr = FOREGROUND_GREEN; break; + case TEST_COLOR_RED__: attr = FOREGROUND_RED; break; + case TEST_COLOR_GREEN_INTENSIVE__: attr = FOREGROUND_GREEN | FOREGROUND_INTENSITY; break; + case TEST_COLOR_RED_INTENSIVE__: attr = FOREGROUND_RED | FOREGROUND_INTENSITY; break; + case TEST_COLOR_DEFAULT_INTENSIVE__: attr = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY; break; + default: attr = 0; break; + } + if(attr != 0) + SetConsoleTextAttribute(h, attr); + n = printf("%s", buffer); + SetConsoleTextAttribute(h, info.wAttributes); + return n; + } +#else + n = printf("%s", buffer); + return n; +#endif +} + +int +test_check__(int cond, const char* file, int line, const char* fmt, ...) +{ + const char *result_str; + int result_color; + int verbose_level; + + if(cond) { + result_str = "ok"; + result_color = TEST_COLOR_GREEN__; + verbose_level = 3; + } else { + if(!test_current_already_logged__ && test_current_unit__ != NULL) { + printf("[ "); + test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, "FAILED"); + printf(" ]\n"); + } + result_str = "failed"; + result_color = TEST_COLOR_RED__; + verbose_level = 2; + test_current_failures__++; + test_current_already_logged__++; + } + + if(test_verbose_level__ >= verbose_level) { + va_list args; + + printf(" "); + + if(file != NULL) { + if(test_verbose_level__ < 3) { +#ifdef ACUTEST_WIN__ + const char* lastsep1 = strrchr(file, '\\'); + const char* lastsep2 = strrchr(file, '/'); + if(lastsep1 == NULL) + lastsep1 = file-1; + if(lastsep2 == NULL) + lastsep2 = file-1; + file = (lastsep1 > lastsep2 ? lastsep1 : lastsep2) + 1; +#else + const char* lastsep = strrchr(file, '/'); + if(lastsep != NULL) + file = lastsep+1; +#endif + } + printf("%s:%d: Check ", file, line); + } + + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); + + printf("... "); + test_print_in_color__(result_color, result_str); + printf("\n"); + test_current_already_logged__++; + } + + return (cond != 0); +} + +void +test_message__(const char* fmt, ...) +{ + char buffer[TEST_MSG_MAXSIZE]; + char* line_beg; + char* line_end; + va_list args; + + if(test_verbose_level__ < 2) + return; + + /* We allow extra message only when something is already wrong in the + * current test. */ + if(!test_current_already_logged__ || test_current_unit__ == NULL) + return; + + va_start(args, fmt); + vsnprintf(buffer, TEST_MSG_MAXSIZE, fmt, args); + va_end(args); + buffer[TEST_MSG_MAXSIZE-1] = '\0'; + + line_beg = buffer; + while(1) { + line_end = strchr(line_beg, '\n'); + if(line_end == NULL) + break; + printf(" %.*s\n", (int)(line_end - line_beg), line_beg); + line_beg = line_end + 1; + } + if(line_beg[0] != '\0') + printf(" %s\n", line_beg); +} + +static void +test_list_names__(void) +{ + const struct test__* test; + + printf("Unit tests:\n"); + for(test = &test_list__[0]; test->func != NULL; test++) + printf(" %s\n", test->name); +} + +static void +test_remember__(int i) +{ + if(test_flags__[i]) + return; + else + test_flags__[i] = 1; + + tests__[test_count__] = &test_list__[i]; + test_count__++; +} + +static int +test_name_contains_word__(const char* name, const char* pattern) +{ + static const char word_delim[] = " \t-_."; + const char* substr; + size_t pattern_len; + int starts_on_word_boundary; + int ends_on_word_boundary; + + pattern_len = strlen(pattern); + + substr = strstr(name, pattern); + while(substr != NULL) { + starts_on_word_boundary = (substr == name || strchr(word_delim, substr[-1]) != NULL); + ends_on_word_boundary = (substr[pattern_len] == '\0' || strchr(word_delim, substr[pattern_len]) != NULL); + + if(starts_on_word_boundary && ends_on_word_boundary) + return 1; + + substr = strstr(substr+1, pattern); + } + + return 0; +} + +static int +test_lookup__(const char* pattern) +{ + int i; + int n = 0; + + /* Try exact match. */ + for(i = 0; i < (int) test_list_size__; i++) { + if(strcmp(test_list__[i].name, pattern) == 0) { + test_remember__(i); + n++; + break; + } + } + if(n > 0) + return n; + + /* Try word match. */ + for(i = 0; i < (int) test_list_size__; i++) { + if(test_name_contains_word__(test_list__[i].name, pattern)) { + test_remember__(i); + n++; + } + } + if(n > 0) + return n; + + /* Try relaxed match. */ + for(i = 0; i < (int) test_list_size__; i++) { + if(strstr(test_list__[i].name, pattern) != NULL) { + test_remember__(i); + n++; + } + } + + return n; +} + +/* Call directly the given test unit function. */ +static int +test_do_run__(const struct test__* test) +{ + test_current_unit__ = test; + test_current_failures__ = 0; + test_current_already_logged__ = 0; + + if(test_verbose_level__ >= 3) { + test_print_in_color__(TEST_COLOR_DEFAULT_INTENSIVE__, "Test %s:\n", test->name); + test_current_already_logged__++; + } else if(test_verbose_level__ >= 1) { + int n; + char spaces[48]; + + n = test_print_in_color__(TEST_COLOR_DEFAULT_INTENSIVE__, "Test %s... ", test->name); + memset(spaces, ' ', sizeof(spaces)); + if(n < (int) sizeof(spaces)) + printf("%.*s", (int) sizeof(spaces) - n, spaces); + } else { + test_current_already_logged__ = 1; + } + +#ifdef __cplusplus + try { +#endif + + /* This is good to do for case the test unit e.g. crashes. */ + fflush(stdout); + fflush(stderr); + + test->func(); + +#ifdef __cplusplus + } catch(std::exception& e) { + const char* what = e.what(); + if(what != NULL) + test_check__(0, NULL, 0, "Threw std::exception: %s", what); + else + test_check__(0, NULL, 0, "Threw std::exception"); + } catch(...) { + test_check__(0, NULL, 0, "Threw an exception"); + } +#endif + + if(test_verbose_level__ >= 3) { + switch(test_current_failures__) { + case 0: test_print_in_color__(TEST_COLOR_GREEN_INTENSIVE__, " All conditions have passed.\n\n"); break; + case 1: test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, " One condition has FAILED.\n\n"); break; + default: test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, " %d conditions have FAILED.\n\n", test_current_failures__); break; + } + } else if(test_verbose_level__ >= 1 && test_current_failures__ == 0) { + printf("[ "); + test_print_in_color__(TEST_COLOR_GREEN_INTENSIVE__, "OK"); + printf(" ]\n"); + } + + test_current_unit__ = NULL; + return (test_current_failures__ == 0) ? 0 : -1; +} + +#if defined(ACUTEST_UNIX__) || defined(ACUTEST_WIN__) +/* Called if anything goes bad in Acutest, or if the unit test ends in other + * way then by normal returning from its function (e.g. exception or some + * abnormal child process termination). */ +static void +test_error__(const char* fmt, ...) +{ + va_list args; + + if(test_verbose_level__ == 0) + return; + + if(test_verbose_level__ <= 2 && !test_current_already_logged__ && test_current_unit__ != NULL) { + printf("[ "); + test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, "FAILED"); + printf(" ]\n"); + } + + if(test_verbose_level__ >= 2) { + test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, " Error: "); + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); + printf("\n"); + } +} +#endif + +/* Trigger the unit test. If possible (and not suppressed) it starts a child + * process who calls test_do_run__(), otherwise it calls test_do_run__() + * directly. */ +static void +test_run__(const struct test__* test) +{ + int failed = 1; + + test_current_unit__ = test; + test_current_already_logged__ = 0; + + if(!test_no_exec__) { + +#if defined(ACUTEST_UNIX__) + + pid_t pid; + int exit_code; + + pid = fork(); + if(pid == (pid_t)-1) { + test_error__("Cannot fork. %s [%d]", strerror(errno), errno); + failed = 1; + } else if(pid == 0) { + /* Child: Do the test. */ + failed = (test_do_run__(test) != 0); + exit(failed ? 1 : 0); + } else { + /* Parent: Wait until child terminates and analyze its exit code. */ + waitpid(pid, &exit_code, 0); + if(WIFEXITED(exit_code)) { + switch(WEXITSTATUS(exit_code)) { + case 0: failed = 0; break; /* test has passed. */ + case 1: /* noop */ break; /* "normal" failure. */ + default: test_error__("Unexpected exit code [%d]", WEXITSTATUS(exit_code)); + } + } else if(WIFSIGNALED(exit_code)) { + char tmp[32]; + const char* signame; + switch(WTERMSIG(exit_code)) { + case SIGINT: signame = "SIGINT"; break; + case SIGHUP: signame = "SIGHUP"; break; + case SIGQUIT: signame = "SIGQUIT"; break; + case SIGABRT: signame = "SIGABRT"; break; + case SIGKILL: signame = "SIGKILL"; break; + case SIGSEGV: signame = "SIGSEGV"; break; + case SIGILL: signame = "SIGILL"; break; + case SIGTERM: signame = "SIGTERM"; break; + default: sprintf(tmp, "signal %d", WTERMSIG(exit_code)); signame = tmp; break; + } + test_error__("Test interrupted by %s", signame); + } else { + test_error__("Test ended in an unexpected way [%d]", exit_code); + } + } + +#elif defined(ACUTEST_WIN__) + + char buffer[512] = {0}; + STARTUPINFOA startupInfo; + PROCESS_INFORMATION processInfo; + DWORD exitCode; + + /* Windows has no fork(). So we propagate all info into the child + * through a command line arguments. */ + _snprintf(buffer, sizeof(buffer)-1, + "%s --no-exec --no-summary --verbose=%d --color=%s -- \"%s\"", + test_argv0__, test_verbose_level__, + test_colorize__ ? "always" : "never", test->name); + memset(&startupInfo, 0, sizeof(startupInfo)); + startupInfo.cb = sizeof(STARTUPINFO); + if(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo)) { + WaitForSingleObject(processInfo.hProcess, INFINITE); + GetExitCodeProcess(processInfo.hProcess, &exitCode); + CloseHandle(processInfo.hThread); + CloseHandle(processInfo.hProcess); + failed = (exitCode != 0); + } else { + test_error__("Cannot create unit test subprocess [%ld].", GetLastError()); + failed = 1; + } + +#else + + /* A platform where we don't know how to run child process. */ + failed = (test_do_run__(test) != 0); + +#endif + + } else { + /* Child processes suppressed through --no-exec. */ + failed = (test_do_run__(test) != 0); + } + + test_current_unit__ = NULL; + + test_stat_run_units__++; + if(failed) + test_stat_failed_units__++; +} + +#if defined(ACUTEST_WIN__) +/* Callback for SEH events. */ +static LONG CALLBACK +test_exception_filter__(EXCEPTION_POINTERS *ptrs) +{ + test_error__("Unhandled SEH exception %08lx at %p.", + ptrs->ExceptionRecord->ExceptionCode, + ptrs->ExceptionRecord->ExceptionAddress); + fflush(stdout); + fflush(stderr); + return EXCEPTION_EXECUTE_HANDLER; +} +#endif + + +static void +test_help__(void) +{ + printf("Usage: %s [options] [test...]\n", test_argv0__); + printf("Run the specified unit tests; or if the option '--skip' is used, run all\n"); + printf("tests in the suite but those listed. By default, if no tests are specified\n"); + printf("on the command line, all unit tests in the suite are run.\n"); + printf("\n"); + printf("Options:\n"); + printf(" -s, --skip Execute all unit tests but the listed ones\n"); + printf(" --exec=WHEN If supported, execute unit tests as child processes\n"); + printf(" (WHEN is one of 'auto', 'always', 'never')\n"); + printf(" -E, --no-exec Same as --exec=never\n"); + printf(" --no-summary Suppress printing of test results summary\n"); + printf(" -l, --list List unit tests in the suite and exit\n"); + printf(" -v, --verbose Enable more verbose output\n"); + printf(" --verbose=LEVEL Set verbose level to LEVEL:\n"); + printf(" 0 ... Be silent\n"); + printf(" 1 ... Output one line per test (and summary)\n"); + printf(" 2 ... As 1 and failed conditions (this is default)\n"); + printf(" 3 ... As 1 and all conditions (and extended summary)\n"); + printf(" --color=WHEN Enable colorized output\n"); + printf(" (WHEN is one of 'auto', 'always', 'never')\n"); + printf(" -h, --help Display this help and exit\n"); + + if(test_list_size__ < 16) { + printf("\n"); + test_list_names__(); + } +} + +#ifdef ACUTEST_LINUX__ +static int +test_is_tracer_present__(void) +{ + char buf[256+32+1]; + int tracer_present = 0; + int fd; + ssize_t n_read; + + fd = open("/proc/self/status", O_RDONLY); + if(fd == -1) + return 0; + + n_read = read(fd, buf, sizeof(buf)-1); + while(n_read > 0) { + static const char pattern[] = "TracerPid:"; + const char* field; + + buf[n_read] = '\0'; + field = strstr(buf, pattern); + if(field != NULL && field < buf + sizeof(buf) - 32) { + pid_t tracer_pid = (pid_t) atoi(field + sizeof(pattern) - 1); + tracer_present = (tracer_pid != 0); + break; + } + + if(n_read == sizeof(buf)-1) { + memmove(buf, buf + sizeof(buf)-1 - 32, 32); + n_read = read(fd, buf+32, sizeof(buf)-1-32); + if(n_read > 0) + n_read += 32; + } + } + + close(fd); + return tracer_present; +} +#endif + +int +main(int argc, char** argv) +{ + int i; + int seen_double_dash = 0; + + test_argv0__ = argv[0]; + +#if defined ACUTEST_UNIX__ + test_colorize__ = isatty(STDOUT_FILENO); +#elif defined ACUTEST_WIN__ + #if defined __BORLANDC__ + test_colorize__ = isatty(_fileno(stdout)); + #else + test_colorize__ = _isatty(_fileno(stdout)); + #endif +#else + test_colorize__ = 0; +#endif + + /* Count all test units */ + test_list_size__ = 0; + for(i = 0; test_list__[i].func != NULL; i++) + test_list_size__++; + + tests__ = (const struct test__**) malloc(sizeof(const struct test__*) * test_list_size__); + test_flags__ = (char*) malloc(sizeof(char) * test_list_size__); + if(tests__ == NULL || test_flags__ == NULL) { + fprintf(stderr, "Out of memory.\n"); + exit(2); + } + memset((void*) test_flags__, 0, sizeof(char) * test_list_size__); + + /* Parse options */ + for(i = 1; i < argc; i++) { + if(seen_double_dash || argv[i][0] != '-') { + if(test_lookup__(argv[i]) == 0) { + fprintf(stderr, "%s: Unrecognized unit test '%s'\n", argv[0], argv[i]); + fprintf(stderr, "Try '%s --list' for list of unit tests.\n", argv[0]); + exit(2); + } + } else if(strcmp(argv[i], "--") == 0) { + seen_double_dash = 1; + } else if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) { + test_help__(); + exit(0); + } else if(strcmp(argv[i], "--verbose") == 0 || strcmp(argv[i], "-v") == 0) { + test_verbose_level__++; + } else if(strncmp(argv[i], "--verbose=", 10) == 0) { + test_verbose_level__ = atoi(argv[i] + 10); + } else if(strcmp(argv[i], "--color=auto") == 0) { + /* noop (set from above) */ + } else if(strcmp(argv[i], "--color=always") == 0 || strcmp(argv[i], "--color") == 0) { + test_colorize__ = 1; + } else if(strcmp(argv[i], "--color=never") == 0 || strcmp(argv[i], "--no-color") == 0) { + test_colorize__ = 0; + } else if(strcmp(argv[i], "--skip") == 0 || strcmp(argv[i], "-s") == 0) { + test_skip_mode__ = 1; + } else if(strcmp(argv[i], "--exec=auto") == 0) { + /* noop (set from above) */ + } else if(strcmp(argv[i], "--exec=always") == 0 || strcmp(argv[i], "--exec") == 0) { + test_no_exec__ = 0; + } else if(strcmp(argv[i], "--exec=never") == 0 || strcmp(argv[i], "--no-exec") == 0 || strcmp(argv[i], "-E") == 0) { + test_no_exec__ = 1; + } else if(strcmp(argv[i], "--no-summary") == 0) { + test_no_summary__ = 1; + } else if(strcmp(argv[i], "--list") == 0 || strcmp(argv[i], "-l") == 0) { + test_list_names__(); + exit(0); + } else { + fprintf(stderr, "%s: Unrecognized option '%s'\n", argv[0], argv[i]); + fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); + exit(2); + } + } + +#if defined(ACUTEST_WIN__) + SetUnhandledExceptionFilter(test_exception_filter__); +#endif + + /* By default, we want to run all tests. */ + if(test_count__ == 0) { + for(i = 0; test_list__[i].func != NULL; i++) + tests__[i] = &test_list__[i]; + test_count__ = test_list_size__; + } + + /* Guess whether we want to run unit tests as child processes. */ + if(test_no_exec__ < 0) { + test_no_exec__ = 0; + + if(test_count__ <= 1) { + test_no_exec__ = 1; + } else { +#ifdef ACUTEST_WIN__ + if(IsDebuggerPresent()) + test_no_exec__ = 1; +#endif +#ifdef ACUTEST_LINUX__ + if(test_is_tracer_present__()) + test_no_exec__ = 1; +#endif + } + } + + /* Run the tests */ + if(!test_skip_mode__) { + /* Run the listed tests. */ + for(i = 0; i < (int) test_count__; i++) + test_run__(tests__[i]); + } else { + /* Run all tests except those listed. */ + for(i = 0; test_list__[i].func != NULL; i++) { + if(!test_flags__[i]) + test_run__(&test_list__[i]); + } + } + + /* Write a summary */ + if(!test_no_summary__ && test_verbose_level__ >= 1) { + if(test_verbose_level__ >= 3) { + test_print_in_color__(TEST_COLOR_DEFAULT_INTENSIVE__, "Summary:\n"); + + printf(" Count of all unit tests: %4d\n", (int) test_list_size__); + printf(" Count of run unit tests: %4d\n", test_stat_run_units__); + printf(" Count of failed unit tests: %4d\n", test_stat_failed_units__); + printf(" Count of skipped unit tests: %4d\n", (int) test_list_size__ - test_stat_run_units__); + printf(" "); + } + + if(test_stat_failed_units__ == 0) { + test_print_in_color__(TEST_COLOR_GREEN_INTENSIVE__, "SUCCESS:"); + printf(" All unit tests have passed.\n"); + } else { + test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, "FAILED:"); + printf(" %d of %d unit tests have failed.\n", + test_stat_failed_units__, test_stat_run_units__); + } + + if(test_verbose_level__ >= 3) + printf("\n"); + } + + free((void*) tests__); + free((void*) test_flags__); + + return (test_stat_failed_units__ == 0) ? 0 : 1; +} + + +#endif /* #ifndef TEST_NO_MAIN */ + +#ifdef __cplusplus + } /* extern "C" */ +#endif + + +#endif /* #ifndef ACUTEST_H__ */ diff --git a/lib/cfl/tests/list.c b/lib/cfl/tests/list.c new file mode 100644 index 00000000000..0c12f888fd7 --- /dev/null +++ b/lib/cfl/tests/list.c @@ -0,0 +1,50 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "cfl_tests_internal.h" + +struct test { + struct cfl_list _head; +}; + +static void checks() +{ + struct test *t; + struct cfl_list list; + + cfl_list_init(&list); + TEST_CHECK(cfl_list_is_empty(&list)); + + t = malloc(sizeof(struct test)); + cfl_list_add(&t->_head, &list); + TEST_CHECK(!cfl_list_is_empty(&list)); + + cfl_list_del(&t->_head); + TEST_CHECK(cfl_list_is_empty(&list)); + + free(t); +} + +TEST_LIST = { + {"checks", checks}, + { 0 } +}; + diff --git a/lib/cfl/tests/sds.c b/lib/cfl/tests/sds.c new file mode 100644 index 00000000000..899725e161f --- /dev/null +++ b/lib/cfl/tests/sds.c @@ -0,0 +1,59 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "cfl_tests_internal.h" + +static void test_sds_usage() +{ + cfl_sds_t s; + + s = cfl_sds_create("test"); + TEST_CHECK(s != NULL); + TEST_CHECK(cfl_sds_len(s) == 4); + TEST_CHECK(cfl_sds_alloc(s) == 4); + TEST_CHECK(strcmp("test", s) == 0); + + s = cfl_sds_cat(s, ",cat message", 12); + TEST_CHECK(strcmp("test,cat message", s) == 0); + + cfl_sds_destroy(s); +} + +static void test_sds_printf() +{ + int len; + cfl_sds_t s; + cfl_sds_t tmp; + char *str = "0123456789ABCDEFGHIJQLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvewxyz"; + + s = cfl_sds_create_size(10); + tmp = cfl_sds_printf(&s, "%s=%s", str, str); + + len = (strlen(str) * 2) + 1; + TEST_CHECK(tmp == s); + TEST_CHECK(cfl_sds_len(s) == len); + cfl_sds_destroy(s); +} + +TEST_LIST = { + { "sds_usage" , test_sds_usage}, + { "sds_printf", test_sds_printf}, + { 0 } +}; diff --git a/lib/cfl/tests/variant.c b/lib/cfl/tests/variant.c new file mode 100644 index 00000000000..83dcb33aa73 --- /dev/null +++ b/lib/cfl/tests/variant.c @@ -0,0 +1,470 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + +/* CFL + * === + * Copyright (C) 2022 The CFL Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "cfl_tests_internal.h" + +static int compare(FILE *fp, char *expect, int ignore_len) +{ + int ret; + size_t len = strlen(expect); + size_t ret_fp; + char buf[1024] = {0}; + + ret = fseek(fp, 0, SEEK_SET); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("fseek failed"); + return ret; + } + + ret_fp = fread(&buf[0], 1, sizeof(buf), fp); + if (ret_fp == 0) { + if (!TEST_CHECK(feof(fp) == 0)) { + TEST_MSG("fread error."); + return -1; + } + } + if (ignore_len) { + if (!TEST_CHECK(strstr(&buf[0], expect) != NULL)) { + TEST_MSG("compare error. got=%s expect=%s", &buf[0], expect); + return -1; + } + + } else { + if (!TEST_CHECK(strlen(buf) == len)) { + TEST_MSG("length error. len=%d got=%s expect=%s", strlen(buf), &buf[0], expect); + return -1; + } + if (!TEST_CHECK(strncmp(expect, &buf[0], len) == 0)) { + TEST_MSG("compare error. got=%s expect=%s", &buf[0], expect); + return -1; + } + } + return 0; +} + +static void test_variant_print_bool() +{ + int ret; + int i; + int inputs[] = {CFL_TRUE, CFL_FALSE}; + char *expects[] = {"true", "false"}; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + for (i=0; i 0)) { + TEST_MSG("%d:cfl_variant_print failed", i); + cfl_variant_destroy(val); + fclose(fp); + continue; + } + ret = compare(fp, expects[i], 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("%d:compare failed", i); + } + cfl_variant_destroy(val); + fclose(fp); + } +} + +static void test_variant_print_array() +{ + int ret; + int i; + int64_t inputs[] = {1, 0, -123}; + char *expect = {"[1,0,-123]"}; + + FILE *fp = NULL; + struct cfl_array *array = NULL; + struct cfl_variant *val = NULL; + + fp = tmpfile(); + if (!TEST_CHECK(fp != NULL)) { + TEST_MSG("fp is NULL"); + exit(1); + } + + array = cfl_array_create(sizeof(inputs)/sizeof(int64_t)); + if (!TEST_CHECK(array != NULL)) { + TEST_MSG("cfl_array_create failed"); + fclose(fp); + exit(1); + } + + + for (i=0; i 0)) { + TEST_MSG("cfl_variant_print failed"); + cfl_variant_destroy(val); + fclose(fp); + exit(1); + } + ret = compare(fp, expect, 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("compare failed"); + } + cfl_variant_destroy(val); + fclose(fp); +} + +static void test_variant_print_kvlist() +{ + int ret; + int i; + char *key_inputs[] = {"key", "key2", "aaa"}; + int64_t val_inputs[] = {1, 0, -123}; + char *expect = {"{\"key\":1,\"key2\":0,\"aaa\":-123}"}; + + FILE *fp = NULL; + struct cfl_kvlist *list = NULL; + struct cfl_variant *val = NULL; + + if (!TEST_CHECK(sizeof(key_inputs)/sizeof(char*) == sizeof(val_inputs)/sizeof(int64_t))) { + TEST_MSG("key val array size mismatch. key_len=%d val_len=%d", + sizeof(key_inputs)/sizeof(char*), + sizeof(val_inputs)/sizeof(int64_t)); + exit(1); + } + + fp = tmpfile(); + if (!TEST_CHECK(fp != NULL)) { + TEST_MSG("fp is NULL"); + exit(1); + } + + list = cfl_kvlist_create(); + if (!TEST_CHECK(list != NULL)) { + TEST_MSG("cfl_kvlist_create failed"); + fclose(fp); + exit(1); + } + + for (i=0; i 0)) { + TEST_MSG("cfl_variant_print failed"); + cfl_variant_destroy(val); + fclose(fp); + exit(1); + } + ret = compare(fp, expect, 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("compare failed"); + } + cfl_variant_destroy(val); + fclose(fp); +} + +static void test_variant_print_double() +{ + int ret; + int i; + double inputs[] = {1.0, -12.3}; + char *expects[] = {"1.0", "-12.3"}; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + for (i=0; i 0)) { + TEST_MSG("%d:cfl_variant_print failed", i); + cfl_variant_destroy(val); + fclose(fp); + continue; + } + ret = compare(fp, expects[i], 1); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("%d:compare failed", i); + } + cfl_variant_destroy(val); + fclose(fp); + } +} + +static void test_variant_print_string() +{ + int ret; + int i; + char *inputs[] = {"hoge", "aaa"}; + char *expects[] = {"\"hoge\"", "\"aaa\""}; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + for (i=0; i 0)) { + TEST_MSG("%d:cfl_variant_print failed", i); + cfl_variant_destroy(val); + fclose(fp); + continue; + } + ret = compare(fp, expects[i], 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("%d:compare failed", i); + } + cfl_variant_destroy(val); + fclose(fp); + } +} + +static void test_variant_print_bytes() +{ + int ret; + char input[] = {0x1f, 0xaa, 0x0a, 0xff}; + char *expect = "1faa0aff"; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + fp = tmpfile(); + if (!TEST_CHECK(fp != NULL)) { + TEST_MSG("fp is NULL"); + exit(1); + } + + val = cfl_variant_create_from_bytes(input, 4); + if (!TEST_CHECK(val != NULL)) { + TEST_MSG("cfl_variant_create_from_bytes failed"); + fclose(fp); + exit(1); + } + + ret = cfl_variant_print(fp, val); + if (!TEST_CHECK(ret > 0)) { + TEST_MSG("cfl_variant_print failed"); + cfl_variant_destroy(val); + fclose(fp); + exit(1); + } + ret = compare(fp, expect, 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("compare failed"); + } + cfl_variant_destroy(val); + fclose(fp); +} + + +static void test_variant_print_reference() +{ + int ret; + int *input = (int*)0x12345678; + char expect[] = "0x12345678"; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + fp = tmpfile(); + if (!TEST_CHECK(fp != NULL)) { + TEST_MSG("fp is NULL"); + exit(1); + } + + val = cfl_variant_create_from_reference(input); + if (!TEST_CHECK(val != NULL)) { + TEST_MSG("cfl_variant_create_from_reference failed"); + fclose(fp); + exit(1); + } + + ret = cfl_variant_print(fp, val); + if (!TEST_CHECK(ret > 0)) { + TEST_MSG("cfl_variant_print failed"); + fclose(fp); + cfl_variant_destroy(val); + exit(1); + } + ret = compare(fp, &expect[0], 0); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("compare failed"); + } + cfl_variant_destroy(val); + fclose(fp); +} + +static void test_variant_print_unknown() +{ + int ret; + char expect[] = "Unknown"; + + FILE *fp = NULL; + struct cfl_variant *val = NULL; + + fp = tmpfile(); + if (!TEST_CHECK(fp != NULL)) { + TEST_MSG("fp is NULL"); + exit(1); + } + + val = cfl_variant_create(); + if (!TEST_CHECK(val != NULL)) { + TEST_MSG("cfl_variant_create failed"); + fclose(fp); + exit(1); + } + + ret = cfl_variant_print(fp, val); + if (!TEST_CHECK(ret != EOF)) { + TEST_MSG("cfl_variant_print failed"); + fclose(fp); + cfl_variant_destroy(val); + exit(1); + } + ret = compare(fp, &expect[0], 1); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("compare failed"); + } + cfl_variant_destroy(val); + fclose(fp); +} + +TEST_LIST = { + {"variant_print_bool", test_variant_print_bool}, + {"variant_print_int64", test_variant_print_int64}, + {"variant_print_double", test_variant_print_double}, + {"variant_print_string", test_variant_print_string}, + {"variant_print_bytes", test_variant_print_bytes}, + {"variant_print_array", test_variant_print_array}, + {"variant_print_kvlist", test_variant_print_kvlist}, + {"variant_print_reference", test_variant_print_reference}, + {"variant_print_unknown", test_variant_print_unknown}, + { 0 } +}; diff --git a/lib/flb_libco/CMakeLists.txt b/lib/flb_libco/CMakeLists.txt index 1f0c5539588..a6f86a9150e 100644 --- a/lib/flb_libco/CMakeLists.txt +++ b/lib/flb_libco/CMakeLists.txt @@ -1,3 +1,6 @@ +cmake_minimum_required(VERSION 3.12) +project(flb_libco C) + set(src libco.c ) diff --git a/lib/flb_libco/libco.c b/lib/flb_libco/libco.c index e0101d23872..a66b5b3119c 100644 --- a/lib/flb_libco/libco.c +++ b/lib/flb_libco/libco.c @@ -16,7 +16,9 @@ #include "arm.c" #elif defined(__aarch64__) #include "aarch64.c" - #elif defined(_ARCH_PPC) + #elif defined(__powerpc64__) && defined(_CALL_ELF) && _CALL_ELF == 2 + #include "ppc64le.c" + #elif defined(_ARCH_PPC) && !defined(__LITTLE_ENDIAN__) #include "ppc.c" #elif defined(_WIN32) #include "fiber.c" diff --git a/lib/flb_libco/ppc64le.c b/lib/flb_libco/ppc64le.c new file mode 100644 index 00000000000..95cc2f599e8 --- /dev/null +++ b/lib/flb_libco/ppc64le.c @@ -0,0 +1,239 @@ +/* + libco.ppc (2016-09-14) + author: blargg + license: public domain +*/ + +#define LIBCO_C +#include "libco.h" +#include "settings.h" + +#include +#include +#include + +/* state format (offsets in 32-bit words) + +0 pointer to swap code + rest of function descriptor for entry function + +8 PC ++10 SP + special registers + GPRs + FPRs + VRs + stack +*/ + +enum { state_size = 1024 }; +enum { above_stack = 2048 }; +enum { stack_align = 256 }; + +static thread_local cothread_t co_active_handle = 0; + +/* determine environment */ + +#define LIBCO_PPC64 (_ARCH_PPC64 || __PPC64__ || __ppc64__ || __powerpc64__) + +text_section +static const uint32_t libco_ppc_code[1024] = { + 0xf8240008, /* std r1, 8(4) */ + 0xf8440010, /* std r2, 16(4) */ + 0xf9840060, /* std r12, 96(4) */ + 0xf9a40068, /* std r13, 104(4) */ + 0xf9c40070, /* std r14, 112(4) */ + 0xf9e40078, /* std r15, 120(4) */ + 0xfa040080, /* std r16, 128(4) */ + 0xfa240088, /* std r17, 136(4) */ + 0xfa440090, /* std r18, 144(4) */ + 0xfa640098, /* std r19, 152(4) */ + 0xfa8400a0, /* std r20, 160(4) */ + 0xfaa400a8, /* std r21, 168(4) */ + 0xfac400b0, /* std r22, 176(4) */ + 0xfae400b8, /* std r23, 184(4) */ + 0xfb0400c0, /* std r24, 192(4) */ + 0xfb2400c8, /* std r25, 200(4) */ + 0xfb4400d0, /* std r26, 208(4) */ + 0xfb6400d8, /* std r27, 216(4) */ + 0xfb8400e0, /* std r28, 224(4) */ + 0xfba400e8, /* std r29, 232(4) */ + 0xfbc400f0, /* std r30, 240(4) */ + 0xfbe400f8, /* std r31, 248(4) */ + 0x7ca802a6, /* mflr r5 */ + 0xf8a40100, /* std r5, 256(4) */ + 0x7ca00026, /* mfcr r5 */ + 0xf8a40108, /* std r5, 264(4) */ + 0xe8230008, /* ld r1, 8(3) */ + 0xe8430010, /* ld r2, 16(3) */ + 0xe9830060, /* ld r12, 96(3) */ + 0xe9a30068, /* ld r13, 104(3) */ + 0xe9c30070, /* ld r14, 112(3) */ + 0xe9e30078, /* ld r15, 120(3) */ + 0xea030080, /* ld r16, 128(3) */ + 0xea230088, /* ld r17, 136(3) */ + 0xea430090, /* ld r18, 144(3) */ + 0xea630098, /* ld r19, 152(3) */ + 0xea8300a0, /* ld r20, 160(3) */ + 0xeaa300a8, /* ld r21, 168(3) */ + 0xeac300b0, /* ld r22, 176(3) */ + 0xeae300b8, /* ld r23, 184(3) */ + 0xeb0300c0, /* ld r24, 192(3) */ + 0xeb2300c8, /* ld r25, 200(3) */ + 0xeb4300d0, /* ld r26, 208(3) */ + 0xeb6300d8, /* ld r27, 216(3) */ + 0xeb8300e0, /* ld r28, 224(3) */ + 0xeba300e8, /* ld r29, 232(3) */ + 0xebc300f0, /* ld r30, 240(3) */ + 0xebe300f8, /* ld r31, 248(3) */ + 0xe8a30100, /* ld r5, 256(3) */ + 0x7ca803a6, /* mtlr r5 */ + 0xe8a30108, /* ld r5, 264(3) */ + 0x7caff120, /* mtcr r5 */ + + #ifndef LIBCO_PPC_NOFP + 0xd9c40180, /* stfd r14, 384(4) */ + 0xd9e40188, /* stfd r15, 392(4) */ + 0xda040190, /* stfd r16, 400(4) */ + 0xda240198, /* stfd r17, 408(4) */ + 0xda4401a0, /* stfd r18, 416(4) */ + 0xda6401a8, /* stfd r19, 424(4) */ + 0xda8401b0, /* stfd r20, 432(4) */ + 0xdaa401b8, /* stfd r21, 440(4) */ + 0xdac401c0, /* stfd r22, 448(4) */ + 0xdae401c8, /* stfd r23, 456(4) */ + 0xdb0401d0, /* stfd r24, 464(4) */ + 0xdb2401d8, /* stfd r25, 472(4) */ + 0xdb4401e0, /* stfd r26, 480(4) */ + 0xdb6401e8, /* stfd r27, 488(4) */ + 0xdb8401f0, /* stfd r28, 496(4) */ + 0xdba401f8, /* stfd r29, 504(4) */ + 0xdbc40200, /* stfd r30, 512(4) */ + 0xdbe40208, /* stfd r31, 520(4) */ + 0xc9c30180, /* lfd r14, 384(3) */ + 0xc9e30188, /* lfd r15, 392(3) */ + 0xca030190, /* lfd r16, 400(3) */ + 0xca230198, /* lfd r17, 408(3) */ + 0xca4301a0, /* lfd r18, 416(3) */ + 0xca6301a8, /* lfd r19, 424(3) */ + 0xca8301b0, /* lfd r20, 432(3) */ + 0xcaa301b8, /* lfd r21, 440(3) */ + 0xcac301c0, /* lfd r22, 448(3) */ + 0xcae301c8, /* lfd r23, 456(3) */ + 0xcb0301d0, /* lfd r24, 464(3) */ + 0xcb2301d8, /* lfd r25, 472(3) */ + 0xcb4301e0, /* lfd r26, 480(3) */ + 0xcb6301e8, /* lfd r27, 488(3) */ + 0xcb8301f0, /* lfd r28, 496(3) */ + 0xcba301f8, /* lfd r29, 504(3) */ + 0xcbc30200, /* lfd r30, 512(3) */ + 0xcbe30208, /* lfd r31, 520(3) */ + #endif + + #ifdef __ALTIVEC__ + 0x38a00210, /* li r5, 528 */ + 0x7e842bce, /* stvxl v20, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ea42bce, /* stvxl v21, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ec42bce, /* stvxl v22, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ee42bce, /* stvxl v23, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f042bce, /* stvxl v24, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f242bce, /* stvxl v25, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f442bce, /* stvxl v26, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f642bce, /* stvxl v27, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f842bce, /* stvxl v28, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fa42bce, /* stvxl v29, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fc42bce, /* stvxl v30, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fe42bce, /* stvxl v31, r4, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ca042a6, /* mfvrsave r5 */ + 0x90a402e0, /* stw r5, 736(4) */ + 0x38a00210, /* li r5, 528 */ + 0x7e832ace, /* lvxl v20, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ea32ace, /* lvxl v21, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ec32ace, /* lvxl v22, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7ee32ace, /* lvxl v23, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f032ace, /* lvxl v24, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f232ace, /* lvxl v25, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f432ace, /* lvxl v26, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f632ace, /* lvxl v27, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7f832ace, /* lvxl v28, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fa32ace, /* lvxl v29, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fc32ace, /* lvxl v30, r3, r5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x7fe32ace, /* lvxl v31, r3, 5 */ + 0x38a50010, /* addi r5, r5, 16 */ + 0x80a302d0, /* lwz r5, 720(3) */ + 0x7ca043a6, /* mtvrsave r5 */ + #endif + + 0x4e800020 /* blr */ +}; + +/* function call goes directly to code */ +#define CO_SWAP_ASM(x, y) ((void (*)(cothread_t, cothread_t))(uintptr_t)libco_ppc_code)(x, y) + +cothread_t co_active() { + if(!co_active_handle) co_active_handle = (uint64_t*)malloc(state_size); + return co_active_handle; +} + +cothread_t co_create(unsigned int size, void (*entry_)(void), + size_t *out_size) { + + uintptr_t entry = (uintptr_t)entry_; + uint64_t* t = 0; + uintptr_t sp; + int shift; + + /* be sure main thread was successfully allocated */ + if(co_active()) { + size += state_size + above_stack + stack_align; + t = (uint64_t*)malloc(size); + } + + if(t) { + /* save current registers into new thread, so that any special ones will have proper values when thread is begun */ + CO_SWAP_ASM(t, t); + + /* put stack near end of block, and align */ + sp = (uintptr_t)t + size - above_stack; + sp -= sp % stack_align; + + /* set up sp and entry will be called on next swap */ + t[1] = (uint64_t)sp; + t[12] = (uint64_t)entry; + t[32] = (uint64_t)entry; + } + *out_size = size; + return t; +} + +void co_delete(cothread_t t) { + free(t); +} + +void co_switch(cothread_t t) { + cothread_t old = co_active_handle; + co_active_handle = t; + + CO_SWAP_ASM(t, old); +} \ No newline at end of file diff --git a/lib/libbacktrace-2446c66/.gitignore b/lib/libbacktrace-8602fda/.gitignore similarity index 100% rename from lib/libbacktrace-2446c66/.gitignore rename to lib/libbacktrace-8602fda/.gitignore diff --git a/lib/libbacktrace-2446c66/Isaac.Newton-Opticks.txt b/lib/libbacktrace-8602fda/Isaac.Newton-Opticks.txt similarity index 100% rename from lib/libbacktrace-2446c66/Isaac.Newton-Opticks.txt rename to lib/libbacktrace-8602fda/Isaac.Newton-Opticks.txt diff --git a/lib/libbacktrace-2446c66/LICENSE b/lib/libbacktrace-8602fda/LICENSE similarity index 100% rename from lib/libbacktrace-2446c66/LICENSE rename to lib/libbacktrace-8602fda/LICENSE diff --git a/lib/libbacktrace-2446c66/Makefile.am b/lib/libbacktrace-8602fda/Makefile.am similarity index 96% rename from lib/libbacktrace-2446c66/Makefile.am rename to lib/libbacktrace-8602fda/Makefile.am index 166a058a087..598e6cb5fa8 100644 --- a/lib/libbacktrace-2446c66/Makefile.am +++ b/lib/libbacktrace-8602fda/Makefile.am @@ -86,13 +86,19 @@ libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD) # Testsuite. -# Add a test to this variable if you want it to be built. +# Add a test to this variable if you want it to be built as a program, +# with SOURCES, etc. check_PROGRAMS = # Add a test to this variable if you want it to be run. TESTS = -# Add a test to this variable if you want it to be built and run. +# Add a test to this variable if you want it to be built as a Makefile +# target and run. +MAKETESTS = + +# Add a test to this variable if you want it to be built as a program, +# with SOURCES, etc., and run. BUILDTESTS = # Add a file to this variable if you want it to be built for testing. @@ -251,7 +257,7 @@ b2test_LDFLAGS = -Wl,--build-id b2test_LDADD = libbacktrace_elf_for_test.la check_PROGRAMS += b2test -TESTS += b2test_buildid +MAKETESTS += b2test_buildid if HAVE_DWZ @@ -261,7 +267,7 @@ b3test_LDFLAGS = -Wl,--build-id b3test_LDADD = libbacktrace_elf_for_test.la check_PROGRAMS += b3test -TESTS += b3test_dwz_buildid +MAKETESTS += b3test_dwz_buildid endif HAVE_DWZ @@ -312,11 +318,11 @@ if HAVE_DWZ cp $< $@; \ fi -TESTS += btest_dwz +MAKETESTS += btest_dwz if HAVE_OBJCOPY_DEBUGLINK -TESTS += btest_dwz_gnudebuglink +MAKETESTS += btest_dwz_gnudebuglink endif HAVE_OBJCOPY_DEBUGLINK @@ -417,7 +423,7 @@ endif HAVE_PTHREAD if HAVE_OBJCOPY_DEBUGLINK -TESTS += btest_gnudebuglink +MAKETESTS += btest_gnudebuglink %_gnudebuglink: % $(OBJCOPY) --only-keep-debug $< $@.debug @@ -495,7 +501,7 @@ endif USE_DSYMUTIL if HAVE_MINIDEBUG -TESTS += mtest_minidebug +MAKETESTS += mtest_minidebug %_minidebug: % $(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms @@ -537,10 +543,11 @@ endif HAVE_ELF check_PROGRAMS += $(BUILDTESTS) -TESTS += $(BUILDTESTS) +TESTS += $(MAKETESTS) $(BUILDTESTS) CLEANFILES = \ - $(TESTS) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build \ + $(MAKETESTS) $(BUILDTESTS) *.debug elf_for_test.c edtest2_build.c \ + gen_edtest2_build \ *.dsyms *.fsyms *.keepsyms *.dbg *.mdbg *.mdbg.xz *.strip clean-local: diff --git a/lib/libbacktrace-2446c66/Makefile.in b/lib/libbacktrace-8602fda/Makefile.in similarity index 99% rename from lib/libbacktrace-2446c66/Makefile.in rename to lib/libbacktrace-8602fda/Makefile.in index b6a57ee0245..e05b1497ce7 100644 --- a/lib/libbacktrace-2446c66/Makefile.in +++ b/lib/libbacktrace-8602fda/Makefile.in @@ -123,9 +123,7 @@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_14) -TESTS = $(am__append_4) $(am__append_7) $(am__append_9) \ - $(am__append_12) $(am__append_13) $(am__append_20) \ - $(am__append_26) $(am__EXEEXT_14) +TESTS = $(am__append_4) $(MAKETESTS) $(am__EXEEXT_14) @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_1 = libbacktrace_elf_for_test.la @NATIVE_TRUE@am__append_2 = test_elf_32 test_elf_64 test_macho \ @NATIVE_TRUE@ test_xcoff_32 test_xcoff_64 test_pecoff \ @@ -987,7 +985,13 @@ libbacktrace_la_LIBADD = \ libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD) -# Add a test to this variable if you want it to be built and run. +# Add a test to this variable if you want it to be built as a Makefile +# target and run. +MAKETESTS = $(am__append_7) $(am__append_9) $(am__append_12) \ + $(am__append_13) $(am__append_20) $(am__append_26) + +# Add a test to this variable if you want it to be built as a program, +# with SOURCES, etc., and run. BUILDTESTS = $(am__append_2) $(am__append_10) $(am__append_11) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_21) $(am__append_22) $(am__append_24) \ @@ -1129,7 +1133,8 @@ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g @HAVE_ELF_TRUE@xztest_alloc_LDADD = libbacktrace_alloc.la \ @HAVE_ELF_TRUE@ $(am__append_28) $(CLOCK_GETTIME_LINK) CLEANFILES = \ - $(TESTS) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build \ + $(MAKETESTS) $(BUILDTESTS) *.debug elf_for_test.c edtest2_build.c \ + gen_edtest2_build \ *.dsyms *.fsyms *.keepsyms *.dbg *.mdbg *.mdbg.xz *.strip all: config.h diff --git a/lib/libbacktrace-2446c66/README.md b/lib/libbacktrace-8602fda/README.md similarity index 100% rename from lib/libbacktrace-2446c66/README.md rename to lib/libbacktrace-8602fda/README.md diff --git a/lib/libbacktrace-2446c66/aclocal.m4 b/lib/libbacktrace-8602fda/aclocal.m4 similarity index 100% rename from lib/libbacktrace-2446c66/aclocal.m4 rename to lib/libbacktrace-8602fda/aclocal.m4 diff --git a/lib/libbacktrace-2446c66/alloc.c b/lib/libbacktrace-8602fda/alloc.c similarity index 100% rename from lib/libbacktrace-2446c66/alloc.c rename to lib/libbacktrace-8602fda/alloc.c diff --git a/lib/libbacktrace-2446c66/allocfail.c b/lib/libbacktrace-8602fda/allocfail.c similarity index 100% rename from lib/libbacktrace-2446c66/allocfail.c rename to lib/libbacktrace-8602fda/allocfail.c diff --git a/lib/libbacktrace-2446c66/allocfail.sh b/lib/libbacktrace-8602fda/allocfail.sh similarity index 100% rename from lib/libbacktrace-2446c66/allocfail.sh rename to lib/libbacktrace-8602fda/allocfail.sh diff --git a/lib/libbacktrace-2446c66/atomic.c b/lib/libbacktrace-8602fda/atomic.c similarity index 100% rename from lib/libbacktrace-2446c66/atomic.c rename to lib/libbacktrace-8602fda/atomic.c diff --git a/lib/libbacktrace-2446c66/backtrace-supported.h.in b/lib/libbacktrace-8602fda/backtrace-supported.h.in similarity index 100% rename from lib/libbacktrace-2446c66/backtrace-supported.h.in rename to lib/libbacktrace-8602fda/backtrace-supported.h.in diff --git a/lib/libbacktrace-2446c66/backtrace.c b/lib/libbacktrace-8602fda/backtrace.c similarity index 100% rename from lib/libbacktrace-2446c66/backtrace.c rename to lib/libbacktrace-8602fda/backtrace.c diff --git a/lib/libbacktrace-2446c66/backtrace.h b/lib/libbacktrace-8602fda/backtrace.h similarity index 100% rename from lib/libbacktrace-2446c66/backtrace.h rename to lib/libbacktrace-8602fda/backtrace.h diff --git a/lib/libbacktrace-2446c66/btest.c b/lib/libbacktrace-8602fda/btest.c similarity index 100% rename from lib/libbacktrace-2446c66/btest.c rename to lib/libbacktrace-8602fda/btest.c diff --git a/lib/libbacktrace-2446c66/compile b/lib/libbacktrace-8602fda/compile similarity index 100% rename from lib/libbacktrace-2446c66/compile rename to lib/libbacktrace-8602fda/compile diff --git a/lib/libbacktrace-2446c66/config.guess b/lib/libbacktrace-8602fda/config.guess similarity index 100% rename from lib/libbacktrace-2446c66/config.guess rename to lib/libbacktrace-8602fda/config.guess diff --git a/lib/libbacktrace-2446c66/config.h.in b/lib/libbacktrace-8602fda/config.h.in similarity index 98% rename from lib/libbacktrace-2446c66/config.h.in rename to lib/libbacktrace-8602fda/config.h.in index b90e85e7c83..0b01ddbb006 100644 --- a/lib/libbacktrace-2446c66/config.h.in +++ b/lib/libbacktrace-8602fda/config.h.in @@ -85,6 +85,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LDR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_LINK_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H diff --git a/lib/libbacktrace-2446c66/config.sub b/lib/libbacktrace-8602fda/config.sub similarity index 100% rename from lib/libbacktrace-2446c66/config.sub rename to lib/libbacktrace-8602fda/config.sub diff --git a/lib/libbacktrace-2446c66/config/enable.m4 b/lib/libbacktrace-8602fda/config/enable.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/enable.m4 rename to lib/libbacktrace-8602fda/config/enable.m4 diff --git a/lib/libbacktrace-2446c66/config/lead-dot.m4 b/lib/libbacktrace-8602fda/config/lead-dot.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/lead-dot.m4 rename to lib/libbacktrace-8602fda/config/lead-dot.m4 diff --git a/lib/libbacktrace-2446c66/config/libtool.m4 b/lib/libbacktrace-8602fda/config/libtool.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/libtool.m4 rename to lib/libbacktrace-8602fda/config/libtool.m4 diff --git a/lib/libbacktrace-2446c66/config/ltoptions.m4 b/lib/libbacktrace-8602fda/config/ltoptions.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/ltoptions.m4 rename to lib/libbacktrace-8602fda/config/ltoptions.m4 diff --git a/lib/libbacktrace-2446c66/config/ltsugar.m4 b/lib/libbacktrace-8602fda/config/ltsugar.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/ltsugar.m4 rename to lib/libbacktrace-8602fda/config/ltsugar.m4 diff --git a/lib/libbacktrace-2446c66/config/ltversion.m4 b/lib/libbacktrace-8602fda/config/ltversion.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/ltversion.m4 rename to lib/libbacktrace-8602fda/config/ltversion.m4 diff --git a/lib/libbacktrace-2446c66/config/lt~obsolete.m4 b/lib/libbacktrace-8602fda/config/lt~obsolete.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/lt~obsolete.m4 rename to lib/libbacktrace-8602fda/config/lt~obsolete.m4 diff --git a/lib/libbacktrace-2446c66/config/multi.m4 b/lib/libbacktrace-8602fda/config/multi.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/multi.m4 rename to lib/libbacktrace-8602fda/config/multi.m4 diff --git a/lib/libbacktrace-2446c66/config/override.m4 b/lib/libbacktrace-8602fda/config/override.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/override.m4 rename to lib/libbacktrace-8602fda/config/override.m4 diff --git a/lib/libbacktrace-2446c66/config/unwind_ipinfo.m4 b/lib/libbacktrace-8602fda/config/unwind_ipinfo.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/unwind_ipinfo.m4 rename to lib/libbacktrace-8602fda/config/unwind_ipinfo.m4 diff --git a/lib/libbacktrace-2446c66/config/warnings.m4 b/lib/libbacktrace-8602fda/config/warnings.m4 similarity index 100% rename from lib/libbacktrace-2446c66/config/warnings.m4 rename to lib/libbacktrace-8602fda/config/warnings.m4 diff --git a/lib/libbacktrace-2446c66/configure b/lib/libbacktrace-8602fda/configure similarity index 99% rename from lib/libbacktrace-2446c66/configure rename to lib/libbacktrace-8602fda/configure index ba94e2ae562..7dfba5e6512 100755 --- a/lib/libbacktrace-2446c66/configure +++ b/lib/libbacktrace-8602fda/configure @@ -12316,26 +12316,31 @@ fi # Check for dl_iterate_phdr. -for ac_header in link.h +for ac_header in link.h sys/link.h do : - ac_fn_c_check_header_mongrel "$LINENO" "link.h" "ac_cv_header_link_h" "$ac_includes_default" -if test "x$ac_cv_header_link_h" = xyes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LINK_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -if test "$ac_cv_header_link_h" = "no"; then +if test "$ac_cv_header_link_h" = "no" -a "$ac_cv_header_sys_link_h" = "no"; then have_dl_iterate_phdr=no else if test -n "${with_target_subdir}"; then + link_h=link.h + if test "$ac_cv_header_link_h" = "no"; then + link_h=sys/link.h + fi # When built as a GCC target library, we can't do a link test. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include <$link_h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -12887,7 +12892,7 @@ else libbacktrace_cv_objcopy_debuglink=no elif ! test -n "${OBJCOPY}"; then libbacktrace_cv_objcopy_debuglink=no -elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then +elif ${OBJCOPY} --help | grep add-gnu-debuglink >/dev/null 2>&1; then libbacktrace_cv_objcopy_debuglink=yes else libbacktrace_cv_objcopy_debuglink=no diff --git a/lib/libbacktrace-2446c66/configure.ac b/lib/libbacktrace-8602fda/configure.ac similarity index 98% rename from lib/libbacktrace-2446c66/configure.ac rename to lib/libbacktrace-8602fda/configure.ac index f0b1bdb3f13..2857e74e9d4 100644 --- a/lib/libbacktrace-2446c66/configure.ac +++ b/lib/libbacktrace-8602fda/configure.ac @@ -325,13 +325,17 @@ fi AC_SUBST(BACKTRACE_USES_MALLOC) # Check for dl_iterate_phdr. -AC_CHECK_HEADERS(link.h) -if test "$ac_cv_header_link_h" = "no"; then +AC_CHECK_HEADERS(link.h sys/link.h) +if test "$ac_cv_header_link_h" = "no" -a "$ac_cv_header_sys_link_h" = "no"; then have_dl_iterate_phdr=no else if test -n "${with_target_subdir}"; then + link_h=link.h + if test "$ac_cv_header_link_h" = "no"; then + link_h=sys/link.h + fi # When built as a GCC target library, we can't do a link test. - AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes], + AC_EGREP_HEADER([dl_iterate_phdr], [$link_h], [have_dl_iterate_phdr=yes], [have_dl_iterate_phdr=no]) case "${host}" in *-*-solaris2.10*) @@ -497,7 +501,7 @@ AC_CACHE_CHECK([whether objcopy supports debuglink], libbacktrace_cv_objcopy_debuglink=no elif ! test -n "${OBJCOPY}"; then libbacktrace_cv_objcopy_debuglink=no -elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then +elif ${OBJCOPY} --help | grep add-gnu-debuglink >/dev/null 2>&1; then libbacktrace_cv_objcopy_debuglink=yes else libbacktrace_cv_objcopy_debuglink=no diff --git a/lib/libbacktrace-2446c66/dwarf.c b/lib/libbacktrace-8602fda/dwarf.c similarity index 100% rename from lib/libbacktrace-2446c66/dwarf.c rename to lib/libbacktrace-8602fda/dwarf.c diff --git a/lib/libbacktrace-2446c66/edtest.c b/lib/libbacktrace-8602fda/edtest.c similarity index 100% rename from lib/libbacktrace-2446c66/edtest.c rename to lib/libbacktrace-8602fda/edtest.c diff --git a/lib/libbacktrace-2446c66/edtest2.c b/lib/libbacktrace-8602fda/edtest2.c similarity index 100% rename from lib/libbacktrace-2446c66/edtest2.c rename to lib/libbacktrace-8602fda/edtest2.c diff --git a/lib/libbacktrace-2446c66/elf.c b/lib/libbacktrace-8602fda/elf.c similarity index 99% rename from lib/libbacktrace-2446c66/elf.c rename to lib/libbacktrace-8602fda/elf.c index 79d56146fc6..61014562a73 100644 --- a/lib/libbacktrace-2446c66/elf.c +++ b/lib/libbacktrace-8602fda/elf.c @@ -40,7 +40,12 @@ POSSIBILITY OF SUCH DAMAGE. */ #include #ifdef HAVE_DL_ITERATE_PHDR -#include + #ifdef HAVE_LINK_H + #include + #endif + #ifdef HAVE_SYS_LINK_H + #include + #endif #endif #include "backtrace.h" @@ -1796,7 +1801,7 @@ elf_zlib_inflate (const unsigned char *pin, size_t sin, uint16_t *zdebug_table, /* An uncompressed block. */ /* If we've read ahead more than a byte, back up. */ - while (bits > 8) + while (bits >= 8) { --pin; bits -= 8; diff --git a/lib/libbacktrace-2446c66/fileline.c b/lib/libbacktrace-8602fda/fileline.c similarity index 100% rename from lib/libbacktrace-2446c66/fileline.c rename to lib/libbacktrace-8602fda/fileline.c diff --git a/lib/libbacktrace-2446c66/filenames.h b/lib/libbacktrace-8602fda/filenames.h similarity index 100% rename from lib/libbacktrace-2446c66/filenames.h rename to lib/libbacktrace-8602fda/filenames.h diff --git a/lib/libbacktrace-2446c66/filetype.awk b/lib/libbacktrace-8602fda/filetype.awk similarity index 100% rename from lib/libbacktrace-2446c66/filetype.awk rename to lib/libbacktrace-8602fda/filetype.awk diff --git a/lib/libbacktrace-2446c66/install-debuginfo-for-buildid.sh.in b/lib/libbacktrace-8602fda/install-debuginfo-for-buildid.sh.in similarity index 100% rename from lib/libbacktrace-2446c66/install-debuginfo-for-buildid.sh.in rename to lib/libbacktrace-8602fda/install-debuginfo-for-buildid.sh.in diff --git a/lib/libbacktrace-2446c66/install-sh b/lib/libbacktrace-8602fda/install-sh similarity index 100% rename from lib/libbacktrace-2446c66/install-sh rename to lib/libbacktrace-8602fda/install-sh diff --git a/lib/libbacktrace-2446c66/instrumented_alloc.c b/lib/libbacktrace-8602fda/instrumented_alloc.c similarity index 100% rename from lib/libbacktrace-2446c66/instrumented_alloc.c rename to lib/libbacktrace-8602fda/instrumented_alloc.c diff --git a/lib/libbacktrace-2446c66/internal.h b/lib/libbacktrace-8602fda/internal.h similarity index 100% rename from lib/libbacktrace-2446c66/internal.h rename to lib/libbacktrace-8602fda/internal.h diff --git a/lib/libbacktrace-2446c66/libtool.m4 b/lib/libbacktrace-8602fda/libtool.m4 similarity index 100% rename from lib/libbacktrace-2446c66/libtool.m4 rename to lib/libbacktrace-8602fda/libtool.m4 diff --git a/lib/libbacktrace-2446c66/ltmain.sh b/lib/libbacktrace-8602fda/ltmain.sh similarity index 100% rename from lib/libbacktrace-2446c66/ltmain.sh rename to lib/libbacktrace-8602fda/ltmain.sh diff --git a/lib/libbacktrace-2446c66/ltoptions.m4 b/lib/libbacktrace-8602fda/ltoptions.m4 similarity index 100% rename from lib/libbacktrace-2446c66/ltoptions.m4 rename to lib/libbacktrace-8602fda/ltoptions.m4 diff --git a/lib/libbacktrace-2446c66/ltsugar.m4 b/lib/libbacktrace-8602fda/ltsugar.m4 similarity index 100% rename from lib/libbacktrace-2446c66/ltsugar.m4 rename to lib/libbacktrace-8602fda/ltsugar.m4 diff --git a/lib/libbacktrace-2446c66/ltversion.m4 b/lib/libbacktrace-8602fda/ltversion.m4 similarity index 100% rename from lib/libbacktrace-2446c66/ltversion.m4 rename to lib/libbacktrace-8602fda/ltversion.m4 diff --git a/lib/libbacktrace-2446c66/lt~obsolete.m4 b/lib/libbacktrace-8602fda/lt~obsolete.m4 similarity index 100% rename from lib/libbacktrace-2446c66/lt~obsolete.m4 rename to lib/libbacktrace-8602fda/lt~obsolete.m4 diff --git a/lib/libbacktrace-2446c66/macho.c b/lib/libbacktrace-8602fda/macho.c similarity index 99% rename from lib/libbacktrace-2446c66/macho.c rename to lib/libbacktrace-8602fda/macho.c index 66e101e0a4b..d00aea9bc8a 100644 --- a/lib/libbacktrace-2446c66/macho.c +++ b/lib/libbacktrace-8602fda/macho.c @@ -1268,7 +1268,7 @@ backtrace_initialize (struct backtrace_state *state, const char *filename, mff = macho_nodebug; if (!macho_add (state, name, d, 0, NULL, base_address, 0, error_callback, data, &mff, &mfs)) - return 0; + continue; if (mff != macho_nodebug) macho_fileline_fn = mff; diff --git a/lib/libbacktrace-2446c66/missing b/lib/libbacktrace-8602fda/missing similarity index 100% rename from lib/libbacktrace-2446c66/missing rename to lib/libbacktrace-8602fda/missing diff --git a/lib/libbacktrace-2446c66/mmap.c b/lib/libbacktrace-8602fda/mmap.c similarity index 100% rename from lib/libbacktrace-2446c66/mmap.c rename to lib/libbacktrace-8602fda/mmap.c diff --git a/lib/libbacktrace-2446c66/mmapio.c b/lib/libbacktrace-8602fda/mmapio.c similarity index 100% rename from lib/libbacktrace-2446c66/mmapio.c rename to lib/libbacktrace-8602fda/mmapio.c diff --git a/lib/libbacktrace-2446c66/move-if-change b/lib/libbacktrace-8602fda/move-if-change similarity index 100% rename from lib/libbacktrace-2446c66/move-if-change rename to lib/libbacktrace-8602fda/move-if-change diff --git a/lib/libbacktrace-2446c66/mtest.c b/lib/libbacktrace-8602fda/mtest.c similarity index 100% rename from lib/libbacktrace-2446c66/mtest.c rename to lib/libbacktrace-8602fda/mtest.c diff --git a/lib/libbacktrace-2446c66/nounwind.c b/lib/libbacktrace-8602fda/nounwind.c similarity index 100% rename from lib/libbacktrace-2446c66/nounwind.c rename to lib/libbacktrace-8602fda/nounwind.c diff --git a/lib/libbacktrace-2446c66/pecoff.c b/lib/libbacktrace-8602fda/pecoff.c similarity index 100% rename from lib/libbacktrace-2446c66/pecoff.c rename to lib/libbacktrace-8602fda/pecoff.c diff --git a/lib/libbacktrace-2446c66/posix.c b/lib/libbacktrace-8602fda/posix.c similarity index 100% rename from lib/libbacktrace-2446c66/posix.c rename to lib/libbacktrace-8602fda/posix.c diff --git a/lib/libbacktrace-2446c66/print.c b/lib/libbacktrace-8602fda/print.c similarity index 100% rename from lib/libbacktrace-2446c66/print.c rename to lib/libbacktrace-8602fda/print.c diff --git a/lib/libbacktrace-2446c66/read.c b/lib/libbacktrace-8602fda/read.c similarity index 100% rename from lib/libbacktrace-2446c66/read.c rename to lib/libbacktrace-8602fda/read.c diff --git a/lib/libbacktrace-2446c66/simple.c b/lib/libbacktrace-8602fda/simple.c similarity index 100% rename from lib/libbacktrace-2446c66/simple.c rename to lib/libbacktrace-8602fda/simple.c diff --git a/lib/libbacktrace-2446c66/sort.c b/lib/libbacktrace-8602fda/sort.c similarity index 100% rename from lib/libbacktrace-2446c66/sort.c rename to lib/libbacktrace-8602fda/sort.c diff --git a/lib/libbacktrace-2446c66/state.c b/lib/libbacktrace-8602fda/state.c similarity index 100% rename from lib/libbacktrace-2446c66/state.c rename to lib/libbacktrace-8602fda/state.c diff --git a/lib/libbacktrace-2446c66/stest.c b/lib/libbacktrace-8602fda/stest.c similarity index 100% rename from lib/libbacktrace-2446c66/stest.c rename to lib/libbacktrace-8602fda/stest.c diff --git a/lib/libbacktrace-2446c66/test-driver b/lib/libbacktrace-8602fda/test-driver similarity index 100% rename from lib/libbacktrace-2446c66/test-driver rename to lib/libbacktrace-8602fda/test-driver diff --git a/lib/libbacktrace-2446c66/test_format.c b/lib/libbacktrace-8602fda/test_format.c similarity index 100% rename from lib/libbacktrace-2446c66/test_format.c rename to lib/libbacktrace-8602fda/test_format.c diff --git a/lib/libbacktrace-2446c66/testlib.c b/lib/libbacktrace-8602fda/testlib.c similarity index 100% rename from lib/libbacktrace-2446c66/testlib.c rename to lib/libbacktrace-8602fda/testlib.c diff --git a/lib/libbacktrace-2446c66/testlib.h b/lib/libbacktrace-8602fda/testlib.h similarity index 100% rename from lib/libbacktrace-2446c66/testlib.h rename to lib/libbacktrace-8602fda/testlib.h diff --git a/lib/libbacktrace-2446c66/ttest.c b/lib/libbacktrace-8602fda/ttest.c similarity index 100% rename from lib/libbacktrace-2446c66/ttest.c rename to lib/libbacktrace-8602fda/ttest.c diff --git a/lib/libbacktrace-2446c66/unittest.c b/lib/libbacktrace-8602fda/unittest.c similarity index 100% rename from lib/libbacktrace-2446c66/unittest.c rename to lib/libbacktrace-8602fda/unittest.c diff --git a/lib/libbacktrace-2446c66/unknown.c b/lib/libbacktrace-8602fda/unknown.c similarity index 100% rename from lib/libbacktrace-2446c66/unknown.c rename to lib/libbacktrace-8602fda/unknown.c diff --git a/lib/libbacktrace-2446c66/xcoff.c b/lib/libbacktrace-8602fda/xcoff.c similarity index 100% rename from lib/libbacktrace-2446c66/xcoff.c rename to lib/libbacktrace-8602fda/xcoff.c diff --git a/lib/libbacktrace-2446c66/xztest.c b/lib/libbacktrace-8602fda/xztest.c similarity index 100% rename from lib/libbacktrace-2446c66/xztest.c rename to lib/libbacktrace-8602fda/xztest.c diff --git a/lib/libbacktrace-2446c66/ztest.c b/lib/libbacktrace-8602fda/ztest.c similarity index 100% rename from lib/libbacktrace-2446c66/ztest.c rename to lib/libbacktrace-8602fda/ztest.c diff --git a/lib/onigmo/doc/UnicodeProps.txt b/lib/onigmo/doc/UnicodeProps.txt index bc5e15625aa..59124ee28f0 100644 --- a/lib/onigmo/doc/UnicodeProps.txt +++ b/lib/onigmo/doc/UnicodeProps.txt @@ -1,4 +1,4 @@ -Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 +Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.2 2022/09/20 * POSIX brackets Alpha @@ -85,13 +85,16 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Chakma Cham Cherokee + Chorasmian Common Coptic Cuneiform Cypriot + Cypro_Minoan Cyrillic Deseret Devanagari + Dives_Akuru Dogra Duployan Egyptian_Hieroglyphs @@ -121,8 +124,10 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Kaithi Kannada Katakana + Kawi Kayah_Li Kharoshthi + Khitan_Small_Script Khmer Khojki Khudawadi @@ -154,6 +159,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Multani Myanmar Nabataean + Nag_Mundari Nandinagari New_Tai_Lue Newa @@ -170,6 +176,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Old_Sogdian Old_South_Arabian Old_Turkic + Old_Uyghur Oriya Osage Osmanya @@ -201,6 +208,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Tai_Viet Takri Tamil + Tangsa Tangut Telugu Thaana @@ -208,11 +216,14 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Tibetan Tifinagh Tirhuta + Toto Ugaritic Unknown Vai + Vithkuqi Wancho Warang_Citi + Yezidi Yi Zanabazar_Square @@ -292,6 +303,10 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 DI Dep Dia + EBase + EComp + EMod + EPres Ext Gr_Base Gr_Ext @@ -390,11 +405,14 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Cans Cari Cher + Chrs Copt Qaac + Cpmn Cprt Cyrl Deva + Diak Dogr Dsrt Dupl @@ -428,6 +446,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Khar Khmr Khoj + Kits Knda Kthi Lana @@ -454,6 +473,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Mtei Mult Mymr + Nagm Nand Narb Nbat @@ -465,6 +485,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Orya Osge Osma + Ougr Palm Pauc Perm @@ -506,12 +527,15 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Thaa Tibt Tirh + Tnsa Ugar Vaii + Vith Wara Wcho Xpeo Xsux + Yezi Yiii Zanb Zinh @@ -525,6 +549,9 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 Age=11.0 Age=12.0 Age=12.1 + Age=13.0 + Age=14.0 + Age=15.0 Age=2.0 Age=2.1 Age=3.0 @@ -564,6 +591,7 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Samaritan In_Mandaic In_Syriac_Supplement + In_Arabic_Extended_B In_Arabic_Extended_A In_Devanagari In_Bengali @@ -727,7 +755,9 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Osage In_Elbasan In_Caucasian_Albanian + In_Vithkuqi In_Linear_A + In_Latin_Extended_F In_Cypriot_Syllabary In_Imperial_Aramaic In_Palmyrene @@ -749,8 +779,12 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Old_Hungarian In_Hanifi_Rohingya In_Rumi_Numeral_Symbols + In_Yezidi + In_Arabic_Extended_C In_Old_Sogdian In_Sogdian + In_Old_Uyghur + In_Chorasmian In_Elymaic In_Brahmi In_Kaithi @@ -772,24 +806,31 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Ahom In_Dogra In_Warang_Citi + In_Dives_Akuru In_Nandinagari In_Zanabazar_Square In_Soyombo + In_Unified_Canadian_Aboriginal_Syllabics_Extended_A In_Pau_Cin_Hau + In_Devanagari_Extended_A In_Bhaiksuki In_Marchen In_Masaram_Gondi In_Gunjala_Gondi In_Makasar + In_Kawi + In_Lisu_Supplement In_Tamil_Supplement In_Cuneiform In_Cuneiform_Numbers_and_Punctuation In_Early_Dynastic_Cuneiform + In_Cypro_Minoan In_Egyptian_Hieroglyphs In_Egyptian_Hieroglyph_Format_Controls In_Anatolian_Hieroglyphs In_Bamum_Supplement In_Mro + In_Tangsa In_Bassa_Vah In_Pahawh_Hmong In_Medefaidrin @@ -797,23 +838,33 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Ideographic_Symbols_and_Punctuation In_Tangut In_Tangut_Components + In_Khitan_Small_Script + In_Tangut_Supplement + In_Kana_Extended_B In_Kana_Supplement In_Kana_Extended_A In_Small_Kana_Extension In_Nushu In_Duployan In_Shorthand_Format_Controls + In_Znamenny_Musical_Notation In_Byzantine_Musical_Symbols In_Musical_Symbols In_Ancient_Greek_Musical_Notation + In_Kaktovik_Numerals In_Mayan_Numerals In_Tai_Xuan_Jing_Symbols In_Counting_Rod_Numerals In_Mathematical_Alphanumeric_Symbols In_Sutton_SignWriting + In_Latin_Extended_G In_Glagolitic_Supplement + In_Cyrillic_Extended_D In_Nyiakeng_Puachue_Hmong + In_Toto In_Wancho + In_Nag_Mundari + In_Ethiopic_Extended_B In_Mende_Kikakui In_Adlam In_Indic_Siyaq_Numbers @@ -834,12 +885,15 @@ Onigmo (Oniguruma-mod) Unicode Properties Version 6.2.1 2019/07/28 In_Supplemental_Symbols_and_Pictographs In_Chess_Symbols In_Symbols_and_Pictographs_Extended_A + In_Symbols_for_Legacy_Computing In_CJK_Unified_Ideographs_Extension_B In_CJK_Unified_Ideographs_Extension_C In_CJK_Unified_Ideographs_Extension_D In_CJK_Unified_Ideographs_Extension_E In_CJK_Unified_Ideographs_Extension_F In_CJK_Compatibility_Ideographs_Supplement + In_CJK_Unified_Ideographs_Extension_G + In_CJK_Unified_Ideographs_Extension_H In_Tags In_Variation_Selectors_Supplement In_Supplementary_Private_Use_Area_A diff --git a/lib/onigmo/enc/unicode/casefold.h b/lib/onigmo/enc/unicode/casefold.h index 5497e5afe04..cf2fd4a90c7 100644 --- a/lib/onigmo/enc/unicode/casefold.h +++ b/lib/onigmo/enc/unicode/casefold.h @@ -2,19 +2,19 @@ /* Generated by tool/case-folding.rb */ #if defined ONIG_UNICODE_VERSION_STRING && !( \ - ONIG_UNICODE_VERSION_MAJOR == 12 && \ - ONIG_UNICODE_VERSION_MINOR == 1 && \ + ONIG_UNICODE_VERSION_MAJOR == 15 && \ + ONIG_UNICODE_VERSION_MINOR == 0 && \ ONIG_UNICODE_VERSION_TEENY == 0 && \ 1) # error ONIG_UNICODE_VERSION_STRING mismatch #endif -#define ONIG_UNICODE_VERSION_STRING "12.1.0" -#define ONIG_UNICODE_VERSION_MAJOR 12 -#define ONIG_UNICODE_VERSION_MINOR 1 +#define ONIG_UNICODE_VERSION_STRING "15.0.0" +#define ONIG_UNICODE_VERSION_MAJOR 15 +#define ONIG_UNICODE_VERSION_MINOR 0 #define ONIG_UNICODE_VERSION_TEENY 0 static const CaseFold_11_Type CaseFold_11_Table[] = { -#define CaseFold (*(CaseFold_11_Type (*)[1485])(CaseFold_11_Table+0)) +#define CaseFold (*(CaseFold_11_Type (*)[1528])(CaseFold_11_Table+0)) {0x0041, {1|F|D, {0x0061}}}, {0x0042, {1|F|D, {0x0062}}}, {0x0043, {1|F|D, {0x0063}}}, @@ -973,6 +973,7 @@ static const CaseFold_11_Type CaseFold_11_Table[] = { {0x2c2c, {1|F|D, {0x2c5c}}}, {0x2c2d, {1|F|D, {0x2c5d}}}, {0x2c2e, {1|F|D, {0x2c5e}}}, + {0x2c2f, {1|F|D, {0x2c5f}}}, {0x2c60, {1|F|D, {0x2c61}}}, {0x2c62, {1|F|D, {0x026b}}}, {0x2c63, {1|F|D, {0x1d7d}}}, @@ -1153,10 +1154,17 @@ static const CaseFold_11_Type CaseFold_11_Table[] = { {0xa7ba, {1|F|D, {0xa7bb}}}, {0xa7bc, {1|F|D, {0xa7bd}}}, {0xa7be, {1|F|D, {0xa7bf}}}, + {0xa7c0, {1|F|D, {0xa7c1}}}, {0xa7c2, {1|F|D, {0xa7c3}}}, {0xa7c4, {1|F|D, {0xa794}}}, {0xa7c5, {1|F|D, {0x0282}}}, {0xa7c6, {1|F|D, {0x1d8e}}}, + {0xa7c7, {1|F|D, {0xa7c8}}}, + {0xa7c9, {1|F|D, {0xa7ca}}}, + {0xa7d0, {1|F|D, {0xa7d1}}}, + {0xa7d6, {1|F|D, {0xa7d7}}}, + {0xa7d8, {1|F|D, {0xa7d9}}}, + {0xa7f5, {1|F|D, {0xa7f6}}}, {0xab70, {1|F|U, {0x13a0}}}, {0xab71, {1|F|U, {0x13a1}}}, {0xab72, {1|F|U, {0x13a2}}}, @@ -1351,6 +1359,41 @@ static const CaseFold_11_Type CaseFold_11_Table[] = { {0x104d1, {1|F|D, {0x104f9}}}, {0x104d2, {1|F|D, {0x104fa}}}, {0x104d3, {1|F|D, {0x104fb}}}, + {0x10570, {1|F|D, {0x10597}}}, + {0x10571, {1|F|D, {0x10598}}}, + {0x10572, {1|F|D, {0x10599}}}, + {0x10573, {1|F|D, {0x1059a}}}, + {0x10574, {1|F|D, {0x1059b}}}, + {0x10575, {1|F|D, {0x1059c}}}, + {0x10576, {1|F|D, {0x1059d}}}, + {0x10577, {1|F|D, {0x1059e}}}, + {0x10578, {1|F|D, {0x1059f}}}, + {0x10579, {1|F|D, {0x105a0}}}, + {0x1057a, {1|F|D, {0x105a1}}}, + {0x1057c, {1|F|D, {0x105a3}}}, + {0x1057d, {1|F|D, {0x105a4}}}, + {0x1057e, {1|F|D, {0x105a5}}}, + {0x1057f, {1|F|D, {0x105a6}}}, + {0x10580, {1|F|D, {0x105a7}}}, + {0x10581, {1|F|D, {0x105a8}}}, + {0x10582, {1|F|D, {0x105a9}}}, + {0x10583, {1|F|D, {0x105aa}}}, + {0x10584, {1|F|D, {0x105ab}}}, + {0x10585, {1|F|D, {0x105ac}}}, + {0x10586, {1|F|D, {0x105ad}}}, + {0x10587, {1|F|D, {0x105ae}}}, + {0x10588, {1|F|D, {0x105af}}}, + {0x10589, {1|F|D, {0x105b0}}}, + {0x1058a, {1|F|D, {0x105b1}}}, + {0x1058c, {1|F|D, {0x105b3}}}, + {0x1058d, {1|F|D, {0x105b4}}}, + {0x1058e, {1|F|D, {0x105b5}}}, + {0x1058f, {1|F|D, {0x105b6}}}, + {0x10590, {1|F|D, {0x105b7}}}, + {0x10591, {1|F|D, {0x105b8}}}, + {0x10592, {1|F|D, {0x105b9}}}, + {0x10594, {1|F|D, {0x105bb}}}, + {0x10595, {1|F|D, {0x105bc}}}, {0x10c80, {1|F|D, {0x10cc0}}}, {0x10c81, {1|F|D, {0x10cc1}}}, {0x10c82, {1|F|D, {0x10cc2}}}, @@ -1500,7 +1543,7 @@ static const CaseFold_11_Type CaseFold_11_Table[] = { {0x1e91f, {1|F|D, {0x1e941}}}, {0x1e920, {1|F|D, {0x1e942}}}, {0x1e921, {1|F|D, {0x1e943}}}, -#define CaseFold_Locale (*(CaseFold_11_Type (*)[2])(CaseFold_11_Table+1485)) +#define CaseFold_Locale (*(CaseFold_11_Type (*)[2])(CaseFold_11_Table+1528)) {0x0049, {1|F|D, {0x0069}}}, {0x0130, {2|F|D, {0x0069, 0x0307}}}, }; @@ -1508,7 +1551,7 @@ static const CaseFold_11_Type CaseFold_11_Table[] = { /* ANSI-C code produced by gperf version 3.1 */ /* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseFold_11_hash -N onigenc_unicode_CaseFold_11_lookup -n */ -/* maximum key range = 3500, duplicates = 0 */ +/* maximum key range = 3080, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -1523,29 +1566,29 @@ onigenc_unicode_CaseFold_11_hash(const OnigCodePoint code) { static const unsigned short asso_values[] = { - 5, 273, 4, 8, 3, 1, 86, 9, 2, 289, - 290, 3, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510, - 3510, 3510, 3510, 3510, 3510, 50, 3510, 3510, 3510, 3510, - 3510, 3510, 3510, 225, 3510, 3510, 3510, 3510, 3510, 28, - 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 3510, 394, - 3510, 3510, 3510, 3510, 3510, 3510, 3510, 47, 3510, 3510, - 255, 40, 286, 1, 3510, 3510, 599, 8, 3510, 3510, - 3510, 3510, 3510, 282, 3510, 3510, 267, 667, 473, 39, - 2019, 189, 47, 175, 2001, 107, 1626, 6, 12, 25, - 1961, 678, 1128, 526, 1945, 148, 1923, 371, 1720, 134, - 1857, 80, 1375, 66, 1705, 300, 1635, 445, 1611, 472, - 1795, 216, 1303, 499, 1552, 270, 1511, 243, 121, 619, - 1284, 540, 875, 592, 1484, 567, 412, 703, 1692, 387, - 1782, 781, 1767, 664, 1718, 648, 1316, 608, 1647, 715, - 1592, 771, 1544, 1029, 1563, 887, 1296, 861, 1194, 978, - 95, 899, 1257, 835, 1335, 765, 1529, 984, 862, 938, - 1460, 759, 329, 1079, 1159, 940, 234, 1101, 1204, 990, - 949, 1493, 92, 1438, 77, 1391, 7, 1073, 44, 1377, - 2, 1435, 4, 1321, 428, 1274, 332, 1206, 11, 1426, - 46, 478, 200, 1502, 31, 1400, 153, 1663, 352, 1820, - 229, 1733, 265, 1405, 315, 1879, 198 + 1, 3085, 2, 20, 3, 307, 200, 8, 31, 159, + 2, 253, 33, 967, 3085, 3085, 3085, 3085, 3085, 3085, + 3085, 3085, 3085, 3085, 3085, 3085, 3085, 30, 3085, 3085, + 3085, 3085, 3085, 3085, 3085, 352, 3085, 3085, 3085, 3085, + 3085, 93, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, + 3085, 407, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 201, + 3085, 3085, 14, 13, 373, 1, 3085, 3085, 503, 19, + 3085, 3085, 3085, 3085, 3085, 325, 3085, 3085, 290, 1064, + 484, 28, 1906, 447, 272, 414, 2002, 79, 905, 5, + 11, 22, 2024, 623, 761, 617, 1893, 45, 1874, 113, + 1856, 255, 1823, 96, 1463, 62, 1841, 130, 1798, 331, + 1771, 238, 1977, 147, 1387, 464, 1691, 187, 1639, 181, + 366, 580, 1331, 508, 1287, 547, 1583, 541, 400, 783, + 1944, 657, 1850, 932, 1785, 858, 1645, 681, 1412, 722, + 1622, 972, 1306, 807, 1942, 1282, 283, 1218, 1557, 1055, + 1406, 1258, 1401, 1168, 1327, 864, 893, 1123, 1714, 1195, + 1885, 1083, 2016, 1232, 823, 678, 1420, 1017, 155, 1261, + 86, 1351, 794, 1929, 51, 1525, 50, 221, 4, 1383, + 196, 325, 1, 1562, 102, 1441, 3, 1356, 226, 1304, + 271, 1516, 68, 1752, 37, 1469, 51, 1920, 143, 2059, + 198, 2095, 370, 2069, 137, 718, 407, 1926, 136 }; - return asso_values[bits_of(code, 2)+79] + asso_values[bits_of(code, 1)] + asso_values[bits_of(code, 0)]; + return asso_values[bits_of(code, 2)+81] + asso_values[bits_of(code, 1)+2] + asso_values[bits_of(code, 0)]; } static const CodePointList3 * @@ -1555,2028 +1598,2021 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) { MIN_CODE_VALUE = 0x41, MAX_CODE_VALUE = 0x1e921, - TOTAL_KEYWORDS = 1487, + TOTAL_KEYWORDS = 1530, MIN_WORD_LENGTH = 3, MAX_WORD_LENGTH = 3, - MIN_HASH_VALUE = 10, - MAX_HASH_VALUE = 3509 + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 3084 }; static const short wordlist[] = { - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, - /*0x1fe7*/ 848, - /*0x10408*/ 1268, + -1, -1, -1, -1, -1, + /*0x1fe9*/ 850, + -1, /*0x1f88*/ 775, /*0x0408*/ 305, - /*0x0208*/ 194, /*0x0108*/ 61, - /*0xab88*/ 1166, - /*0x10409*/ 1269, + /*0x10408*/ 1276, + -1, + /*0xab88*/ 1174, /*0x1f89*/ 776, /*0x0409*/ 306, - /*0x0388*/ 235, - /*0x2c67*/ 962, - /*0xab89*/ 1167, + /*0x2c69*/ 964, + /*0x10409*/ 1277, /*0x2c08*/ 919, - -1, - /*0x0189*/ 126, - /*0x0389*/ 236, - -1, - /*0x2c6d*/ 965, + /*0xab89*/ 1175, + /*0x1e88*/ 653, + /*0x1e08*/ 589, + -1, -1, /*0x2c09*/ 920, - /*0x1040a*/ 1270, /*0x1f8a*/ 777, /*0x040a*/ 307, - /*0x020a*/ 195, /*0x010a*/ 62, - /*0xab8a*/ 1168, - /*0x2c88*/ 977, - /*0x1ff3*/ 855, - /*0x018a*/ 127, - /*0x038a*/ 237, - -1, - /*0x2ced*/ 1024, - /*0x2c0a*/ 921, - -1, - /*0x10400*/ 1260, + /*0x1040a*/ 1278, + /*0x2c88*/ 978, + /*0xab8a*/ 1176, /*0x1f80*/ 767, /*0x0400*/ 297, - /*0x0200*/ 190, /*0x0100*/ 57, - /*0xab80*/ 1158, - /*0x1fe3*/ 845, - /*0x1e88*/ 653, - /*0x10403*/ 1263, - /*0x1f83*/ 770, - /*0x0403*/ 300, - /*0x2c8a*/ 978, - /*0x2c00*/ 911, - /*0xab83*/ 1161, - /*0x1c88*/ 538, - /*0x10c88*/ 1344, - /*0x2183*/ 884, - /*0x2c63*/ 960, - /*0x1e908*/ 1459, - /*0x2c6f*/ 967, - /*0x2c03*/ 914, - /*0x10c89*/ 1345, - -1, -1, - /*0x1e909*/ 1460, - /*0x2c80*/ 973, + /*0x10400*/ 1268, + /*0x2c0a*/ 921, + /*0xab80*/ 1166, /*0x1e8a*/ 654, - /*0x10418*/ 1284, + /*0x1e0a*/ 590, + /*0x10c88*/ 1387, + /*0x0508*/ 425, + /*0x2c00*/ 911, + -1, + /*0x1e80*/ 649, + /*0x1e00*/ 585, + /*0x10c89*/ 1388, + /*0x2c8a*/ 979, + -1, + /*0x1f90*/ 783, + /*0x0410*/ 313, + /*0x0110*/ 65, + /*0x10410*/ 1284, + /*0x2c80*/ 974, + /*0xab90*/ 1182, + /*0x1ff3*/ 855, + -1, + /*0x10c8a*/ 1389, + /*0x050a*/ 426, + /*0x2c10*/ 927, + /*0xa780*/ 1106, + /*0x1e90*/ 657, + /*0x1e10*/ 593, + /*0x10c80*/ 1379, + /*0x0500*/ 421, + -1, /*0x1f98*/ 791, /*0x0418*/ 321, - /*0x0218*/ 202, /*0x0118*/ 69, - /*0xab98*/ 1182, + /*0x10418*/ 1292, + /*0x2c90*/ 982, + /*0xab98*/ 1190, -1, - /*0x10c8a*/ 1346, - /*0x0198*/ 137, - /*0x0398*/ 249, - /*0x1e90a*/ 1461, - /*0xa780*/ 1105, + /*0x00df*/ 56, + /*0x00dd*/ 54, + /*0x10571*/ 1345, /*0x2c18*/ 935, - /*0x1e80*/ 649, - /*0x10416*/ 1282, - /*0x1f96*/ 789, - /*0x0416*/ 319, - /*0x0216*/ 201, - /*0x0116*/ 68, - /*0xab96*/ 1180, - /*0x1c80*/ 530, - /*0x10c80*/ 1336, - /*0x0196*/ 135, - /*0x0396*/ 247, - /*0x1e900*/ 1451, - /*0x2c98*/ 985, - /*0x2c16*/ 933, - -1, - /*0x1c83*/ 533, - /*0x10c83*/ 1339, - /*0x1fc7*/ 830, - -1, - /*0x1e903*/ 1454, - /*0x0147*/ 91, - /*0x0047*/ 6, - -1, -1, - /*0x01c7*/ 159, - /*0xa798*/ 1114, - /*0x2c96*/ 984, + /*0xa790*/ 1112, /*0x1e98*/ 662, - /*0x10406*/ 1266, + /*0x1e18*/ 597, + /*0x10c90*/ 1395, + /*0x0510*/ 429, + /*0x2c6f*/ 968, /*0x1f86*/ 773, /*0x0406*/ 303, - /*0x0206*/ 193, /*0x0106*/ 60, - /*0xab86*/ 1164, - /*0x1c98*/ 547, - /*0x10c98*/ 1360, - /*0x0186*/ 124, - /*0x0386*/ 234, - /*0x1e918*/ 1475, - /*0xa796*/ 1113, - /*0x2c06*/ 917, - /*0x1e96*/ 660, - /*0x10427*/ 1299, - /*0x1fa7*/ 806, - /*0x0427*/ 336, - -1, -1, - /*0xaba7*/ 1197, - /*0x1c96*/ 545, - /*0x10c96*/ 1358, - /*0x01a7*/ 145, - /*0x03a7*/ 263, - /*0x1e916*/ 1473, - /*0x2c86*/ 976, - /*0x2c27*/ 950, - /*0x10414*/ 1280, - /*0x1f94*/ 787, - /*0x0414*/ 317, - /*0x0214*/ 200, - /*0x0114*/ 67, - /*0xab94*/ 1178, - -1, -1, - /*0x0194*/ 134, - /*0x0394*/ 245, + /*0x10406*/ 1274, + /*0x2c98*/ 986, + /*0xab86*/ 1172, + /*0x10573*/ 1347, + /*0x1fd9*/ 841, + /*0x0059*/ 23, -1, - /*0xa786*/ 1108, - /*0x2c14*/ 931, + /*0x2c06*/ 917, + /*0xa798*/ 1115, /*0x1e86*/ 652, - /*0x10410*/ 1276, - /*0x1f90*/ 783, - /*0x0410*/ 313, - /*0x0210*/ 198, - /*0x0110*/ 65, - /*0xab90*/ 1174, - /*0x1c86*/ 536, - /*0x10c86*/ 1342, - /*0x0190*/ 131, - /*0x0390*/ 241, - /*0x1e906*/ 1457, - /*0x2c94*/ 983, - /*0x2c10*/ 927, - -1, - /*0x03f5*/ 290, - /*0xfb00*/ 1222, + /*0x1e06*/ 588, + /*0x10c98*/ 1403, + /*0x0518*/ 433, -1, - /*0x2c75*/ 970, + /*0x1f96*/ 789, + /*0x0416*/ 319, + /*0x0116*/ 68, + /*0x10416*/ 1290, + /*0x2c86*/ 977, + /*0xab96*/ 1188, + /*0x1fe7*/ 848, -1, -1, - /*0x1ca7*/ 562, - /*0x10ca7*/ 1375, - -1, - /*0xfb03*/ 1225, - -1, - /*0x2c90*/ 981, - /*0x1e94*/ 659, - /*0x10404*/ 1264, - /*0x1f84*/ 771, - /*0x0404*/ 301, - /*0x0204*/ 192, - /*0x0104*/ 59, - /*0xab84*/ 1162, - /*0x1c94*/ 543, - /*0x10c94*/ 1356, - /*0x0184*/ 123, + /*0x00d9*/ 50, + /*0x2c16*/ 933, + /*0xa786*/ 1109, + /*0x1e96*/ 660, + /*0x1e16*/ 596, + /*0x10c86*/ 1385, + /*0x0506*/ 424, + /*0x2c67*/ 963, + /*0x1f92*/ 785, + /*0x0412*/ 315, + /*0x0112*/ 66, + /*0x10412*/ 1286, + /*0x2c96*/ 985, + /*0xab92*/ 1184, + -1, -1, -1, -1, + /*0x2c12*/ 929, + /*0xa796*/ 1114, + /*0x1e92*/ 658, + /*0x1e12*/ 594, + /*0x10c96*/ 1401, + /*0x0516*/ 432, -1, - /*0x1e914*/ 1471, - /*0xa790*/ 1111, - /*0x2c04*/ 915, - /*0x1e90*/ 657, - /*0x10402*/ 1262, - /*0x1f82*/ 769, - /*0x0402*/ 299, - /*0x0202*/ 191, - /*0x0102*/ 58, - /*0xab82*/ 1160, - /*0x1c90*/ 539, - /*0x10c90*/ 1352, - /*0x0182*/ 122, + /*0x1f9a*/ 793, + /*0x041a*/ 323, + /*0x011a*/ 70, + /*0x1041a*/ 1294, + /*0x2c92*/ 983, + /*0xab9a*/ 1192, -1, - /*0x1e910*/ 1467, - /*0x2c84*/ 975, - /*0x2c02*/ 913, + /*0x1ffb*/ 862, /*0x017f*/ 120, - -1, - /*0xfb16*/ 1232, - -1, -1, - /*0x03ff*/ 296, - /*0x01f1*/ 181, - /*0x03f1*/ 288, - /*0x2c7f*/ 972, - -1, -1, - /*0xa784*/ 1107, - /*0x2c82*/ 974, - /*0x1e84*/ 651, - /*0x10420*/ 1292, + /*0x017b*/ 118, + /*0x2c1a*/ 937, + /*0xa792*/ 1113, + /*0x1e9a*/ 664, + /*0x1e1a*/ 598, + /*0x10c92*/ 1397, + /*0x0512*/ 430, + /*0x2c7f*/ 973, /*0x1fa0*/ 799, /*0x0420*/ 329, - /*0x0220*/ 206, /*0x0120*/ 73, - /*0xaba0*/ 1190, - /*0x1c84*/ 534, - /*0x10c84*/ 1340, - /*0x01a0*/ 141, - /*0x03a0*/ 257, - /*0x1e904*/ 1455, - /*0xa782*/ 1106, - /*0x2c20*/ 943, - /*0x1e82*/ 650, - /*0x1ff9*/ 860, - /*0xfb06*/ 1228, - -1, - /*0x0179*/ 117, + /*0x10420*/ 1300, + /*0x2c9a*/ 987, + /*0xaba0*/ 1198, + /*0x2c75*/ 971, -1, /*0x1fd7*/ 839, - /*0x1c82*/ 532, - /*0x10c82*/ 1338, - /*0x03f9*/ 292, /*0x0057*/ 21, - /*0x1e902*/ 1453, - /*0x2ca0*/ 989, - /*0x01d7*/ 168, - /*0x10426*/ 1298, - /*0x1fa6*/ 805, - /*0x0426*/ 335, - /*0x0226*/ 209, - /*0x0126*/ 76, - /*0xaba6*/ 1196, - -1, -1, - /*0x01a6*/ 144, - /*0x03a6*/ 262, - -1, - /*0xa7a0*/ 1118, - /*0x2c26*/ 949, + /*0x2c20*/ 943, + /*0xa79a*/ 1116, /*0x1ea0*/ 667, - /*0x13f9*/ 525, - /*0xfb14*/ 1230, + /*0x1e20*/ 601, + /*0x10c9a*/ 1405, + /*0x051a*/ 434, + /*0x0388*/ 235, -1, -1, - /*0x1e08*/ 589, + /*0x037f*/ 233, -1, - /*0x1ca0*/ 555, - /*0x10ca0*/ 1368, + /*0x2ca0*/ 990, + /*0x0389*/ 236, + /*0x1057f*/ 1358, + /*0xa7f5*/ 1149, + -1, -1, -1, + /*0xa7a0*/ 1119, -1, - /*0x1ffb*/ 862, - /*0x1e920*/ 1483, - /*0x2ca6*/ 992, - /*0x017b*/ 118, - /*0x10424*/ 1296, + /*0x10575*/ 1349, + /*0x10ca0*/ 1411, + /*0x0520*/ 437, + /*0x038a*/ 237, + /*0x1fa6*/ 805, + /*0x0426*/ 335, + /*0x0126*/ 76, + /*0x10426*/ 1306, + -1, + /*0xaba6*/ 1204, /*0x1fa4*/ 803, /*0x0424*/ 333, - /*0x0224*/ 208, /*0x0124*/ 75, - /*0xaba4*/ 1194, - -1, -1, - /*0x01a4*/ 143, - /*0x03a4*/ 260, - /*0x1e0a*/ 590, - /*0xa7a6*/ 1121, - /*0x2c24*/ 947, + /*0x10424*/ 1304, + /*0x2c26*/ 949, + /*0xaba4*/ 1202, /*0x1ea6*/ 670, - /*0x037f*/ 233, - -1, -1, -1, -1, -1, - /*0x1ca6*/ 561, - /*0x10ca6*/ 1374, - /*0x1f08*/ 715, - /*0x13fb*/ 527, - /*0x1e00*/ 585, - /*0x2ca4*/ 991, - /*0x0508*/ 425, - /*0x1f6d*/ 764, - /*0x1f09*/ 716, - /*0xfb04*/ 1226, - /*0x1041a*/ 1286, - /*0x1f9a*/ 793, - /*0x041a*/ 323, - /*0x021a*/ 203, - /*0x011a*/ 70, - /*0xab9a*/ 1184, - -1, -1, - /*0xa7a4*/ 1120, - /*0x039a*/ 251, + /*0x1e26*/ 604, + /*0x03f1*/ 288, + /*0x1fe3*/ 845, + /*0x2c24*/ 947, + /*0x1ff7*/ 858, /*0x1ea4*/ 669, - /*0x1f0a*/ 717, - /*0x2c1a*/ 937, - /*0xfb02*/ 1224, - /*0x048a*/ 362, - /*0x050a*/ 426, - -1, - /*0x1ca4*/ 559, - /*0x10ca4*/ 1372, - /*0x017d*/ 119, - /*0x10c7*/ 522, - /*0x1e18*/ 597, - -1, -1, - /*0x03fd*/ 294, - /*0x2c9a*/ 986, - -1, -1, - /*0x0480*/ 361, - /*0x0500*/ 421, - /*0x1fd3*/ 837, - -1, - /*0x1f6f*/ 766, - /*0x1feb*/ 852, - /*0x0053*/ 17, - /*0x1e16*/ 596, + /*0x1e24*/ 603, -1, - /*0x01d3*/ 166, - /*0xa79a*/ 1115, + /*0x2ca6*/ 993, + /*0x0390*/ 241, + /*0x0208*/ 194, + /*0x1c88*/ 538, + /*0x2c63*/ 961, -1, - /*0x1e9a*/ 664, + /*0x2ca4*/ 992, + /*0xa7a6*/ 1122, -1, -1, - /*0x13fd*/ 529, - /*0x2c6b*/ 964, - -1, - /*0x10a7*/ 491, - /*0x1c9a*/ 549, - /*0x10c9a*/ 1362, - -1, - /*0x00df*/ 56, - /*0x1e91a*/ 1477, - /*0x1f18*/ 723, - /*0x1ff7*/ 858, + /*0x10ca6*/ 1417, + /*0x0526*/ 440, -1, - /*0x0498*/ 369, - /*0x0518*/ 433, - /*0x2ceb*/ 1023, + /*0xa7a4*/ 1121, -1, -1, - /*0x01f7*/ 185, - /*0x03f7*/ 291, - /*0x1e06*/ 588, - /*0x1f5f*/ 758, - -1, - /*0x00dd*/ 54, + /*0x10ca4*/ 1415, + /*0x0524*/ 439, + /*0x0398*/ 249, + /*0x020a*/ 195, + /*0x0460*/ 345, + /*0x0160*/ 104, -1, -1, - /*0x00c7*/ 33, - /*0x0496*/ 368, - /*0x0516*/ 432, - /*0x10412*/ 1278, - /*0x1f92*/ 785, - /*0x0412*/ 315, - /*0x0212*/ 199, - /*0x0112*/ 66, - /*0xab92*/ 1176, - /*0x24c7*/ 902, - /*0x1f5d*/ 757, + /*0x1feb*/ 852, + /*0x0200*/ 190, + /*0x1c80*/ 530, + /*0x13fb*/ 527, -1, - /*0x0392*/ 243, + /*0x2c60*/ 959, + /*0x10577*/ 1351, + /*0x1ee0*/ 699, + /*0x1e60*/ 633, -1, - /*0x104c7*/ 1323, - /*0x2c12*/ 929, - /*0x04c7*/ 393, - /*0x0547*/ 467, + /*0x2c6b*/ 965, + /*0x0386*/ 234, + /*0x1f9e*/ 797, + /*0x041e*/ 327, + /*0x011e*/ 72, + /*0x1041e*/ 1298, + /*0x2ce0*/ 1022, + /*0xab9e*/ 1196, + /*0x0210*/ 198, + /*0x1c90*/ 539, + -1, + /*0x2ceb*/ 1024, + /*0x2c1e*/ 941, + -1, + /*0x1e9e*/ 666, + /*0x1e1e*/ 600, -1, -1, - /*0x1fb2*/ 815, + /*0x0396*/ 247, + /*0x1f94*/ 787, + /*0x0414*/ 317, + /*0x0114*/ 67, + /*0x10414*/ 1288, + /*0x2c9e*/ 989, + /*0xab94*/ 1186, + /*0x0218*/ 202, + /*0x1c98*/ 547, + -1, -1, + /*0x2c14*/ 931, + /*0xa79e*/ 1118, + /*0x1e94*/ 659, /*0x1e14*/ 595, - /*0x0232*/ 215, - /*0x0132*/ 81, - /*0xabb2*/ 1208, + /*0x10c9e*/ 1409, + /*0x051e*/ 436, + /*0x0392*/ 243, + /*0x1f83*/ 770, + /*0x0403*/ 300, + /*0x048a*/ 362, + /*0x10403*/ 1271, + /*0x2c94*/ 984, + /*0xab83*/ 1169, + /*0x0206*/ 193, + /*0x1c86*/ 536, + /*0x0480*/ 361, + /*0x2c6d*/ 966, + /*0x2c03*/ 914, + /*0x1e908*/ 1502, + /*0x0041*/ 0, + /*0x0141*/ 88, + /*0x10c94*/ 1399, + /*0x0514*/ 431, + /*0x039a*/ 251, + /*0x1e909*/ 1503, + /*0x2183*/ 884, + -1, + /*0x2ced*/ 1025, + -1, + /*0x03ff*/ 296, + /*0x0216*/ 201, + /*0x1c96*/ 545, + /*0x0490*/ 365, -1, -1, - /*0x01b2*/ 151, - /*0x2c92*/ 982, - /*0x0506*/ 424, + /*0x1e90a*/ 1504, + /*0x03f5*/ 290, + /*0x00c1*/ 27, + /*0x10c83*/ 1382, + -1, + /*0x03a0*/ 257, + /*0x1e900*/ 1494, -1, -1, -1, -1, -1, - /*0x1e10*/ 593, + /*0x0212*/ 199, + /*0x1c92*/ 541, + /*0x0498*/ 369, + /*0x0541*/ 461, + -1, + /*0x0189*/ 126, -1, -1, -1, -1, -1, - /*0xa792*/ 1112, + /*0x1e910*/ 1510, -1, - /*0x1e92*/ 658, - /*0x2cb2*/ 998, - /*0x1faf*/ 814, - /*0x042f*/ 344, + /*0x1fe4*/ 846, + /*0x0464*/ 347, + /*0x0164*/ 106, + /*0x018a*/ 127, + /*0x021a*/ 203, + /*0x1c9a*/ 549, + /*0x1f9c*/ 795, + /*0x041c*/ 325, + /*0x011c*/ 71, + /*0x1041c*/ 1296, + /*0x2c64*/ 962, + /*0xab9c*/ 1194, + /*0x1ee4*/ 701, + /*0x1e64*/ 635, + /*0x03a6*/ 262, + /*0x1e918*/ 1518, + /*0x2c1c*/ 939, + -1, + /*0x01f1*/ 181, + /*0x1e1c*/ 599, + /*0x03a4*/ 260, + /*0x0220*/ 206, + /*0x1ca0*/ 555, + /*0x0496*/ 368, -1, -1, - /*0xabaf*/ 1205, - /*0x1c92*/ 541, - /*0x10c92*/ 1354, - /*0x01af*/ 149, + /*0x0190*/ 131, + /*0x2c9c*/ 988, + -1, -1, -1, + /*0x03f7*/ 291, + /*0x1e906*/ 1500, -1, - /*0x1e912*/ 1469, - /*0x0494*/ 367, - /*0x0514*/ 431, - /*0xa7b2*/ 1130, + /*0xa79c*/ 1117, + -1, -1, + /*0x10c9c*/ 1407, + /*0x051c*/ 435, -1, - /*0x1eb2*/ 676, + /*0x0492*/ 366, + /*0x1fa7*/ 806, + /*0x0427*/ 336, + /*0x0198*/ 137, + /*0x10427*/ 1307, + /*0x1ff9*/ 860, + /*0xaba7*/ 1205, + /*0x0179*/ 117, -1, - /*0x1fe9*/ 850, - /*0x1e04*/ 587, + /*0x1e916*/ 1516, + /*0x1f69*/ 760, + /*0x2c27*/ 950, + /*0x1f08*/ 715, + -1, + /*0x03e0*/ 279, + /*0x0226*/ 209, + /*0x1ca6*/ 561, + /*0x049a*/ 370, + /*0x1f09*/ 716, + -1, + /*0x0186*/ 124, + /*0x0224*/ 208, + /*0x1ca4*/ 559, -1, -1, -1, - /*0x1cb2*/ 573, - /*0x10cb2*/ 1386, + /*0x1e912*/ 1512, + /*0x01d9*/ 169, -1, - /*0x0490*/ 365, - /*0x0510*/ 429, + /*0x1f0a*/ 717, -1, - /*0x2c69*/ 963, - /*0x10a0*/ 484, - -1, -1, - /*0x1e02*/ 586, - /*0x1041c*/ 1288, - /*0x1f9c*/ 795, - /*0x041c*/ 325, - /*0x021c*/ 204, - /*0x011c*/ 71, - /*0xab9c*/ 1186, - -1, -1, - /*0x019c*/ 138, - /*0x039c*/ 253, - -1, -1, - /*0x2c1c*/ 939, + /*0x039e*/ 255, + /*0x10ca7*/ 1418, -1, - /*0x1caf*/ 570, - /*0x10caf*/ 1383, - -1, -1, -1, -1, - /*0x0504*/ 423, + /*0x04a0*/ 373, + /*0x1faf*/ 814, + /*0x042f*/ 344, + /*0x0196*/ 135, + -1, + /*0x10579*/ 1353, + /*0xabaf*/ 1213, -1, -1, - /*0x10a6*/ 490, + /*0x1e91a*/ 1520, + /*0x017d*/ 119, + /*0x2c2f*/ 958, -1, - /*0x2c9c*/ 987, - /*0x1e20*/ 601, - /*0x1041e*/ 1290, - /*0x1f9e*/ 797, - /*0x041e*/ 327, - /*0x021e*/ 205, - /*0x011e*/ 72, - /*0xab9e*/ 1188, + /*0xfb00*/ 1230, + /*0x0394*/ 245, + /*0x1f84*/ 771, + /*0x0404*/ 301, + /*0x0104*/ 59, + /*0x10404*/ 1272, -1, - /*0x0502*/ 422, - /*0x0470*/ 353, - /*0x039e*/ 255, - /*0x0170*/ 112, - /*0xa79c*/ 1116, - /*0x2c1e*/ 941, + /*0xab84*/ 1170, + -1, -1, + /*0x1f5f*/ 758, + /*0x1f5d*/ 757, + /*0x2c04*/ 915, + /*0x1e920*/ 1526, + /*0x1e84*/ 651, + /*0x1e04*/ 587, + -1, -1, -1, + /*0x10caf*/ 1426, -1, - /*0x01f0*/ 180, - /*0x03f0*/ 287, + /*0x04a6*/ 376, + /*0x1f18*/ 723, + /*0x2c84*/ 976, + -1, + /*0x021e*/ 205, + /*0x1c9e*/ 553, + /*0x04a4*/ 375, + /*0x1f6f*/ 766, + /*0x1057d*/ 1356, + /*0xa784*/ 1108, -1, -1, - /*0x2c70*/ 968, + /*0x10c84*/ 1383, + /*0x0504*/ 423, + /*0x1f82*/ 769, + /*0x0402*/ 299, + /*0x0102*/ 58, + /*0x10402*/ 1270, -1, - /*0x1c9c*/ 551, - /*0x10c9c*/ 1364, + /*0xab82*/ 1168, + /*0x01a0*/ 141, + /*0x0214*/ 200, + /*0x1c94*/ 543, -1, - /*0x10a4*/ 488, - /*0x1e91c*/ 1479, - /*0x2c9e*/ 988, - /*0x1e26*/ 604, - /*0x10422*/ 1294, + /*0x2c02*/ 913, + /*0x1f59*/ 755, + /*0x1e82*/ 650, + /*0x1e02*/ 586, + /*0x01d7*/ 168, + /*0x13f9*/ 525, + /*0xfb06*/ 1236, /*0x1fa2*/ 801, /*0x0422*/ 331, - /*0x0222*/ 207, /*0x0122*/ 74, - /*0xaba2*/ 1192, - /*0x04a0*/ 373, - /*0x0520*/ 437, - /*0x01a2*/ 142, + /*0x10422*/ 1302, + /*0x2c82*/ 975, + /*0xaba2*/ 1200, -1, -1, - /*0xa79e*/ 1117, + /*0x1c83*/ 533, + /*0x04e0*/ 405, /*0x2c22*/ 945, - /*0x1e9e*/ 666, - /*0x118a7*/ 1394, - -1, -1, -1, -1, - /*0x1ef0*/ 707, - /*0x1c9e*/ 553, - /*0x10c9e*/ 1366, - -1, -1, - /*0x1e91e*/ 1481, - /*0x2ca2*/ 990, - /*0x1e24*/ 603, - /*0x1040e*/ 1274, - /*0x1f8e*/ 781, - /*0x040e*/ 311, - /*0x020e*/ 197, - /*0x010e*/ 64, - /*0xab8e*/ 1172, - /*0x04a6*/ 376, - /*0x0526*/ 440, - /*0x018e*/ 129, - /*0x038e*/ 239, - /*0xff27*/ 1240, - /*0xa7a2*/ 1119, - /*0x2c0e*/ 925, + /*0xa782*/ 1107, /*0x1ea2*/ 668, + /*0x1e22*/ 602, + /*0x10c82*/ 1381, + /*0x0502*/ 422, + /*0xfb16*/ 1240, + -1, + /*0x0241*/ 220, + /*0x03e4*/ 281, + -1, + /*0x2ca2*/ 991, -1, + /*0x01a6*/ 144, + -1, + /*0x039c*/ 253, + /*0x049e*/ 372, + -1, + /*0xa7a2*/ 1120, + /*0x01a4*/ 143, + -1, + /*0x10ca2*/ 1413, + /*0x0522*/ 438, + -1, + /*0x10a0*/ 484, + /*0x13fd*/ 529, + -1, -1, + /*0x1f1a*/ 725, + /*0x2165*/ 873, + /*0x01f7*/ 185, + /*0x2169*/ 877, + /*0x2161*/ 869, + /*0x0494*/ 367, /*0x1faa*/ 809, /*0x042a*/ 339, - /*0x022a*/ 211, /*0x012a*/ 78, - /*0xabaa*/ 1200, - /*0x1ca2*/ 557, - /*0x10ca2*/ 1370, + /*0xa660*/ 1043, -1, - /*0x03aa*/ 266, + /*0xabaa*/ 1208, + -1, -1, + /*0x1e91e*/ 1524, -1, - /*0x2c8e*/ 980, /*0x2c2a*/ 953, + -1, + /*0x1eaa*/ 672, + /*0x1e2a*/ 606, -1, -1, - /*0x1e1a*/ 598, - -1, -1, -1, - /*0x04a4*/ 375, - /*0x0524*/ 439, - -1, -1, -1, - /*0x0370*/ 230, - /*0x2caa*/ 994, - /*0x1e8e*/ 656, + /*0x03a7*/ 263, + -1, -1, + /*0x01e0*/ 172, + /*0x03f9*/ 292, + /*0x2caa*/ 995, + /*0x021c*/ 204, + /*0x1c9c*/ 551, + /*0x10a6*/ 490, + /*0x1e914*/ 1514, -1, + /*0x04c1*/ 390, + /*0xa7aa*/ 1124, + /*0x104c1*/ 1325, + /*0x10a4*/ 488, + /*0x10caa*/ 1421, + /*0x052a*/ 442, /*0x1fae*/ 813, /*0x042e*/ 343, - /*0x022e*/ 213, /*0x012e*/ 80, - /*0xabae*/ 1204, - -1, - /*0x10c8e*/ 1350, - /*0x01ae*/ 148, - -1, - /*0x1e90e*/ 1465, - /*0xa7aa*/ 1123, - /*0x2c2e*/ 957, - /*0x1eaa*/ 672, - -1, -1, -1, -1, -1, - /*0x1f1a*/ 725, - /*0x1caa*/ 565, - /*0x10caa*/ 1378, - /*0x049a*/ 370, - /*0x051a*/ 434, - -1, - /*0x2cae*/ 996, + -1, -1, + /*0xabae*/ 1212, /*0x1fac*/ 811, /*0x042c*/ 341, - /*0x022c*/ 212, /*0x012c*/ 79, - /*0xabac*/ 1202, - -1, -1, - /*0x01ac*/ 147, - /*0x2165*/ 873, - /*0x00d3*/ 45, - /*0x2167*/ 875, - /*0x2c2c*/ 955, - /*0xa7ae*/ 1127, - /*0x2161*/ 869, + /*0x1e903*/ 1497, + /*0x2c2e*/ 957, + /*0xabac*/ 1210, /*0x1eae*/ 674, - /*0x118a0*/ 1387, - /*0x1fba*/ 822, - /*0x216d*/ 881, - /*0x023a*/ 216, - /*0x10b2*/ 502, - /*0xabba*/ 1216, - /*0x1cae*/ 569, - /*0x10cae*/ 1382, - /*0x104d3*/ 1335, - /*0x2cac*/ 995, - /*0x1f6b*/ 762, - /*0x0553*/ 479, - /*0x1fa8*/ 807, - /*0x0428*/ 337, - /*0x0228*/ 210, - /*0x0128*/ 77, - /*0xaba8*/ 1198, - -1, - /*0x1e12*/ 594, + /*0x1e2e*/ 608, + /*0x118a0*/ 1430, -1, - /*0x03a8*/ 264, + /*0x2c2c*/ 955, -1, - /*0xa7ac*/ 1125, - /*0x2c28*/ 951, /*0x1eac*/ 673, - /*0x2cba*/ 1002, + /*0x1e2c*/ 607, + /*0x0194*/ 134, + /*0x2cae*/ 997, + -1, -1, + /*0x03fd*/ 294, + /*0x1ca7*/ 562, -1, - /*0x118a6*/ 1393, + /*0x2cac*/ 996, + /*0xa7ae*/ 1128, + /*0x216f*/ 883, -1, - /*0x10af*/ 499, + /*0x10cae*/ 1425, + /*0x052e*/ 444, -1, - /*0x1cac*/ 567, - /*0x10cac*/ 1380, + /*0xa7ac*/ 1126, -1, - /*0x1e32*/ 610, - /*0x2163*/ 871, - /*0x2ca8*/ 993, - /*0x216f*/ 883, - /*0xa7ba*/ 1135, + /*0x04e4*/ 407, + /*0x10cac*/ 1423, + /*0x052c*/ 443, + /*0x1fa8*/ 807, + /*0x0428*/ 337, + /*0x0128*/ 77, + /*0x049c*/ 371, -1, - /*0x1eba*/ 680, - /*0x1fb8*/ 820, + /*0xaba8*/ 1206, -1, -1, -1, - /*0xabb8*/ 1214, + /*0x118a6*/ 1436, + /*0x2c28*/ 951, -1, - /*0x1cba*/ 581, - /*0x01b8*/ 155, - /*0xa7a8*/ 1122, - /*0xff26*/ 1239, /*0x1ea8*/ 671, - /*0x0492*/ 366, - /*0x0512*/ 430, - /*0x118a4*/ 1391, + /*0x1e28*/ 605, + -1, + /*0x118a4*/ 1434, -1, -1, - /*0x1fb6*/ 818, - /*0x1ca8*/ 563, - /*0x10ca8*/ 1376, - /*0x0136*/ 83, - /*0xabb6*/ 1212, + /*0x1f6b*/ 762, + /*0xff26*/ 1247, + /*0x1caf*/ 570, + /*0x2ca8*/ 994, -1, -1, - /*0xa688*/ 1053, - /*0x2cb8*/ 1001, - /*0x104b2*/ 1302, + /*0x2167*/ 875, + /*0xff24*/ 1245, -1, - /*0x04b2*/ 382, - /*0x0532*/ 446, - /*0x1040c*/ 1272, + /*0x24c1*/ 896, + /*0xa7a8*/ 1123, + /*0x1e91c*/ 1522, + -1, + /*0x10ca8*/ 1419, + /*0x0528*/ 441, + /*0x0204*/ 192, + /*0x1c84*/ 534, + /*0xa664*/ 1045, + -1, + /*0x1f8e*/ 781, + /*0x040e*/ 311, + /*0x010e*/ 64, + /*0x1040e*/ 1282, + /*0xa77b*/ 1103, + /*0xab8e*/ 1180, /*0x1f8c*/ 779, /*0x040c*/ 309, - /*0x020c*/ 196, /*0x010c*/ 63, - /*0xab8c*/ 1170, + /*0x1040c*/ 1280, + /*0x2c0e*/ 925, + /*0xab8c*/ 1178, + /*0x1e8e*/ 656, + /*0x1e0e*/ 592, + /*0x01e4*/ 174, -1, - /*0xff24*/ 1237, - /*0xa7b8*/ 1134, - /*0x038c*/ 238, - /*0x1eb8*/ 679, - /*0x2cb6*/ 1000, /*0x2c0c*/ 923, - /*0xa68a*/ 1054, + /*0x10c1*/ 517, + /*0x1e8c*/ 655, + /*0x1e0c*/ 591, + /*0x019c*/ 138, + /*0x2c8e*/ 981, + /*0xfb14*/ 1238, -1, -1, -1, - /*0x1cb8*/ 579, + /*0x1f6d*/ 764, + /*0x2c8c*/ 980, + -1, + /*0x0202*/ 191, + /*0x1c82*/ 532, + /*0x10c8e*/ 1393, + /*0x050e*/ 428, + -1, -1, -1, -1, + /*0x10c8c*/ 1391, + /*0x050c*/ 427, + /*0xfb03*/ 1233, + /*0x1fb2*/ 815, + -1, + /*0x0132*/ 81, -1, -1, - /*0x1f2f*/ 736, + /*0xabb2*/ 1216, + /*0x0222*/ 207, + /*0x1ca2*/ 557, + /*0xa726*/ 1066, + /*0x03aa*/ 266, + -1, -1, + /*0x1eb2*/ 676, + /*0x1e32*/ 610, + /*0xa724*/ 1065, + /*0x01a7*/ 145, + -1, -1, -1, -1, -1, + /*0x2cb2*/ 999, + /*0x0054*/ 18, + /*0x0154*/ 98, + /*0x1fb8*/ 820, -1, - /*0x1e1c*/ 599, - /*0xa779*/ 1101, - /*0xa7b6*/ 1133, - /*0x2c8c*/ 979, - /*0x1eb6*/ 678, - /*0xa680*/ 1049, - /*0x0230*/ 214, - /*0x0130*/ 1486, - /*0xabb0*/ 1206, + /*0x2126*/ 864, + -1, + /*0xa7b2*/ 1131, + /*0xabb8*/ 1222, + -1, + /*0x10cb2*/ 1429, + /*0x0532*/ 446, + /*0x1ed4*/ 693, + /*0x1e54*/ 627, + /*0x1e904*/ 1498, + /*0x1eb8*/ 679, + /*0x1e38*/ 613, -1, -1, - /*0x1cb6*/ 577, - /*0x03b0*/ 268, + /*0x00d4*/ 46, + /*0x2163*/ 871, + /*0x2cd4*/ 1016, + -1, -1, + /*0x2cb8*/ 1002, + /*0x1f1c*/ 727, -1, - /*0x1f69*/ 760, - /*0xa726*/ 1065, - /*0x1fbc*/ 824, + /*0xa760*/ 1094, + /*0x01af*/ 149, + /*0x022a*/ 211, + /*0x1caa*/ 565, + /*0xa7b8*/ 1135, + /*0x0554*/ 480, + -1, -1, + /*0x0538*/ 452, + -1, -1, + /*0x04a2*/ 374, + /*0x10a7*/ 491, + /*0x1ffc*/ 863, + /*0x047c*/ 359, + /*0x0184*/ 123, -1, - /*0x1e8c*/ 655, + /*0x1fba*/ 822, + /*0x2160*/ 868, + -1, + /*0x1e902*/ 1496, + -1, + /*0xabba*/ 1224, + /*0x216b*/ 879, -1, - /*0xabbc*/ 1218, + /*0x1efc*/ 713, + /*0x1e7c*/ 647, -1, -1, - /*0x01bc*/ 156, - /*0x10a2*/ 486, + /*0x1eba*/ 680, + /*0x1e3a*/ 614, + -1, -1, + /*0x03a8*/ 264, -1, - /*0x10c8c*/ 1348, - /*0x1e1e*/ 600, - /*0x2cb0*/ 997, - /*0x1e90c*/ 1463, + /*0x022e*/ 213, + /*0x1cae*/ 569, -1, - /*0x1f1c*/ 727, - /*0xa698*/ 1061, - /*0x1e70*/ 641, - /*0x049c*/ 371, - /*0x051c*/ 435, + /*0x2cba*/ 1003, + -1, -1, + /*0x022c*/ 212, + /*0x1cac*/ 567, + -1, -1, + /*0xa7ba*/ 1136, + /*0x10af*/ 499, + /*0x1057c*/ 1355, + /*0x0182*/ 122, + /*0x053a*/ 454, + -1, -1, -1, -1, -1, + /*0x04aa*/ 378, + /*0x1f8d*/ 780, + /*0x040d*/ 310, + -1, + /*0x1040d*/ 1281, -1, - /*0xa77b*/ 1102, + /*0xab8d*/ 1179, + -1, -1, -1, + /*0x01a2*/ 142, + /*0x2c0d*/ 924, + /*0x1f2f*/ 736, + /*0x216d*/ 881, + /*0x118a7*/ 1437, + /*0x038e*/ 239, + -1, -1, -1, + /*0x0228*/ 210, + /*0x1ca8*/ 563, + /*0x038c*/ 238, + -1, -1, + /*0xff27*/ 1248, + /*0x0130*/ 1529, + -1, -1, + /*0xabb0*/ 1214, + /*0xa78d*/ 1111, -1, -1, - /*0x2cbc*/ 1003, - /*0xa7b0*/ 1128, - /*0xa724*/ 1064, + /*0x10c8d*/ 1392, + /*0x04ae*/ 380, + /*0x1fdb*/ 843, /*0x1eb0*/ 675, + /*0x1e30*/ 609, + -1, + /*0xfb04*/ 1234, + /*0x04ac*/ 379, + -1, -1, -1, -1, + /*0x2cb0*/ 998, -1, -1, - /*0xa696*/ 1060, - -1, -1, -1, - /*0x1cb0*/ 571, - /*0x10cb0*/ 1384, + /*0x1fbe*/ 825, + /*0x118af*/ 1445, + /*0xa764*/ 1096, + /*0x13fc*/ 528, + /*0xa7b0*/ 1129, + /*0xabbe*/ 1228, + /*0x00db*/ 52, + /*0x10cb0*/ 1427, + /*0x10a2*/ 486, + /*0x020e*/ 197, -1, - /*0xa7bc*/ 1136, - /*0x1e22*/ 602, - /*0x1ebc*/ 681, + /*0xff2f*/ 1256, + /*0x1ebe*/ 682, + /*0x1e3e*/ 616, + -1, + /*0x020c*/ 196, + /*0x1fd3*/ 837, + /*0x0053*/ 17, + -1, -1, + /*0x2164*/ 872, + /*0x2cbe*/ 1005, + -1, -1, + /*0xfb02*/ 1232, + /*0x04a8*/ 377, + -1, -1, + /*0xa7be*/ 1138, + -1, -1, -1, + /*0x053e*/ 458, + -1, -1, + /*0x00d3*/ 45, -1, -1, -1, -1, - /*0x1fd2*/ 836, - /*0x049e*/ 372, - /*0x051e*/ 436, - /*0x0152*/ 97, - /*0x0052*/ 16, + /*0x01ae*/ 148, + -1, -1, -1, -1, -1, + /*0x01ac*/ 147, + /*0xa779*/ 1102, + /*0x0553*/ 479, + /*0x0232*/ 215, + /*0x1cb2*/ 573, + /*0x1fb6*/ 818, /*0x10aa*/ 494, - /*0x1fcc*/ 835, - /*0x04f0*/ 413, - /*0x024c*/ 227, - /*0x014c*/ 94, - /*0x004c*/ 10, + /*0x0136*/ 83, + -1, -1, + /*0xabb6*/ 1220, + /*0x1fca*/ 833, + /*0x004a*/ 8, + /*0x014a*/ 93, + -1, -1, + /*0x048e*/ 364, + /*0x1eb6*/ 678, + /*0x1e36*/ 612, + /*0x118a2*/ 1432, + -1, -1, + /*0x048c*/ 363, + /*0x1eca*/ 688, + /*0x1e4a*/ 622, -1, - /*0x1fbe*/ 825, - /*0xa686*/ 1052, - /*0x023e*/ 219, + /*0x2cb6*/ 1001, + /*0x1f2a*/ 731, + /*0x1cb8*/ 579, + /*0xff22*/ 1243, + /*0x00ca*/ 36, + -1, + /*0x2cca*/ 1011, + /*0xa7b6*/ 1134, + -1, -1, -1, + /*0x0536*/ 450, + /*0xa77d*/ 1104, + /*0x10ae*/ 498, + /*0x1fcb*/ 834, + /*0x004b*/ 9, + /*0x1e90e*/ 1508, + /*0x054a*/ 470, -1, - /*0xabbe*/ 1220, + /*0x10ac*/ 496, -1, -1, - /*0x118b2*/ 1405, + /*0x1e90c*/ 1506, + -1, -1, -1, + /*0x1f87*/ 774, + /*0x0407*/ 304, -1, - /*0x1e0e*/ 592, - /*0x1fb4*/ 817, + /*0x10407*/ 1275, + /*0x04b2*/ 382, + /*0xab87*/ 1173, + /*0x104b2*/ 1310, + /*0x00cb*/ 37, + /*0x1f2e*/ 735, + -1, + /*0x2c07*/ 918, + /*0x118aa*/ 1440, + -1, -1, + /*0x1f2c*/ 733, + -1, + /*0x023a*/ 216, + /*0x1cba*/ 581, + /*0x018e*/ 129, -1, - /*0x2cd2*/ 1014, + /*0x054b*/ 471, + /*0xff2a*/ 1251, + -1, -1, -1, + /*0x04d4*/ 399, + /*0x10a8*/ 492, + /*0x1fb4*/ 817, + /*0x04b8*/ 385, /*0x0134*/ 82, - /*0xabb4*/ 1210, - /*0xa77d*/ 1103, - /*0x04a2*/ 374, - /*0x0522*/ 438, - /*0x2ccc*/ 1011, + /*0x104b8*/ 1316, + /*0x10c87*/ 1386, + /*0xabb4*/ 1218, + -1, -1, -1, + /*0x03b0*/ 268, + /*0xab71*/ 1151, + -1, + /*0x1eb4*/ 677, + /*0x1e34*/ 611, + -1, -1, + /*0xa722*/ 1064, + /*0x118ae*/ 1444, + -1, -1, + /*0x1f28*/ 729, + /*0x2cb4*/ 1000, -1, - /*0x10ae*/ 498, + /*0x118ac*/ 1442, + /*0xab73*/ 1153, -1, -1, - /*0x1e2a*/ 606, - /*0x2cbe*/ 1004, + /*0xff2e*/ 1255, + /*0xa7b4*/ 1133, -1, -1, - /*0x1ed2*/ 692, - /*0xa694*/ 1059, + /*0x01b2*/ 151, + /*0x0534*/ 448, + /*0xff2c*/ 1253, + -1, -1, + /*0xa654*/ 1037, + -1, + /*0x04fc*/ 419, -1, - /*0xff32*/ 1251, + /*0x1fbc*/ 824, + /*0x10588*/ 1367, + /*0x04ba*/ 386, -1, - /*0x118af*/ 1402, - /*0x1ecc*/ 689, - /*0x2cb4*/ 999, + /*0x104ba*/ 1318, + /*0xabbc*/ 1226, + -1, + /*0x10589*/ 1368, -1, -1, - /*0xa7be*/ 1137, + /*0x0230*/ 214, + /*0x1cb0*/ 571, + /*0x1ebc*/ 681, + /*0x1e3c*/ 615, -1, - /*0x1ebe*/ 682, + /*0x01b8*/ 155, + /*0x118a8*/ 1438, /*0x1f0e*/ 721, + /*0x1058a*/ 1369, -1, - /*0xa690*/ 1057, - /*0x048e*/ 364, - /*0x050e*/ 428, - /*0x10ac*/ 496, - /*0x1cbe*/ 583, - /*0xa7b4*/ 1132, + /*0xa72a*/ 1068, + /*0x2cbc*/ 1004, -1, - /*0x1eb4*/ 677, - /*0x1e2e*/ 608, + /*0x1f0c*/ 719, + /*0x10580*/ 1359, + -1, + /*0xff28*/ 1249, + -1, + /*0xa7bc*/ 1137, -1, -1, -1, - /*0x1f2a*/ 731, - /*0xff2f*/ 1248, - /*0x1cb4*/ 575, - /*0x04aa*/ 378, - /*0x052a*/ 442, + /*0x053c*/ 456, + /*0x24b8*/ 887, + /*0x023e*/ 219, + /*0x1cbe*/ 583, + /*0x10b2*/ 502, + -1, + /*0x212a*/ 865, -1, -1, - /*0x10ba*/ 510, + /*0x10590*/ 1374, + -1, -1, -1, + /*0x1fd6*/ 838, + /*0x0056*/ 20, + /*0x0156*/ 99, + -1, -1, -1, -1, + /*0x01fc*/ 188, + /*0xa72e*/ 1070, + -1, -1, -1, + /*0x1ed6*/ 694, + /*0x1e56*/ 628, + /*0xa72c*/ 1069, + /*0x10b8*/ 508, -1, -1, - /*0x1fca*/ 833, + /*0x04b0*/ 381, + /*0x00d6*/ 48, + /*0x104b0*/ 1308, + /*0x2cd6*/ 1017, + /*0x1e90d*/ 1507, -1, - /*0x024a*/ 226, - /*0x014a*/ 93, - /*0x004a*/ 8, - /*0xa684*/ 1051, - /*0x2126*/ 864, - /*0x01ca*/ 161, - /*0x10a8*/ 492, + /*0xab7f*/ 1165, + /*0xab7b*/ 1161, -1, -1, - /*0x1e2c*/ 607, - -1, -1, -1, -1, -1, - /*0x1f2e*/ 735, - -1, - /*0xa682*/ 1050, - /*0x04ae*/ 380, - /*0x052e*/ 444, - -1, - /*0xa732*/ 1070, - /*0x2cca*/ 1010, + /*0xa7d6*/ 1147, + /*0x24ba*/ 889, + /*0x10586*/ 1365, + /*0xab75*/ 1155, + /*0x0556*/ 482, + /*0x1f54*/ 753, + -1, -1, + /*0x1f38*/ 737, -1, /*0x1fc4*/ 828, - /*0x1e3a*/ 614, - /*0x0244*/ 222, - -1, /*0x0044*/ 3, - /*0x004f*/ 13, -1, - /*0x01c4*/ 157, - /*0x01cf*/ 164, - /*0x03cf*/ 270, + /*0x1cb6*/ 577, + /*0x04be*/ 388, -1, - /*0x10b8*/ 508, - /*0x1e28*/ 605, - /*0x1eca*/ 688, - /*0x1fab*/ 810, - /*0x042b*/ 340, - /*0x1f2c*/ 733, + /*0x104be*/ 1322, -1, - /*0xabab*/ 1201, - /*0x04ac*/ 379, - /*0x052c*/ 443, + /*0x024a*/ 226, + /*0xa728*/ 1067, + /*0x118b2*/ 1448, -1, - /*0x03ab*/ 267, + /*0x1ec4*/ 685, + /*0x1e44*/ 619, + /*0xa688*/ 1054, + -1, -1, -1, + /*0x10ba*/ 510, + /*0x00c4*/ 30, + /*0xff32*/ 1259, + /*0x2cc4*/ 1008, + /*0x104d3*/ 1343, + -1, -1, -1, + /*0x10592*/ 1376, -1, - /*0x2cc4*/ 1007, - /*0x2c2b*/ 954, - /*0x1fc2*/ 826, - /*0x10b6*/ 506, - /*0x24ba*/ 889, - /*0x118a2*/ 1389, - /*0x0042*/ 1, + /*0xa7c4*/ 1141, + /*0x0050*/ 14, + /*0x0150*/ 96, + /*0xa68a*/ 1055, + /*0x0544*/ 464, + -1, + /*0x118b8*/ 1454, + -1, -1, + /*0xa680*/ 1050, -1, /*0x1f3a*/ 739, - /*0x104ba*/ 1310, - /*0x03c2*/ 269, - /*0x04ba*/ 386, - /*0x053a*/ 454, - /*0xa7c4*/ 1139, - /*0x1fc8*/ 831, - /*0x1ec4*/ 685, - /*0x0248*/ 225, - /*0x1e38*/ 613, - /*0x0048*/ 7, - /*0x1f28*/ 729, + /*0x1ed0*/ 691, + /*0x1e50*/ 625, + -1, -1, + /*0xff38*/ 1265, + /*0x01db*/ 170, -1, - /*0x01c8*/ 160, - /*0x04a8*/ 377, - /*0x0528*/ 441, + /*0x00d0*/ 42, + /*0xab77*/ 1157, + /*0x2cd0*/ 1014, + /*0x1c87*/ 537, + -1, -1, -1, + /*0xa690*/ 1058, + /*0x04b6*/ 384, + /*0xa7d0*/ 1146, + /*0x104b6*/ 1314, -1, -1, - /*0x2cc2*/ 1006, - /*0xa7ab*/ 1124, - /*0xff22*/ 1235, + /*0x0550*/ 476, + /*0x16e5f*/ 1493, + /*0x16e5d*/ 1491, + /*0x104ca*/ 1334, -1, -1, -1, -1, - /*0x1e36*/ 612, + /*0x1fcc*/ 835, + /*0x004c*/ 10, + /*0x014c*/ 94, + /*0xa698*/ 1062, -1, -1, - /*0x1cab*/ 566, - /*0x10cab*/ 1379, - /*0x2cc8*/ 1009, - /*0xa7c2*/ 1138, - -1, - /*0x1ec2*/ 684, + /*0x01d3*/ 166, + /*0x118ba*/ 1456, + /*0x24be*/ 893, + /*0x1cb4*/ 575, + /*0x1f0d*/ 720, /*0x10b0*/ 500, - -1, - /*0x24b8*/ 887, - /*0x216b*/ 879, - /*0x118aa*/ 1397, - /*0x1e0c*/ 591, - /*0x1f38*/ 737, - /*0x104b8*/ 1308, - -1, - /*0x04b8*/ 385, - /*0x0538*/ 452, - /*0x1ec8*/ 687, - /*0x10bc*/ 512, - /*0x1fd6*/ 838, - /*0x0150*/ 96, - /*0x0050*/ 14, - /*0x0156*/ 99, - /*0x0056*/ 20, - /*0x24b6*/ 885, - /*0x03d0*/ 271, - -1, - /*0x03d6*/ 274, - /*0x1fdb*/ 843, - /*0x104b6*/ 1306, - -1, - /*0x04b6*/ 384, - /*0x0536*/ 450, - /*0xff2a*/ 1243, - -1, - /*0x01db*/ 170, - /*0x1e30*/ 609, - /*0x118ae*/ 1401, + /*0x1ecc*/ 689, + /*0x1e4c*/ 623, -1, -1, -1, - /*0x2cd0*/ 1013, - /*0x1f0c*/ 719, - /*0x2cd6*/ 1016, - /*0xa69a*/ 1062, - /*0x048c*/ 363, - /*0x050c*/ 427, - -1, - /*0x1e3c*/ 615, - /*0xa722*/ 1063, - -1, -1, -1, -1, -1, -1, - /*0x1ed0*/ 691, - /*0x1fc6*/ 829, - /*0x1ed6*/ 694, - /*0x0246*/ 224, - /*0xff2e*/ 1247, - /*0x0046*/ 5, - /*0x118ac*/ 1399, + /*0xff3a*/ 1267, + /*0xa732*/ 1071, + /*0x00cc*/ 38, + /*0xa686*/ 1053, + /*0x2ccc*/ 1012, + /*0x04cb*/ 395, -1, - /*0x2132*/ 867, - /*0x024e*/ 228, - /*0x014e*/ 95, - /*0x004e*/ 12, - /*0x104b0*/ 1300, - /*0x1fda*/ 842, - /*0x04b0*/ 381, + /*0x104cb*/ 1335, + -1, -1, -1, -1, + /*0x16e59*/ 1487, -1, - /*0x015a*/ 101, - /*0x005a*/ 24, + /*0xa64a*/ 1032, + /*0x054c*/ 472, + -1, -1, /*0x10be*/ 514, - /*0x24bc*/ 891, - -1, - /*0x03da*/ 276, - /*0x118ba*/ 1413, - /*0x1f3c*/ 741, - /*0x104bc*/ 1312, - /*0x2cc6*/ 1008, - /*0x04bc*/ 387, - /*0x053c*/ 456, - /*0x10b4*/ 504, - /*0xff2c*/ 1245, - -1, - /*0x2cce*/ 1012, - -1, - /*0x118a8*/ 1395, - /*0xa72a*/ 1067, - -1, - /*0x1e52*/ 626, - /*0x2cda*/ 1018, - /*0xa7c6*/ 1141, - -1, - /*0x1ec6*/ 686, + /*0x2132*/ 867, + /*0xa696*/ 1061, -1, - /*0x1e4c*/ 623, - -1, -1, - /*0xff3a*/ 1259, - /*0x1ece*/ 690, - /*0xa652*/ 1035, - /*0x1e3e*/ 616, - /*0x2169*/ 877, + /*0xa754*/ 1088, -1, -1, - /*0x1eda*/ 696, - /*0xa64c*/ 1032, - /*0x00d2*/ 44, - -1, - /*0xff28*/ 1241, + /*0xa738*/ 1074, + /*0x1f5b*/ 756, -1, - /*0x1e34*/ 611, - /*0xa692*/ 1058, - /*0x00cc*/ 38, - /*0xa72e*/ 1069, - /*0x118b8*/ 1411, + /*0x1fc8*/ 831, + /*0x0048*/ 7, + /*0x01ca*/ 161, -1, -1, -1, -1, - /*0x1f52*/ 752, - /*0x104d2*/ 1334, - /*0x24cc*/ 907, - /*0x04d2*/ 398, - /*0x0552*/ 478, + /*0x03d6*/ 274, + -1, + /*0xa692*/ 1059, -1, - /*0x1f4c*/ 749, - /*0x104cc*/ 1328, - /*0x24be*/ 893, - /*0x2cc0*/ 1005, - /*0x054c*/ 472, - /*0x118b6*/ 1409, /*0x1f3e*/ 743, - /*0x104be*/ 1314, + /*0x1ec8*/ 687, + /*0x1e48*/ 621, + /*0x24b6*/ 885, + /*0x1e907*/ 1501, + /*0x04b4*/ 383, -1, - /*0x04be*/ 388, - /*0x053e*/ 458, + /*0x104b4*/ 1312, + /*0x00c8*/ 34, + /*0x24ca*/ 905, + /*0x2cc8*/ 1010, -1, - /*0xff38*/ 1257, - /*0xa72c*/ 1068, - -1, -1, -1, - /*0x104b4*/ 1304, - /*0x1ec0*/ 683, - /*0x04b4*/ 383, - /*0x0534*/ 448, + /*0x118b0*/ 1446, -1, -1, - /*0x1fe2*/ 844, - /*0x0462*/ 346, + /*0xa69a*/ 1063, -1, - /*0x0162*/ 105, + /*0x004e*/ 12, + /*0x014e*/ 95, -1, - /*0xff36*/ 1255, - /*0xa73a*/ 1074, - /*0x01e2*/ 173, - /*0x03e2*/ 280, - /*0x0154*/ 98, - /*0x0054*/ 18, - /*0x2c62*/ 959, - /*0x10c4*/ 520, - -1, -1, -1, - /*0x1e4a*/ 622, - /*0xa728*/ 1066, - -1, -1, -1, - /*0x118b0*/ 1403, - -1, -1, - /*0x2ce2*/ 1022, + /*0x01cb*/ 162, + /*0x0548*/ 468, + /*0xff30*/ 1257, + -1, -1, -1, -1, + /*0xa73a*/ 1075, + /*0x1ece*/ 690, + /*0x1e4e*/ 624, + /*0x10b6*/ 506, -1, - /*0x10ab*/ 495, - /*0xa64a*/ 1031, - /*0x1fd8*/ 840, + /*0x0187*/ 125, + -1, -1, + /*0x00ce*/ 40, + /*0x118be*/ 1460, + /*0x2cce*/ 1013, + /*0x24cb*/ 906, + /*0x1fc2*/ 826, + /*0x0042*/ 1, -1, - /*0x2cd4*/ 1015, - /*0x0158*/ 100, - /*0x0058*/ 22, - /*0x118bc*/ 1415, - /*0x00ca*/ 36, + /*0x16e57*/ 1485, -1, - /*0x03d8*/ 275, + /*0x10594*/ 1377, + /*0x04bc*/ 387, -1, - /*0x10c2*/ 518, - /*0x1ee2*/ 700, - -1, -1, - /*0x1e44*/ 619, - /*0x24ca*/ 905, - /*0xff30*/ 1249, - /*0x1ed4*/ 693, - /*0xa738*/ 1073, - /*0x1f4a*/ 747, - /*0x104ca*/ 1326, - -1, -1, - /*0x054a*/ 470, - /*0x2cd8*/ 1017, - /*0xa644*/ 1028, - /*0x1040d*/ 1273, - /*0x1f8d*/ 780, - /*0x040d*/ 310, - -1, -1, - /*0xab8d*/ 1171, - /*0x00c4*/ 30, - /*0x00cf*/ 41, - /*0xa736*/ 1072, + /*0x104bc*/ 1320, + /*0x054e*/ 474, -1, -1, - /*0x212a*/ 865, - /*0x2c0d*/ 924, - /*0x1ed8*/ 695, + /*0x1ec2*/ 684, /*0x1e42*/ 618, - /*0x24c4*/ 899, - /*0x24cf*/ 910, - -1, -1, -1, - /*0x104c4*/ 1320, - /*0x104cf*/ 1331, + /*0x1fd2*/ 836, + /*0x0052*/ 16, + /*0x0152*/ 97, -1, - /*0x0544*/ 464, - /*0x054f*/ 475, - /*0xa642*/ 1027, - /*0x1e48*/ 621, - -1, -1, -1, -1, -1, + /*0x1f4a*/ 747, /*0x00c2*/ 28, - /*0x1f2b*/ 732, -1, - /*0x118be*/ 1417, - /*0x0055*/ 19, - /*0xa648*/ 1030, - /*0xa78d*/ 1110, - /*0x01d5*/ 167, - /*0x03d5*/ 273, - /*0x24c2*/ 897, + /*0x2cc2*/ 1007, + /*0x10583*/ 1362, + /*0x03d0*/ 271, -1, -1, - /*0x00c8*/ 34, - /*0x118b4*/ 1407, - /*0x104c2*/ 1318, - -1, - /*0x10c8d*/ 1349, + /*0x1ed2*/ 692, + /*0x1e52*/ 626, + /*0xa7c2*/ 1140, + -1, -1, -1, /*0x0542*/ 462, + /*0x00d2*/ 44, -1, - /*0x1e90d*/ 1464, - -1, - /*0x24c8*/ 903, + /*0x2cd2*/ 1015, + /*0x0244*/ 222, -1, -1, -1, - /*0x1f48*/ 745, - /*0x104c8*/ 1324, - /*0xa73c*/ 1075, + /*0x1fc6*/ 829, + /*0x0046*/ 5, -1, - /*0x0548*/ 468, + /*0x1fd8*/ 840, + /*0x0058*/ 22, + /*0x0158*/ 100, + /*0x0552*/ 478, + /*0x1f4b*/ 748, + /*0x118b6*/ 1452, -1, -1, - /*0xa68e*/ 1056, - /*0x1e50*/ 625, + /*0x04d6*/ 400, + /*0x1ec6*/ 686, + /*0x1e46*/ 620, -1, - /*0x1e56*/ 628, - /*0xff34*/ 1253, - /*0x0245*/ 223, - /*0x0145*/ 90, - /*0x0045*/ 4, + /*0x1ed8*/ 695, + /*0x1e58*/ 629, + /*0xab79*/ 1159, + /*0xff36*/ 1263, + /*0x00c6*/ 32, + /*0x01bc*/ 156, + /*0x2cc6*/ 1009, + /*0x00d8*/ 49, -1, - /*0x16e5f*/ 1450, - /*0x01c5*/ 158, + /*0x2cd8*/ 1018, + /*0x10b4*/ 504, + -1, -1, + /*0xa7c6*/ 1143, + /*0x1fab*/ 810, + /*0x042b*/ 340, + /*0xa7d8*/ 1148, + /*0x0546*/ 466, + /*0xa73e*/ 1077, + /*0xabab*/ 1209, -1, - /*0xa650*/ 1034, - /*0x1fd9*/ 841, - /*0xa656*/ 1037, + /*0x1ec0*/ 683, + /*0x1e40*/ 617, + /*0x24bc*/ 891, + /*0x2c2b*/ 954, + -1, -1, -1, + /*0x00c0*/ 26, + -1, + /*0x2cc0*/ 1006, /*0x1fec*/ 853, /*0x046c*/ 351, - /*0x0059*/ 23, /*0x016c*/ 110, - /*0x00d0*/ 42, - /*0x01d9*/ 169, - /*0x00d6*/ 48, - /*0x01ec*/ 178, - /*0x03ec*/ 285, - /*0x16e5d*/ 1448, - -1, -1, - /*0x16e47*/ 1426, - -1, -1, - /*0x00db*/ 52, - -1, - /*0x1f50*/ 751, - /*0x104d0*/ 1332, - /*0x1f56*/ 754, - /*0x04d0*/ 397, - /*0x0550*/ 476, - /*0x04d6*/ 400, - /*0x0556*/ 482, - /*0xa752*/ 1086, - /*0xa7c5*/ 1140, - /*0x1e46*/ 620, - -1, - /*0x1f5b*/ 756, - -1, - /*0xa74c*/ 1083, + /*0xa656*/ 1038, + /*0x013d*/ 86, + /*0x104c4*/ 1328, + /*0xa7c0*/ 1139, + /*0xabbd*/ 1227, + /*0xab7d*/ 1163, -1, - /*0x1e4e*/ 624, - -1, -1, -1, - /*0xa73e*/ 1076, - /*0xa646*/ 1029, - /*0x1e5a*/ 630, + /*0x0540*/ 460, + /*0xa7ab*/ 1125, /*0x1eec*/ 705, + /*0x1e6c*/ 639, + /*0x10cab*/ 1422, + /*0xa694*/ 1060, + -1, -1, + /*0x024c*/ 227, + /*0x10bc*/ 512, -1, -1, -1, - /*0xa64e*/ 1033, - /*0x00c6*/ 32, - -1, - /*0xa734*/ 1071, - /*0x10c0*/ 516, - -1, - /*0xa65a*/ 1039, - /*0x00ce*/ 40, /*0x1fc9*/ 832, - -1, - /*0x24c6*/ 901, + /*0x0049*/ 1528, /*0x0149*/ 92, - /*0x0049*/ 1485, - /*0x00da*/ 51, -1, - /*0x104c6*/ 1322, - /*0x24ce*/ 909, - /*0x118ab*/ 1398, - /*0x0546*/ 466, - -1, -1, - /*0x104ce*/ 1330, + /*0x1fa9*/ 808, + /*0x0429*/ 338, -1, -1, - /*0x054e*/ 474, + /*0x04d0*/ 397, + /*0xaba9*/ 1207, + /*0x104d0*/ 1340, + /*0x053d*/ 457, + -1, + /*0x118b4*/ 1450, + /*0x2c29*/ 952, + /*0xa736*/ 1073, + -1, + /*0x1f3c*/ 741, + /*0xa644*/ 1029, + /*0x00c9*/ 35, + -1, + /*0xa74a*/ 1083, + /*0x16e41*/ 1463, + /*0xff34*/ 1261, + /*0x1fda*/ 842, + /*0x005a*/ 24, + /*0x015a*/ 101, + -1, + /*0xa7c9*/ 1145, /*0x1fea*/ 851, /*0x046a*/ 350, - -1, /*0x016a*/ 109, - /*0x04da*/ 402, - /*0x0345*/ 229, + /*0x0549*/ 469, -1, - /*0x01ea*/ 177, - /*0x03ea*/ 284, - /*0x1e40*/ 617, - /*0x1fa9*/ 808, - /*0x0429*/ 338, + /*0x01c4*/ 157, + /*0x10ca9*/ 1420, + /*0x1eda*/ 696, + /*0x1e5a*/ 630, -1, -1, - /*0xaba9*/ 1199, - /*0xff2b*/ 1244, + /*0x0248*/ 225, + /*0x1eea*/ 704, + /*0x1e6a*/ 638, + /*0x00da*/ 51, -1, - /*0x01a9*/ 146, - /*0x03a9*/ 265, + /*0x2cda*/ 1019, + /*0xa650*/ 1035, + -1, -1, + /*0x03c2*/ 269, + /*0x104cc*/ 1336, -1, - /*0xa640*/ 1026, - /*0x2c29*/ 952, - /*0x1fc3*/ 827, + /*0x24c4*/ 899, + /*0x118bc*/ 1458, + -1, + /*0x10584*/ 1363, + /*0x1fe2*/ 844, + /*0x0462*/ 346, + /*0x0162*/ 105, -1, - /*0x0243*/ 221, - /*0x0143*/ 89, - /*0x0043*/ 2, - /*0x00c0*/ 26, - /*0x10421*/ 1293, /*0x1fa1*/ 800, /*0x0421*/ 330, + /*0x1f56*/ 754, + /*0x10421*/ 1301, -1, - /*0xa74a*/ 1082, - /*0xaba1*/ 1191, - -1, -1, - /*0x24c0*/ 895, - /*0x03a1*/ 258, - -1, - /*0x1eea*/ 704, + /*0xaba1*/ 1199, + /*0x2c62*/ 960, + /*0x024e*/ 228, + /*0x1ee2*/ 700, + /*0x1e62*/ 634, /*0x2c21*/ 944, - /*0x104c0*/ 1316, + -1, -1, -1, + /*0x1fc7*/ 830, + /*0x0047*/ 6, + /*0x0147*/ 91, + /*0x2ce2*/ 1023, + -1, + /*0x10c4*/ 520, + /*0x0045*/ 4, + /*0x0145*/ 90, + -1, -1, -1, /*0x1fb9*/ 821, - /*0x04c0*/ 389, - /*0x0540*/ 460, + /*0xa64c*/ 1033, /*0x0139*/ 84, - /*0xabb9*/ 1215, + /*0x10582*/ 1361, + /*0xa734*/ 1072, + /*0xabb9*/ 1223, + /*0x10ca1*/ 1412, + /*0x03d8*/ 275, + /*0x00c7*/ 33, + /*0x0055*/ 19, + /*0x104c8*/ 1332, + -1, -1, + /*0x00c5*/ 31, + -1, -1, -1, + /*0xa7c7*/ 1144, + -1, -1, -1, + /*0x0547*/ 467, + /*0xa7c5*/ 1142, + -1, + /*0x0345*/ 229, + -1, + /*0x0545*/ 465, + /*0x00d5*/ 47, + -1, /*0x1fe8*/ 849, /*0x0468*/ 349, - -1, /*0x0168*/ 108, - -1, -1, - /*0x1e62*/ 634, - /*0x01e8*/ 176, - /*0x03e8*/ 283, - /*0x1ca9*/ 564, - /*0x10ca9*/ 1377, - /*0xa744*/ 1079, - /*0x1e54*/ 627, + /*0x0539*/ 453, + /*0x03ab*/ 267, -1, - /*0x1fcb*/ 834, + /*0x24cc*/ 907, + -1, + /*0x104ce*/ 1338, -1, -1, - /*0xa662*/ 1043, - /*0x004b*/ 9, + /*0x0555*/ 481, + /*0x1ee8*/ 703, + /*0x1e68*/ 637, + /*0x1f50*/ 751, + /*0xa73c*/ 1076, + /*0x0246*/ 224, + /*0xa648*/ 1031, + -1, -1, -1, + /*0x03ec*/ 285, + /*0x1f97*/ 790, + /*0x0417*/ 320, + -1, + /*0x10417*/ 1291, + -1, + /*0xab97*/ 1189, + /*0x1ff2*/ 854, + /*0x0472*/ 354, + /*0x0172*/ 113, + /*0x104c2*/ 1326, + /*0x2c17*/ 934, + /*0x01c8*/ 160, + /*0x1e97*/ 661, -1, -1, - /*0x01cb*/ 162, - /*0xa68c*/ 1055, - /*0xa654*/ 1036, - -1, -1, -1, -1, - /*0x1ca1*/ 556, - /*0x10ca1*/ 1369, - /*0x00d4*/ 46, + /*0xa684*/ 1052, + /*0x2c72*/ 970, + -1, + /*0x1ef2*/ 708, + /*0x1e72*/ 642, -1, - /*0x1e921*/ 1484, + /*0x04d2*/ 398, + /*0xa64e*/ 1034, + /*0x104d2*/ 1342, + /*0x1cab*/ 566, -1, - /*0x1e58*/ 629, + /*0x03a9*/ 265, + /*0x2cf2*/ 1026, -1, - /*0x16e57*/ 1442, - /*0xa742*/ 1078, + /*0x24c8*/ 903, -1, - /*0x1ee8*/ 703, - /*0x04e2*/ 406, - /*0x1cb9*/ 580, + /*0x10c97*/ 1402, + /*0x1f4c*/ 749, + -1, -1, -1, + /*0x0372*/ 231, -1, - /*0x1f54*/ 753, + /*0xa756*/ 1089, -1, - /*0xa658*/ 1038, - /*0x04d4*/ 399, - /*0x0554*/ 480, + /*0x10572*/ 1346, -1, - /*0xa748*/ 1081, - -1, -1, - /*0x00d8*/ 49, - /*0x10417*/ 1283, - /*0x1f97*/ 790, - /*0x0417*/ 320, - /*0x1fe4*/ 846, - /*0x0464*/ 347, - /*0xab97*/ 1181, - /*0x0164*/ 106, + /*0x023d*/ 218, + /*0x1cbd*/ 582, -1, - /*0x0197*/ 136, - /*0x0397*/ 248, - /*0x01e4*/ 174, - /*0x03e4*/ 281, - /*0x2c17*/ 934, + /*0xa642*/ 1028, + /*0x03da*/ 276, -1, - /*0x2c64*/ 961, + /*0xa682*/ 1051, + /*0x104c6*/ 1330, /*0x04d8*/ 401, + /*0x03ea*/ 284, -1, -1, - /*0x0460*/ 345, - -1, - /*0x0160*/ 104, + /*0x046e*/ 352, + /*0x016e*/ 111, + /*0x24ce*/ 909, + -1, -1, + /*0xa652*/ 1036, -1, -1, -1, - /*0x01e0*/ 172, - /*0x03e0*/ 279, - /*0x1ff4*/ 856, - /*0x0474*/ 355, - /*0x2c60*/ 958, - /*0x0174*/ 114, + /*0x2c6e*/ 967, + /*0x015e*/ 103, + /*0x1eee*/ 706, + /*0x1e6e*/ 640, -1, - /*0x1ffc*/ 863, - /*0x047c*/ 359, - /*0x01f4*/ 183, - /*0x03f4*/ 289, - /*0xa750*/ 1085, + /*0x1ca9*/ 564, + -1, -1, + /*0x04c0*/ 389, -1, - /*0xa756*/ 1088, - /*0x01fc*/ 188, - /*0x1f0d*/ 720, - /*0x1e97*/ 661, - /*0x2ce0*/ 1021, - /*0x1ee4*/ 701, + /*0x104c0*/ 1324, + /*0x1ede*/ 698, + /*0x1e5e*/ 632, + /*0xa744*/ 1080, + /*0x1f48*/ 745, + /*0x03e2*/ 280, + /*0x24c2*/ 897, -1, - /*0x10c5*/ 521, - -1, -1, - /*0x1c97*/ 546, - /*0x10c97*/ 1359, - -1, -1, - /*0x1e917*/ 1474, + /*0x00de*/ 55, + /*0x03a1*/ 258, + /*0x2cde*/ 1021, -1, - /*0x046e*/ 352, + /*0xa646*/ 1030, + -1, -1, + /*0xa658*/ 1039, + -1, -1, -1, -1, + /*0x04ec*/ 411, + /*0x1fc3*/ 827, + /*0x0043*/ 2, + /*0x0143*/ 89, + /*0x104bd*/ 1321, -1, - /*0x016e*/ 111, - /*0x1ee0*/ 699, - /*0x00d5*/ 47, - /*0x13fc*/ 528, - /*0x01ee*/ 179, - /*0x03ee*/ 286, /*0x1fe6*/ 847, /*0x0466*/ 348, - /*0x2c6e*/ 966, /*0x0166*/ 107, - /*0x1ef4*/ 709, - -1, - /*0x015e*/ 103, - /*0x01e6*/ 175, - /*0x03e6*/ 282, - /*0x1efc*/ 713, - /*0x01de*/ 171, - /*0x03de*/ 278, - -1, - /*0x0555*/ 481, - /*0xa746*/ 1080, -1, -1, - /*0x16e53*/ 1438, - -1, -1, - /*0xa74e*/ 1084, - -1, -1, -1, -1, - /*0x1e6c*/ 639, - /*0xa75a*/ 1090, - /*0x2cde*/ 1020, + /*0xa750*/ 1086, -1, - /*0x0051*/ 15, - /*0x1eee*/ 706, - /*0x00c5*/ 31, - /*0x01d1*/ 165, - /*0x03d1*/ 272, + /*0x10c2*/ 518, -1, -1, - /*0xa66c*/ 1048, + /*0xa640*/ 1027, -1, - /*0x212b*/ 866, /*0x1ee6*/ 702, - /*0x24c5*/ 900, - /*0x00d9*/ 50, - /*0x1ede*/ 698, - -1, -1, - /*0x104c5*/ 1321, + /*0x1e66*/ 636, + /*0x00c3*/ 29, -1, - /*0x04c5*/ 392, - /*0x0545*/ 465, + /*0x03d5*/ 273, + /*0x04c9*/ 394, + -1, + /*0x104c9*/ 1333, + /*0x24c6*/ 901, /*0x1fad*/ 812, /*0x042d*/ 342, - -1, -1, - /*0xabad*/ 1203, - /*0x1f59*/ 755, + /*0x1058e*/ 1372, -1, - /*0x1f6c*/ 763, - -1, -1, - /*0x04ec*/ 411, - /*0x2c2d*/ 956, - /*0x015c*/ 102, + /*0x1ca1*/ 556, + /*0xabad*/ 1211, + /*0x0543*/ 463, -1, - /*0xfb17*/ 1233, + /*0x1058c*/ 1370, -1, - /*0xa740*/ 1077, - /*0x03dc*/ 277, - /*0x1ff2*/ 854, - /*0x0472*/ 354, + /*0x2c2d*/ 956, + /*0xa66c*/ 1049, + -1, -1, -1, -1, + /*0x03e8*/ 283, + -1, -1, -1, + /*0x04da*/ 402, + /*0x1f52*/ 752, + /*0x0245*/ 223, + /*0x24c0*/ 895, + /*0xa74c*/ 1084, + /*0x04ea*/ 410, -1, - /*0x0172*/ 113, + /*0x01ec*/ 178, + /*0xa7ad*/ 1127, + /*0x1cb9*/ 580, + -1, + /*0x10cad*/ 1424, + -1, -1, -1, -1, -1, -1, + /*0x0397*/ 248, + /*0x1fbb*/ 823, + /*0xab7c*/ 1162, + /*0x013b*/ 85, -1, -1, - /*0x10a9*/ 493, - /*0x01f2*/ 182, - /*0x10425*/ 1297, + /*0xabbb*/ 1225, + -1, -1, + /*0x24bd*/ 892, + -1, -1, + /*0x10c0*/ 516, + -1, + /*0x04e2*/ 406, + -1, + /*0x01a9*/ 146, + /*0x10ab*/ 495, /*0x1fa5*/ 804, /*0x0425*/ 334, - /*0x2c72*/ 969, + /*0xa65a*/ 1040, + /*0x10425*/ 1305, -1, - /*0xaba5*/ 1195, + /*0xaba5*/ 1203, + /*0x1fb7*/ 819, + /*0xa66a*/ 1048, + -1, -1, + /*0x2c25*/ 948, + /*0xabb7*/ 1221, + /*0x24c9*/ 904, + /*0xa748*/ 1082, + /*0x04c7*/ 393, + /*0x053b*/ 455, + /*0x104c7*/ 1331, -1, - /*0x2cdc*/ 1019, + /*0x10bd*/ 513, + /*0x04c5*/ 392, + /*0x1f2b*/ 732, + /*0x104c5*/ 1329, -1, - /*0x03a5*/ 261, - /*0x10c3*/ 519, - /*0xa7ad*/ 1126, - /*0x2c25*/ 948, + /*0x01ea*/ 177, + /*0x1c97*/ 546, + -1, + /*0x1e921*/ 1527, + /*0x104b9*/ 1317, -1, -1, -1, - /*0x2cf2*/ 1025, - /*0x10a1*/ 485, - /*0x1e6a*/ 638, - /*0x00c9*/ 35, - /*0x1cad*/ 568, - /*0x10cad*/ 1381, - /*0x1edc*/ 697, - /*0x004d*/ 11, + /*0x10ca5*/ 1416, -1, -1, - /*0x01cd*/ 163, + /*0xa662*/ 1044, + /*0x03ee*/ 286, -1, - /*0x24c9*/ 904, - /*0xa66a*/ 1047, - /*0x10b9*/ 509, - /*0x1ef2*/ 708, - /*0x1f49*/ 746, - /*0x104c9*/ 1325, - /*0xa762*/ 1094, - /*0x04c9*/ 394, - /*0x0549*/ 469, - /*0x013f*/ 87, - /*0xabbf*/ 1221, + /*0x1f6c*/ 763, + /*0x0537*/ 451, + /*0x1f3d*/ 742, + /*0xa74e*/ 1085, + -1, + /*0xa68e*/ 1057, + /*0x10a9*/ 493, + /*0x03de*/ 278, + -1, -1, -1, + /*0xa68c*/ 1056, + -1, + /*0x01e2*/ 173, -1, - /*0xa754*/ 1087, - /*0x10423*/ 1295, /*0x1fa3*/ 802, /*0x0423*/ 332, + /*0x04e8*/ 409, + /*0x10423*/ 1303, + /*0x118ab*/ 1441, + /*0xaba3*/ 1201, -1, -1, - /*0xaba3*/ 1193, - /*0x1ca5*/ 560, - /*0x10ca5*/ 1373, - /*0x1f6a*/ 761, - /*0x03a3*/ 259, + /*0x1f49*/ 746, -1, - /*0x04ea*/ 410, /*0x2c23*/ 946, - -1, - /*0x0241*/ 220, - /*0x0141*/ 88, - /*0x0041*/ 0, - /*0x00c3*/ 29, + /*0xa742*/ 1079, /*0x1f29*/ 730, - -1, -1, - /*0xa758*/ 1089, - -1, -1, - /*0x1e68*/ 637, -1, - /*0x24c3*/ 898, + /*0xff2b*/ 1252, + -1, + /*0x01c7*/ 159, -1, -1, -1, -1, - /*0x104c3*/ 1319, + /*0x01c5*/ 158, -1, - /*0x04c3*/ 391, - /*0x0543*/ 463, - /*0xa668*/ 1046, - /*0x0372*/ 231, - -1, -1, - /*0x1cbf*/ 584, + /*0x118bd*/ 1459, + /*0x004d*/ 11, + /*0xa752*/ 1087, -1, -1, -1, - /*0x023d*/ 218, - /*0x013d*/ 86, - /*0xabbd*/ 1219, + /*0x03e6*/ 282, + /*0x04f2*/ 414, + /*0x10ca3*/ 1414, + -1, -1, + /*0x24c7*/ 902, + /*0x01d5*/ 167, + -1, + /*0x1f6a*/ 761, + /*0x1058d*/ 1371, + /*0x24c5*/ 900, + /*0xa668*/ 1047, + -1, + /*0x00cd*/ 39, + -1, -1, /*0x24b9*/ 888, - /*0x1ca3*/ 558, - /*0x10ca3*/ 1371, -1, - /*0x1f39*/ 738, - /*0x104b9*/ 1309, + /*0x10a1*/ 485, + /*0x118a9*/ 1439, + -1, + /*0x1e917*/ 1517, + /*0xa746*/ 1081, + -1, + /*0x16e54*/ 1482, + /*0xa758*/ 1090, + /*0x054d*/ 473, + /*0x01e8*/ 176, + -1, + /*0xff29*/ 1250, -1, -1, - /*0x0539*/ 453, - /*0x1f68*/ 759, - /*0x00cb*/ 37, + /*0x10c7*/ 522, + /*0x0470*/ 353, + /*0x0170*/ 112, + -1, + /*0x0243*/ 221, + /*0x10c5*/ 521, + -1, -1, -1, -1, + /*0x2c70*/ 969, + /*0x10b9*/ 509, + /*0x1ef0*/ 707, + /*0x1e70*/ 641, + /*0xa740*/ 1078, + -1, + /*0x04ee*/ 412, + /*0x0197*/ 136, -1, - /*0x04e8*/ 409, - /*0x1041d*/ 1289, /*0x1f9d*/ 796, /*0x041d*/ 326, - -1, -1, - /*0xab9d*/ 1187, - /*0x24cb*/ 906, -1, - /*0x019d*/ 139, - /*0x039d*/ 254, - /*0x1f4b*/ 748, - /*0x104cb*/ 1327, + /*0x1041d*/ 1297, + /*0x01f2*/ 182, + /*0xab9d*/ 1195, + /*0x04de*/ 404, + -1, -1, -1, /*0x2c1d*/ 940, - /*0x04cb*/ 395, - /*0x054b*/ 471, - /*0x10407*/ 1267, - /*0x1f87*/ 774, - /*0x0407*/ 304, - /*0x0587*/ 483, + /*0x0370*/ 230, + /*0x1cad*/ 568, + /*0x1f39*/ 738, -1, - /*0xab87*/ 1165, - /*0x1e64*/ 635, + /*0x10570*/ 1344, -1, - /*0x0187*/ 125, - /*0x1041b*/ 1287, + /*0xa76c*/ 1100, + /*0x212b*/ 866, + /*0xabb5*/ 1219, + -1, -1, -1, -1, + /*0x118a1*/ 1431, + -1, + /*0x03a5*/ 261, /*0x1f9b*/ 794, /*0x041b*/ 324, - /*0x2c07*/ 918, - /*0x1cbd*/ 582, - /*0xab9b*/ 1185, - -1, -1, - /*0xa664*/ 1044, - /*0x039b*/ 252, - -1, - /*0x1e60*/ 633, - /*0x2c1b*/ 938, - /*0x1fbb*/ 823, - -1, - /*0x023b*/ 217, - /*0x013b*/ 85, - /*0xabbb*/ 1217, - -1, -1, - /*0x1e74*/ 643, - /*0xab73*/ 1145, - /*0xa660*/ 1042, - /*0x1c9d*/ 552, - /*0x10c9d*/ 1365, - /*0x1e7c*/ 647, -1, - /*0x1e91d*/ 1480, + /*0x1041b*/ 1295, + /*0x10c9d*/ 1408, + /*0xab9b*/ 1193, + /*0x00b5*/ 25, + /*0xff21*/ 1242, + /*0x216c*/ 880, -1, - /*0x1ff6*/ 857, - /*0x0476*/ 356, - /*0x04e4*/ 407, - /*0x0176*/ 115, - -1, -1, -1, - /*0x01f6*/ 184, - /*0x2162*/ 870, - /*0x1c87*/ 537, - /*0x10c87*/ 1343, + /*0x2c1b*/ 938, + /*0x04c3*/ 391, /*0x1e9b*/ 665, - /*0x118a9*/ 1396, - /*0x1e907*/ 1458, - /*0xa76c*/ 1099, + /*0x104c3*/ 1327, -1, - /*0x04e0*/ 405, - /*0x1e6e*/ 640, - /*0x1c9b*/ 550, - /*0x10c9b*/ 1363, - -1, -1, - /*0x1e91b*/ 1478, - -1, -1, - /*0x04f4*/ 415, - /*0x1e66*/ 636, + /*0x1f68*/ 759, + /*0x04e6*/ 408, + /*0xa65e*/ 1042, + -1, + /*0x0535*/ 449, -1, -1, - /*0x1e5e*/ 632, - /*0x04fc*/ 419, - /*0x118a1*/ 1388, + /*0x118b9*/ 1455, + /*0x023b*/ 217, + /*0x01ee*/ 179, + /*0x1f95*/ 788, + /*0x0415*/ 318, -1, - /*0xabb1*/ 1207, + /*0x10415*/ 1289, -1, - /*0xff29*/ 1242, - /*0x01b1*/ 150, - /*0xa666*/ 1045, + /*0xab95*/ 1187, + /*0x10c9b*/ 1406, + /*0xff39*/ 1266, + /*0x01de*/ 171, -1, - /*0x1ef6*/ 710, - /*0xa65e*/ 1041, - /*0x10419*/ 1285, + /*0x2c15*/ 932, + -1, + /*0xa75a*/ 1091, + -1, -1, -1, + /*0x1ca5*/ 560, + /*0xa76a*/ 1099, /*0x1f99*/ 792, /*0x0419*/ 322, - /*0x118b9*/ 1412, - /*0x10ad*/ 497, - /*0xab99*/ 1183, - /*0x00de*/ 55, - /*0x1f6e*/ 765, -1, - /*0x0399*/ 250, - /*0x04ee*/ 412, + /*0x10419*/ 1293, + /*0x1cb7*/ 578, + /*0xab99*/ 1191, + /*0xfb17*/ 1241, -1, + /*0x03a3*/ 259, + /*0x1fb3*/ 816, /*0x2c19*/ 936, - /*0xff21*/ 1234, - /*0x1fb7*/ 819, - /*0x10413*/ 1279, + /*0xa666*/ 1046, + /*0x1e99*/ 663, + /*0x10c95*/ 1400, + /*0xabb3*/ 1217, /*0x1f93*/ 786, /*0x0413*/ 316, - /*0xabb7*/ 1213, - /*0x04e6*/ 408, - /*0xab93*/ 1177, - /*0x01b7*/ 154, - /*0x04de*/ 404, - /*0x0193*/ 133, - /*0x0393*/ 244, - /*0xa7b1*/ 1129, - /*0xff39*/ 1258, + /*0x216a*/ 878, + /*0x10413*/ 1287, + /*0x16e5b*/ 1489, + /*0xab93*/ 1185, + -1, -1, -1, -1, /*0x2c13*/ 930, - /*0x00d1*/ 43, - /*0x1ffa*/ 861, - /*0x047a*/ 358, - /*0x10a5*/ 489, - -1, -1, - /*0x1cb1*/ 572, - /*0x10cb1*/ 1385, - /*0x01fa*/ 187, - /*0x03fa*/ 293, + /*0xa762*/ 1095, + /*0x01e6*/ 175, -1, -1, - /*0x1e99*/ 663, - /*0xa76a*/ 1098, - /*0x104d1*/ 1333, - /*0x1e5c*/ 631, - /*0x0376*/ 232, - /*0x0551*/ 477, + /*0x0587*/ 483, + /*0x10c99*/ 1404, + /*0x10587*/ 1366, + /*0x1f91*/ 784, + /*0x0411*/ 314, + /*0x104bb*/ 1319, + /*0x10411*/ 1285, + /*0xa7b3*/ 1132, + /*0xab91*/ 1183, -1, - /*0x1c99*/ 548, - /*0x10c99*/ 1361, - /*0x10cd*/ 523, + /*0x24c3*/ 898, + /*0x0533*/ 447, -1, - /*0x1e919*/ 1476, - /*0x1e72*/ 642, + /*0x2c11*/ 928, + /*0x2162*/ 870, + /*0x004f*/ 13, + /*0x10c93*/ 1398, + /*0x1f6e*/ 765, + /*0x16e53*/ 1481, -1, - /*0xa65c*/ 1040, + /*0x1ca3*/ 558, -1, - /*0x13fa*/ 526, - -1, -1, -1, - /*0x1cb7*/ 578, - /*0x00dc*/ 53, - /*0x1c93*/ 542, - /*0x10c93*/ 1355, - /*0x10bf*/ 515, - /*0x1f2d*/ 734, - /*0x1e913*/ 1470, - /*0xabb5*/ 1211, - /*0x1efa*/ 712, + /*0x1f8f*/ 782, + /*0x040f*/ 312, -1, - /*0x01b5*/ 153, + /*0x1040f*/ 1283, -1, - /*0x10a3*/ 487, - /*0xab75*/ 1147, - -1, -1, -1, - /*0x04dc*/ 403, - /*0x1fb3*/ 816, + /*0xab8f*/ 1181, + /*0x104b7*/ 1315, -1, -1, -1, - /*0xabb3*/ 1209, - /*0x10c1*/ 517, + /*0x2c0f*/ 926, + /*0x00cf*/ 41, + /*0x10c91*/ 1396, + /*0x1f81*/ 768, + /*0x0401*/ 298, + /*0x10c3*/ 519, + /*0x10401*/ 1269, + /*0x03f0*/ 287, + /*0xab81*/ 1167, + -1, -1, -1, -1, + /*0x2c01*/ 912, + /*0x054f*/ 475, + -1, -1, + /*0x1ff4*/ 856, + /*0x0474*/ 355, + /*0x0174*/ 114, -1, - /*0x01b3*/ 152, - /*0x04f2*/ 414, + /*0x10c8f*/ 1394, + /*0xa768*/ 1098, -1, - /*0xa768*/ 1097, + /*0x047e*/ 360, -1, - /*0x1041f*/ 1291, - /*0x1f9f*/ 798, - /*0x041f*/ 328, + /*0x039d*/ 254, + /*0x16e4a*/ 1472, + /*0x015c*/ 102, + /*0x1ef4*/ 709, + /*0x1e74*/ 643, + /*0x10ad*/ 497, + -1, + /*0x2c7e*/ 972, + /*0x10c81*/ 1380, + /*0x1efe*/ 714, + /*0x1e7e*/ 648, + -1, + /*0x1edc*/ 697, + /*0x1e5c*/ 631, + /*0x2168*/ 876, + /*0x013f*/ 87, + -1, + /*0x24bb*/ 890, + /*0xabbf*/ 1229, + /*0x00dc*/ 53, + /*0xabb1*/ 1215, + /*0x2cdc*/ 1020, + /*0x01b7*/ 154, + -1, -1, + /*0x10574*/ 1348, + /*0x1f2d*/ 734, + /*0x039b*/ 252, -1, -1, - /*0xab9f*/ 1189, + /*0x16e4b*/ 1473, + /*0x1057e*/ 1357, + -1, -1, -1, -1, -1, + /*0x04cd*/ 396, -1, - /*0x00cd*/ 39, - /*0x019f*/ 140, - /*0x039f*/ 256, - /*0x216c*/ 880, + /*0x104cd*/ 1337, + /*0x24b7*/ 886, -1, - /*0x2c1f*/ 942, - -1, -1, -1, - /*0x24cd*/ 908, + /*0x1c9d*/ 552, + /*0xa7b1*/ 1130, + /*0x10bb*/ 511, + /*0x053f*/ 459, + /*0x10cb1*/ 1428, + /*0x0531*/ 445, + /*0x1f9f*/ 798, + /*0x041f*/ 328, + -1, + /*0x1041f*/ 1299, + /*0x0395*/ 246, + /*0xab9f*/ 1197, -1, -1, /*0x1cb5*/ 576, - /*0x1f4d*/ 750, - /*0x104cd*/ 1329, - /*0x10bd*/ 513, - /*0x04cd*/ 396, - /*0x054d*/ 473, - /*0xa7b3*/ 1131, - /*0x1ff8*/ 859, - /*0x0478*/ 357, - /*0xab7f*/ 1157, - /*0x0178*/ 116, - /*0xab71*/ 1143, - /*0x24bf*/ 894, -1, - /*0x01f8*/ 186, - /*0x1cb3*/ 574, - /*0x1f3f*/ 744, - /*0x104bf*/ 1315, + /*0x2c1f*/ 942, -1, -1, - /*0x053f*/ 459, + /*0x10a5*/ 489, + /*0x118ad*/ 1443, + -1, -1, + /*0x1f3b*/ 740, -1, - /*0x00c1*/ 27, - -1, -1, -1, -1, -1, - /*0x1c9f*/ 554, - /*0x10c9f*/ 1367, - /*0xfb13*/ 1229, - /*0x24c1*/ 896, - /*0x1e91f*/ 1482, + /*0x10b7*/ 507, -1, - /*0x13f8*/ 524, - /*0xa764*/ 1095, - /*0x104c1*/ 1317, + /*0x1c9b*/ 550, + /*0x0399*/ 250, + /*0xa76e*/ 1101, + /*0xff2d*/ 1254, + /*0x1f85*/ 772, + /*0x0405*/ 302, + /*0x04f0*/ 413, + /*0x10405*/ 1273, -1, - /*0x04c1*/ 390, - /*0x0541*/ 461, - /*0xab79*/ 1151, + /*0xab85*/ 1171, + /*0x10c9f*/ 1410, + /*0xa75e*/ 1093, -1, -1, - /*0x10415*/ 1281, - /*0x1f95*/ 788, - /*0x0415*/ 318, - /*0x1ef8*/ 711, + /*0x2c05*/ 916, -1, - /*0xab95*/ 1179, - /*0xa760*/ 1093, - -1, -1, - /*0x0395*/ 246, - -1, -1, - /*0x2c15*/ 932, + /*0x0393*/ 244, -1, -1, - /*0x10bb*/ 511, - /*0x216a*/ 878, - /*0x24bd*/ 892, + /*0x0051*/ 15, + /*0x216e*/ 882, -1, - /*0x118ad*/ 1400, + /*0x01cd*/ 163, + -1, -1, + /*0x1c95*/ 544, + /*0x1f8b*/ 778, + /*0x040b*/ 308, -1, - /*0x1f3d*/ 742, - /*0x104bd*/ 1313, + /*0x1040b*/ 1279, -1, - /*0x047e*/ 360, - /*0x053d*/ 457, - /*0x16e52*/ 1437, - -1, -1, -1, - /*0x01fe*/ 189, - /*0x03fe*/ 295, - /*0x16e4c*/ 1431, - /*0xab7b*/ 1153, - /*0x2c7e*/ 971, - -1, -1, -1, -1, -1, - /*0x1f1d*/ 728, - /*0xa76e*/ 1100, - /*0xff2d*/ 1246, - -1, -1, -1, - /*0x118a5*/ 1392, - /*0x1c95*/ 544, - /*0x10c95*/ 1357, + /*0xab8b*/ 1177, + /*0x118bb*/ 1457, -1, - /*0xa766*/ 1096, - /*0x1e915*/ 1472, + /*0x0391*/ 242, + /*0x10c85*/ 1384, + /*0x2c0b*/ 922, + /*0x00d1*/ 43, + -1, -1, + /*0x24cd*/ 908, + /*0x104b5*/ 1313, -1, - /*0xa75e*/ 1092, - -1, -1, -1, -1, -1, -1, - /*0x10b1*/ 501, - /*0x1e76*/ 644, - /*0x1efe*/ 714, - /*0x2168*/ 876, - /*0x1f1b*/ 726, + /*0x1c99*/ 548, + /*0x10a3*/ 487, + /*0x03cf*/ 270, + -1, -1, + /*0xa766*/ 1097, + /*0x118a5*/ 1435, + /*0x0551*/ 477, + /*0x1e91d*/ 1523, + /*0x1cb3*/ 574, + /*0x038f*/ 240, + /*0xa78b*/ 1110, + /*0x118b7*/ 1453, -1, - /*0x10411*/ 1277, - /*0x1f91*/ 784, - /*0x0411*/ 314, - /*0xff25*/ 1238, + /*0x10c8b*/ 1390, + /*0x1c93*/ 542, + /*0xff25*/ 1246, + /*0x01f0*/ 180, + /*0x1ff6*/ 857, + /*0x0476*/ 356, + /*0x0176*/ 115, -1, - /*0xab91*/ 1175, - /*0x24bb*/ 890, + /*0xff37*/ 1264, + /*0x2166*/ 874, + /*0x10cd*/ 523, + -1, -1, -1, + /*0x1ffa*/ 861, + /*0x047a*/ 358, + /*0x1ef6*/ 710, + /*0x1e76*/ 644, -1, - /*0x0191*/ 132, - /*0x0391*/ 242, - /*0x1f3b*/ 740, - /*0x104bb*/ 1311, - /*0x2c11*/ 928, - /*0x118bf*/ 1418, - /*0x053b*/ 455, - -1, -1, - /*0xab7d*/ 1155, - -1, -1, - /*0x10b7*/ 507, - /*0x118a3*/ 1390, - /*0x1040f*/ 1275, - /*0x1f8f*/ 782, - /*0x040f*/ 312, - -1, -1, - /*0xab8f*/ 1173, + /*0x1c91*/ 540, -1, - /*0x04f6*/ 416, - /*0x018f*/ 130, - /*0x038f*/ 240, + /*0x1e91b*/ 1521, + /*0x019d*/ 139, + /*0x03f4*/ 289, -1, -1, - /*0x2c0f*/ 926, + /*0x1efa*/ 712, + /*0x1e7a*/ 646, + /*0x16e56*/ 1484, + /*0x03fe*/ 295, -1, - /*0x16e4a*/ 1429, + /*0x1f4d*/ 750, + /*0x03dc*/ 277, -1, - /*0x1040b*/ 1271, - /*0x1f8b*/ 778, - /*0x040b*/ 308, + /*0x0376*/ 232, -1, - /*0xa75c*/ 1091, - /*0xab8b*/ 1169, - /*0xff23*/ 1236, + /*0x01b5*/ 153, -1, - /*0x018b*/ 128, - /*0x1c91*/ 540, - /*0x10c91*/ 1353, + /*0x10576*/ 1350, -1, - /*0x2c0b*/ 922, - /*0x1e911*/ 1468, + /*0x1ff8*/ 859, + /*0x0478*/ 357, + /*0x0178*/ 116, -1, - /*0x2164*/ 872, - /*0xab77*/ 1149, + /*0x118a3*/ 1433, -1, - /*0x104b1*/ 1301, + /*0x1e915*/ 1515, -1, - /*0xfb15*/ 1231, - /*0x0531*/ 445, + /*0x1057a*/ 1354, + /*0x104b3*/ 1311, -1, - /*0x118bd*/ 1416, - /*0x16e44*/ 1423, - /*0x16e4f*/ 1434, + /*0x1c81*/ 531, + /*0x1ef8*/ 711, + /*0x1e78*/ 645, + /*0xff23*/ 1244, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0x1e919*/ 1519, -1, - /*0x1e7a*/ 646, + /*0x16e44*/ 1466, + -1, -1, -1, -1, -1, -1, -1, - /*0x2160*/ 868, - /*0x1f19*/ 724, + /*0x10578*/ 1352, + -1, -1, -1, -1, + /*0x1e913*/ 1513, + /*0x039f*/ 256, /*0x10b5*/ 505, - /*0x10c8f*/ 1351, -1, -1, - /*0x1e90f*/ 1466, + /*0x104cf*/ 1339, -1, -1, - /*0xa78b*/ 1109, - /*0x24b7*/ 886, - /*0x10405*/ 1265, - /*0x1f85*/ 772, - /*0x0405*/ 302, - -1, - /*0x104b7*/ 1307, - /*0xab85*/ 1163, - /*0x10b3*/ 503, - /*0x0537*/ 451, - /*0x10c8b*/ 1347, - -1, - /*0x16e42*/ 1421, - /*0x1e90b*/ 1462, - /*0x2c05*/ 916, - -1, -1, -1, -1, -1, - /*0x10401*/ 1261, - /*0x1f81*/ 768, - /*0x0401*/ 298, - /*0x04fa*/ 418, - /*0x16e48*/ 1427, - /*0xab81*/ 1159, - /*0x216e*/ 882, - -1, - /*0x0181*/ 121, - -1, -1, -1, - /*0x2c01*/ 912, + /*0x1cbf*/ 584, + /*0x1f1d*/ 728, + /*0x1cb1*/ 572, + -1, -1, -1, -1, + /*0x16e50*/ 1478, -1, -1, - /*0x2166*/ 874, + /*0x1e911*/ 1511, + -1, -1, -1, + /*0x01b3*/ 152, -1, -1, -1, -1, - /*0x118bb*/ 1414, - /*0x00b5*/ 25, + /*0x13fa*/ 526, + /*0x0193*/ 133, -1, -1, -1, -1, -1, -1, -1, - /*0x1c85*/ 535, - /*0x10c85*/ 1341, + /*0x1f1b*/ 726, + /*0x1e90f*/ 1509, + /*0x04f4*/ 415, + -1, + /*0x03d1*/ 272, -1, -1, - /*0x1e905*/ 1456, + /*0x1c9f*/ 554, + /*0x04fe*/ 420, -1, - /*0x104b5*/ 1305, + /*0x0191*/ 132, + /*0x04dc*/ 403, -1, -1, - /*0x0535*/ 449, - -1, -1, -1, -1, - /*0x16e50*/ 1435, + /*0x1e901*/ 1495, + -1, -1, + /*0x13f8*/ 524, -1, - /*0x16e56*/ 1441, + /*0x16e4c*/ 1474, -1, - /*0x1c81*/ 531, - /*0x10c81*/ 1337, + /*0x01cf*/ 164, -1, - /*0x104b3*/ 1303, - /*0x1e901*/ 1452, + /*0x118b5*/ 1451, + -1, -1, + /*0x104bf*/ 1323, -1, - /*0x0533*/ 447, - /*0x16e5b*/ 1446, + /*0x104b1*/ 1309, + /*0x018f*/ 130, -1, - /*0x1e78*/ 645, - -1, -1, -1, -1, -1, -1, + /*0x10b3*/ 503, + /*0x1c85*/ 535, + /*0xff35*/ 1262, + -1, -1, -1, + /*0xfb15*/ 1239, + -1, + /*0x24cf*/ 910, -1, -1, - /*0x118b1*/ 1404, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x0181*/ 121, + /*0x1f19*/ 724, -1, -1, -1, -1, -1, - /*0x16e46*/ 1425, - /*0xab70*/ 1142, - -1, -1, -1, - /*0xff31*/ 1250, - /*0x16e4e*/ 1433, - /*0x04f8*/ 417, - /*0x118b7*/ 1410, - -1, -1, -1, - /*0x16e5a*/ 1445, + /*0xa65c*/ 1041, -1, -1, -1, -1, -1, -1, + /*0x01f4*/ 183, + /*0x03fa*/ 293, -1, -1, -1, -1, - /*0xfb05*/ 1227, - -1, -1, -1, -1, -1, -1, + /*0x01fe*/ 189, -1, - /*0xff37*/ 1256, - /*0x1e7e*/ 648, - -1, -1, -1, -1, -1, -1, - -1, -1, - /*0xfb01*/ 1223, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, - /*0x16e40*/ 1419, + /*0x16e48*/ 1470, -1, -1, -1, -1, -1, - /*0x118b5*/ 1408, + /*0xfb13*/ 1237, -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0x01b1*/ 150, + -1, -1, -1, -1, + /*0x1e91f*/ 1525, -1, -1, - /*0x04fe*/ 420, - -1, -1, -1, -1, -1, - /*0x118b3*/ 1406, - -1, -1, -1, -1, -1, -1, - -1, - /*0xff35*/ 1254, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x118b3*/ 1449, -1, -1, - /*0xff33*/ 1252, - -1, -1, -1, -1, -1, - /*0x16e54*/ 1439, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x16e4e*/ 1476, -1, -1, -1, - /*0x16e58*/ 1443, - -1, -1, -1, -1, -1, /*0x1f0f*/ 722, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, - /*0x1f0b*/ 718, - -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, - /*0x16e55*/ 1440, - -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, - /*0x16e45*/ 1424, + /*0x24bf*/ 894, + -1, + /*0xff33*/ 1260, + -1, + /*0x104d1*/ 1341, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x16e59*/ 1444, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, - /*0xa77e*/ 1104, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x1e905*/ 1499, + -1, -1, + /*0x019f*/ 140, + /*0x16e42*/ 1464, -1, -1, -1, -1, -1, - /*0x16e49*/ 1428, - -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, + /*0xfb01*/ 1231, -1, -1, - /*0x16e43*/ 1422, - -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, + /*0x10bf*/ 515, + -1, + /*0x10b1*/ 501, -1, -1, - /*0x16e4b*/ 1430, - -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, - -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, - -1, -1, -1, -1, -1, -1, - /*0x16e5e*/ 1449, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x16e52*/ 1480, -1, -1, -1, - /*0x16e51*/ 1436, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x1e90b*/ 1505, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x16e5c*/ 1447, - -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, - /*0x16e4d*/ 1432, - -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, - /*0x16e41*/ 1420, - -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, - -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, - -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, - -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, + /*0x04f6*/ 416, + -1, -1, + /*0x1f3f*/ 744, -1, -1, -1, -1, -1, -1, + /*0x04fa*/ 418, + /*0x01d1*/ 165, + -1, + /*0x16e46*/ 1468, + -1, -1, + /*0x16e58*/ 1486, + -1, -1, + /*0x018b*/ 128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0x04f8*/ 417, + /*0x16e40*/ 1462, + -1, + /*0x118bf*/ 1461, + -1, + /*0x118b1*/ 1447, -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0xff31*/ 1258, + -1, -1, + /*0x01f6*/ 184, -1, -1, -1, -1, -1, -1, + -1, -1, + /*0xab72*/ 1152, + /*0x01fa*/ 187, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0xfb05*/ 1235, -1, -1, -1, -1, -1, -1, + /*0x16e49*/ 1471, + -1, -1, + /*0x1f0b*/ 718, + -1, -1, -1, -1, + /*0x01f8*/ 186, -1, -1, -1, -1, -1, -1, + -1, -1, + /*0xa77e*/ 1105, + -1, -1, + /*0xa75c*/ 1092, + -1, -1, -1, + /*0x16e5a*/ 1488, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3585,8 +3621,14 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, + /*0x16e47*/ 1469, + -1, -1, -1, -1, + /*0x16e45*/ 1467, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, + /*0x16e55*/ 1483, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3599,27 +3641,28 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, - /*0xab74*/ 1146, - -1, -1, -1, -1, - /*0xab7c*/ 1154, -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, + /*0x16e5e*/ 1492, -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, + /*0x16e43*/ 1465, -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, + /*0xab70*/ 1150, -1, -1, -1, -1, -1, -1, - /*0xab72*/ 1144, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3639,44 +3682,62 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, + /*0x16e4d*/ 1475, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0x10595*/ 1378, -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, + /*0xab74*/ 1154, + -1, -1, -1, -1, -1, + /*0xab7e*/ 1164, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0xab76*/ 1148, + /*0x10591*/ 1375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + /*0x1058f*/ 1373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + /*0x10581*/ 1360, + -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, - /*0xab7a*/ 1152, -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, + /*0x16e4f*/ 1477, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + /*0xab76*/ 1156, + -1, -1, -1, -1, -1, + /*0x10585*/ 1364, + -1, -1, -1, + /*0xab7a*/ 1160, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, + /*0x16e5c*/ 1490, + -1, -1, -1, -1, + /*0xab78*/ 1158, -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, - /*0xab78*/ 1150, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3686,8 +3747,8 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, - /*0xab7e*/ 1156 + -1, -1, -1, + /*0x16e51*/ 1479 }; if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE) @@ -3706,7 +3767,7 @@ onigenc_unicode_CaseFold_11_lookup(const OnigCodePoint code) } static const CaseUnfold_11_Type CaseUnfold_11_Table[] = { -#define CaseUnfold_11 (*(CaseUnfold_11_Type (*)[1352])(CaseUnfold_11_Table+0)) +#define CaseUnfold_11 (*(CaseUnfold_11_Type (*)[1395])(CaseUnfold_11_Table+0)) {0x0061, {1|U, {0x0041}}}, {0x0062, {1|U, {0x0042}}}, {0x0063, {1|U, {0x0043}}}, @@ -4603,6 +4664,7 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = { {0x2c5c, {1|U, {0x2c2c}}}, {0x2c5d, {1|U, {0x2c2d}}}, {0x2c5e, {1|U, {0x2c2e}}}, + {0x2c5f, {1|U, {0x2c2f}}}, {0x2c61, {1|U, {0x2c60}}}, {0x2c65, {1|U, {0x023a}}}, {0x2c66, {1|U, {0x023e}}}, @@ -4806,7 +4868,14 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = { {0xa7bb, {1|U, {0xa7ba}}}, {0xa7bd, {1|U, {0xa7bc}}}, {0xa7bf, {1|U, {0xa7be}}}, + {0xa7c1, {1|U, {0xa7c0}}}, {0xa7c3, {1|U, {0xa7c2}}}, + {0xa7c8, {1|U, {0xa7c7}}}, + {0xa7ca, {1|U, {0xa7c9}}}, + {0xa7d1, {1|U, {0xa7d0}}}, + {0xa7d7, {1|U, {0xa7d6}}}, + {0xa7d9, {1|U, {0xa7d8}}}, + {0xa7f6, {1|U, {0xa7f5}}}, {0xab53, {1|U, {0xa7b3}}}, {0xff41, {1|U, {0xff21}}}, {0xff42, {1|U, {0xff22}}}, @@ -4910,6 +4979,41 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = { {0x104f9, {1|U, {0x104d1}}}, {0x104fa, {1|U, {0x104d2}}}, {0x104fb, {1|U, {0x104d3}}}, + {0x10597, {1|U, {0x10570}}}, + {0x10598, {1|U, {0x10571}}}, + {0x10599, {1|U, {0x10572}}}, + {0x1059a, {1|U, {0x10573}}}, + {0x1059b, {1|U, {0x10574}}}, + {0x1059c, {1|U, {0x10575}}}, + {0x1059d, {1|U, {0x10576}}}, + {0x1059e, {1|U, {0x10577}}}, + {0x1059f, {1|U, {0x10578}}}, + {0x105a0, {1|U, {0x10579}}}, + {0x105a1, {1|U, {0x1057a}}}, + {0x105a3, {1|U, {0x1057c}}}, + {0x105a4, {1|U, {0x1057d}}}, + {0x105a5, {1|U, {0x1057e}}}, + {0x105a6, {1|U, {0x1057f}}}, + {0x105a7, {1|U, {0x10580}}}, + {0x105a8, {1|U, {0x10581}}}, + {0x105a9, {1|U, {0x10582}}}, + {0x105aa, {1|U, {0x10583}}}, + {0x105ab, {1|U, {0x10584}}}, + {0x105ac, {1|U, {0x10585}}}, + {0x105ad, {1|U, {0x10586}}}, + {0x105ae, {1|U, {0x10587}}}, + {0x105af, {1|U, {0x10588}}}, + {0x105b0, {1|U, {0x10589}}}, + {0x105b1, {1|U, {0x1058a}}}, + {0x105b3, {1|U, {0x1058c}}}, + {0x105b4, {1|U, {0x1058d}}}, + {0x105b5, {1|U, {0x1058e}}}, + {0x105b6, {1|U, {0x1058f}}}, + {0x105b7, {1|U, {0x10590}}}, + {0x105b8, {1|U, {0x10591}}}, + {0x105b9, {1|U, {0x10592}}}, + {0x105bb, {1|U, {0x10594}}}, + {0x105bc, {1|U, {0x10595}}}, {0x10cc0, {1|U, {0x10c80}}}, {0x10cc1, {1|U, {0x10c81}}}, {0x10cc2, {1|U, {0x10c82}}}, @@ -5059,14 +5163,14 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = { {0x1e941, {1|U, {0x1e91f}}}, {0x1e942, {1|U, {0x1e920}}}, {0x1e943, {1|U, {0x1e921}}}, -#define CaseUnfold_11_Locale (*(CaseUnfold_11_Type (*)[1])(CaseUnfold_11_Table+1352)) +#define CaseUnfold_11_Locale (*(CaseUnfold_11_Type (*)[1])(CaseUnfold_11_Table+1395)) {0x0069, {1|U, {0x0049}}}, }; /* ANSI-C code produced by gperf version 3.1 */ /* Command-line: gperf -7 -k1,2,3 -F,-1 -c -j1 -i1 -t -T -E -C -H onigenc_unicode_CaseUnfold_11_hash -N onigenc_unicode_CaseUnfold_11_lookup -n */ -/* maximum key range = 2507, duplicates = 0 */ +/* maximum key range = 2771, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -5081,26 +5185,26 @@ onigenc_unicode_CaseUnfold_11_hash(const OnigCodePoint code) { static const unsigned short asso_values[] = { - 1, 2510, 2, 7, 4, 582, 9, 308, 197, 674, - 297, 20, 2, 3, 303, 351, 2510, 2510, 2510, 2510, - 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 2510, 112, - 2510, 2510, 2510, 2510, 2510, 2510, 2510, 120, 2510, 2510, - 2510, 2510, 2510, 1, 2510, 2510, 2510, 2510, 2510, 2510, - 2510, 2510, 2510, 278, 2510, 2510, 2510, 2510, 2510, 2510, - 2510, 2510, 12, 1, 7, 8, 218, 878, 222, 1178, - 480, 1102, 54, 1340, 151, 1615, 8, 15, 106, 1607, - 225, 854, 87, 490, 44, 1351, 5, 1281, 3, 1470, - 11, 1215, 377, 10, 441, 599, 152, 1642, 127, 1334, - 702, 841, 594, 827, 123, 916, 146, 1118, 117, 1363, - 254, 812, 249, 1096, 1630, 945, 437, 745, 1600, 718, - 1593, 704, 152, 1005, 383, 1064, 1493, 975, 236, 676, - 761, 579, 1017, 557, 1241, 628, 1195, 614, 1506, 464, - 1576, 535, 1432, 513, 1159, 423, 1026, 276, 1460, 291, - 1453, 392, 1263, 201, 1442, 85, 1412, 70, 1430, 100, - 1632, 129, 1410, 1, 1386, 25, 1373, 35, 656, 55, - 1188, 45, 1308, 160, 687, 227, 355, 175, 1201, 328, - 1030, 367, 1483, 414, 1479, 1166, 1418, 783, 994, 937, - 1083, 959, 1463, 967 + 1, 2774, 2, 2, 4, 421, 9, 371, 231, 463, + 37, 20, 2, 3, 419, 408, 2774, 2774, 2774, 2774, + 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 112, + 2774, 2774, 2774, 2774, 2774, 2774, 2774, 120, 2774, 2774, + 2774, 2774, 2774, 1, 2774, 2774, 2774, 2774, 2774, 2774, + 2774, 2774, 2774, 355, 2774, 2774, 2774, 2774, 2774, 2774, + 2774, 2774, 10, 9, 7, 8, 244, 689, 226, 993, + 561, 710, 104, 1429, 36, 1190, 28, 15, 114, 1768, + 241, 1003, 87, 285, 26, 1399, 78, 1360, 7, 1455, + 90, 1076, 113, 10, 724, 1460, 167, 1727, 155, 1040, + 67, 754, 66, 705, 246, 886, 331, 1140, 430, 1251, + 864, 768, 643, 1064, 1591, 865, 834, 720, 1700, 671, + 1581, 657, 1794, 842, 1782, 1050, 1537, 1024, 1760, 814, + 975, 440, 1187, 407, 1440, 951, 1384, 909, 1320, 555, + 1567, 541, 1723, 525, 383, 501, 1179, 250, 1596, 342, + 1575, 352, 1501, 194, 1559, 70, 1512, 85, 1509, 129, + 467, 100, 1413, 1, 1485, 25, 1351, 35, 1088, 55, + 1262, 45, 1277, 160, 1245, 317, 118, 220, 1300, 596, + 1100, 373, 1632, 617, 1337, 1236, 1500, 1152, 148, 793, + 1538, 979, 385, 1228 }; return asso_values[bits_of(code, 2)+66] + asso_values[bits_of(code, 1)+4] + asso_values[bits_of(code, 0)]; } @@ -5112,11 +5216,11 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) { MIN_CODE_VALUE = 0x61, MAX_CODE_VALUE = 0x1e943, - TOTAL_KEYWORDS = 1353, + TOTAL_KEYWORDS = 1396, MIN_WORD_LENGTH = 3, MAX_WORD_LENGTH = 3, MIN_HASH_VALUE = 3, - MAX_HASH_VALUE = 2509 + MAX_HASH_VALUE = 2773 }; static const short wordlist[] = @@ -5127,11 +5231,11 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) /*0x04e1*/ 400, /*0x0061*/ 0, -1, - /*0x104e1*/ 1176, + /*0x104e1*/ 1184, /*0x1e61*/ 661, /*0x1ee1*/ 720, /*0x0161*/ 102, - /*0x2ce1*/ 952, + /*0x2ce1*/ 953, -1, /*0x049b*/ 365, -1, -1, @@ -5139,28 +5243,28 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) /*0x1e1b*/ 626, /*0x048b*/ 357, /*0x011b*/ 69, - /*0x2c9b*/ 917, + /*0x2c9b*/ 918, /*0x03e1*/ 280, /*0x1e0b*/ 618, /*0x1e8b*/ 682, /*0x010b*/ 61, - /*0x2c8b*/ 909, + /*0x2c8b*/ 910, /*0x13e3*/ 591, /*0x0463*/ 341, /*0x04e3*/ 401, /*0x0063*/ 2, -1, - /*0x104e3*/ 1178, + /*0x104e3*/ 1186, /*0x1e63*/ 662, /*0x1ee3*/ 721, /*0x0163*/ 103, - /*0x2ce3*/ 953, + /*0x2ce3*/ 954, /*0x13e5*/ 593, /*0x0465*/ 342, /*0x04e5*/ 402, /*0x0065*/ 4, /*0x24e3*/ 842, - /*0x104e5*/ 1180, + /*0x104e5*/ 1188, /*0x1e65*/ 663, /*0x1ee5*/ 722, /*0x0165*/ 104, @@ -5168,9 +5272,9 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) /*0x13e9*/ 597, /*0x0469*/ 344, /*0x04e9*/ 404, - /*0x0069*/ 1352, + /*0x0069*/ 1395, /*0x24e5*/ 844, - /*0x104e9*/ 1184, + /*0x104e9*/ 1192, /*0x1e69*/ 665, /*0x1ee9*/ 724, /*0x0169*/ 106, @@ -5180,1764 +5284,1865 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) /*0x04e7*/ 403, /*0x0067*/ 6, /*0x24e9*/ 848, - /*0x104e7*/ 1182, + /*0x104e7*/ 1190, /*0x1e67*/ 664, /*0x1ee7*/ 723, /*0x0167*/ 105, /*0x03e9*/ 284, - -1, -1, -1, -1, - /*0x24e7*/ 846, - /*0x13db*/ 583, - /*0x045b*/ 335, - /*0x04db*/ 397, -1, - /*0x03e7*/ 283, - /*0x104db*/ 1170, - /*0x1e5b*/ 658, - /*0x1edb*/ 717, - /*0x015b*/ 99, - /*0x2cdb*/ 949, - -1, -1, -1, -1, - /*0x24db*/ 834, + /*0x13a4*/ 528, + /*0x13a2*/ 526, + -1, + /*0x24e7*/ 846, /*0x13d9*/ 581, /*0x0459*/ 333, /*0x04d9*/ 396, - /*0xa761*/ 1064, - /*0x03db*/ 277, - /*0x104d9*/ 1168, + -1, + /*0x03e7*/ 283, + /*0x104d9*/ 1176, /*0x1e59*/ 657, /*0x1ed9*/ 716, /*0x0159*/ 98, - /*0x2cd9*/ 948, + /*0x2cd9*/ 949, -1, -1, -1, -1, /*0x24d9*/ 832, - /*0x13dd*/ 585, - /*0x045d*/ 337, - /*0x04dd*/ 398, - -1, + /*0x13db*/ 583, + /*0x045b*/ 335, + /*0x04db*/ 397, + /*0xa761*/ 1065, /*0x03d9*/ 276, - /*0x104dd*/ 1172, - /*0x1e5d*/ 659, - /*0x1edd*/ 718, - /*0x015d*/ 100, - /*0x2cdd*/ 950, - -1, -1, - /*0xa763*/ 1065, - -1, - /*0x24dd*/ 836, - /*0x10ce1*/ 1236, - -1, - /*0x13aa*/ 534, - -1, - /*0x03dd*/ 278, - /*0x10e1*/ 495, - /*0x1042a*/ 1129, - /*0xa765*/ 1066, - /*0x13a6*/ 530, - -1, -1, -1, - /*0x13a0*/ 524, - -1, + /*0x104db*/ 1178, + /*0x1e5b*/ 658, + /*0x1edb*/ 717, + /*0x015b*/ 99, + /*0x2cdb*/ 950, + -1, -1, -1, -1, + /*0x24db*/ 834, /*0x13df*/ 587, /*0x045f*/ 339, /*0x04df*/ 399, - /*0xa769*/ 1068, -1, - /*0x104df*/ 1174, + /*0x03db*/ 277, + /*0x104df*/ 1182, /*0x1e5f*/ 660, /*0x1edf*/ 719, /*0x015f*/ 101, - /*0x2cdf*/ 951, - /*0x10ce3*/ 1238, + /*0x2cdf*/ 952, -1, -1, - /*0xa767*/ 1067, + /*0xa763*/ 1066, + /*0x2c61*/ 897, /*0x24df*/ 838, - /*0x10e3*/ 497, + /*0x10ce1*/ 1279, + -1, -1, + /*0x13ee*/ 602, + /*0x03df*/ 279, + /*0x10e1*/ 495, + /*0x006e*/ 12, + /*0xa765*/ 1067, + /*0x104ee*/ 1197, + -1, -1, -1, + /*0x2cee*/ 956, -1, - /*0x13a8*/ 532, + /*0x13dd*/ 585, + /*0x045d*/ 337, + /*0x04dd*/ 398, + /*0xa769*/ 1069, -1, - /*0x03df*/ 279, - /*0x10ce5*/ 1240, - /*0x10428*/ 1127, + /*0x104dd*/ 1180, + /*0x1e5d*/ 659, + /*0x1edd*/ 718, + /*0x015d*/ 100, + /*0x2cdd*/ 951, + /*0x10ce3*/ 1281, + -1, -1, + /*0xa767*/ 1068, + /*0x24dd*/ 836, + /*0x10e3*/ 497, + -1, -1, + /*0x2c65*/ 898, + /*0x03dd*/ 278, + /*0x10ce5*/ 1283, -1, - /*0x13b8*/ 548, - /*0x0438*/ 300, - /*0x10e5*/ 499, + /*0x007a*/ 24, -1, - /*0x10438*/ 1143, - /*0xa75b*/ 1061, + /*0x104fa*/ 1209, + /*0x10e5*/ 499, + /*0x13a0*/ 524, + /*0x017a*/ 114, + /*0xa759*/ 1061, -1, - /*0x10ce9*/ 1244, + /*0x10ce9*/ 1287, /*0x13eb*/ 599, /*0x046b*/ 345, /*0x04eb*/ 405, /*0x006b*/ 9, /*0x10e9*/ 503, - /*0x104eb*/ 1186, + /*0x104eb*/ 1194, /*0x1e6b*/ 666, /*0x1eeb*/ 725, /*0x016b*/ 107, - /*0x10ce7*/ 1242, - -1, - /*0x03b8*/ 253, - /*0xa759*/ 1060, + /*0x10ce7*/ 1285, + -1, -1, + /*0xa75b*/ 1062, -1, /*0x10e7*/ 501, - /*0x13ef*/ 603, - /*0x046f*/ 347, - /*0x04ef*/ 407, - /*0x006f*/ 13, + -1, -1, -1, -1, /*0x03eb*/ 285, - /*0x104ef*/ 1190, - /*0x1e6f*/ 668, - /*0x1eef*/ 727, - /*0x016f*/ 109, - /*0x10cdb*/ 1230, -1, -1, - /*0xa75d*/ 1062, + /*0x2c59*/ 890, -1, - /*0x10db*/ 489, - -1, -1, -1, -1, - /*0x03ef*/ 287, + /*0x10cd9*/ 1271, -1, -1, - /*0x0261*/ 210, - -1, - /*0x10cd9*/ 1228, + /*0xa75f*/ 1064, -1, + /*0x10d9*/ 487, + -1, -1, -1, -1, /*0x13d7*/ 579, /*0x0457*/ 331, /*0x04d7*/ 395, - /*0x10d9*/ 487, + /*0x2c5b*/ 892, -1, - /*0x021b*/ 178, + /*0x10cdb*/ 1273, /*0x1e57*/ 656, /*0x1ed7*/ 715, /*0x0157*/ 97, - /*0x2cd7*/ 947, - /*0x020b*/ 170, - -1, -1, - /*0x10cdd*/ 1232, + /*0x2cd7*/ 948, + /*0x10db*/ 489, + -1, -1, -1, /*0x24d7*/ 830, - /*0xa75f*/ 1063, - -1, - /*0x1f61*/ 777, - /*0x10dd*/ 491, + -1, -1, -1, + /*0x2c5f*/ 896, /*0x03d7*/ 275, - /*0x0263*/ 211, - /*0x1f14*/ 748, - -1, -1, - /*0x1d8e*/ 612, - /*0xa661*/ 1013, - /*0x13ed*/ 601, - /*0x046d*/ 346, - /*0x04ed*/ 406, - /*0x006d*/ 11, - /*0x0265*/ 212, - /*0x104ed*/ 1188, - /*0x1e6d*/ 667, - /*0x1eed*/ 726, - /*0x016d*/ 108, - /*0x13be*/ 554, - /*0x043e*/ 306, - -1, -1, - /*0x1043e*/ 1149, - /*0x0269*/ 215, - /*0x1f63*/ 779, - /*0x10cdf*/ 1234, - /*0x013e*/ 85, + /*0x10cdf*/ 1277, -1, - /*0x03ed*/ 286, - /*0xa76b*/ 1069, + /*0xa75d*/ 1063, + -1, -1, /*0x10df*/ 493, - /*0x13ae*/ 538, - /*0xa663*/ 1014, + /*0x13ef*/ 603, + /*0x046f*/ 347, + /*0x04ef*/ 407, + /*0x006f*/ 13, -1, - /*0x1f65*/ 781, - /*0x1042e*/ 1133, - /*0x13ac*/ 536, - /*0x03be*/ 259, + /*0x104ef*/ 1198, + /*0x1e6f*/ 668, + /*0x1eef*/ 727, + /*0x016f*/ 109, -1, -1, - /*0x1042c*/ 1131, - -1, - /*0xa665*/ 1015, - /*0x1f12*/ 746, - /*0xa76f*/ 1071, - -1, -1, -1, - /*0x025b*/ 207, - -1, - /*0x03ae*/ 244, + /*0x0261*/ 210, + /*0x10cee*/ 1292, + -1, -1, + /*0xa77a*/ 1073, -1, - /*0xa669*/ 1017, - /*0x1f06*/ 742, - /*0x1f67*/ 783, - /*0x03ac*/ 242, - /*0x10ceb*/ 1246, + /*0x10ee*/ 508, -1, + /*0x03ef*/ 287, + /*0x021b*/ 178, + /*0x2c5d*/ 894, + /*0xa661*/ 1014, + /*0x10cdd*/ 1275, + /*0x1f61*/ 777, + /*0x020b*/ 170, + /*0x13a6*/ 530, + /*0xa76b*/ 1070, + /*0x10dd*/ 491, + /*0x1d8e*/ 612, /*0x13d1*/ 573, /*0x0451*/ 325, /*0x04d1*/ 392, - /*0x10eb*/ 505, - /*0xa667*/ 1016, - /*0x0259*/ 206, + -1, -1, + /*0x0263*/ 211, /*0x1e51*/ 653, /*0x1ed1*/ 712, /*0x0151*/ 94, - /*0x2cd1*/ 944, - -1, -1, - /*0xa757*/ 1059, - /*0x10cef*/ 1250, + /*0x2cd1*/ 945, + -1, -1, -1, -1, /*0x24d1*/ 824, - /*0x13d3*/ 575, - /*0x0453*/ 327, - /*0x04d3*/ 393, - /*0x10ef*/ 509, - /*0xa65b*/ 1010, - -1, - /*0x1e53*/ 654, - /*0x1ed3*/ 713, - /*0x0153*/ 95, - /*0x2cd3*/ 945, + /*0x0265*/ 212, + /*0xa663*/ 1015, + /*0x10fa*/ 520, + /*0x1f63*/ 779, + /*0x1f12*/ 746, + -1, -1, -1, -1, + /*0x10ceb*/ 1289, + /*0x0269*/ 215, + /*0xa665*/ 1016, -1, - /*0xab53*/ 1100, - /*0x0561*/ 440, - /*0x1f10*/ 744, - /*0x24d3*/ 826, - -1, -1, - /*0x01e1*/ 151, + /*0x1f65*/ 781, + /*0x10eb*/ 505, -1, - /*0xa659*/ 1009, + /*0xa757*/ 1060, + -1, -1, -1, -1, + /*0xa669*/ 1018, + /*0x0491*/ 360, + -1, -1, -1, + /*0x1e11*/ 621, + /*0x1e91*/ 685, + /*0x0111*/ 64, + /*0x2c91*/ 913, + /*0xa79b*/ 1086, + /*0xa667*/ 1017, -1, - /*0x051b*/ 429, + /*0x1f67*/ 783, -1, - /*0xa76d*/ 1070, - /*0x10cd7*/ 1226, + /*0x0259*/ 206, + -1, -1, -1, -1, -1, + /*0x2c57*/ 888, + /*0xa76f*/ 1072, + /*0x10cd7*/ 1269, + /*0x1f24*/ 754, + /*0x1f22*/ 752, + /*0xa659*/ 1010, -1, - /*0x050b*/ 421, - -1, -1, /*0x10d7*/ 485, - -1, -1, -1, -1, - /*0xa65d*/ 1011, -1, - /*0x0563*/ 442, - /*0x13f1*/ 605, - /*0x0471*/ 348, - /*0x04f1*/ 408, - /*0x0071*/ 15, - /*0x01e3*/ 152, - /*0x104f1*/ 1192, - /*0x1e71*/ 669, - /*0x1ef1*/ 728, - /*0x0171*/ 110, - /*0x0565*/ 444, + /*0x025b*/ 207, + -1, + /*0x13ed*/ 601, + /*0x046d*/ 346, + /*0x04ed*/ 406, + /*0x006d*/ 11, + /*0x1f14*/ 748, + /*0x104ed*/ 1196, + /*0x1e6d*/ 667, + /*0x1eed*/ 726, + /*0x016d*/ 108, + /*0xa65b*/ 1011, + -1, -1, -1, + /*0x1f10*/ 744, + /*0x13a8*/ 532, -1, -1, - /*0x1f26*/ 756, - /*0x10ced*/ 1248, - /*0x01e5*/ 153, + /*0x10cef*/ 1293, + /*0x10428*/ 1135, + /*0x03ed*/ 286, + /*0xa751*/ 1057, -1, - /*0x1f20*/ 750, + /*0x10ef*/ 509, -1, - /*0x10ed*/ 507, - /*0x0569*/ 448, + /*0xa65f*/ 1013, + /*0x13d3*/ 575, + /*0x0453*/ 327, + /*0x04d3*/ 393, -1, -1, - /*0x118db*/ 1281, - /*0x0192*/ 122, - /*0x01e9*/ 155, - -1, - /*0xa65f*/ 1012, - /*0x13ee*/ 602, - /*0x026b*/ 217, - /*0x0567*/ 446, - /*0x006e*/ 12, + /*0x1f06*/ 742, + /*0x1e53*/ 654, + /*0x1ed3*/ 713, + /*0x0153*/ 95, + /*0x2cd3*/ 946, + /*0x13d5*/ 577, + /*0x0455*/ 329, + /*0x04d5*/ 394, + /*0xa7d9*/ 1106, + /*0x24d3*/ 826, -1, - /*0x104ee*/ 1189, + /*0x1e55*/ 655, + /*0x1ed5*/ 714, + /*0x0155*/ 96, + /*0x2cd5*/ 947, + /*0x2c51*/ 882, + /*0xa794*/ 1083, + /*0x10cd1*/ 1263, -1, - /*0x01e7*/ 154, - /*0xa751*/ 1056, - /*0x2cee*/ 955, - /*0x118d9*/ 1279, + /*0x24d5*/ 828, + -1, -1, + /*0x10d1*/ 479, + /*0xa65d*/ 1012, + /*0x01e1*/ 151, -1, /*0x13f3*/ 607, /*0x0473*/ 349, /*0x04f3*/ 409, /*0x0073*/ 17, - /*0x026f*/ 219, - /*0x104f3*/ 1194, + -1, + /*0x104f3*/ 1202, /*0x1e73*/ 670, /*0x1ef3*/ 729, /*0x0173*/ 111, - /*0x2cf3*/ 956, - /*0x2c61*/ 896, - /*0xa753*/ 1057, + /*0x2cf3*/ 957, + /*0x13ce*/ 570, + /*0x044e*/ 322, + /*0x04ce*/ 390, -1, - /*0x118dd*/ 1283, + /*0x1044e*/ 1173, -1, -1, - /*0x13ba*/ 550, - /*0x043a*/ 302, - /*0xa66b*/ 1018, + /*0x026b*/ 217, + /*0x1f7a*/ 794, /*0x03f3*/ 289, - /*0x1043a*/ 1145, - -1, -1, - /*0x10cd1*/ 1220, - /*0x013a*/ 83, - /*0x13d5*/ 577, - /*0x0455*/ 329, - /*0x04d5*/ 394, - /*0x10d1*/ 479, + /*0x017e*/ 116, -1, - /*0x0257*/ 205, - /*0x1e55*/ 655, - /*0x1ed5*/ 714, - /*0x0155*/ 96, - /*0x2cd5*/ 946, - /*0x03ba*/ 255, + /*0x01e3*/ 152, + /*0x0192*/ 122, -1, - /*0x0586*/ 477, - /*0x10cd3*/ 1222, - /*0x24d5*/ 828, - /*0x01dd*/ 149, + /*0x1f20*/ 750, + /*0xa78c*/ 1080, -1, - /*0x118df*/ 1285, - /*0x10d3*/ 481, - /*0x2c65*/ 897, + /*0xa66b*/ 1019, + /*0x03ce*/ 274, -1, - /*0x018c*/ 121, - /*0x13f5*/ 609, - /*0x0475*/ 350, - /*0x04f5*/ 410, - /*0x0075*/ 19, + /*0xa76d*/ 1071, + /*0x01e5*/ 153, + /*0x0188*/ 120, + /*0x13c3*/ 559, + /*0x0443*/ 311, + /*0x0373*/ 237, + -1, + /*0x10443*/ 1162, + -1, + /*0x1e43*/ 646, + /*0x1ec3*/ 705, + /*0x01e9*/ 155, + /*0x2cc3*/ 938, + -1, -1, + /*0x0561*/ 440, + /*0x1059b*/ 1215, + /*0x00e1*/ 26, + -1, -1, + /*0x0257*/ 205, + /*0x01e7*/ 154, + /*0x03c3*/ 263, + /*0x118d9*/ 1322, + /*0x051b*/ 429, + /*0xa753*/ 1058, + /*0x13aa*/ 534, + /*0x10ced*/ 1291, + /*0xab53*/ 1108, + /*0x050b*/ 421, + /*0x1042a*/ 1137, + /*0xa657*/ 1009, + /*0x10ed*/ 507, /*0x1f57*/ 775, - /*0x104f5*/ 1196, - /*0x1e75*/ 671, - /*0x1ef5*/ 730, - /*0x0175*/ 112, - /*0x13cf*/ 571, - /*0x044f*/ 323, - /*0x04cf*/ 391, - /*0xa657*/ 1008, - /*0x1044f*/ 1166, - /*0x1e92a*/ 1326, - /*0x1e4f*/ 652, - /*0x1ecf*/ 711, - /*0x014f*/ 93, - /*0x2ccf*/ 943, -1, - /*0x1e926*/ 1322, - /*0x1f00*/ 736, - /*0x01df*/ 150, - /*0x13b2*/ 542, - /*0x0432*/ 294, - /*0x1f02*/ 738, + /*0xa755*/ 1059, + /*0x13c1*/ 557, + /*0x0441*/ 309, + /*0x118db*/ 1324, + /*0x0563*/ 442, + /*0x10441*/ 1160, + /*0x00e3*/ 28, + /*0x1e41*/ 645, + /*0x1ec1*/ 704, -1, - /*0x10432*/ 1137, - /*0x10cf1*/ 1252, - /*0x2d16*/ 979, + /*0x2cc1*/ 937, + /*0x026f*/ 219, + -1, -1, + /*0x0565*/ 444, + /*0x2c53*/ 884, + /*0x00e5*/ 30, + /*0x10cd3*/ 1265, + /*0x118df*/ 1328, -1, - /*0x2d14*/ 977, - /*0x2c5b*/ 892, - /*0x10f1*/ 511, - /*0x2d0a*/ 967, + /*0x03c1*/ 262, -1, - /*0x2d1b*/ 984, - /*0x2d18*/ 981, - /*0xa66d*/ 1019, - /*0x01a8*/ 130, + /*0x10d3*/ 481, -1, - /*0x2d0b*/ 968, - /*0x03b2*/ 247, - /*0x1e928*/ 1324, - /*0x0188*/ 120, - /*0x019e*/ 126, + /*0x0569*/ 448, + /*0x2c55*/ 886, + /*0x00e9*/ 34, + /*0x10cd5*/ 1267, + /*0x13de*/ 586, + /*0x045e*/ 338, + /*0x1f02*/ 738, + /*0x01df*/ 150, + /*0x10d5*/ 483, + /*0x104de*/ 1181, + /*0x0567*/ 446, -1, - /*0x2c59*/ 890, - /*0x056b*/ 450, - /*0x1e938*/ 1340, - /*0x13c9*/ 565, - /*0x0449*/ 317, + /*0x00e7*/ 32, + /*0x105a4*/ 1223, + /*0x028b*/ 231, -1, - /*0x01eb*/ 156, - /*0x10449*/ 1160, - /*0x10cee*/ 1249, - /*0x1e49*/ 649, - /*0x1ec9*/ 708, + /*0xa7d7*/ 1105, /*0x0251*/ 200, - /*0x2cc9*/ 940, - /*0x10ee*/ 508, + /*0x24de*/ 837, -1, - /*0x2c5d*/ 894, - /*0x056f*/ 454, + /*0x019a*/ 125, + /*0x018c*/ 121, + /*0x2c73*/ 903, + /*0x118dd*/ 1326, + /*0x1f00*/ 736, + /*0x0292*/ 233, + /*0x1f26*/ 756, + /*0x028a*/ 230, + /*0xa651*/ 1006, + /*0x10f3*/ 513, + /*0x1f51*/ 772, + /*0xa743*/ 1050, + /*0x2c4e*/ 879, -1, - /*0xa755*/ 1058, + /*0x10cce*/ 1260, + /*0x0288*/ 228, + /*0x01dd*/ 149, + /*0x10598*/ 1212, + /*0x13cf*/ 571, + /*0x044f*/ 323, + /*0x04cf*/ 391, + /*0x10fe*/ 522, + /*0x1044f*/ 1174, -1, - /*0x118d7*/ 1277, - /*0x01ef*/ 158, - /*0x03c9*/ 269, - /*0x2d12*/ 975, + /*0x1e4f*/ 652, + /*0x1ecf*/ 711, + /*0x014f*/ 93, + /*0x2ccf*/ 944, + /*0x0586*/ 477, -1, - /*0x10f3*/ 513, - /*0x0253*/ 202, - -1, -1, -1, -1, - /*0x0491*/ 360, - /*0x1f51*/ 772, - /*0x2d06*/ 963, - /*0xa794*/ 1082, - /*0x1e11*/ 621, - /*0x1e91*/ 685, - /*0x0111*/ 64, - /*0x2c91*/ 912, - /*0xa79b*/ 1085, - /*0xa651*/ 1005, - -1, -1, -1, -1, - /*0x10cd5*/ 1224, + /*0x1e924*/ 1363, + /*0x1e922*/ 1361, + /*0x0211*/ 173, + -1, -1, -1, + /*0x2c43*/ 868, -1, - /*0x1f53*/ 773, + /*0x10cc3*/ 1249, -1, - /*0xa74f*/ 1055, - /*0x10d5*/ 483, + /*0x1059a*/ 1214, -1, /*0x13cd*/ 569, /*0x044d*/ 321, - -1, - /*0xa653*/ 1006, - /*0x1044d*/ 1164, - -1, + /*0xa741*/ 1049, + /*0x1f11*/ 745, + /*0x1044d*/ 1172, + /*0x01eb*/ 156, /*0x1e4d*/ 651, /*0x1ecd*/ 710, /*0x014d*/ 92, - /*0x2ccd*/ 942, - -1, - /*0x0271*/ 220, - /*0x0180*/ 117, - -1, - /*0x2d10*/ 973, - /*0x2c38*/ 857, - /*0x056d*/ 452, + /*0x2ccd*/ 943, + /*0xa7d1*/ 1104, + /*0x056e*/ 453, + /*0x019e*/ 126, + /*0x00ee*/ 39, -1, -1, - /*0x03cd*/ 273, - /*0x10f5*/ 515, - /*0x01ed*/ 157, /*0x13cb*/ 567, /*0x044b*/ 319, - /*0x10ccf*/ 1218, -1, - /*0x1044b*/ 1162, + /*0x03cd*/ 273, + /*0x1044b*/ 1170, -1, /*0x1e4b*/ 650, /*0x1ecb*/ 709, /*0x014b*/ 91, - /*0x2ccb*/ 941, - /*0x1f71*/ 785, - /*0x2d0c*/ 969, - /*0x1e93e*/ 1346, - -1, -1, -1, - /*0xa749*/ 1052, - -1, -1, - /*0x03cb*/ 271, - -1, - /*0x118d1*/ 1271, - /*0x13c3*/ 559, - /*0x0443*/ 311, - -1, - /*0x1e92e*/ 1330, - /*0x10443*/ 1154, - -1, - /*0x1e43*/ 646, - /*0x1ec3*/ 705, - /*0x1e92c*/ 1328, - /*0x2cc3*/ 937, - /*0x2d20*/ 989, - /*0x0580*/ 471, - -1, -1, - /*0x118d3*/ 1273, - /*0x0582*/ 473, - -1, -1, -1, - /*0x03c3*/ 263, - /*0x2c57*/ 888, - /*0x10cc9*/ 1212, - /*0x13c1*/ 557, - /*0x0441*/ 309, - -1, - /*0x00e1*/ 26, - /*0x10441*/ 1152, - /*0x1f73*/ 787, - /*0x1e41*/ 645, - /*0x1ec1*/ 704, - -1, - /*0x2cc1*/ 936, - -1, -1, - /*0x2d08*/ 965, - /*0x2d1e*/ 987, - -1, - /*0x13a4*/ 528, - -1, - /*0xa78c*/ 1079, - -1, - /*0x03c1*/ 262, + /*0x2ccb*/ 942, + /*0x118d7*/ 1320, + /*0x2c41*/ 866, -1, - /*0xa74d*/ 1054, - /*0x049d*/ 366, - -1, -1, -1, - /*0x1e1d*/ 627, - /*0x00e3*/ 28, - /*0x011d*/ 70, - /*0x2c9d*/ 918, - /*0x1f55*/ 774, - /*0x0275*/ 222, + /*0x10cc1*/ 1247, + /*0x13c9*/ 565, + /*0x0449*/ 317, -1, - /*0x2c3e*/ 863, + /*0xa66d*/ 1020, + /*0x10449*/ 1168, + /*0x03cb*/ 271, + /*0x1e49*/ 649, + /*0x1ec9*/ 708, -1, - /*0x13c7*/ 563, - /*0x0447*/ 315, - /*0x00e5*/ 30, - /*0xa655*/ 1007, - /*0x10447*/ 1158, - /*0x024f*/ 198, - /*0x1e47*/ 648, - /*0x1ec7*/ 707, - /*0xa74b*/ 1053, - /*0x2cc7*/ 939, - /*0x0371*/ 236, + /*0x2cc9*/ 941, + /*0x105a0*/ 1220, + /*0x057a*/ 465, -1, - /*0x00e9*/ 34, - /*0x10ccd*/ 1216, - /*0x13c5*/ 561, - /*0x0445*/ 313, - /*0x0571*/ 456, - /*0x1f75*/ 789, - /*0x10445*/ 1156, - /*0x03c7*/ 267, - /*0x1e45*/ 647, - /*0x1ec5*/ 706, - /*0x00e7*/ 32, - /*0x2cc5*/ 938, - -1, -1, -1, -1, -1, -1, - /*0xa743*/ 1049, - -1, -1, - /*0x03c5*/ 265, - /*0xa64f*/ 1004, - /*0x10ccb*/ 1214, - -1, -1, - /*0x2c51*/ 882, + /*0x00fa*/ 50, -1, - /*0x1f32*/ 760, + /*0xa791*/ 1081, -1, - /*0x13e6*/ 594, - /*0x056e*/ 453, - /*0x2d00*/ 957, - /*0x0066*/ 5, - /*0x0249*/ 195, - /*0x104e6*/ 1181, - /*0x2d02*/ 959, - /*0x0373*/ 237, + /*0x0253*/ 202, -1, - /*0x2d0e*/ 971, - /*0xa741*/ 1048, - /*0x2c53*/ 884, + /*0x03c9*/ 269, -1, - /*0x0573*/ 458, - /*0x24e6*/ 845, - /*0x10cc3*/ 1206, - /*0x118d5*/ 1275, + /*0x028c*/ 232, + /*0x1059e*/ 1218, + /*0x056b*/ 450, + /*0x2c5e*/ 895, + /*0x00eb*/ 36, + /*0x10cde*/ 1276, -1, - /*0x01f3*/ 159, + /*0xa653*/ 1007, -1, - /*0x13bf*/ 555, - /*0x043f*/ 307, - /*0x04bf*/ 383, + /*0x1f53*/ 773, + /*0x10de*/ 492, + /*0x16e61*/ 1330, + /*0xa74f*/ 1056, -1, - /*0x1043f*/ 1150, - /*0x028a*/ 230, - /*0x1e3f*/ 644, - /*0x1ebf*/ 703, - /*0x019a*/ 125, - /*0x2cbf*/ 935, - /*0x0211*/ 173, - /*0x13ec*/ 600, - /*0x028b*/ 231, - /*0xa649*/ 1001, - /*0x006c*/ 10, + /*0x01ef*/ 158, + -1, -1, + /*0xa655*/ 1008, -1, - /*0x104ec*/ 1187, - /*0x10cc1*/ 1204, - /*0x1e93a*/ 1342, - /*0x03bf*/ 260, - /*0x2cec*/ 954, - /*0x1f04*/ 740, + /*0x1f55*/ 774, + /*0x13f1*/ 605, + /*0x0471*/ 348, + /*0x04f1*/ 408, + /*0x0071*/ 15, + -1, + /*0x104f1*/ 1200, + /*0x1e71*/ 669, + /*0x1ef1*/ 728, + /*0x0171*/ 110, + -1, -1, + /*0x118d1*/ 1314, -1, -1, -1, - /*0xa747*/ 1051, - /*0x13a2*/ 526, - /*0x118cf*/ 1269, + /*0x16e63*/ 1332, + /*0xa74d*/ 1055, + /*0x2c4f*/ 880, + /*0x0180*/ 117, + /*0x10ccf*/ 1261, + /*0x1f73*/ 787, + /*0x13f5*/ 609, + /*0x0475*/ 350, + /*0x04f5*/ 410, + /*0x0075*/ 19, + /*0x16e65*/ 1334, + /*0x104f5*/ 1204, + /*0x1e75*/ 671, + /*0x1ef5*/ 730, + /*0x0175*/ 112, + -1, -1, + /*0xa74b*/ 1054, + /*0x029e*/ 235, + -1, + /*0x16e69*/ 1338, + /*0x0371*/ 236, + /*0x0582*/ 473, + -1, -1, -1, + /*0x2c4d*/ 878, + /*0x056f*/ 454, + /*0x10ccd*/ 1259, + /*0x00ef*/ 40, + /*0x16e67*/ 1336, + /*0xa749*/ 1053, + /*0x13ae*/ 538, + -1, -1, -1, + /*0x1042e*/ 1141, + /*0xa643*/ 999, + -1, + /*0x1f43*/ 769, + /*0x0580*/ 471, + -1, + /*0x2c4b*/ 876, + -1, + /*0x10ccb*/ 1257, + /*0x105a6*/ 1225, /*0x13b7*/ 547, /*0x0437*/ 299, /*0x04b7*/ 379, - /*0x1f11*/ 745, - /*0x10437*/ 1142, - /*0x024d*/ 197, + -1, + /*0x10437*/ 1150, + /*0x03ae*/ 244, /*0x1e37*/ 640, /*0x1eb7*/ 699, /*0x0137*/ 82, - /*0x2cb7*/ 931, + /*0x2cb7*/ 932, + /*0x2c49*/ 874, + -1, + /*0x10cc9*/ 1255, -1, - /*0xa745*/ 1050, - /*0x0575*/ 460, - /*0x0292*/ 233, /*0x13b5*/ 545, /*0x0435*/ 297, /*0x04b5*/ 378, - /*0x01f5*/ 160, - /*0x10435*/ 1140, + -1, + /*0x10435*/ 1148, /*0x03b7*/ 252, /*0x1e35*/ 639, /*0x1eb5*/ 698, /*0x0135*/ 81, - /*0x2cb5*/ 930, - /*0x10cc7*/ 1210, - -1, -1, - /*0x024b*/ 196, + /*0x2cb5*/ 931, + /*0xa641*/ 998, -1, - /*0x16e61*/ 1287, + /*0x1f41*/ 767, -1, -1, -1, + /*0x01ed*/ 157, + /*0x0282*/ 225, + /*0x1fe1*/ 803, /*0x03b5*/ 250, - /*0xa64d*/ 1003, - -1, -1, - /*0x00eb*/ 36, - /*0x10cc5*/ 1208, - /*0x2c73*/ 902, - /*0x118c9*/ 1263, + /*0x0481*/ 356, + /*0xa7c3*/ 1101, + /*0x1e926*/ 1365, + -1, + /*0x1e01*/ 613, + /*0x1e81*/ 677, + /*0x0101*/ 56, + /*0x2c81*/ 905, + /*0x118d3*/ 1316, + -1, + /*0x01a8*/ 130, + -1, + /*0x0511*/ 424, + /*0x16e6e*/ 1343, + /*0x13a5*/ 529, + /*0x0280*/ 224, + /*0x04a5*/ 370, + /*0x217a*/ 816, + /*0x118d5*/ 1318, + /*0x10cf1*/ 1295, + /*0x1e25*/ 631, + /*0x1ea5*/ 690, + /*0x0125*/ 74, + /*0x2ca5*/ 923, + /*0x10f1*/ 511, + /*0x1e05*/ 615, + /*0x1e85*/ 679, + /*0x0105*/ 58, + /*0x2c85*/ 907, /*0x13b3*/ 543, /*0x0433*/ 295, /*0x04b3*/ 377, - /*0x1e932*/ 1334, - /*0x10433*/ 1138, - -1, + /*0x1fe5*/ 804, + /*0x10433*/ 1146, + /*0xa7c1*/ 1100, /*0x1e33*/ 638, /*0x1eb3*/ 697, /*0x0133*/ 80, - /*0x2cb3*/ 929, - -1, - /*0x00ef*/ 40, - /*0x16e63*/ 1289, + /*0x2cb3*/ 930, + /*0x2d16*/ 980, + /*0x024f*/ 198, -1, - /*0x2c3a*/ 859, - /*0xa64b*/ 1002, - /*0x13c0*/ 556, - /*0x0440*/ 308, - /*0xa73f*/ 1047, + /*0x2d1b*/ 985, + /*0x16e7a*/ 1355, + /*0x056d*/ 452, + /*0x10f5*/ 515, + /*0x00ed*/ 38, + /*0x2d0b*/ 969, /*0x03b3*/ 248, - /*0x10440*/ 1151, + /*0x118ce*/ 1311, + /*0x105a8*/ 1227, + /*0xa64f*/ 1005, + /*0x01f3*/ 159, + /*0xa737*/ 1044, -1, - /*0x16e65*/ 1291, - /*0x2c55*/ 886, - /*0x0140*/ 86, - /*0x10ce6*/ 1241, - /*0x01c9*/ 139, + /*0x16e6b*/ 1340, -1, -1, - /*0x1f43*/ 769, - /*0x10e6*/ 500, + /*0x2d12*/ 976, -1, - /*0x16e69*/ 1295, - -1, - /*0x028c*/ 232, - /*0x03c0*/ 261, + /*0x2d0a*/ 968, -1, - /*0xa643*/ 998, + /*0x01ce*/ 141, + /*0x13a3*/ 527, + /*0x024d*/ 197, + /*0x04a3*/ 369, -1, - /*0x0479*/ 352, - /*0x04f9*/ 412, - /*0x0079*/ 23, - /*0x16e67*/ 1293, - /*0x104f9*/ 1200, - /*0x1e79*/ 673, - /*0x1ef9*/ 732, - /*0xa737*/ 1043, - /*0x0511*/ 424, - /*0x118cd*/ 1267, - /*0x1d79*/ 610, - /*0x021d*/ 179, - /*0x1f41*/ 767, - -1, -1, - /*0x2c4f*/ 880, + /*0xa735*/ 1043, + /*0x2d08*/ 966, + /*0x1e23*/ 630, + /*0x1ea3*/ 689, + /*0x0123*/ 73, + /*0x2ca3*/ 922, + /*0x118c3*/ 1300, -1, - /*0x10cec*/ 1247, - -1, -1, - /*0xa641*/ 997, - /*0xa735*/ 1042, - /*0x10ec*/ 506, - /*0x2171*/ 807, - /*0x00ed*/ 38, + /*0xa64d*/ 1004, -1, - /*0x0247*/ 194, - /*0x1f24*/ 754, /*0x13ad*/ 537, - /*0x2c32*/ 851, + /*0x2c37*/ 856, /*0x04ad*/ 374, - /*0x118cb*/ 1265, - /*0x1042d*/ 1132, - /*0x2d1a*/ 983, + /*0x024b*/ 196, + /*0x1042d*/ 1140, + -1, /*0x1e2d*/ 635, /*0x1ead*/ 694, /*0x012d*/ 78, - /*0x2cad*/ 926, - -1, -1, - /*0x0288*/ 228, - /*0x029e*/ 235, + /*0x2cad*/ 927, + /*0x1e928*/ 1367, + -1, -1, -1, + /*0xa64b*/ 1003, + /*0x2c35*/ 854, -1, - /*0x13a5*/ 529, + /*0x0249*/ 195, -1, - /*0x04a5*/ 370, - /*0x0584*/ 475, /*0x03ad*/ 243, - /*0xa733*/ 1041, - /*0x1e25*/ 631, - /*0x1ea5*/ 690, - /*0x0125*/ 74, - /*0x2ca5*/ 922, - /*0x118c3*/ 1257, - -1, - /*0xa647*/ 1000, - /*0x2c49*/ 874, - /*0x13a3*/ 527, -1, - /*0x04a3*/ 369, - -1, - /*0x1f45*/ 771, - /*0x2173*/ 809, - /*0x1e23*/ 630, - /*0x1ea3*/ 689, - /*0x0123*/ 73, - /*0x2ca3*/ 921, - /*0xff59*/ 1125, - /*0x0266*/ 213, - /*0xa645*/ 999, - -1, -1, - /*0x048f*/ 359, - -1, -1, - /*0x118c1*/ 1255, - /*0x1e0f*/ 620, - /*0x1e8f*/ 684, - /*0x010f*/ 63, - /*0x2c8f*/ 911, - /*0xa69b*/ 1033, - -1, -1, -1, - /*0x1e943*/ 1351, - /*0xa68b*/ 1025, - -1, -1, - /*0x023f*/ 191, - /*0x1f66*/ 782, + /*0x2d24*/ 994, + /*0x2d22*/ 992, + /*0x0573*/ 458, + /*0xa725*/ 1036, + /*0x00f3*/ 44, + /*0x047b*/ 353, + /*0x04fb*/ 413, + /*0xa649*/ 1002, + /*0x118c1*/ 1298, + /*0x104fb*/ 1210, + /*0x1e7b*/ 674, + /*0x1efb*/ 733, + /*0x2d14*/ 978, -1, - /*0x10cc0*/ 1203, + /*0x057e*/ 469, + /*0x1f04*/ 740, + /*0x00fe*/ 54, + /*0x16e6f*/ 1344, + /*0xa733*/ 1042, -1, -1, - /*0x1fe1*/ 803, - -1, - /*0x0481*/ 356, - /*0x2d1c*/ 985, - -1, - /*0x026c*/ 218, - /*0x1e01*/ 613, - /*0x1e81*/ 677, - /*0x0101*/ 56, - /*0x2c81*/ 904, - -1, - /*0x2c4d*/ 878, - /*0x1e941*/ 1349, - /*0x0280*/ 224, - /*0x16e6b*/ 1297, - /*0x2175*/ 811, - /*0x118c7*/ 1261, - /*0x0282*/ 225, - -1, -1, -1, - /*0xa72d*/ 1039, + /*0x2d10*/ 974, -1, - /*0x051d*/ 430, - /*0x10f9*/ 519, - -1, -1, - /*0x1e924*/ 1320, + /*0x03fb*/ 291, + /*0x2d18*/ 982, + /*0x13bf*/ 555, + /*0x043f*/ 307, + /*0x04bf*/ 383, -1, - /*0x16e6f*/ 1301, - /*0x118c5*/ 1259, - /*0x00f1*/ 42, + /*0x1043f*/ 1158, -1, - /*0x2c4b*/ 876, - /*0x1fe5*/ 804, + /*0x1e3f*/ 644, + /*0x1ebf*/ 703, -1, - /*0xa725*/ 1035, + /*0x2cbf*/ 936, + /*0x118de*/ 1327, -1, - /*0x13a7*/ 531, + /*0x0271*/ 220, + /*0x2d06*/ 964, -1, - /*0x04a7*/ 371, - /*0x1f22*/ 752, - /*0x2d04*/ 961, - /*0x1f37*/ 765, - /*0x1e27*/ 632, - /*0x1ea7*/ 691, - /*0x0127*/ 75, - /*0x2ca7*/ 923, + /*0x037b*/ 239, -1, -1, - /*0xa723*/ 1034, + /*0x2c33*/ 852, + /*0x03bf*/ 260, + /*0x13b2*/ 542, + /*0x0432*/ 294, + /*0x2d1a*/ 984, + /*0x2d0c*/ 970, + /*0x10432*/ 1145, + /*0x1f71*/ 785, + /*0x105aa*/ 1229, + /*0xa723*/ 1035, + /*0x13b9*/ 549, + /*0x0439*/ 301, + /*0x04b9*/ 380, -1, - /*0x2d11*/ 974, - -1, -1, - /*0x2c43*/ 868, + /*0x10439*/ 1152, + /*0x0275*/ 222, + /*0x1e39*/ 641, + /*0x1eb9*/ 700, -1, - /*0x1f35*/ 763, - /*0x00ee*/ 39, + /*0x2cb9*/ 933, -1, - /*0x047b*/ 353, - /*0x04fb*/ 413, + /*0x03b2*/ 247, + /*0x1e943*/ 1394, + /*0xa72d*/ 1040, + -1, -1, + /*0x118cf*/ 1312, -1, - /*0x0233*/ 189, - /*0x104fb*/ 1202, - /*0x1e7b*/ 674, - /*0x1efb*/ 733, + /*0x1f75*/ 789, + /*0x03b9*/ 254, + -1, -1, + /*0x13ac*/ 536, /*0x13b1*/ 541, /*0x0431*/ 293, /*0x04b1*/ 376, - /*0x00f3*/ 44, - /*0x10431*/ 1136, + /*0x1042c*/ 1139, + /*0x10431*/ 1144, -1, /*0x1e31*/ 637, /*0x1eb1*/ 696, -1, - /*0x2cb1*/ 928, - /*0x2c41*/ 866, - /*0x03fb*/ 291, - /*0x0240*/ 192, - /*0x0566*/ 445, - /*0x16e6d*/ 1299, - /*0x047d*/ 354, - /*0x04fd*/ 414, - /*0x1f33*/ 761, - -1, - /*0x03b1*/ 246, - /*0x1e7d*/ 675, - /*0x1efd*/ 734, - /*0xff57*/ 1123, - /*0x047f*/ 355, - /*0x04ff*/ 415, - /*0x1d7d*/ 611, - -1, -1, - /*0x1e7f*/ 676, - /*0x1eff*/ 735, - /*0x13bd*/ 553, - /*0x043d*/ 305, - /*0x04bd*/ 382, - /*0x1f40*/ 766, - /*0x1043d*/ 1148, - /*0xa791*/ 1080, - /*0x1e3d*/ 643, - /*0x1ebd*/ 702, - /*0x01bf*/ 137, - /*0x2cbd*/ 934, + /*0x2cb1*/ 929, -1, -1, - /*0x1e93f*/ 1347, - -1, - /*0x056c*/ 451, - /*0x2c47*/ 872, + /*0x1e92a*/ 1369, + /*0x2d20*/ 990, -1, -1, -1, - /*0x03bd*/ 258, - /*0x00f5*/ 46, + /*0x118cd*/ 1310, + /*0x03ac*/ 242, + /*0x03b1*/ 246, -1, - /*0x007a*/ 24, + /*0x13a7*/ 531, + /*0x1e941*/ 1392, + /*0x04a7*/ 371, -1, - /*0x104fa*/ 1201, - /*0x1f79*/ 793, + /*0x2d1e*/ 988, -1, - /*0x017a*/ 114, - /*0xa727*/ 1036, - /*0x2c45*/ 870, - /*0x13b9*/ 549, - /*0x0439*/ 301, - /*0x04b9*/ 380, - /*0x022d*/ 186, - /*0x10439*/ 1144, + /*0x1e27*/ 632, + /*0x1ea7*/ 691, + /*0x0127*/ 75, + /*0x2ca7*/ 924, + -1, -1, + /*0x118cb*/ 1308, -1, - /*0x1e39*/ 641, - /*0x1eb9*/ 700, - /*0x1e922*/ 1318, - /*0x2cb9*/ 932, - /*0x1e937*/ 1339, + /*0x1f37*/ 765, + /*0xa73f*/ 1048, -1, - /*0x13c2*/ 558, - /*0x0442*/ 310, - /*0x04c2*/ 384, + /*0x16e6d*/ 1342, + -1, -1, -1, -1, -1, + /*0x13c7*/ 563, + /*0x0447*/ 315, -1, - /*0x10442*/ 1153, + /*0x118c9*/ 1306, + /*0x10447*/ 1166, + /*0x1f35*/ 763, + /*0x1e47*/ 648, + /*0x1ec7*/ 707, -1, - /*0x0225*/ 182, - /*0x03b9*/ 254, - /*0x0142*/ 87, - /*0x13d0*/ 572, - /*0x0450*/ 324, + /*0x2cc7*/ 940, + /*0x0201*/ 165, + -1, -1, -1, -1, -1, + /*0x01c9*/ 139, + /*0x2c3f*/ 864, -1, - /*0x1e935*/ 1337, - /*0x13f2*/ 606, + /*0x03c7*/ 267, + /*0xa739*/ 1045, + -1, -1, + /*0x1f01*/ 737, + /*0x2173*/ 809, -1, - /*0x2c66*/ 898, - /*0x0072*/ 16, - /*0x2d24*/ 993, - /*0x104f2*/ 1193, + /*0x0225*/ 182, + -1, -1, + /*0x1fd1*/ 801, -1, - /*0x0223*/ 181, + /*0x0205*/ 167, -1, - /*0x2d1d*/ 986, - /*0x24d0*/ 823, - /*0x118c0*/ 1254, - /*0xff51*/ 1117, + /*0xa7b7*/ 1095, + /*0x214e*/ 805, + -1, + /*0x217e*/ 820, + /*0x2c32*/ 851, -1, /*0x1f25*/ 755, + /*0x2d02*/ 960, + /*0x0233*/ 189, + /*0x13c5*/ 561, + /*0x0445*/ 313, + /*0x1f05*/ 741, + /*0x2c39*/ 858, + /*0x10445*/ 1164, + /*0xa7b5*/ 1094, + /*0x1e45*/ 647, + /*0x1ec5*/ 706, + /*0x16e73*/ 1348, + /*0x2cc5*/ 939, + -1, -1, + /*0x1f33*/ 761, + /*0x2d0e*/ 972, -1, -1, - /*0xa7c3*/ 1099, + /*0x2d00*/ 958, + /*0x0584*/ 475, -1, - /*0x03f2*/ 288, - /*0x020f*/ 172, + /*0x03c5*/ 265, + /*0x16e7e*/ 1359, -1, - /*0x2c3f*/ 864, + /*0xa727*/ 1037, + /*0xa781*/ 1076, + /*0x13c0*/ 556, + /*0x0440*/ 308, + /*0x2c31*/ 850, -1, - /*0xa77f*/ 1074, + /*0x10440*/ 1159, + /*0x047d*/ 354, + /*0x04fd*/ 414, + -1, + /*0x0140*/ 86, + /*0x0223*/ 181, + /*0x1e7d*/ 675, + /*0x1efd*/ 734, + /*0x01f5*/ 160, + /*0x1d7d*/ 611, -1, - /*0x1e933*/ 1335, - /*0xff53*/ 1119, + /*0xa7a5*/ 1091, + -1, -1, -1, + /*0x03c0*/ 261, + /*0xa785*/ 1078, + /*0xa747*/ 1052, /*0x1f23*/ 753, + /*0x022d*/ 186, + /*0x1e03*/ 614, + /*0x1e83*/ 678, + /*0x0103*/ 57, + /*0x2c83*/ 906, + -1, -1, + /*0x048f*/ 359, + -1, -1, + /*0x2d11*/ 975, + /*0x1e0f*/ 620, + /*0x1e8f*/ 684, + /*0x010f*/ 63, + /*0x2c8f*/ 912, + /*0xa69b*/ 1034, + /*0x0571*/ 456, + /*0x037d*/ 241, + /*0x00f1*/ 42, -1, - /*0x16e71*/ 1303, + /*0xa68b*/ 1026, + -1, -1, + /*0x2c47*/ 872, + -1, + /*0x10cc7*/ 1253, + /*0x13bd*/ 553, + /*0x043d*/ 305, + /*0x04bd*/ 382, + -1, + /*0x1043d*/ 1156, + -1, + /*0x1e3d*/ 643, + /*0x1ebd*/ 702, + -1, + /*0x2cbd*/ 935, + -1, + /*0x0575*/ 460, + /*0x1f7b*/ 795, + /*0x00f5*/ 46, + /*0xa745*/ 1051, + /*0xa7a3*/ 1090, + /*0x13a1*/ 525, -1, - /*0xa73d*/ 1046, - /*0x2c6c*/ 901, + /*0x04a1*/ 368, + /*0x03bd*/ 258, + /*0x023f*/ 191, + /*0xff59*/ 1133, + /*0x1e21*/ 629, + /*0x1ea1*/ 688, + /*0x0121*/ 72, + /*0x2ca1*/ 921, /*0x13bb*/ 551, /*0x043b*/ 303, /*0x04bb*/ 381, - -1, - /*0x1043b*/ 1146, + /*0x105ae*/ 1233, + /*0x1043b*/ 1154, -1, /*0x1e3b*/ 642, /*0x1ebb*/ 701, - /*0x1e940*/ 1348, - /*0x2cbb*/ 933, - /*0x0201*/ 165, + -1, + /*0x2cbb*/ 934, -1, -1, -1, - /*0x10fd*/ 521, + /*0x2c45*/ 870, + /*0x13af*/ 539, + /*0x10cc5*/ 1251, + /*0x04af*/ 375, + /*0x105b7*/ 1241, + /*0x1042f*/ 1142, + /*0x03bb*/ 256, + /*0x1e2f*/ 636, + /*0x1eaf*/ 695, + /*0x012f*/ 79, + /*0x2caf*/ 928, -1, - /*0x2c37*/ 856, - /*0xa77a*/ 1072, + /*0x01a5*/ 129, -1, - /*0x03bb*/ 256, + /*0x1f32*/ 760, + /*0x0499*/ 364, -1, - /*0x0579*/ 464, - /*0x10ff*/ 523, - /*0x16e6e*/ 1300, + /*0x0185*/ 119, + /*0x105b5*/ 1239, + /*0x1e19*/ 625, + /*0x03af*/ 245, + /*0x0119*/ 68, + /*0x2c99*/ 917, -1, - /*0xa79d*/ 1086, - /*0x01f9*/ 161, - /*0x017c*/ 115, - /*0xa739*/ 1044, + /*0x2c40*/ 865, + /*0x13e6*/ 594, + /*0x10cc0*/ 1246, + /*0x1e92e*/ 1373, + /*0x0066*/ 5, -1, - /*0x2c35*/ 854, - /*0x1f01*/ 737, - /*0x13af*/ 539, + /*0x104e6*/ 1189, -1, - /*0x04af*/ 375, - /*0x16e73*/ 1305, - /*0x1042f*/ 1134, + /*0x0231*/ 188, + /*0x0581*/ 472, -1, - /*0x1e2f*/ 636, - /*0x1eaf*/ 695, - /*0x012f*/ 79, - /*0x2caf*/ 927, + /*0x10fd*/ 521, + /*0xa7bf*/ 1099, + /*0x13f2*/ 606, + -1, + /*0x24e6*/ 845, + /*0x0072*/ 16, + /*0x1e937*/ 1382, + /*0x104f2*/ 1201, + -1, + /*0x0501*/ 416, + /*0x1f31*/ 759, -1, -1, - /*0x1e05*/ 615, - /*0x1e85*/ 679, - /*0x0105*/ 58, - /*0x2c85*/ 906, + /*0xa73d*/ 1047, + -1, -1, -1, + /*0x105a5*/ 1224, /*0x0227*/ 183, - /*0x10fa*/ 520, - /*0x052d*/ 438, - /*0x03af*/ 245, + /*0x0585*/ 476, + /*0x1e935*/ 1380, + /*0x03f2*/ 288, + -1, -1, -1, + /*0x0525*/ 434, + /*0x01a3*/ 128, -1, -1, - /*0x13a9*/ 533, + /*0xa7b9*/ 1096, + /*0x0505*/ 418, + /*0x1f27*/ 757, + /*0x105b3*/ 1237, + -1, -1, -1, + /*0x1059c*/ 1216, + -1, + /*0x2c3d*/ 862, + /*0xa73b*/ 1046, /*0x01ad*/ 131, + /*0x0247*/ 194, + /*0x13a9*/ 533, + -1, /*0x04a9*/ 372, - /*0x2c33*/ 852, - /*0x10429*/ 1128, - /*0x1e92d*/ 1329, + -1, + /*0x10429*/ 1136, + -1, /*0x1e29*/ 633, /*0x1ea9*/ 692, /*0x0129*/ 76, - /*0x2ca9*/ 924, + /*0x2ca9*/ 925, + /*0xa647*/ 1001, + /*0xa72f*/ 1041, + /*0x1e925*/ 1364, + /*0x0479*/ 352, + /*0x04f9*/ 412, + /*0x0079*/ 23, + /*0x2171*/ 807, + /*0x104f9*/ 1208, + /*0x1e79*/ 673, + /*0x1ef9*/ 732, + -1, + /*0x1d79*/ 610, + /*0x2c3b*/ 860, + /*0x01fb*/ 162, + /*0x105a3*/ 1222, + -1, -1, + /*0x1e933*/ 1378, + -1, + /*0xff57*/ 1131, + -1, + /*0xa7a7*/ 1092, + /*0x0523*/ 433, + -1, -1, -1, -1, + /*0x2175*/ 811, + /*0x105ad*/ 1232, + /*0x13d0*/ 572, + /*0x0450*/ 324, + -1, + /*0x16e71*/ 1346, + -1, + /*0x01bf*/ 137, + -1, + /*0x052d*/ 438, + /*0x13c2*/ 558, + /*0x0442*/ 310, + /*0x04c2*/ 384, -1, - /*0x0525*/ 434, + /*0x10442*/ 1161, + /*0xa645*/ 1000, + /*0x24d0*/ 823, + /*0x1f45*/ 771, + /*0x0142*/ 87, + /*0x1e09*/ 617, + /*0x1e89*/ 681, + /*0x0109*/ 60, + /*0x2c89*/ 909, + /*0x2c66*/ 899, + /*0x1e923*/ 1362, + /*0x10ce6*/ 1284, + /*0x16e75*/ 1350, -1, - /*0x10cc2*/ 1205, + /*0x0240*/ 192, -1, - /*0x1f27*/ 757, - /*0x01a5*/ 129, - -1, -1, - /*0x2c40*/ 865, - /*0x1e925*/ 1321, + /*0x10e6*/ 500, -1, - /*0x10cd0*/ 1219, - /*0x0231*/ 188, - /*0x2d22*/ 991, - /*0x0523*/ 433, - /*0x10cf2*/ 1253, - /*0x10d0*/ 478, - /*0x16e75*/ 1307, + /*0x027d*/ 223, -1, - /*0x01a3*/ 128, + /*0x057b*/ 466, + /*0x01b9*/ 135, + /*0x00fb*/ 51, + /*0x10cf2*/ 1296, + /*0x1e92d*/ 1372, + -1, -1, + /*0x1f40*/ 766, /*0x10f2*/ 512, + -1, -1, + /*0x1f7d*/ 797, + /*0x0203*/ 166, -1, - /*0xa73b*/ 1045, - /*0x1e923*/ 1319, - /*0x1fd1*/ 801, - /*0x1f7b*/ 795, - /*0x027d*/ 223, - /*0x050f*/ 423, + /*0xff51*/ 1125, -1, - /*0xff55*/ 1121, - /*0x13ce*/ 570, - /*0x044e*/ 322, - /*0x04ce*/ 390, - /*0x1f31*/ 759, - /*0x1044e*/ 1165, + /*0xa729*/ 1038, + -1, + /*0x047f*/ 355, + /*0x04ff*/ 415, -1, -1, - /*0xa7bf*/ 1098, + /*0x020f*/ 172, + /*0x1e7f*/ 676, + /*0x1eff*/ 735, + /*0x1f03*/ 739, /*0x0477*/ 351, /*0x04f7*/ 411, /*0x0077*/ 21, - /*0xa77c*/ 1073, - /*0x104f7*/ 1198, + -1, + /*0x104f7*/ 1206, /*0x1e77*/ 672, /*0x1ef7*/ 731, /*0x0177*/ 113, + /*0x13ec*/ 600, + -1, -1, + /*0x006c*/ 10, -1, - /*0x1f7d*/ 797, - -1, - /*0x03ce*/ 274, + /*0x104ec*/ 1195, + /*0x13ab*/ 535, + /*0x105b9*/ 1243, + /*0x04ab*/ 373, + /*0x2cec*/ 955, + /*0x1042b*/ 1138, -1, - /*0x0501*/ 416, - -1, -1, - /*0xa72f*/ 1040, - /*0x1e03*/ 614, - /*0x1e83*/ 678, - /*0x0103*/ 57, - /*0x2c83*/ 905, + /*0x1e2b*/ 634, + /*0x1eab*/ 693, + /*0x012b*/ 77, + /*0x2cab*/ 926, + /*0x1e93f*/ 1390, /*0x13e8*/ 596, - /*0xff4f*/ 1115, - -1, + -1, -1, /*0x0068*/ 7, + /*0x118c7*/ 1304, + /*0x104e8*/ 1191, + -1, -1, + /*0x2184*/ 822, + /*0x10f9*/ 519, + /*0x0377*/ 238, -1, - /*0x104e8*/ 1183, - /*0xa7b7*/ 1094, - /*0x13c6*/ 562, - /*0x0446*/ 314, - /*0x04c6*/ 386, + /*0x105ac*/ 1231, + /*0x105b1*/ 1236, + /*0x24e8*/ 847, + /*0x13ea*/ 598, + /*0xa783*/ 1077, + -1, + /*0x006a*/ 8, + /*0x1e932*/ 1377, + /*0x104ea*/ 1193, + /*0x1f21*/ 751, + /*0x2d04*/ 962, + -1, -1, -1, + /*0xa691*/ 1029, + /*0x1e939*/ 1384, + -1, + /*0x2c50*/ 881, + -1, + /*0x10cd0*/ 1262, + /*0x022f*/ 187, -1, - /*0x10446*/ 1157, + /*0x105a7*/ 1226, -1, + /*0x10d0*/ 478, + /*0x2c42*/ 867, /*0x13f0*/ 604, - /*0x24e8*/ 847, - /*0x0146*/ 89, + /*0x10cc2*/ 1248, + -1, /*0x0070*/ 14, - /*0xa729*/ 1037, - /*0x104f0*/ 1191, + /*0x0527*/ 435, + /*0x104f0*/ 1199, + /*0x0219*/ 177, -1, - /*0xa7b5*/ 1093, - -1, -1, - /*0x1f7a*/ 794, + /*0x118c5*/ 1302, + /*0xa7bd*/ 1098, -1, - /*0x0242*/ 193, - /*0x03c6*/ 266, + /*0x1e92c*/ 1371, + /*0x1e931*/ 1376, -1, -1, - /*0x0499*/ 364, - /*0x0527*/ 435, - -1, -1, - /*0x1e19*/ 625, - /*0x0250*/ 199, - /*0x0119*/ 68, - /*0x2c99*/ 916, + /*0xa77f*/ 1075, -1, - /*0x0272*/ 221, - /*0x1e927*/ 1323, - /*0x0581*/ 472, + /*0xff53*/ 1127, + /*0x0266*/ 213, -1, - /*0xff49*/ 1109, - -1, -1, - /*0x037b*/ 239, - /*0x1f42*/ 768, - -1, -1, - /*0x00e6*/ 31, + /*0x13c8*/ 564, + /*0x0448*/ 316, + /*0x04c8*/ 387, -1, - /*0x057b*/ 466, + /*0x10448*/ 1167, + /*0xa7a1*/ 1089, -1, - /*0x13c4*/ 560, - /*0x0444*/ 312, - /*0x04c4*/ 385, - /*0x01fb*/ 162, - /*0x10444*/ 1155, + /*0xff55*/ 1129, + /*0x0148*/ 90, -1, - /*0x1f72*/ 786, + /*0x0272*/ 221, + /*0x1f66*/ 782, + /*0x118c0*/ 1297, + /*0x1e927*/ 1366, -1, - /*0x0144*/ 88, - -1, -1, - /*0x2d2d*/ 996, + /*0xa7bb*/ 1097, -1, -1, - /*0x037d*/ 241, - /*0x1e931*/ 1333, + /*0xa72b*/ 1039, + /*0x03c8*/ 268, + /*0x0076*/ 20, + -1, + /*0x104f6*/ 1205, + /*0x1f72*/ 786, -1, -1, -1, - /*0x03c4*/ 264, - /*0x057d*/ 468, - /*0x2179*/ 815, - /*0x13d6*/ 578, - /*0x0456*/ 330, + /*0x10ff*/ 523, -1, /*0x01fd*/ 163, - /*0x2d25*/ 994, - /*0x00ec*/ 37, - /*0x057f*/ 470, - -1, -1, - /*0x029d*/ 234, - /*0x10cce*/ 1217, - /*0x01ff*/ 164, - -1, -1, - /*0x24d6*/ 829, -1, - /*0xff4d*/ 1113, - -1, - /*0x2d23*/ 992, - /*0x01bd*/ 136, - /*0x0495*/ 362, + /*0x13e4*/ 592, -1, + /*0x217b*/ 817, + /*0x0064*/ 3, /*0x10f7*/ 517, - /*0x1e93d*/ 1345, + /*0x104e4*/ 1187, + /*0x2c6c*/ 902, + /*0xff4e*/ 1122, + /*0x10cec*/ 1290, + -1, + /*0xa799*/ 1085, + /*0x0495*/ 362, + /*0x0183*/ 118, + /*0x10ec*/ 506, + /*0x24e4*/ 843, /*0x1e15*/ 623, /*0x1e95*/ 687, /*0x0115*/ 66, - /*0x2c95*/ 914, - -1, - /*0x022f*/ 187, - -1, - /*0x2d0f*/ 972, + /*0x2c95*/ 915, + /*0x0229*/ 184, + -1, -1, -1, + /*0x2c68*/ 900, -1, - /*0x057a*/ 465, - /*0x118c2*/ 1256, - /*0x0205*/ 167, + /*0x10ce8*/ 1286, + -1, -1, + /*0x16e7b*/ 1356, -1, - /*0x1f7c*/ 796, - /*0xff4b*/ 1111, - /*0x10ce8*/ 1243, - -1, -1, -1, - /*0x118d0*/ 1270, /*0x10e8*/ 502, - /*0x13ea*/ 598, - /*0x10cc6*/ 1209, + /*0xff43*/ 1111, -1, - /*0x006a*/ 8, - /*0x01b9*/ 135, - /*0x104ea*/ 1185, - /*0x0229*/ 184, - /*0x10cf0*/ 1251, - /*0x1e939*/ 1341, - /*0xa7a5*/ 1090, - /*0x2d01*/ 958, - /*0x1f05*/ 741, - /*0x10f0*/ 510, - /*0x2c31*/ 850, + /*0x13c6*/ 562, + /*0x0446*/ 314, + /*0x04c6*/ 386, -1, - /*0xff43*/ 1103, - -1, -1, -1, -1, - /*0x1e942*/ 1350, - -1, -1, - /*0xa7a3*/ 1089, - /*0x0572*/ 457, - /*0x01d0*/ 142, - /*0x13a1*/ 525, + /*0x10446*/ 1165, + /*0x2c6a*/ 901, -1, - /*0x04a1*/ 368, - -1, -1, -1, - /*0x1e21*/ 629, - /*0x1ea1*/ 688, - /*0x0121*/ 72, - /*0x2ca1*/ 920, - /*0xa691*/ 1028, - /*0xff41*/ 1101, - /*0x1e07*/ 616, - /*0x1e87*/ 680, - /*0x0107*/ 59, - /*0x2c87*/ 907, + /*0x10cea*/ 1288, + /*0x0146*/ 89, -1, - /*0x2c3d*/ 862, + /*0x01bd*/ 136, + /*0x1f79*/ 793, + /*0x10ea*/ 504, + /*0x057d*/ 468, -1, + /*0x00fd*/ 53, + /*0x0583*/ 474, /*0x0493*/ 361, -1, - /*0x10cc4*/ 1207, - /*0x2d27*/ 995, + /*0x03c6*/ 266, + -1, /*0x1e13*/ 622, /*0x1e93*/ 686, /*0x0113*/ 65, - /*0x2c93*/ 913, + /*0x2c93*/ 914, + /*0x0250*/ 199, + /*0x01a1*/ 127, + /*0x0503*/ 417, + /*0x2d01*/ 959, + /*0x13e0*/ 588, + /*0x10cf0*/ 1294, + /*0xff41*/ 1109, + -1, + /*0x0242*/ 193, + /*0x104e0*/ 1183, + /*0x10f0*/ 510, + /*0x0209*/ 169, + /*0x050f*/ 423, + /*0x1e940*/ 1391, -1, -1, - /*0x13ab*/ 535, - /*0x00f9*/ 49, - /*0x04ab*/ 373, + /*0xa7a9*/ 1093, -1, - /*0x1042b*/ 1130, - /*0xa781*/ 1075, - /*0x1e2b*/ 634, - /*0x1eab*/ 693, - /*0x012b*/ 77, - /*0x2cab*/ 925, - /*0x13e4*/ 592, - /*0x0203*/ 166, - /*0x1e93b*/ 1343, - /*0x0064*/ 3, - /*0x10cd6*/ 1225, - /*0x104e4*/ 1179, - /*0x037c*/ 240, - /*0xff47*/ 1107, - /*0x2c39*/ 858, - /*0x10d6*/ 484, - /*0x1f77*/ 791, - /*0x0268*/ 214, - /*0x057c*/ 467, - /*0x13e2*/ 590, - /*0x24e4*/ 843, - /*0x16e66*/ 1292, - /*0x0062*/ 1, + /*0x24e0*/ 839, + /*0x2d25*/ 995, -1, - /*0x104e2*/ 1177, + /*0x1f42*/ 768, -1, - /*0x2c42*/ 867, - /*0xff45*/ 1105, - /*0x1f03*/ 739, + /*0x2c48*/ 873, + /*0x2d05*/ 963, + /*0x10cc8*/ 1254, + /*0x1e07*/ 616, + /*0x1e87*/ 680, + /*0x0107*/ 59, + /*0x2c87*/ 908, + -1, + /*0x13c4*/ 560, + /*0x0444*/ 312, + /*0x04c4*/ 385, + -1, + /*0x10444*/ 1163, + -1, + /*0x0199*/ 124, + /*0x2d1c*/ 986, + /*0x0144*/ 88, + /*0x2c76*/ 904, + /*0x105a1*/ 1221, + -1, -1, -1, -1, + /*0x0283*/ 226, + /*0x10f6*/ 516, + /*0x0497*/ 363, + /*0x0521*/ 432, + /*0x03c4*/ 264, + /*0x105bb*/ 1244, + /*0x1e17*/ 624, + /*0x049d*/ 366, + /*0x0117*/ 67, + /*0x2c97*/ 916, + /*0x10ce4*/ 1282, + /*0x1e1d*/ 627, + -1, + /*0x011d*/ 70, + /*0x2c9d*/ 919, + /*0x10e4*/ 498, + /*0x1e93d*/ 1388, -1, -1, - /*0x052f*/ 439, + /*0x105af*/ 1234, + /*0x026c*/ 218, + /*0xff4f*/ 1123, + /*0x2d23*/ 993, -1, - /*0x24e2*/ 841, + /*0x1f77*/ 791, -1, - /*0x2c50*/ 881, + /*0x022b*/ 185, + /*0x052f*/ 439, + -1, -1, + /*0x13e2*/ 590, + /*0x10599*/ 1213, -1, - /*0x0505*/ 418, + /*0x0062*/ 1, -1, - /*0xa7a7*/ 1091, - /*0x1e92f*/ 1331, + /*0x104e2*/ 1185, + /*0x2d2d*/ 997, + /*0x0268*/ 214, -1, - /*0x0185*/ 119, - /*0x13e0*/ 588, - /*0x0219*/ 177, - /*0x13da*/ 582, - /*0x045a*/ 334, + /*0x0519*/ 428, -1, - /*0x104e0*/ 1175, - /*0x217b*/ 817, - /*0x104da*/ 1169, - /*0x1f70*/ 784, - /*0x16e6c*/ 1298, - /*0x0529*/ 436, + /*0x2c46*/ 871, + /*0x1e93b*/ 1386, + /*0x10cc6*/ 1252, + /*0x24e2*/ 841, + /*0xff4d*/ 1121, + /*0x13d6*/ 578, + /*0x0456*/ 330, /*0x0078*/ 22, - /*0x10cea*/ 1245, - /*0x104f8*/ 1199, - /*0x24e0*/ 839, - -1, - /*0x24da*/ 833, - /*0x10ea*/ 504, -1, - /*0x1e929*/ 1325, + /*0x104f8*/ 1207, + /*0x0566*/ 445, + /*0x026a*/ 216, + /*0x00e6*/ 31, /*0x13dc*/ 584, /*0x045c*/ 336, - /*0x13cc*/ 568, - /*0x044c*/ 320, - /*0x04cc*/ 389, - /*0x104dc*/ 1171, - /*0x1044c*/ 1163, + /*0x1e92f*/ 1374, + /*0x13da*/ 582, + /*0x045a*/ 334, + /*0x104dc*/ 1179, + /*0x24d6*/ 829, + /*0xff4b*/ 1119, + /*0x104da*/ 1177, + /*0x0572*/ 457, /*0x03f8*/ 290, + /*0x00f2*/ 43, + -1, + /*0x01f9*/ 161, + /*0x24dc*/ 835, + -1, -1, + /*0x24da*/ 833, + /*0x10ce0*/ 1278, + -1, -1, + /*0xff49*/ 1117, + -1, + /*0x10e0*/ 494, + -1, -1, -1, + /*0x118d0*/ 1313, + /*0x13bc*/ 552, + /*0x043c*/ 304, /*0x217d*/ 819, - /*0x118ce*/ 1268, - /*0x2c3b*/ 860, -1, + /*0x1043c*/ 1155, + -1, + /*0x1f70*/ 784, + /*0x118c2*/ 1299, + /*0x013c*/ 84, + /*0x017c*/ 115, + -1, -1, + /*0x01d0*/ 142, + /*0x105a9*/ 1228, + -1, + /*0x2c44*/ 869, + /*0x1fb1*/ 799, + /*0x10cc4*/ 1250, + -1, + /*0x03bc*/ 257, + -1, + /*0x0529*/ 436, /*0x13d8*/ 580, /*0x0458*/ 332, - /*0x24dc*/ 835, + -1, -1, -1, + /*0x104d8*/ 1175, + /*0x16e7d*/ 1358, -1, - /*0x217f*/ 821, - /*0x104d8*/ 1167, - -1, -1, - /*0xa72b*/ 1038, - /*0x03cc*/ 272, - /*0x0585*/ 476, + /*0x13ca*/ 566, + /*0x044a*/ 318, + /*0x04ca*/ 388, + /*0x0579*/ 464, + /*0x1044a*/ 1169, + /*0x00f9*/ 49, + /*0x24d8*/ 831, + /*0x037c*/ 240, /*0x13d4*/ 576, /*0x0454*/ 328, + -1, -1, -1, + /*0x1f76*/ 790, + /*0x13b6*/ 546, + /*0x0436*/ 298, + -1, -1, + /*0x10436*/ 1149, + /*0x03ca*/ 270, + /*0x1e929*/ 1368, -1, - /*0x24d8*/ 831, + /*0x24d4*/ 827, + /*0x0215*/ 175, + /*0x13b0*/ 540, + /*0x0430*/ 292, -1, - /*0x1f44*/ 770, - /*0x0256*/ 204, + /*0x1f64*/ 780, + /*0x10430*/ 1143, /*0x13d2*/ 574, /*0x0452*/ 326, - /*0x0377*/ 238, + /*0x01ff*/ 164, + /*0x10ce2*/ 1280, + /*0x03b6*/ 251, -1, -1, - /*0xa7bd*/ 1097, - /*0x01ce*/ 141, - /*0x24d4*/ 827, - /*0x0577*/ 462, + /*0x1f15*/ 749, + /*0x10e2*/ 496, + /*0xa7c8*/ 1102, -1, -1, - /*0x017e*/ 116, - /*0x0497*/ 363, - /*0x217a*/ 816, + /*0x0509*/ 420, + /*0x2d27*/ 996, /*0x24d2*/ 825, - /*0x118c6*/ 1260, - /*0x1e17*/ 624, - /*0x0215*/ 175, - /*0x0117*/ 67, - /*0x2c97*/ 915, - /*0x0503*/ 417, - -1, - /*0x0076*/ 20, - /*0x13f4*/ 608, - /*0x104f6*/ 1197, - /*0x0183*/ 118, - /*0x0074*/ 18, - /*0x10ce4*/ 1239, - /*0x104f4*/ 1195, - -1, - /*0x0568*/ 447, - -1, - /*0x10e4*/ 498, - /*0x13bc*/ 552, - /*0x043c*/ 304, - /*0xa7b9*/ 1095, + -1, -1, + /*0x2c56*/ 887, -1, - /*0x1043c*/ 1147, - /*0x1f15*/ 749, + /*0x10cd6*/ 1268, + -1, -1, -1, + /*0x10f8*/ 518, + /*0x10d6*/ 484, + /*0x2c5c*/ 893, + /*0xa7f6*/ 1107, + /*0x10cdc*/ 1274, + /*0x2c5a*/ 891, + /*0xa77c*/ 1074, + /*0x10cda*/ 1272, -1, - /*0x10ce2*/ 1237, - /*0x013c*/ 84, - /*0x01c6*/ 138, - /*0x0570*/ 455, - /*0x026a*/ 216, - /*0x10e2*/ 496, - /*0x13c8*/ 564, - /*0x0448*/ 316, - /*0x04c8*/ 387, - /*0x2172*/ 808, - /*0x10448*/ 1159, + /*0x10dc*/ 490, + /*0x0213*/ 174, -1, - /*0x03bc*/ 257, + /*0x10da*/ 488, + /*0x13f4*/ 608, -1, - /*0x0148*/ 90, - /*0x16e79*/ 1311, + /*0x1e942*/ 1393, + /*0x0074*/ 18, -1, - /*0x0519*/ 428, - /*0x00fb*/ 51, + /*0x104f4*/ 1203, + -1, -1, -1, -1, + /*0x1f13*/ 747, + /*0x0260*/ 209, -1, -1, - /*0x118c4*/ 1258, - /*0x0199*/ 124, + /*0x057f*/ 470, -1, - /*0x10ce0*/ 1235, - /*0x03c8*/ 268, - /*0x10cda*/ 1229, + /*0x00ff*/ 55, + /*0x2c3c*/ 861, + -1, -1, + /*0x0289*/ 229, -1, - /*0x0583*/ 474, - /*0x10e0*/ 494, + /*0x0577*/ 462, -1, - /*0x10da*/ 488, - -1, -1, -1, - /*0x2c4e*/ 879, - /*0x0207*/ 168, - /*0x10f8*/ 518, + /*0x1f60*/ 776, -1, -1, - /*0x00fd*/ 53, + /*0x0207*/ 168, + /*0x2172*/ 808, + /*0x105ab*/ 1230, -1, - /*0x2d05*/ 962, - /*0x118d6*/ 1276, - /*0x10cdc*/ 1231, + /*0x056c*/ 451, -1, - /*0x10ccc*/ 1215, - /*0x0213*/ 174, - /*0x00ff*/ 55, - /*0x10dc*/ 490, + /*0x00ec*/ 37, + -1, -1, -1, + /*0x052b*/ 437, -1, - /*0x1f21*/ 751, + /*0x2c58*/ 889, + /*0x1f07*/ 743, + /*0x10cd8*/ 1270, + /*0x16e66*/ 1335, -1, -1, - /*0xa7bb*/ 1096, + /*0x118c8*/ 1305, + /*0x10d8*/ 486, + /*0x2c4a*/ 875, + /*0x0568*/ 447, + /*0x10cca*/ 1256, + /*0x00e8*/ 33, + /*0x1f44*/ 770, + /*0xa793*/ 1082, + /*0x0217*/ 176, + /*0x16e72*/ 1347, + /*0x2c54*/ 885, -1, - /*0x10cd8*/ 1227, - /*0x1f07*/ 743, + /*0x10cd4*/ 1266, + /*0x021d*/ 179, -1, - /*0x022b*/ 185, + /*0xa681*/ 1021, + /*0x2c36*/ 855, + /*0x10d4*/ 482, + /*0x056a*/ 449, -1, - /*0x10d8*/ 486, - /*0x217c*/ 818, + /*0x00ea*/ 35, + /*0x1e92b*/ 1370, -1, - /*0x2c68*/ 899, - -1, -1, - /*0x10cd4*/ 1223, - /*0x1f13*/ 747, + /*0x13b4*/ 544, + /*0x0434*/ 296, -1, - /*0x01d6*/ 145, - /*0x2c46*/ 871, - /*0x10d4*/ 482, + /*0x2c30*/ 849, + /*0x10434*/ 1147, + -1, -1, -1, + /*0x2c52*/ 883, -1, - /*0x10cd2*/ 1221, - /*0x00fa*/ 50, - /*0x13ca*/ 566, - /*0x044a*/ 318, - /*0x04ca*/ 388, + /*0x10cd2*/ 1264, + -1, + /*0x2179*/ 815, + /*0xa685*/ 1023, + /*0xa787*/ 1079, /*0x10d2*/ 480, - /*0x1044a*/ 1161, - /*0x2184*/ 822, - /*0x10fe*/ 522, - /*0x0515*/ 426, - -1, -1, -1, -1, + /*0x2d03*/ 961, + -1, + /*0x0570*/ 455, + /*0x03b4*/ 249, + /*0x00f0*/ 41, + -1, -1, + /*0x13cc*/ 568, + /*0x044c*/ 320, + /*0x04cc*/ 389, + /*0x2d0f*/ 973, + /*0x1044c*/ 1171, + /*0x1f62*/ 778, + /*0x049f*/ 367, /*0x0195*/ 123, + /*0x0256*/ 204, -1, - /*0x1f64*/ 780, + /*0x1e1f*/ 628, -1, - /*0xa785*/ 1077, - /*0x13b6*/ 546, - /*0x0436*/ 298, - /*0x03ca*/ 270, + /*0x011f*/ 71, + /*0x2c9f*/ 920, -1, - /*0x10436*/ 1141, - /*0x10f6*/ 516, + /*0x16e79*/ 1354, + /*0x025c*/ 208, + /*0xa797*/ 1084, + /*0x118c6*/ 1303, + /*0x03cc*/ 272, + /*0x1f78*/ 792, -1, - /*0x13b4*/ 544, - /*0x0434*/ 296, + /*0xa79d*/ 1087, + -1, -1, -1, -1, -1, /*0x10f4*/ 514, - /*0x1f62*/ 778, - /*0x10434*/ 1139, + -1, -1, + /*0x01c6*/ 138, + /*0x0576*/ 461, -1, - /*0x0260*/ 209, + /*0x00f6*/ 47, + -1, -1, + /*0x13be*/ 554, + /*0x043e*/ 306, -1, - /*0xa7a9*/ 1092, + /*0x2d21*/ 991, + /*0x1043e*/ 1157, + -1, -1, + /*0x023c*/ 190, + /*0x013e*/ 85, + /*0x0564*/ 443, /*0x048d*/ 358, - /*0x056a*/ 449, - /*0x00f2*/ 43, - /*0x03b6*/ 251, + /*0x00e4*/ 29, + -1, -1, /*0x1e0d*/ 619, /*0x1e8d*/ 683, /*0x010d*/ 62, - /*0x2c8d*/ 910, - /*0x2c44*/ 869, - /*0x2d03*/ 960, - /*0x03b4*/ 249, - /*0x10cc8*/ 1211, - /*0x1e09*/ 617, - /*0x1e89*/ 681, - /*0x0109*/ 60, - /*0x2c89*/ 908, + /*0x2c8d*/ 911, + /*0x0515*/ 426, + /*0x03be*/ 259, -1, - /*0x025c*/ 208, - /*0x1f60*/ 776, + /*0x1f7c*/ 796, + /*0x13ba*/ 550, + /*0x043a*/ 302, -1, -1, - /*0x13b0*/ 540, - /*0x0430*/ 292, - /*0x13de*/ 586, - /*0x045e*/ 338, - /*0x10430*/ 1135, - /*0x1f78*/ 792, - /*0x0521*/ 432, - /*0x104de*/ 1173, - /*0x214e*/ 805, - /*0x2c56*/ 887, + /*0x1043a*/ 1153, -1, - /*0x01a1*/ 127, - /*0x0507*/ 419, + /*0x217f*/ 821, -1, - /*0x049f*/ 367, + /*0x013a*/ 83, + -1, -1, -1, + /*0x13b8*/ 548, + /*0x0438*/ 300, /*0x2177*/ 813, - /*0x24de*/ 837, + /*0x118c4*/ 1301, + /*0x10438*/ 1151, + /*0x2d19*/ 983, -1, - /*0x1e1f*/ 628, + /*0x03ba*/ 255, + -1, -1, -1, /*0x0254*/ 203, - /*0x011f*/ 71, - /*0x2c9f*/ 919, - -1, - /*0x0513*/ 425, - -1, - /*0x2d19*/ 982, - /*0x0252*/ 201, -1, -1, -1, -1, -1, -1, + /*0x2c34*/ 853, + /*0x03b8*/ 253, + /*0x16e7f*/ 1360, + -1, -1, + /*0x0513*/ 425, + -1, -1, -1, -1, + /*0x16e77*/ 1352, -1, - /*0x00fc*/ 52, - /*0x052b*/ 437, - /*0x0217*/ 176, + /*0x1f36*/ 764, -1, - /*0xa783*/ 1076, - /*0x16e7b*/ 1313, - -1, -1, -1, -1, - /*0x1e92b*/ 1327, - /*0x0564*/ 443, - -1, -1, -1, -1, - /*0x2170*/ 806, - -1, -1, -1, - /*0x2c6a*/ 900, - -1, -1, -1, - /*0x0562*/ 441, - /*0x023c*/ 190, - /*0x10cca*/ 1213, - /*0x16e7d*/ 1315, - /*0x118da*/ 1280, - -1, -1, -1, - /*0x1f76*/ 790, - -1, -1, - /*0x16e7f*/ 1317, - /*0x1f74*/ 788, + /*0x0252*/ 201, -1, -1, -1, -1, - /*0xa799*/ 1084, - -1, -1, - /*0xa68f*/ 1027, + /*0x16e6c*/ 1341, -1, - /*0x118dc*/ 1282, + /*0x00e0*/ 25, + /*0x1f30*/ 758, + /*0x2c4c*/ 877, -1, - /*0x118cc*/ 1266, + /*0x10ccc*/ 1258, -1, -1, -1, -1, -1, -1, - /*0x01da*/ 147, - /*0x0578*/ 463, - /*0x2d15*/ 978, - /*0x118d8*/ 1278, -1, -1, -1, - /*0x16e7a*/ 1312, - -1, -1, -1, -1, -1, - /*0xa681*/ 1020, - /*0x118d4*/ 1274, + /*0x0507*/ 419, + /*0x16e68*/ 1337, -1, -1, -1, - /*0x01dc*/ 148, - -1, - /*0x01cc*/ 140, - /*0x118d2*/ 1272, + /*0xa7ca*/ 1103, -1, -1, -1, -1, -1, - /*0x10cde*/ 1233, - -1, -1, - /*0x01d8*/ 146, - -1, - /*0x10de*/ 492, - -1, -1, -1, -1, -1, -1, - -1, -1, - /*0x01d4*/ 144, + /*0x118d6*/ 1319, -1, - /*0x16e72*/ 1304, + /*0x2170*/ 806, -1, -1, - /*0x057e*/ 469, + /*0x16e6a*/ 1339, -1, - /*0x01d2*/ 143, + /*0x10597*/ 1211, + /*0x118dc*/ 1325, + /*0x1fd0*/ 800, -1, - /*0x00e8*/ 33, - -1, -1, + /*0x118da*/ 1323, + /*0x1059d*/ 1217, + /*0x01d6*/ 145, + /*0x2c3e*/ 863, /*0x0517*/ 427, -1, - /*0x2d21*/ 990, - -1, -1, -1, -1, -1, - /*0x2d07*/ 964, - /*0x0576*/ 461, - /*0x00f0*/ 41, - /*0xff42*/ 1102, + /*0x1f74*/ 788, + -1, -1, + /*0x051d*/ 430, + /*0x01dc*/ 148, + -1, -1, + /*0x01da*/ 147, -1, - /*0x0574*/ 459, - /*0x118c8*/ 1262, + /*0xff47*/ 1115, -1, - /*0x2c5a*/ 891, - -1, -1, - /*0x2d13*/ 976, - /*0xff50*/ 1116, - -1, -1, -1, -1, -1, -1, + /*0x16e70*/ 1345, -1, -1, -1, -1, - /*0x020d*/ 171, - /*0x1e93c*/ 1344, + /*0x0287*/ 227, + -1, -1, + /*0x2c3a*/ 859, + -1, -1, + /*0x2176*/ 812, + -1, -1, -1, -1, -1, + /*0x0562*/ 441, -1, - /*0x2c5c*/ 893, + /*0x00e2*/ 27, + /*0x2c38*/ 857, + -1, -1, -1, -1, -1, -1, + /*0x2d09*/ 967, + -1, -1, + /*0x118d8*/ 1321, -1, - /*0x2c4c*/ 877, + /*0x0578*/ 463, -1, - /*0x1f36*/ 764, - /*0x0209*/ 169, - -1, -1, -1, - /*0x16e7c*/ 1314, + /*0x00f8*/ 48, -1, - /*0x1f34*/ 762, - /*0x2c58*/ 889, - -1, -1, -1, - /*0x1fb1*/ 799, + /*0x029d*/ 234, + /*0x16e76*/ 1351, + /*0x118ca*/ 1307, -1, - /*0xa7a1*/ 1088, + /*0xff45*/ 1113, + -1, -1, + /*0x01d8*/ 146, + -1, -1, + /*0x118d4*/ 1317, -1, -1, -1, -1, - /*0x2c54*/ 885, - /*0xa787*/ 1078, + /*0x16e64*/ 1333, -1, -1, -1, -1, -1, - /*0x2c52*/ 883, + /*0x1f34*/ 762, + -1, + /*0x01d4*/ 144, + -1, + /*0x105bc*/ 1245, + -1, -1, -1, + /*0x01b6*/ 134, -1, + /*0x118d2*/ 1315, + -1, -1, + /*0x057c*/ 467, /*0x021f*/ 180, + /*0x00fc*/ 52, -1, -1, - /*0xa793*/ 1081, + /*0x01b0*/ 132, + -1, -1, -1, -1, + /*0x01d2*/ 143, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x1f30*/ 758, - -1, -1, -1, - /*0x0283*/ 226, - -1, -1, -1, - /*0x2c76*/ 903, - /*0x118ca*/ 1264, + /*0x1e93c*/ 1387, -1, -1, -1, -1, -1, -1, + /*0x105b6*/ 1240, + -1, -1, -1, -1, + /*0xa683*/ 1022, + -1, + /*0x020d*/ 171, + /*0x16e60*/ 1329, + -1, + /*0x105b0*/ 1235, + -1, -1, -1, -1, + /*0xa68f*/ 1028, + -1, -1, -1, -1, -1, + /*0xa79f*/ 1088, -1, -1, -1, -1, -1, -1, - /*0x2c3c*/ 861, -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0x1e936*/ 1381, -1, -1, -1, -1, -1, -1, - /*0x2c48*/ 873, + -1, -1, -1, + /*0x1e930*/ 1375, -1, -1, -1, -1, -1, -1, - /*0x00ea*/ 35, + -1, -1, -1, -1, -1, + /*0x0574*/ 459, + -1, + /*0x00f4*/ 45, -1, -1, -1, -1, -1, -1, -1, /*0x2178*/ 814, - /*0x16e77*/ 1309, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0x01b4*/ 133, + /*0x16e62*/ 1331, + -1, -1, -1, -1, -1, -1, -1, - /*0x01b6*/ 134, + /*0xa699*/ 1033, + /*0x118cc*/ 1309, -1, -1, - /*0x1fd0*/ 800, - /*0x1e936*/ 1338, + /*0x2d15*/ 979, -1, -1, - /*0x01b4*/ 133, - -1, - /*0x050d*/ 422, - /*0x2d17*/ 980, - /*0x1e934*/ 1336, - /*0x118de*/ 1284, + /*0x16e78*/ 1353, + -1, -1, -1, -1, -1, -1, + /*0x01cc*/ 140, -1, -1, -1, -1, - /*0x0509*/ 420, + /*0x217c*/ 818, -1, -1, - /*0x16e68*/ 1294, - -1, -1, -1, -1, - /*0xff4e*/ 1114, + /*0x1fe0*/ 802, -1, -1, -1, -1, -1, -1, - -1, - /*0x16e70*/ 1302, - -1, -1, -1, - /*0x01b0*/ 132, - -1, -1, -1, - /*0x1e930*/ 1332, - /*0x217e*/ 820, - -1, - /*0x051f*/ 431, + -1, -1, + /*0x105b4*/ 1238, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, + /*0x2d13*/ 977, -1, - /*0x2c4a*/ 875, - -1, - /*0x00e4*/ 29, - -1, - /*0xa685*/ 1022, + /*0x16e7c*/ 1357, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + /*0x1059f*/ 1219, + -1, -1, -1, -1, -1, -1, -1, - /*0x2176*/ 812, + /*0x051f*/ 431, -1, - /*0xa797*/ 1083, - /*0xff46*/ 1106, - /*0x2174*/ 810, + /*0x1e934*/ 1379, -1, -1, -1, -1, - /*0x00e2*/ 27, + /*0x2d07*/ 965, -1, - /*0x2c36*/ 855, + /*0xff50*/ 1124, -1, -1, -1, -1, -1, -1, - /*0x2c34*/ 853, + -1, + /*0xff42*/ 1110, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0x2d17*/ 981, + -1, -1, -1, -1, + /*0x2d1d*/ 987, -1, -1, - /*0x00e0*/ 25, + /*0x050d*/ 422, + -1, -1, -1, -1, -1, + /*0x2174*/ 810, + /*0xa689*/ 1025, -1, -1, -1, -1, -1, -1, - -1, - /*0x00f8*/ 48, + -1, -1, -1, -1, + /*0x105b8*/ 1242, + -1, -1, + /*0x1e93e*/ 1389, -1, -1, -1, -1, -1, -1, - /*0x2c30*/ 849, - /*0xff44*/ 1104, - /*0x2c5e*/ 895, -1, -1, -1, -1, - /*0x0287*/ 227, + /*0x16e74*/ 1349, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0x1e93a*/ 1385, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, + /*0x1e938*/ 1383, + -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, - /*0xff56*/ 1122, - -1, -1, - /*0xa683*/ 1021, -1, -1, -1, -1, -1, -1, - -1, - /*0x16e6a*/ 1296, - -1, -1, -1, - /*0x00fe*/ 54, - -1, -1, - /*0x2d0d*/ 970, -1, -1, -1, -1, -1, -1, -1, - /*0x2d09*/ 966, - -1, -1, -1, -1, - /*0x00f6*/ 47, + /*0x1fb0*/ 798, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x00f4*/ 45, - -1, -1, -1, -1, - /*0xa699*/ 1032, + /*0xff48*/ 1116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x2d1f*/ 988, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, - /*0x16e64*/ 1290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x16e62*/ 1288, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, - /*0xa79f*/ 1087, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, + /*0xff46*/ 1114, + -1, -1, -1, + /*0xa695*/ 1031, + -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, - /*0xa695*/ 1030, + /*0xa693*/ 1030, -1, -1, -1, -1, -1, -1, - /*0x16e60*/ 1286, -1, -1, -1, -1, -1, -1, - -1, - /*0x16e78*/ 1310, + /*0xff44*/ 1112, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0xa687*/ 1024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, - /*0xff5a*/ 1126, + -1, -1, -1, -1, -1, + /*0x2d1f*/ 989, -1, -1, -1, -1, -1, -1, + -1, + /*0xa697*/ 1032, -1, -1, -1, -1, -1, -1, - -1, -1, -1, - /*0xa687*/ 1023, - /*0x16e7e*/ 1316, - -1, -1, - /*0xff4c*/ 1112, -1, -1, -1, -1, -1, -1, - /*0xa693*/ 1029, - -1, -1, - /*0xff58*/ 1124, - -1, -1, - /*0x16e76*/ 1308, - -1, -1, -1, - /*0x16e74*/ 1306, + -1, -1, -1, -1, -1, + /*0xff56*/ 1130, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + /*0xff5a*/ 1134, -1, -1, -1, - /*0xff54*/ 1120, + /*0x2d0d*/ 971, -1, -1, -1, -1, -1, -1, - /*0xff52*/ 1118, -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, + /*0xff58*/ 1132, + -1, -1, -1, -1, -1, -1, + -1, + /*0xff4a*/ 1118, + -1, -1, -1, -1, -1, -1, + -1, + /*0xff54*/ 1128, -1, -1, -1, -1, -1, -1, - -1, -1, -1, - /*0xff48*/ 1108, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - /*0x1fe0*/ 802, - /*0x0289*/ 229, + /*0xff52*/ 1126, -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, - /*0xa697*/ 1031, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, - /*0xff4a*/ 1110, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -6952,24 +7157,20 @@ onigenc_unicode_CaseUnfold_11_lookup(const OnigCodePoint code) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + /*0xff4c*/ 1120, -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, - /*0xa68d*/ 1026, -1, -1, -1, -1, -1, -1, - -1, - /*0xa689*/ 1024, -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, - /*0x1fb0*/ 798 + /*0xa68d*/ 1027 }; if (code <= MAX_CODE_VALUE && code >= MIN_CODE_VALUE) diff --git a/lib/onigmo/enc/unicode/name2ctype.h b/lib/onigmo/enc/unicode/name2ctype.h index 39405797361..3703b5a61bd 100644 --- a/lib/onigmo/enc/unicode/name2ctype.h +++ b/lib/onigmo/enc/unicode/name2ctype.h @@ -43,7 +43,7 @@ static const OnigCodePoint CR_NEWLINE[] = { /* 'Alpha': [[:Alpha:]] */ static const OnigCodePoint CR_Alpha[] = { - 679, + 732, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -96,8 +96,9 @@ static const OnigCodePoint CR_Alpha[] = { 0x081a, 0x082c, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c9, 0x08d4, 0x08df, 0x08e3, 0x08e9, 0x08f0, 0x093b, @@ -177,8 +178,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x0bca, 0x0bcc, 0x0bd0, 0x0bd0, 0x0bd7, 0x0bd7, - 0x0c00, 0x0c03, - 0x0c05, 0x0c0c, + 0x0c00, 0x0c0c, 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, @@ -187,6 +187,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x0c4a, 0x0c4c, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c80, 0x0c83, 0x0c85, 0x0c8c, @@ -198,11 +199,10 @@ static const OnigCodePoint CR_Alpha[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccc, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d44, @@ -212,7 +212,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x0d54, 0x0d57, 0x0d5f, 0x0d63, 0x0d7a, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -239,7 +239,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x0f00, 0x0f00, 0x0f40, 0x0f47, 0x0f49, 0x0f6c, - 0x0f71, 0x0f81, + 0x0f71, 0x0f83, 0x0f88, 0x0f97, 0x0f99, 0x0fbc, 0x1000, 0x1036, @@ -275,9 +275,8 @@ static const OnigCodePoint CR_Alpha[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1713, - 0x1720, 0x1733, + 0x1700, 0x1713, + 0x171f, 0x1733, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -300,9 +299,11 @@ static const OnigCodePoint CR_Alpha[] = { 0x1a20, 0x1a5e, 0x1a61, 0x1a74, 0x1aa7, 0x1aa7, + 0x1abf, 0x1ac0, + 0x1acc, 0x1ace, 0x1b00, 0x1b33, 0x1b35, 0x1b43, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b80, 0x1ba9, 0x1bac, 0x1baf, 0x1bba, 0x1be5, @@ -356,9 +357,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x214e, 0x214e, 0x2160, 0x2188, 0x24b6, 0x24e9, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -387,11 +386,10 @@ static const OnigCodePoint CR_Alpha[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa61f, @@ -401,9 +399,11 @@ static const OnigCodePoint CR_Alpha[] = { 0xa67f, 0xa6ef, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa805, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa805, 0xa807, 0xa827, 0xa840, 0xa873, 0xa880, 0xa8c3, @@ -434,7 +434,7 @@ static const OnigCodePoint CR_Alpha[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabea, 0xac00, 0xd7a3, 0xd7b0, 0xd7c6, @@ -485,9 +485,20 @@ static const OnigCodePoint CR_Alpha[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -519,25 +530,33 @@ static const OnigCodePoint CR_Alpha[] = { 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x10d00, 0x10d27, + 0x10e80, 0x10ea9, + 0x10eab, 0x10eac, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11000, 0x11045, - 0x11082, 0x110b8, + 0x11071, 0x11075, + 0x11080, 0x110b8, + 0x110c2, 0x110c2, 0x110d0, 0x110e8, 0x11100, 0x11132, - 0x11144, 0x11146, + 0x11144, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11180, 0x111bf, 0x111c1, 0x111c4, + 0x111ce, 0x111cf, 0x111da, 0x111da, 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x11234, 0x11237, 0x11237, - 0x1123e, 0x1123e, + 0x1123e, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -560,7 +579,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x11400, 0x11441, 0x11443, 0x11445, 0x11447, 0x1144a, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114c1, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -574,9 +593,17 @@ static const OnigCodePoint CR_Alpha[] = { 0x116b8, 0x116b8, 0x11700, 0x1171a, 0x1171d, 0x1172a, + 0x11740, 0x11746, 0x11800, 0x11838, 0x118a0, 0x118df, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x1193c, + 0x1193f, 0x11942, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119df, @@ -586,7 +613,7 @@ static const OnigCodePoint CR_Alpha[] = { 0x11a35, 0x11a3e, 0x11a50, 0x11a97, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c3e, @@ -609,13 +636,20 @@ static const OnigCodePoint CR_Alpha[] = { 0x11d93, 0x11d96, 0x11d98, 0x11d98, 0x11ee0, 0x11ef6, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f40, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, + 0x16a70, 0x16abe, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b40, 0x16b43, @@ -627,10 +661,17 @@ static const OnigCodePoint CR_Alpha[] = { 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -668,15 +709,25 @@ static const OnigCodePoint CR_Alpha[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, + 0x1e4d0, 0x1e4eb, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e900, 0x1e943, 0x1e947, 0x1e947, @@ -717,12 +768,14 @@ static const OnigCodePoint CR_Alpha[] = { 0x1f130, 0x1f149, 0x1f150, 0x1f169, 0x1f170, 0x1f189, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Alpha */ /* 'Blank': [[:Blank:]] */ @@ -747,7 +800,7 @@ static const OnigCodePoint CR_Cntrl[] = { /* 'Digit': [[:Digit:]] */ static const OnigCodePoint CR_Digit[] = { - 59, + 64, 0x0030, 0x0039, 0x0660, 0x0669, 0x06f0, 0x06f9, @@ -798,20 +851,25 @@ static const OnigCodePoint CR_Digit[] = { 0x116c0, 0x116c9, 0x11730, 0x11739, 0x118e0, 0x118e9, + 0x11950, 0x11959, 0x11c50, 0x11c59, 0x11d50, 0x11d59, 0x11da0, 0x11da9, + 0x11f50, 0x11f59, 0x16a60, 0x16a69, + 0x16ac0, 0x16ac9, 0x16b50, 0x16b59, 0x1d7ce, 0x1d7ff, 0x1e140, 0x1e149, 0x1e2f0, 0x1e2f9, + 0x1e4f0, 0x1e4f9, 0x1e950, 0x1e959, + 0x1fbf0, 0x1fbf9, }; /* CR_Digit */ /* 'Graph': [[:Graph:]] */ static const OnigCodePoint CR_Graph[] = { - 671, + 712, 0x0021, 0x007e, 0x00a1, 0x0377, 0x037a, 0x037f, @@ -825,8 +883,7 @@ static const OnigCodePoint CR_Graph[] = { 0x0591, 0x05c7, 0x05d0, 0x05ea, 0x05ef, 0x05f4, - 0x0600, 0x061c, - 0x061e, 0x070d, + 0x0600, 0x070d, 0x070f, 0x074a, 0x074d, 0x07b1, 0x07c0, 0x07fa, @@ -835,9 +892,9 @@ static const OnigCodePoint CR_Graph[] = { 0x0840, 0x085b, 0x085e, 0x085e, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x0983, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x0983, 0x0985, 0x098c, 0x098f, 0x0990, 0x0993, 0x09a8, @@ -891,7 +948,7 @@ static const OnigCodePoint CR_Graph[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b77, @@ -915,11 +972,12 @@ static const OnigCodePoint CR_Graph[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c77, 0x0c8c, @@ -931,19 +989,18 @@ static const OnigCodePoint CR_Graph[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, 0x0d4a, 0x0d4f, 0x0d54, 0x0d63, 0x0d66, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -965,7 +1022,7 @@ static const OnigCodePoint CR_Graph[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f47, @@ -1000,9 +1057,8 @@ static const OnigCodePoint CR_Graph[] = { 0x1400, 0x167f, 0x1681, 0x169c, 0x16a0, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1736, + 0x1700, 0x1715, + 0x171f, 0x1736, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -1010,8 +1066,7 @@ static const OnigCodePoint CR_Graph[] = { 0x1780, 0x17dd, 0x17e0, 0x17e9, 0x17f0, 0x17f9, - 0x1800, 0x180e, - 0x1810, 0x1819, + 0x1800, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -1030,9 +1085,9 @@ static const OnigCodePoint CR_Graph[] = { 0x1a7f, 0x1a89, 0x1a90, 0x1a99, 0x1aa0, 0x1aad, - 0x1ab0, 0x1abe, - 0x1b00, 0x1b4b, - 0x1b50, 0x1b7c, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, 0x1b80, 0x1bf3, 0x1bfc, 0x1c37, 0x1c3b, 0x1c49, @@ -1040,8 +1095,7 @@ static const OnigCodePoint CR_Graph[] = { 0x1c90, 0x1cba, 0x1cbd, 0x1cc7, 0x1cd0, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -1064,16 +1118,14 @@ static const OnigCodePoint CR_Graph[] = { 0x2066, 0x2071, 0x2074, 0x208e, 0x2090, 0x209c, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x20d0, 0x20f0, 0x2100, 0x218b, 0x2190, 0x2426, 0x2440, 0x244a, 0x2460, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2cf3, + 0x2b97, 0x2cf3, 0x2cf9, 0x2d25, 0x2d27, 0x2d27, 0x2d2d, 0x2d2d, @@ -1088,7 +1140,7 @@ static const OnigCodePoint CR_Graph[] = { 0x2dc8, 0x2dce, 0x2dd0, 0x2dd6, 0x2dd8, 0x2dde, - 0x2de0, 0x2e4f, + 0x2de0, 0x2e5d, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -1098,18 +1150,17 @@ static const OnigCodePoint CR_Graph[] = { 0x3099, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x3190, 0x31ba, - 0x31c0, 0x31e3, + 0x3190, 0x31e3, 0x31f0, 0x321e, - 0x3220, 0x4db5, - 0x4dc0, 0x9fef, - 0xa000, 0xa48c, + 0x3220, 0xa48c, 0xa490, 0xa4c6, 0xa4d0, 0xa62b, 0xa640, 0xa6f7, - 0xa700, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa82b, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa82c, 0xa830, 0xa839, 0xa840, 0xa877, 0xa880, 0xa8c5, @@ -1129,7 +1180,7 @@ static const OnigCodePoint CR_Graph[] = { 0xab11, 0xab16, 0xab20, 0xab26, 0xab28, 0xab2e, - 0xab30, 0xab67, + 0xab30, 0xab6b, 0xab70, 0xabed, 0xabf0, 0xabf9, 0xac00, 0xd7a3, @@ -1144,12 +1195,11 @@ static const OnigCodePoint CR_Graph[] = { 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, - 0xfb46, 0xfbc1, - 0xfbd3, 0xfd3f, - 0xfd50, 0xfd8f, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, 0xfd92, 0xfdc7, - 0xfdf0, 0xfdfd, - 0xfe00, 0xfe19, + 0xfdcf, 0xfdcf, + 0xfdf0, 0xfe19, 0xfe20, 0xfe52, 0xfe54, 0xfe66, 0xfe68, 0xfe6b, @@ -1174,7 +1224,7 @@ static const OnigCodePoint CR_Graph[] = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fd, 0x10280, 0x1029c, @@ -1192,10 +1242,20 @@ static const OnigCodePoint CR_Graph[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, - 0x1056f, 0x1056f, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -1234,23 +1294,27 @@ static const OnigCodePoint CR_Graph[] = { 0x10cfa, 0x10d27, 0x10d30, 0x10d39, 0x10e60, 0x10e7e, - 0x10f00, 0x10f27, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f27, 0x10f30, 0x10f59, + 0x10f70, 0x10f89, + 0x10fb0, 0x10fcb, 0x10fe0, 0x10ff6, 0x11000, 0x1104d, - 0x11052, 0x1106f, - 0x1107f, 0x110c1, + 0x11052, 0x11075, + 0x1107f, 0x110c2, 0x110cd, 0x110cd, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, - 0x11136, 0x11146, + 0x11136, 0x11147, 0x11150, 0x11176, - 0x11180, 0x111cd, - 0x111d0, 0x111df, + 0x11180, 0x111df, 0x111e1, 0x111f4, 0x11200, 0x11211, - 0x11213, 0x1123e, + 0x11213, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -1273,9 +1337,8 @@ static const OnigCodePoint CR_Graph[] = { 0x1135d, 0x11363, 0x11366, 0x1136c, 0x11370, 0x11374, - 0x11400, 0x11459, - 0x1145b, 0x1145b, - 0x1145d, 0x1145f, + 0x11400, 0x1145b, + 0x1145d, 0x11461, 0x11480, 0x114c7, 0x114d0, 0x114d9, 0x11580, 0x115b5, @@ -1283,20 +1346,28 @@ static const OnigCodePoint CR_Graph[] = { 0x11600, 0x11644, 0x11650, 0x11659, 0x11660, 0x1166c, - 0x11680, 0x116b8, + 0x11680, 0x116b9, 0x116c0, 0x116c9, 0x11700, 0x1171a, 0x1171d, 0x1172b, - 0x11730, 0x1173f, + 0x11730, 0x11746, 0x11800, 0x1183b, 0x118a0, 0x118f2, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e4, 0x11a00, 0x11a47, 0x11a50, 0x11aa2, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, + 0x11b00, 0x11b09, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c45, @@ -1318,18 +1389,23 @@ static const OnigCodePoint CR_Graph[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef8, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f59, + 0x11fb0, 0x11fb0, 0x11fc0, 0x11ff1, 0x11fff, 0x12399, 0x12400, 0x1246e, 0x12470, 0x12474, 0x12480, 0x12543, - 0x13000, 0x1342e, - 0x13430, 0x13438, + 0x12f90, 0x12ff2, + 0x13000, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, - 0x16a6e, 0x16a6f, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af5, 0x16b00, 0x16b45, @@ -1341,11 +1417,18 @@ static const OnigCodePoint CR_Graph[] = { 0x16f00, 0x16f4a, 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, - 0x16fe0, 0x16fe3, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -1353,10 +1436,14 @@ static const OnigCodePoint CR_Graph[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9c, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, - 0x1d129, 0x1d1e8, + 0x1d129, 0x1d1ea, 0x1d200, 0x1d245, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d300, 0x1d356, 0x1d360, 0x1d378, @@ -1383,17 +1470,27 @@ static const OnigCodePoint CR_Graph[] = { 0x1d7ce, 0x1da8b, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, 0x1e2ff, 0x1e2ff, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8c7, 0x1e8d6, 0x1e900, 0x1e94b, @@ -1441,43 +1538,45 @@ static const OnigCodePoint CR_Graph[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f100, 0x1f10c, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f100, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0001, 0xe0001, 0xe0020, 0xe007f, 0xe0100, 0xe01ef, @@ -1487,7 +1586,7 @@ static const OnigCodePoint CR_Graph[] = { /* 'Lower': [[:Lower:]] */ static const OnigCodePoint CR_Lower[] = { - 649, + 671, 0x0061, 0x007a, 0x00aa, 0x00aa, 0x00b5, 0x00b5, @@ -1764,7 +1863,7 @@ static const OnigCodePoint CR_Lower[] = { 0x052f, 0x052f, 0x0560, 0x0588, 0x10d0, 0x10fa, - 0x10fd, 0x10ff, + 0x10fc, 0x10ff, 0x13f8, 0x13fd, 0x1c80, 0x1c88, 0x1d00, 0x1dbf, @@ -1927,7 +2026,7 @@ static const OnigCodePoint CR_Lower[] = { 0x2170, 0x217f, 0x2184, 0x2184, 0x24d0, 0x24e9, - 0x2c30, 0x2c5e, + 0x2c30, 0x2c5f, 0x2c61, 0x2c61, 0x2c65, 0x2c66, 0x2c68, 0x2c68, @@ -2095,16 +2194,34 @@ static const OnigCodePoint CR_Lower[] = { 0xa7bb, 0xa7bb, 0xa7bd, 0xa7bd, 0xa7bf, 0xa7bf, + 0xa7c1, 0xa7c1, 0xa7c3, 0xa7c3, + 0xa7c8, 0xa7c8, + 0xa7ca, 0xa7ca, + 0xa7d1, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d5, + 0xa7d7, 0xa7d7, + 0xa7d9, 0xa7d9, + 0xa7f2, 0xa7f4, + 0xa7f6, 0xa7f6, 0xa7f8, 0xa7fa, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabbf, 0xfb00, 0xfb06, 0xfb13, 0xfb17, 0xff41, 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, + 0x10780, 0x10780, + 0x10783, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, @@ -2136,12 +2253,16 @@ static const OnigCodePoint CR_Lower[] = { 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7c9, 0x1d7cb, 0x1d7cb, + 0x1df00, 0x1df09, + 0x1df0b, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e922, 0x1e943, }; /* CR_Lower */ /* 'Print': [[:Print:]] */ static const OnigCodePoint CR_Print[] = { - 668, + 709, 0x0020, 0x007e, 0x00a0, 0x0377, 0x037a, 0x037f, @@ -2155,8 +2276,7 @@ static const OnigCodePoint CR_Print[] = { 0x0591, 0x05c7, 0x05d0, 0x05ea, 0x05ef, 0x05f4, - 0x0600, 0x061c, - 0x061e, 0x070d, + 0x0600, 0x070d, 0x070f, 0x074a, 0x074d, 0x07b1, 0x07c0, 0x07fa, @@ -2165,9 +2285,9 @@ static const OnigCodePoint CR_Print[] = { 0x0840, 0x085b, 0x085e, 0x085e, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x0983, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x0983, 0x0985, 0x098c, 0x098f, 0x0990, 0x0993, 0x09a8, @@ -2221,7 +2341,7 @@ static const OnigCodePoint CR_Print[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b77, @@ -2245,11 +2365,12 @@ static const OnigCodePoint CR_Print[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c77, 0x0c8c, @@ -2261,19 +2382,18 @@ static const OnigCodePoint CR_Print[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, 0x0d4a, 0x0d4f, 0x0d54, 0x0d63, 0x0d66, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -2295,7 +2415,7 @@ static const OnigCodePoint CR_Print[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f47, @@ -2329,9 +2449,8 @@ static const OnigCodePoint CR_Print[] = { 0x13f8, 0x13fd, 0x1400, 0x169c, 0x16a0, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1736, + 0x1700, 0x1715, + 0x171f, 0x1736, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -2339,8 +2458,7 @@ static const OnigCodePoint CR_Print[] = { 0x1780, 0x17dd, 0x17e0, 0x17e9, 0x17f0, 0x17f9, - 0x1800, 0x180e, - 0x1810, 0x1819, + 0x1800, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -2359,9 +2477,9 @@ static const OnigCodePoint CR_Print[] = { 0x1a7f, 0x1a89, 0x1a90, 0x1a99, 0x1aa0, 0x1aad, - 0x1ab0, 0x1abe, - 0x1b00, 0x1b4b, - 0x1b50, 0x1b7c, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, 0x1b80, 0x1bf3, 0x1bfc, 0x1c37, 0x1c3b, 0x1c49, @@ -2369,8 +2487,7 @@ static const OnigCodePoint CR_Print[] = { 0x1c90, 0x1cba, 0x1cbd, 0x1cc7, 0x1cd0, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -2391,16 +2508,14 @@ static const OnigCodePoint CR_Print[] = { 0x2066, 0x2071, 0x2074, 0x208e, 0x2090, 0x209c, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x20d0, 0x20f0, 0x2100, 0x218b, 0x2190, 0x2426, 0x2440, 0x244a, 0x2460, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2cf3, + 0x2b97, 0x2cf3, 0x2cf9, 0x2d25, 0x2d27, 0x2d27, 0x2d2d, 0x2d2d, @@ -2415,7 +2530,7 @@ static const OnigCodePoint CR_Print[] = { 0x2dc8, 0x2dce, 0x2dd0, 0x2dd6, 0x2dd8, 0x2dde, - 0x2de0, 0x2e4f, + 0x2de0, 0x2e5d, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -2425,18 +2540,17 @@ static const OnigCodePoint CR_Print[] = { 0x3099, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x3190, 0x31ba, - 0x31c0, 0x31e3, + 0x3190, 0x31e3, 0x31f0, 0x321e, - 0x3220, 0x4db5, - 0x4dc0, 0x9fef, - 0xa000, 0xa48c, + 0x3220, 0xa48c, 0xa490, 0xa4c6, 0xa4d0, 0xa62b, 0xa640, 0xa6f7, - 0xa700, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa82b, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa82c, 0xa830, 0xa839, 0xa840, 0xa877, 0xa880, 0xa8c5, @@ -2456,7 +2570,7 @@ static const OnigCodePoint CR_Print[] = { 0xab11, 0xab16, 0xab20, 0xab26, 0xab28, 0xab2e, - 0xab30, 0xab67, + 0xab30, 0xab6b, 0xab70, 0xabed, 0xabf0, 0xabf9, 0xac00, 0xd7a3, @@ -2471,12 +2585,11 @@ static const OnigCodePoint CR_Print[] = { 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, - 0xfb46, 0xfbc1, - 0xfbd3, 0xfd3f, - 0xfd50, 0xfd8f, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, 0xfd92, 0xfdc7, - 0xfdf0, 0xfdfd, - 0xfe00, 0xfe19, + 0xfdcf, 0xfdcf, + 0xfdf0, 0xfe19, 0xfe20, 0xfe52, 0xfe54, 0xfe66, 0xfe68, 0xfe6b, @@ -2501,7 +2614,7 @@ static const OnigCodePoint CR_Print[] = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fd, 0x10280, 0x1029c, @@ -2519,10 +2632,20 @@ static const OnigCodePoint CR_Print[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, - 0x1056f, 0x1056f, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -2561,23 +2684,27 @@ static const OnigCodePoint CR_Print[] = { 0x10cfa, 0x10d27, 0x10d30, 0x10d39, 0x10e60, 0x10e7e, - 0x10f00, 0x10f27, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f27, 0x10f30, 0x10f59, + 0x10f70, 0x10f89, + 0x10fb0, 0x10fcb, 0x10fe0, 0x10ff6, 0x11000, 0x1104d, - 0x11052, 0x1106f, - 0x1107f, 0x110c1, + 0x11052, 0x11075, + 0x1107f, 0x110c2, 0x110cd, 0x110cd, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, - 0x11136, 0x11146, + 0x11136, 0x11147, 0x11150, 0x11176, - 0x11180, 0x111cd, - 0x111d0, 0x111df, + 0x11180, 0x111df, 0x111e1, 0x111f4, 0x11200, 0x11211, - 0x11213, 0x1123e, + 0x11213, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -2600,9 +2727,8 @@ static const OnigCodePoint CR_Print[] = { 0x1135d, 0x11363, 0x11366, 0x1136c, 0x11370, 0x11374, - 0x11400, 0x11459, - 0x1145b, 0x1145b, - 0x1145d, 0x1145f, + 0x11400, 0x1145b, + 0x1145d, 0x11461, 0x11480, 0x114c7, 0x114d0, 0x114d9, 0x11580, 0x115b5, @@ -2610,20 +2736,28 @@ static const OnigCodePoint CR_Print[] = { 0x11600, 0x11644, 0x11650, 0x11659, 0x11660, 0x1166c, - 0x11680, 0x116b8, + 0x11680, 0x116b9, 0x116c0, 0x116c9, 0x11700, 0x1171a, 0x1171d, 0x1172b, - 0x11730, 0x1173f, + 0x11730, 0x11746, 0x11800, 0x1183b, 0x118a0, 0x118f2, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e4, 0x11a00, 0x11a47, 0x11a50, 0x11aa2, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, + 0x11b00, 0x11b09, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c45, @@ -2645,18 +2779,23 @@ static const OnigCodePoint CR_Print[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef8, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f59, + 0x11fb0, 0x11fb0, 0x11fc0, 0x11ff1, 0x11fff, 0x12399, 0x12400, 0x1246e, 0x12470, 0x12474, 0x12480, 0x12543, - 0x13000, 0x1342e, - 0x13430, 0x13438, + 0x12f90, 0x12ff2, + 0x13000, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, - 0x16a6e, 0x16a6f, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af5, 0x16b00, 0x16b45, @@ -2668,11 +2807,18 @@ static const OnigCodePoint CR_Print[] = { 0x16f00, 0x16f4a, 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, - 0x16fe0, 0x16fe3, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -2680,10 +2826,14 @@ static const OnigCodePoint CR_Print[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9c, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, - 0x1d129, 0x1d1e8, + 0x1d129, 0x1d1ea, 0x1d200, 0x1d245, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d300, 0x1d356, 0x1d360, 0x1d378, @@ -2710,17 +2860,27 @@ static const OnigCodePoint CR_Print[] = { 0x1d7ce, 0x1da8b, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, 0x1e2ff, 0x1e2ff, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8c7, 0x1e8d6, 0x1e900, 0x1e94b, @@ -2768,43 +2928,45 @@ static const OnigCodePoint CR_Print[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f100, 0x1f10c, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f100, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0001, 0xe0001, 0xe0020, 0xe007f, 0xe0100, 0xe01ef, @@ -2814,7 +2976,7 @@ static const OnigCodePoint CR_Print[] = { /* 'XPosixPunct': [[:Punct:]] */ static const OnigCodePoint CR_XPosixPunct[] = { - 177, + 186, 0x0021, 0x002f, 0x003a, 0x0040, 0x005b, 0x0060, @@ -2837,7 +2999,7 @@ static const OnigCodePoint CR_XPosixPunct[] = { 0x0609, 0x060a, 0x060c, 0x060d, 0x061b, 0x061b, - 0x061e, 0x061f, + 0x061d, 0x061f, 0x066a, 0x066d, 0x06d4, 0x06d4, 0x0700, 0x070d, @@ -2876,6 +3038,7 @@ static const OnigCodePoint CR_XPosixPunct[] = { 0x1aa0, 0x1aa6, 0x1aa8, 0x1aad, 0x1b5a, 0x1b60, + 0x1b7d, 0x1b7e, 0x1bfc, 0x1bff, 0x1c3b, 0x1c3f, 0x1c7e, 0x1c7f, @@ -2900,6 +3063,7 @@ static const OnigCodePoint CR_XPosixPunct[] = { 0x2d70, 0x2d70, 0x2e00, 0x2e2e, 0x2e30, 0x2e4f, + 0x2e52, 0x2e5d, 0x3001, 0x3003, 0x3008, 0x3011, 0x3014, 0x301f, @@ -2953,7 +3117,9 @@ static const OnigCodePoint CR_XPosixPunct[] = { 0x10af0, 0x10af6, 0x10b39, 0x10b3f, 0x10b99, 0x10b9c, + 0x10ead, 0x10ead, 0x10f55, 0x10f59, + 0x10f86, 0x10f89, 0x11047, 0x1104d, 0x110bb, 0x110bc, 0x110be, 0x110c1, @@ -2966,23 +3132,28 @@ static const OnigCodePoint CR_XPosixPunct[] = { 0x11238, 0x1123d, 0x112a9, 0x112a9, 0x1144b, 0x1144f, - 0x1145b, 0x1145b, + 0x1145a, 0x1145b, 0x1145d, 0x1145d, 0x114c6, 0x114c6, 0x115c1, 0x115d7, 0x11641, 0x11643, 0x11660, 0x1166c, + 0x116b9, 0x116b9, 0x1173c, 0x1173e, 0x1183b, 0x1183b, + 0x11944, 0x11946, 0x119e2, 0x119e2, 0x11a3f, 0x11a46, 0x11a9a, 0x11a9c, 0x11a9e, 0x11aa2, + 0x11b00, 0x11b09, 0x11c41, 0x11c45, 0x11c70, 0x11c71, 0x11ef7, 0x11ef8, + 0x11f43, 0x11f4f, 0x11fff, 0x11fff, 0x12470, 0x12474, + 0x12ff1, 0x12ff2, 0x16a6e, 0x16a6f, 0x16af5, 0x16af5, 0x16b37, 0x16b3b, @@ -3011,7 +3182,7 @@ static const OnigCodePoint CR_Space[] = { /* 'Upper': [[:Upper:]] */ static const OnigCodePoint CR_Upper[] = { - 641, + 651, 0x0041, 0x005a, 0x00c0, 0x00d6, 0x00d8, 0x00de, @@ -3445,7 +3616,7 @@ static const OnigCodePoint CR_Upper[] = { 0x2160, 0x216f, 0x2183, 0x2183, 0x24b6, 0x24cf, - 0x2c00, 0x2c2e, + 0x2c00, 0x2c2f, 0x2c60, 0x2c60, 0x2c62, 0x2c64, 0x2c67, 0x2c67, @@ -3610,11 +3781,21 @@ static const OnigCodePoint CR_Upper[] = { 0xa7ba, 0xa7ba, 0xa7bc, 0xa7bc, 0xa7be, 0xa7be, + 0xa7c0, 0xa7c0, 0xa7c2, 0xa7c2, - 0xa7c4, 0xa7c6, + 0xa7c4, 0xa7c7, + 0xa7c9, 0xa7c9, + 0xa7d0, 0xa7d0, + 0xa7d6, 0xa7d6, + 0xa7d8, 0xa7d8, + 0xa7f5, 0xa7f5, 0xff21, 0xff3a, 0x10400, 0x10427, 0x104b0, 0x104d3, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, 0x10c80, 0x10cb2, 0x118a0, 0x118bf, 0x16e40, 0x16e5f, @@ -3665,7 +3846,7 @@ static const OnigCodePoint CR_XDigit[] = { /* 'Word': [[:Word:]] */ static const OnigCodePoint CR_Word[] = { - 716, + 770, 0x0030, 0x0039, 0x0041, 0x005a, 0x005f, 0x005f, @@ -3716,9 +3897,9 @@ static const OnigCodePoint CR_Word[] = { 0x0800, 0x082d, 0x0840, 0x085b, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x08e1, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x0898, 0x08e1, 0x08e3, 0x0963, 0x0966, 0x096f, 0x0971, 0x0983, @@ -3777,7 +3958,7 @@ static const OnigCodePoint CR_Word[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b6f, @@ -3802,11 +3983,12 @@ static const OnigCodePoint CR_Word[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c80, 0x0c83, @@ -3819,12 +4001,11 @@ static const OnigCodePoint CR_Word[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, @@ -3833,7 +4014,7 @@ static const OnigCodePoint CR_Word[] = { 0x0d5f, 0x0d63, 0x0d66, 0x0d6f, 0x0d7a, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -3856,7 +4037,7 @@ static const OnigCodePoint CR_Word[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f00, @@ -3902,9 +4083,8 @@ static const OnigCodePoint CR_Word[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1734, + 0x1700, 0x1715, + 0x171f, 0x1734, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -3914,7 +4094,7 @@ static const OnigCodePoint CR_Word[] = { 0x17dc, 0x17dd, 0x17e0, 0x17e9, 0x180b, 0x180d, - 0x1810, 0x1819, + 0x180f, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -3932,8 +4112,8 @@ static const OnigCodePoint CR_Word[] = { 0x1a7f, 0x1a89, 0x1a90, 0x1a99, 0x1aa7, 0x1aa7, - 0x1ab0, 0x1abe, - 0x1b00, 0x1b4b, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, 0x1b50, 0x1b59, 0x1b6b, 0x1b73, 0x1b80, 0x1bf3, @@ -3945,8 +4125,7 @@ static const OnigCodePoint CR_Word[] = { 0x1cbd, 0x1cbf, 0x1cd0, 0x1cd2, 0x1cd4, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -3986,9 +4165,7 @@ static const OnigCodePoint CR_Word[] = { 0x214e, 0x214e, 0x2160, 0x2188, 0x24b6, 0x24e9, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cf3, 0x2d00, 0x2d25, 0x2d27, 0x2d27, @@ -4017,11 +4194,10 @@ static const OnigCodePoint CR_Word[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa62b, @@ -4030,9 +4206,12 @@ static const OnigCodePoint CR_Word[] = { 0xa67f, 0xa6f1, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa827, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa827, + 0xa82c, 0xa82c, 0xa840, 0xa873, 0xa880, 0xa8c5, 0xa8d0, 0xa8d9, @@ -4058,7 +4237,7 @@ static const OnigCodePoint CR_Word[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabea, 0xabec, 0xabed, 0xabf0, 0xabf9, @@ -4120,9 +4299,20 @@ static const OnigCodePoint CR_Word[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -4157,27 +4347,33 @@ static const OnigCodePoint CR_Word[] = { 0x10cc0, 0x10cf2, 0x10d00, 0x10d27, 0x10d30, 0x10d39, - 0x10f00, 0x10f1c, + 0x10e80, 0x10ea9, + 0x10eab, 0x10eac, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f50, + 0x10f70, 0x10f85, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11000, 0x11046, - 0x11066, 0x1106f, + 0x11066, 0x11075, 0x1107f, 0x110ba, + 0x110c2, 0x110c2, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, 0x11136, 0x1113f, - 0x11144, 0x11146, + 0x11144, 0x11147, 0x11150, 0x11173, 0x11176, 0x11176, 0x11180, 0x111c4, 0x111c9, 0x111cc, - 0x111d0, 0x111da, + 0x111ce, 0x111da, 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x11237, - 0x1123e, 0x1123e, + 0x1123e, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -4202,7 +4398,7 @@ static const OnigCodePoint CR_Word[] = { 0x11370, 0x11374, 0x11400, 0x1144a, 0x11450, 0x11459, - 0x1145e, 0x1145f, + 0x1145e, 0x11461, 0x11480, 0x114c5, 0x114c7, 0x114c7, 0x114d0, 0x114d9, @@ -4217,9 +4413,17 @@ static const OnigCodePoint CR_Word[] = { 0x11700, 0x1171a, 0x1171d, 0x1172b, 0x11730, 0x11739, + 0x11740, 0x11746, 0x11800, 0x1183a, 0x118a0, 0x118e9, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11943, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e1, @@ -4228,7 +4432,7 @@ static const OnigCodePoint CR_Word[] = { 0x11a47, 0x11a47, 0x11a50, 0x11a99, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c40, @@ -4250,14 +4454,23 @@ static const OnigCodePoint CR_Word[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef6, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f42, + 0x11f50, 0x11f59, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13440, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, + 0x16a70, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af4, 0x16b00, 0x16b36, @@ -4270,11 +4483,18 @@ static const OnigCodePoint CR_Word[] = { 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, - 0x16fe3, 0x16fe3, + 0x16fe3, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -4282,6 +4502,8 @@ static const OnigCodePoint CR_Word[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d169, 0x1d16d, 0x1d172, 0x1d17b, 0x1d182, @@ -4325,16 +4547,26 @@ static const OnigCodePoint CR_Word[] = { 0x1da84, 0x1da84, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8d0, 0x1e8d6, 0x1e900, 0x1e94b, @@ -4375,18 +4607,21 @@ static const OnigCodePoint CR_Word[] = { 0x1f130, 0x1f149, 0x1f150, 0x1f169, 0x1f170, 0x1f189, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0100, 0xe01ef, }; /* CR_Word */ /* 'Alnum': [[:Alnum:]] */ static const OnigCodePoint CR_Alnum[] = { - 715, + 772, 0x0030, 0x0039, 0x0041, 0x005a, 0x0061, 0x007a, @@ -4439,8 +4674,9 @@ static const OnigCodePoint CR_Alnum[] = { 0x081a, 0x082c, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c9, 0x08d4, 0x08df, 0x08e3, 0x08e9, 0x08f0, 0x093b, @@ -4524,8 +4760,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x0bd0, 0x0bd0, 0x0bd7, 0x0bd7, 0x0be6, 0x0bef, - 0x0c00, 0x0c03, - 0x0c05, 0x0c0c, + 0x0c00, 0x0c0c, 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, @@ -4534,6 +4769,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x0c4a, 0x0c4c, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c80, 0x0c83, @@ -4546,12 +4782,11 @@ static const OnigCodePoint CR_Alnum[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccc, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d44, @@ -4562,7 +4797,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x0d5f, 0x0d63, 0x0d66, 0x0d6f, 0x0d7a, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -4593,7 +4828,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x0f20, 0x0f29, 0x0f40, 0x0f47, 0x0f49, 0x0f6c, - 0x0f71, 0x0f81, + 0x0f71, 0x0f83, 0x0f88, 0x0f97, 0x0f99, 0x0fbc, 0x1000, 0x1036, @@ -4628,9 +4863,8 @@ static const OnigCodePoint CR_Alnum[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1713, - 0x1720, 0x1733, + 0x1700, 0x1713, + 0x171f, 0x1733, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -4658,9 +4892,11 @@ static const OnigCodePoint CR_Alnum[] = { 0x1a80, 0x1a89, 0x1a90, 0x1a99, 0x1aa7, 0x1aa7, + 0x1abf, 0x1ac0, + 0x1acc, 0x1ace, 0x1b00, 0x1b33, 0x1b35, 0x1b43, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b50, 0x1b59, 0x1b80, 0x1ba9, 0x1bac, 0x1be5, @@ -4714,9 +4950,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x214e, 0x214e, 0x2160, 0x2188, 0x24b6, 0x24e9, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -4745,11 +4979,10 @@ static const OnigCodePoint CR_Alnum[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa62b, @@ -4758,9 +4991,11 @@ static const OnigCodePoint CR_Alnum[] = { 0xa67f, 0xa6ef, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa805, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa805, 0xa807, 0xa827, 0xa840, 0xa873, 0xa880, 0xa8c3, @@ -4791,7 +5026,7 @@ static const OnigCodePoint CR_Alnum[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabea, 0xabf0, 0xabf9, 0xac00, 0xd7a3, @@ -4845,9 +5080,20 @@ static const OnigCodePoint CR_Alnum[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -4880,28 +5126,35 @@ static const OnigCodePoint CR_Alnum[] = { 0x10cc0, 0x10cf2, 0x10d00, 0x10d27, 0x10d30, 0x10d39, + 0x10e80, 0x10ea9, + 0x10eab, 0x10eac, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11000, 0x11045, 0x11066, 0x1106f, - 0x11082, 0x110b8, + 0x11071, 0x11075, + 0x11080, 0x110b8, + 0x110c2, 0x110c2, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11132, 0x11136, 0x1113f, - 0x11144, 0x11146, + 0x11144, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11180, 0x111bf, 0x111c1, 0x111c4, - 0x111d0, 0x111da, + 0x111ce, 0x111da, 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x11234, 0x11237, 0x11237, - 0x1123e, 0x1123e, + 0x1123e, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -4926,7 +5179,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x11443, 0x11445, 0x11447, 0x1144a, 0x11450, 0x11459, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114c1, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -4944,9 +5197,18 @@ static const OnigCodePoint CR_Alnum[] = { 0x11700, 0x1171a, 0x1171d, 0x1172a, 0x11730, 0x11739, + 0x11740, 0x11746, 0x11800, 0x11838, 0x118a0, 0x118e9, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x1193c, + 0x1193f, 0x11942, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119df, @@ -4956,7 +5218,7 @@ static const OnigCodePoint CR_Alnum[] = { 0x11a35, 0x11a3e, 0x11a50, 0x11a97, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c3e, @@ -4982,14 +5244,23 @@ static const OnigCodePoint CR_Alnum[] = { 0x11d98, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef6, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f40, + 0x11f50, 0x11f59, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, + 0x16a70, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b40, 0x16b43, @@ -5002,10 +5273,17 @@ static const OnigCodePoint CR_Alnum[] = { 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -5044,17 +5322,28 @@ static const OnigCodePoint CR_Alnum[] = { 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, 0x1d7ce, 0x1d7ff, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, 0x1e2f0, 0x1e2f9, + 0x1e4d0, 0x1e4eb, + 0x1e4f0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e900, 0x1e943, 0x1e947, 0x1e947, @@ -5096,12 +5385,15 @@ static const OnigCodePoint CR_Alnum[] = { 0x1f130, 0x1f149, 0x1f150, 0x1f169, 0x1f170, 0x1f189, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Alnum */ /* 'ASCII': [[:ASCII:]] */ @@ -5112,7 +5404,7 @@ static const OnigCodePoint CR_ASCII[] = { /* 'Punct' */ static const OnigCodePoint CR_Punct[] = { - 182, + 191, 0x0021, 0x0023, 0x0025, 0x002a, 0x002c, 0x002f, @@ -5140,7 +5432,7 @@ static const OnigCodePoint CR_Punct[] = { 0x0609, 0x060a, 0x060c, 0x060d, 0x061b, 0x061b, - 0x061e, 0x061f, + 0x061d, 0x061f, 0x066a, 0x066d, 0x06d4, 0x06d4, 0x0700, 0x070d, @@ -5179,6 +5471,7 @@ static const OnigCodePoint CR_Punct[] = { 0x1aa0, 0x1aa6, 0x1aa8, 0x1aad, 0x1b5a, 0x1b60, + 0x1b7d, 0x1b7e, 0x1bfc, 0x1bff, 0x1c3b, 0x1c3f, 0x1c7e, 0x1c7f, @@ -5203,6 +5496,7 @@ static const OnigCodePoint CR_Punct[] = { 0x2d70, 0x2d70, 0x2e00, 0x2e2e, 0x2e30, 0x2e4f, + 0x2e52, 0x2e5d, 0x3001, 0x3003, 0x3008, 0x3011, 0x3014, 0x301f, @@ -5256,7 +5550,9 @@ static const OnigCodePoint CR_Punct[] = { 0x10af0, 0x10af6, 0x10b39, 0x10b3f, 0x10b99, 0x10b9c, + 0x10ead, 0x10ead, 0x10f55, 0x10f59, + 0x10f86, 0x10f89, 0x11047, 0x1104d, 0x110bb, 0x110bc, 0x110be, 0x110c1, @@ -5269,23 +5565,28 @@ static const OnigCodePoint CR_Punct[] = { 0x11238, 0x1123d, 0x112a9, 0x112a9, 0x1144b, 0x1144f, - 0x1145b, 0x1145b, + 0x1145a, 0x1145b, 0x1145d, 0x1145d, 0x114c6, 0x114c6, 0x115c1, 0x115d7, 0x11641, 0x11643, 0x11660, 0x1166c, + 0x116b9, 0x116b9, 0x1173c, 0x1173e, 0x1183b, 0x1183b, + 0x11944, 0x11946, 0x119e2, 0x119e2, 0x11a3f, 0x11a46, 0x11a9a, 0x11a9c, 0x11a9e, 0x11aa2, + 0x11b00, 0x11b09, 0x11c41, 0x11c45, 0x11c70, 0x11c71, 0x11ef7, 0x11ef8, + 0x11f43, 0x11f4f, 0x11fff, 0x11fff, 0x12470, 0x12474, + 0x12ff1, 0x12ff2, 0x16a6e, 0x16a6f, 0x16af5, 0x16af5, 0x16b37, 0x16b3b, @@ -5306,7 +5607,7 @@ static const OnigCodePoint CR_Any[] = { /* 'Assigned': - */ static const OnigCodePoint CR_Assigned[] = { - 666, + 707, 0x0000, 0x0377, 0x037a, 0x037f, 0x0384, 0x038a, @@ -5319,8 +5620,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x0591, 0x05c7, 0x05d0, 0x05ea, 0x05ef, 0x05f4, - 0x0600, 0x061c, - 0x061e, 0x070d, + 0x0600, 0x070d, 0x070f, 0x074a, 0x074d, 0x07b1, 0x07c0, 0x07fa, @@ -5329,9 +5629,9 @@ static const OnigCodePoint CR_Assigned[] = { 0x0840, 0x085b, 0x085e, 0x085e, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x0983, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x0983, 0x0985, 0x098c, 0x098f, 0x0990, 0x0993, 0x09a8, @@ -5385,7 +5685,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b77, @@ -5409,11 +5709,12 @@ static const OnigCodePoint CR_Assigned[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c77, 0x0c8c, @@ -5425,19 +5726,18 @@ static const OnigCodePoint CR_Assigned[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, 0x0d4a, 0x0d4f, 0x0d54, 0x0d63, 0x0d66, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -5459,7 +5759,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f47, @@ -5493,9 +5793,8 @@ static const OnigCodePoint CR_Assigned[] = { 0x13f8, 0x13fd, 0x1400, 0x169c, 0x16a0, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1736, + 0x1700, 0x1715, + 0x171f, 0x1736, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -5503,8 +5802,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x1780, 0x17dd, 0x17e0, 0x17e9, 0x17f0, 0x17f9, - 0x1800, 0x180e, - 0x1810, 0x1819, + 0x1800, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -5523,9 +5821,9 @@ static const OnigCodePoint CR_Assigned[] = { 0x1a7f, 0x1a89, 0x1a90, 0x1a99, 0x1aa0, 0x1aad, - 0x1ab0, 0x1abe, - 0x1b00, 0x1b4b, - 0x1b50, 0x1b7c, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, 0x1b80, 0x1bf3, 0x1bfc, 0x1c37, 0x1c3b, 0x1c49, @@ -5533,8 +5831,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x1c90, 0x1cba, 0x1cbd, 0x1cc7, 0x1cd0, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -5554,16 +5851,14 @@ static const OnigCodePoint CR_Assigned[] = { 0x2066, 0x2071, 0x2074, 0x208e, 0x2090, 0x209c, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x20d0, 0x20f0, 0x2100, 0x218b, 0x2190, 0x2426, 0x2440, 0x244a, 0x2460, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2cf3, + 0x2b97, 0x2cf3, 0x2cf9, 0x2d25, 0x2d27, 0x2d27, 0x2d2d, 0x2d2d, @@ -5578,7 +5873,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x2dc8, 0x2dce, 0x2dd0, 0x2dd6, 0x2dd8, 0x2dde, - 0x2de0, 0x2e4f, + 0x2de0, 0x2e5d, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -5588,18 +5883,17 @@ static const OnigCodePoint CR_Assigned[] = { 0x3099, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x3190, 0x31ba, - 0x31c0, 0x31e3, + 0x3190, 0x31e3, 0x31f0, 0x321e, - 0x3220, 0x4db5, - 0x4dc0, 0x9fef, - 0xa000, 0xa48c, + 0x3220, 0xa48c, 0xa490, 0xa4c6, 0xa4d0, 0xa62b, 0xa640, 0xa6f7, - 0xa700, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa82b, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa82c, 0xa830, 0xa839, 0xa840, 0xa877, 0xa880, 0xa8c5, @@ -5619,7 +5913,7 @@ static const OnigCodePoint CR_Assigned[] = { 0xab11, 0xab16, 0xab20, 0xab26, 0xab28, 0xab2e, - 0xab30, 0xab67, + 0xab30, 0xab6b, 0xab70, 0xabed, 0xabf0, 0xabf9, 0xac00, 0xd7a3, @@ -5634,12 +5928,11 @@ static const OnigCodePoint CR_Assigned[] = { 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, - 0xfb46, 0xfbc1, - 0xfbd3, 0xfd3f, - 0xfd50, 0xfd8f, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, 0xfd92, 0xfdc7, - 0xfdf0, 0xfdfd, - 0xfe00, 0xfe19, + 0xfdcf, 0xfdcf, + 0xfdf0, 0xfe19, 0xfe20, 0xfe52, 0xfe54, 0xfe66, 0xfe68, 0xfe6b, @@ -5664,7 +5957,7 @@ static const OnigCodePoint CR_Assigned[] = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fd, 0x10280, 0x1029c, @@ -5682,10 +5975,20 @@ static const OnigCodePoint CR_Assigned[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, - 0x1056f, 0x1056f, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -5724,23 +6027,27 @@ static const OnigCodePoint CR_Assigned[] = { 0x10cfa, 0x10d27, 0x10d30, 0x10d39, 0x10e60, 0x10e7e, - 0x10f00, 0x10f27, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f27, 0x10f30, 0x10f59, + 0x10f70, 0x10f89, + 0x10fb0, 0x10fcb, 0x10fe0, 0x10ff6, 0x11000, 0x1104d, - 0x11052, 0x1106f, - 0x1107f, 0x110c1, + 0x11052, 0x11075, + 0x1107f, 0x110c2, 0x110cd, 0x110cd, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, - 0x11136, 0x11146, + 0x11136, 0x11147, 0x11150, 0x11176, - 0x11180, 0x111cd, - 0x111d0, 0x111df, + 0x11180, 0x111df, 0x111e1, 0x111f4, 0x11200, 0x11211, - 0x11213, 0x1123e, + 0x11213, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -5763,9 +6070,8 @@ static const OnigCodePoint CR_Assigned[] = { 0x1135d, 0x11363, 0x11366, 0x1136c, 0x11370, 0x11374, - 0x11400, 0x11459, - 0x1145b, 0x1145b, - 0x1145d, 0x1145f, + 0x11400, 0x1145b, + 0x1145d, 0x11461, 0x11480, 0x114c7, 0x114d0, 0x114d9, 0x11580, 0x115b5, @@ -5773,20 +6079,28 @@ static const OnigCodePoint CR_Assigned[] = { 0x11600, 0x11644, 0x11650, 0x11659, 0x11660, 0x1166c, - 0x11680, 0x116b8, + 0x11680, 0x116b9, 0x116c0, 0x116c9, 0x11700, 0x1171a, 0x1171d, 0x1172b, - 0x11730, 0x1173f, + 0x11730, 0x11746, 0x11800, 0x1183b, 0x118a0, 0x118f2, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e4, 0x11a00, 0x11a47, 0x11a50, 0x11aa2, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, + 0x11b00, 0x11b09, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c45, @@ -5808,18 +6122,23 @@ static const OnigCodePoint CR_Assigned[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef8, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f59, + 0x11fb0, 0x11fb0, 0x11fc0, 0x11ff1, 0x11fff, 0x12399, 0x12400, 0x1246e, 0x12470, 0x12474, 0x12480, 0x12543, - 0x13000, 0x1342e, - 0x13430, 0x13438, + 0x12f90, 0x12ff2, + 0x13000, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, - 0x16a6e, 0x16a6f, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af5, 0x16b00, 0x16b45, @@ -5831,11 +6150,18 @@ static const OnigCodePoint CR_Assigned[] = { 0x16f00, 0x16f4a, 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, - 0x16fe0, 0x16fe3, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -5843,10 +6169,14 @@ static const OnigCodePoint CR_Assigned[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9c, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, - 0x1d129, 0x1d1e8, + 0x1d129, 0x1d1ea, 0x1d200, 0x1d245, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d300, 0x1d356, 0x1d360, 0x1d378, @@ -5873,17 +6203,27 @@ static const OnigCodePoint CR_Assigned[] = { 0x1d7ce, 0x1da8b, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, 0x1e2ff, 0x1e2ff, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8c7, 0x1e8d6, 0x1e900, 0x1e94b, @@ -5931,43 +6271,45 @@ static const OnigCodePoint CR_Assigned[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f100, 0x1f10c, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f100, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0001, 0xe0001, 0xe0020, 0xe007f, 0xe0100, 0xe01ef, @@ -5977,7 +6319,7 @@ static const OnigCodePoint CR_Assigned[] = { /* 'C': Major Category */ static const OnigCodePoint CR_C[] = { - 668, + 712, 0x0000, 0x001f, 0x007f, 0x009f, 0x00ad, 0x00ad, @@ -5993,7 +6335,7 @@ static const OnigCodePoint CR_C[] = { 0x05c8, 0x05cf, 0x05eb, 0x05ee, 0x05f5, 0x0605, - 0x061c, 0x061d, + 0x061c, 0x061c, 0x06dd, 0x06dd, 0x070e, 0x070f, 0x074b, 0x074c, @@ -6003,9 +6345,8 @@ static const OnigCodePoint CR_C[] = { 0x083f, 0x083f, 0x085c, 0x085d, 0x085f, 0x085f, - 0x086b, 0x089f, - 0x08b5, 0x08b5, - 0x08be, 0x08d2, + 0x086b, 0x086f, + 0x088f, 0x0897, 0x08e2, 0x08e2, 0x0984, 0x0984, 0x098d, 0x098e, @@ -6060,7 +6401,7 @@ static const OnigCodePoint CR_C[] = { 0x0b3a, 0x0b3b, 0x0b45, 0x0b46, 0x0b49, 0x0b4a, - 0x0b4e, 0x0b55, + 0x0b4e, 0x0b54, 0x0b58, 0x0b5b, 0x0b5e, 0x0b5e, 0x0b64, 0x0b65, @@ -6084,12 +6425,13 @@ static const OnigCodePoint CR_C[] = { 0x0c0d, 0x0c0d, 0x0c11, 0x0c11, 0x0c29, 0x0c29, - 0x0c3a, 0x0c3c, + 0x0c3a, 0x0c3b, 0x0c45, 0x0c45, 0x0c49, 0x0c49, 0x0c4e, 0x0c54, 0x0c57, 0x0c57, - 0x0c5b, 0x0c5f, + 0x0c5b, 0x0c5c, + 0x0c5e, 0x0c5f, 0x0c64, 0x0c65, 0x0c70, 0x0c76, 0x0c8d, 0x0c8d, @@ -6100,19 +6442,18 @@ static const OnigCodePoint CR_C[] = { 0x0cc5, 0x0cc5, 0x0cc9, 0x0cc9, 0x0cce, 0x0cd4, - 0x0cd7, 0x0cdd, + 0x0cd7, 0x0cdc, 0x0cdf, 0x0cdf, 0x0ce4, 0x0ce5, 0x0cf0, 0x0cf0, - 0x0cf3, 0x0cff, - 0x0d04, 0x0d04, + 0x0cf4, 0x0cff, 0x0d0d, 0x0d0d, 0x0d11, 0x0d11, 0x0d45, 0x0d45, 0x0d49, 0x0d49, 0x0d50, 0x0d53, 0x0d64, 0x0d65, - 0x0d80, 0x0d81, + 0x0d80, 0x0d80, 0x0d84, 0x0d84, 0x0d97, 0x0d99, 0x0db2, 0x0db2, @@ -6135,7 +6476,7 @@ static const OnigCodePoint CR_C[] = { 0x0ebe, 0x0ebf, 0x0ec5, 0x0ec5, 0x0ec7, 0x0ec7, - 0x0ece, 0x0ecf, + 0x0ecf, 0x0ecf, 0x0eda, 0x0edb, 0x0ee0, 0x0eff, 0x0f48, 0x0f48, @@ -6169,8 +6510,7 @@ static const OnigCodePoint CR_C[] = { 0x13fe, 0x13ff, 0x169d, 0x169f, 0x16f9, 0x16ff, - 0x170d, 0x170d, - 0x1715, 0x171f, + 0x1716, 0x171e, 0x1737, 0x173f, 0x1754, 0x175f, 0x176d, 0x176d, @@ -6179,7 +6519,7 @@ static const OnigCodePoint CR_C[] = { 0x17de, 0x17df, 0x17ea, 0x17ef, 0x17fa, 0x17ff, - 0x180e, 0x180f, + 0x180e, 0x180e, 0x181a, 0x181f, 0x1879, 0x187f, 0x18ab, 0x18af, @@ -6199,9 +6539,9 @@ static const OnigCodePoint CR_C[] = { 0x1a8a, 0x1a8f, 0x1a9a, 0x1a9f, 0x1aae, 0x1aaf, - 0x1abf, 0x1aff, - 0x1b4c, 0x1b4f, - 0x1b7d, 0x1b7f, + 0x1acf, 0x1aff, + 0x1b4d, 0x1b4f, + 0x1b7f, 0x1b7f, 0x1bf4, 0x1bfb, 0x1c38, 0x1c3a, 0x1c4a, 0x1c4c, @@ -6209,7 +6549,6 @@ static const OnigCodePoint CR_C[] = { 0x1cbb, 0x1cbc, 0x1cc8, 0x1ccf, 0x1cfb, 0x1cff, - 0x1dfa, 0x1dfa, 0x1f16, 0x1f17, 0x1f1e, 0x1f1f, 0x1f46, 0x1f47, @@ -6232,15 +6571,13 @@ static const OnigCodePoint CR_C[] = { 0x2072, 0x2073, 0x208f, 0x208f, 0x209d, 0x209f, - 0x20c0, 0x20cf, + 0x20c1, 0x20cf, 0x20f1, 0x20ff, 0x218c, 0x218f, 0x2427, 0x243f, 0x244b, 0x245f, 0x2b74, 0x2b75, - 0x2b96, 0x2b97, - 0x2c2f, 0x2c2f, - 0x2c5f, 0x2c5f, + 0x2b96, 0x2b96, 0x2cf4, 0x2cf8, 0x2d26, 0x2d26, 0x2d28, 0x2d2c, @@ -6256,7 +6593,7 @@ static const OnigCodePoint CR_C[] = { 0x2dcf, 0x2dcf, 0x2dd7, 0x2dd7, 0x2ddf, 0x2ddf, - 0x2e50, 0x2e7f, + 0x2e5e, 0x2e7f, 0x2e9a, 0x2e9a, 0x2ef4, 0x2eff, 0x2fd6, 0x2fef, @@ -6266,18 +6603,17 @@ static const OnigCodePoint CR_C[] = { 0x3100, 0x3104, 0x3130, 0x3130, 0x318f, 0x318f, - 0x31bb, 0x31bf, 0x31e4, 0x31ef, 0x321f, 0x321f, - 0x4db6, 0x4dbf, - 0x9ff0, 0x9fff, 0xa48d, 0xa48f, 0xa4c7, 0xa4cf, 0xa62c, 0xa63f, 0xa6f8, 0xa6ff, - 0xa7c0, 0xa7c1, - 0xa7c7, 0xa7f6, - 0xa82c, 0xa82f, + 0xa7cb, 0xa7cf, + 0xa7d2, 0xa7d2, + 0xa7d4, 0xa7d4, + 0xa7da, 0xa7f1, + 0xa82d, 0xa82f, 0xa83a, 0xa83f, 0xa878, 0xa87f, 0xa8c6, 0xa8cd, @@ -6297,7 +6633,7 @@ static const OnigCodePoint CR_C[] = { 0xab17, 0xab1f, 0xab27, 0xab27, 0xab2f, 0xab2f, - 0xab68, 0xab6f, + 0xab6c, 0xab6f, 0xabee, 0xabef, 0xabfa, 0xabff, 0xd7a4, 0xd7af, @@ -6312,11 +6648,10 @@ static const OnigCodePoint CR_C[] = { 0xfb3f, 0xfb3f, 0xfb42, 0xfb42, 0xfb45, 0xfb45, - 0xfbc2, 0xfbd2, - 0xfd40, 0xfd4f, + 0xfbc3, 0xfbd2, 0xfd90, 0xfd91, - 0xfdc8, 0xfdef, - 0xfdfe, 0xfdff, + 0xfdc8, 0xfdce, + 0xfdd0, 0xfdef, 0xfe1a, 0xfe1f, 0xfe53, 0xfe53, 0xfe67, 0xfe67, @@ -6341,7 +6676,7 @@ static const OnigCodePoint CR_C[] = { 0x10103, 0x10106, 0x10134, 0x10136, 0x1018f, 0x1018f, - 0x1019c, 0x1019f, + 0x1019d, 0x1019f, 0x101a1, 0x101cf, 0x101fe, 0x1027f, 0x1029d, 0x1029f, @@ -6359,10 +6694,20 @@ static const OnigCodePoint CR_C[] = { 0x104fc, 0x104ff, 0x10528, 0x1052f, 0x10564, 0x1056e, - 0x10570, 0x105ff, + 0x1057b, 0x1057b, + 0x1058b, 0x1058b, + 0x10593, 0x10593, + 0x10596, 0x10596, + 0x105a2, 0x105a2, + 0x105b2, 0x105b2, + 0x105ba, 0x105ba, + 0x105bd, 0x105ff, 0x10737, 0x1073f, 0x10756, 0x1075f, - 0x10768, 0x107ff, + 0x10768, 0x1077f, + 0x10786, 0x10786, + 0x107b1, 0x107b1, + 0x107bb, 0x107ff, 0x10806, 0x10807, 0x10809, 0x10809, 0x10836, 0x10836, @@ -6400,24 +6745,28 @@ static const OnigCodePoint CR_C[] = { 0x10cf3, 0x10cf9, 0x10d28, 0x10d2f, 0x10d3a, 0x10e5f, - 0x10e7f, 0x10eff, + 0x10e7f, 0x10e7f, + 0x10eaa, 0x10eaa, + 0x10eae, 0x10eaf, + 0x10eb2, 0x10efc, 0x10f28, 0x10f2f, - 0x10f5a, 0x10fdf, + 0x10f5a, 0x10f6f, + 0x10f8a, 0x10faf, + 0x10fcc, 0x10fdf, 0x10ff7, 0x10fff, 0x1104e, 0x11051, - 0x11070, 0x1107e, + 0x11076, 0x1107e, 0x110bd, 0x110bd, - 0x110c2, 0x110cf, + 0x110c3, 0x110cf, 0x110e9, 0x110ef, 0x110fa, 0x110ff, 0x11135, 0x11135, - 0x11147, 0x1114f, + 0x11148, 0x1114f, 0x11177, 0x1117f, - 0x111ce, 0x111cf, 0x111e0, 0x111e0, 0x111f5, 0x111ff, 0x11212, 0x11212, - 0x1123f, 0x1127f, + 0x11242, 0x1127f, 0x11287, 0x11287, 0x11289, 0x11289, 0x1128e, 0x1128e, @@ -6440,9 +6789,8 @@ static const OnigCodePoint CR_C[] = { 0x11364, 0x11365, 0x1136d, 0x1136f, 0x11375, 0x113ff, - 0x1145a, 0x1145a, 0x1145c, 0x1145c, - 0x11460, 0x1147f, + 0x11462, 0x1147f, 0x114c8, 0x114cf, 0x114da, 0x1157f, 0x115b6, 0x115b7, @@ -6450,20 +6798,28 @@ static const OnigCodePoint CR_C[] = { 0x11645, 0x1164f, 0x1165a, 0x1165f, 0x1166d, 0x1167f, - 0x116b9, 0x116bf, + 0x116ba, 0x116bf, 0x116ca, 0x116ff, 0x1171b, 0x1171c, 0x1172c, 0x1172f, - 0x11740, 0x117ff, + 0x11747, 0x117ff, 0x1183c, 0x1189f, 0x118f3, 0x118fe, - 0x11900, 0x1199f, + 0x11907, 0x11908, + 0x1190a, 0x1190b, + 0x11914, 0x11914, + 0x11917, 0x11917, + 0x11936, 0x11936, + 0x11939, 0x1193a, + 0x11947, 0x1194f, + 0x1195a, 0x1199f, 0x119a8, 0x119a9, 0x119d8, 0x119d9, 0x119e5, 0x119ff, 0x11a48, 0x11a4f, - 0x11aa3, 0x11abf, - 0x11af9, 0x11bff, + 0x11aa3, 0x11aaf, + 0x11af9, 0x11aff, + 0x11b0a, 0x11bff, 0x11c09, 0x11c09, 0x11c37, 0x11c37, 0x11c46, 0x11c4f, @@ -6484,18 +6840,25 @@ static const OnigCodePoint CR_C[] = { 0x11d92, 0x11d92, 0x11d99, 0x11d9f, 0x11daa, 0x11edf, - 0x11ef9, 0x11fbf, + 0x11ef9, 0x11eff, + 0x11f11, 0x11f11, + 0x11f3b, 0x11f3d, + 0x11f5a, 0x11faf, + 0x11fb1, 0x11fbf, 0x11ff2, 0x11ffe, 0x1239a, 0x123ff, 0x1246f, 0x1246f, 0x12475, 0x1247f, - 0x12544, 0x12fff, - 0x1342f, 0x143ff, + 0x12544, 0x12f8f, + 0x12ff3, 0x12fff, + 0x13430, 0x1343f, + 0x13456, 0x143ff, 0x14647, 0x167ff, 0x16a39, 0x16a3f, 0x16a5f, 0x16a5f, 0x16a6a, 0x16a6d, - 0x16a70, 0x16acf, + 0x16abf, 0x16abf, + 0x16aca, 0x16acf, 0x16aee, 0x16aef, 0x16af6, 0x16aff, 0x16b46, 0x16b4f, @@ -6507,23 +6870,34 @@ static const OnigCodePoint CR_C[] = { 0x16f4b, 0x16f4e, 0x16f88, 0x16f8e, 0x16fa0, 0x16fdf, - 0x16fe4, 0x16fff, + 0x16fe5, 0x16fef, + 0x16ff2, 0x16fff, 0x187f8, 0x187ff, - 0x18af3, 0x1afff, - 0x1b11f, 0x1b14f, - 0x1b153, 0x1b163, + 0x18cd6, 0x18cff, + 0x18d09, 0x1afef, + 0x1aff4, 0x1aff4, + 0x1affc, 0x1affc, + 0x1afff, 0x1afff, + 0x1b123, 0x1b131, + 0x1b133, 0x1b14f, + 0x1b153, 0x1b154, + 0x1b156, 0x1b163, 0x1b168, 0x1b16f, 0x1b2fc, 0x1bbff, 0x1bc6b, 0x1bc6f, 0x1bc7d, 0x1bc7f, 0x1bc89, 0x1bc8f, 0x1bc9a, 0x1bc9b, - 0x1bca0, 0x1cfff, + 0x1bca0, 0x1ceff, + 0x1cf2e, 0x1cf2f, + 0x1cf47, 0x1cf4f, + 0x1cfc4, 0x1cfff, 0x1d0f6, 0x1d0ff, 0x1d127, 0x1d128, 0x1d173, 0x1d17a, - 0x1d1e9, 0x1d1ff, - 0x1d246, 0x1d2df, + 0x1d1eb, 0x1d1ff, + 0x1d246, 0x1d2bf, + 0x1d2d4, 0x1d2df, 0x1d2f4, 0x1d2ff, 0x1d357, 0x1d35f, 0x1d379, 0x1d3ff, @@ -6549,18 +6923,28 @@ static const OnigCodePoint CR_C[] = { 0x1d7cc, 0x1d7cd, 0x1da8c, 0x1da9a, 0x1daa0, 0x1daa0, - 0x1dab0, 0x1dfff, + 0x1dab0, 0x1deff, + 0x1df1f, 0x1df24, + 0x1df2b, 0x1dfff, 0x1e007, 0x1e007, 0x1e019, 0x1e01a, 0x1e022, 0x1e022, 0x1e025, 0x1e025, - 0x1e02b, 0x1e0ff, + 0x1e02b, 0x1e02f, + 0x1e06e, 0x1e08e, + 0x1e090, 0x1e0ff, 0x1e12d, 0x1e12f, 0x1e13e, 0x1e13f, 0x1e14a, 0x1e14d, - 0x1e150, 0x1e2bf, + 0x1e150, 0x1e28f, + 0x1e2af, 0x1e2bf, 0x1e2fa, 0x1e2fe, - 0x1e300, 0x1e7ff, + 0x1e300, 0x1e4cf, + 0x1e4fa, 0x1e7df, + 0x1e7e7, 0x1e7e7, + 0x1e7ec, 0x1e7ec, + 0x1e7ef, 0x1e7ef, + 0x1e7ff, 0x1e7ff, 0x1e8c5, 0x1e8c6, 0x1e8d7, 0x1e8ff, 0x1e94c, 0x1e94f, @@ -6608,43 +6992,45 @@ static const OnigCodePoint CR_C[] = { 0x1f0c0, 0x1f0c0, 0x1f0d0, 0x1f0d0, 0x1f0f6, 0x1f0ff, - 0x1f10d, 0x1f10f, - 0x1f16d, 0x1f16f, - 0x1f1ad, 0x1f1e5, + 0x1f1ae, 0x1f1e5, 0x1f203, 0x1f20f, 0x1f23c, 0x1f23f, 0x1f249, 0x1f24f, 0x1f252, 0x1f25f, 0x1f266, 0x1f2ff, - 0x1f6d6, 0x1f6df, + 0x1f6d8, 0x1f6db, 0x1f6ed, 0x1f6ef, - 0x1f6fb, 0x1f6ff, - 0x1f774, 0x1f77f, - 0x1f7d9, 0x1f7df, - 0x1f7ec, 0x1f7ff, + 0x1f6fd, 0x1f6ff, + 0x1f777, 0x1f77a, + 0x1f7da, 0x1f7df, + 0x1f7ec, 0x1f7ef, + 0x1f7f1, 0x1f7ff, 0x1f80c, 0x1f80f, 0x1f848, 0x1f84f, 0x1f85a, 0x1f85f, 0x1f888, 0x1f88f, - 0x1f8ae, 0x1f8ff, - 0x1f90c, 0x1f90c, - 0x1f972, 0x1f972, - 0x1f977, 0x1f979, - 0x1f9a3, 0x1f9a4, - 0x1f9ab, 0x1f9ad, - 0x1f9cb, 0x1f9cc, + 0x1f8ae, 0x1f8af, + 0x1f8b2, 0x1f8ff, 0x1fa54, 0x1fa5f, 0x1fa6e, 0x1fa6f, - 0x1fa74, 0x1fa77, - 0x1fa7b, 0x1fa7f, - 0x1fa83, 0x1fa8f, - 0x1fa96, 0x1ffff, - 0x2a6d7, 0x2a6ff, - 0x2b735, 0x2b73f, + 0x1fa7d, 0x1fa7f, + 0x1fa89, 0x1fa8f, + 0x1fabe, 0x1fabe, + 0x1fac6, 0x1facd, + 0x1fadc, 0x1fadf, + 0x1fae9, 0x1faef, + 0x1faf9, 0x1faff, + 0x1fb93, 0x1fb93, + 0x1fbcb, 0x1fbef, + 0x1fbfa, 0x1ffff, + 0x2a6e0, 0x2a6ff, + 0x2b73a, 0x2b73f, 0x2b81e, 0x2b81f, 0x2cea2, 0x2ceaf, 0x2ebe1, 0x2f7ff, - 0x2fa1e, 0xe00ff, + 0x2fa1e, 0x2ffff, + 0x3134b, 0x3134f, + 0x323b0, 0xe00ff, 0xe01f0, 0x10ffff, }; /* CR_C */ @@ -6653,12 +7039,13 @@ static const OnigCodePoint CR_C[] = { /* 'Cf': General Category */ static const OnigCodePoint CR_Cf[] = { - 20, + 21, 0x00ad, 0x00ad, 0x0600, 0x0605, 0x061c, 0x061c, 0x06dd, 0x06dd, 0x070f, 0x070f, + 0x0890, 0x0891, 0x08e2, 0x08e2, 0x180e, 0x180e, 0x200b, 0x200f, @@ -6669,7 +7056,7 @@ static const OnigCodePoint CR_Cf[] = { 0xfff9, 0xfffb, 0x110bd, 0x110bd, 0x110cd, 0x110cd, - 0x13430, 0x13438, + 0x13430, 0x1343f, 0x1bca0, 0x1bca3, 0x1d173, 0x1d17a, 0xe0001, 0xe0001, @@ -6678,7 +7065,7 @@ static const OnigCodePoint CR_Cf[] = { /* 'Cn': General Category */ static const OnigCodePoint CR_Cn[] = { - 666, + 707, 0x0378, 0x0379, 0x0380, 0x0383, 0x038b, 0x038b, @@ -6691,7 +7078,6 @@ static const OnigCodePoint CR_Cn[] = { 0x05c8, 0x05cf, 0x05eb, 0x05ee, 0x05f5, 0x05ff, - 0x061d, 0x061d, 0x070e, 0x070e, 0x074b, 0x074c, 0x07b2, 0x07bf, @@ -6700,9 +7086,9 @@ static const OnigCodePoint CR_Cn[] = { 0x083f, 0x083f, 0x085c, 0x085d, 0x085f, 0x085f, - 0x086b, 0x089f, - 0x08b5, 0x08b5, - 0x08be, 0x08d2, + 0x086b, 0x086f, + 0x088f, 0x088f, + 0x0892, 0x0897, 0x0984, 0x0984, 0x098d, 0x098e, 0x0991, 0x0992, @@ -6756,7 +7142,7 @@ static const OnigCodePoint CR_Cn[] = { 0x0b3a, 0x0b3b, 0x0b45, 0x0b46, 0x0b49, 0x0b4a, - 0x0b4e, 0x0b55, + 0x0b4e, 0x0b54, 0x0b58, 0x0b5b, 0x0b5e, 0x0b5e, 0x0b64, 0x0b65, @@ -6780,12 +7166,13 @@ static const OnigCodePoint CR_Cn[] = { 0x0c0d, 0x0c0d, 0x0c11, 0x0c11, 0x0c29, 0x0c29, - 0x0c3a, 0x0c3c, + 0x0c3a, 0x0c3b, 0x0c45, 0x0c45, 0x0c49, 0x0c49, 0x0c4e, 0x0c54, 0x0c57, 0x0c57, - 0x0c5b, 0x0c5f, + 0x0c5b, 0x0c5c, + 0x0c5e, 0x0c5f, 0x0c64, 0x0c65, 0x0c70, 0x0c76, 0x0c8d, 0x0c8d, @@ -6796,19 +7183,18 @@ static const OnigCodePoint CR_Cn[] = { 0x0cc5, 0x0cc5, 0x0cc9, 0x0cc9, 0x0cce, 0x0cd4, - 0x0cd7, 0x0cdd, + 0x0cd7, 0x0cdc, 0x0cdf, 0x0cdf, 0x0ce4, 0x0ce5, 0x0cf0, 0x0cf0, - 0x0cf3, 0x0cff, - 0x0d04, 0x0d04, + 0x0cf4, 0x0cff, 0x0d0d, 0x0d0d, 0x0d11, 0x0d11, 0x0d45, 0x0d45, 0x0d49, 0x0d49, 0x0d50, 0x0d53, 0x0d64, 0x0d65, - 0x0d80, 0x0d81, + 0x0d80, 0x0d80, 0x0d84, 0x0d84, 0x0d97, 0x0d99, 0x0db2, 0x0db2, @@ -6831,7 +7217,7 @@ static const OnigCodePoint CR_Cn[] = { 0x0ebe, 0x0ebf, 0x0ec5, 0x0ec5, 0x0ec7, 0x0ec7, - 0x0ece, 0x0ecf, + 0x0ecf, 0x0ecf, 0x0eda, 0x0edb, 0x0ee0, 0x0eff, 0x0f48, 0x0f48, @@ -6865,8 +7251,7 @@ static const OnigCodePoint CR_Cn[] = { 0x13fe, 0x13ff, 0x169d, 0x169f, 0x16f9, 0x16ff, - 0x170d, 0x170d, - 0x1715, 0x171f, + 0x1716, 0x171e, 0x1737, 0x173f, 0x1754, 0x175f, 0x176d, 0x176d, @@ -6875,7 +7260,6 @@ static const OnigCodePoint CR_Cn[] = { 0x17de, 0x17df, 0x17ea, 0x17ef, 0x17fa, 0x17ff, - 0x180f, 0x180f, 0x181a, 0x181f, 0x1879, 0x187f, 0x18ab, 0x18af, @@ -6895,9 +7279,9 @@ static const OnigCodePoint CR_Cn[] = { 0x1a8a, 0x1a8f, 0x1a9a, 0x1a9f, 0x1aae, 0x1aaf, - 0x1abf, 0x1aff, - 0x1b4c, 0x1b4f, - 0x1b7d, 0x1b7f, + 0x1acf, 0x1aff, + 0x1b4d, 0x1b4f, + 0x1b7f, 0x1b7f, 0x1bf4, 0x1bfb, 0x1c38, 0x1c3a, 0x1c4a, 0x1c4c, @@ -6905,7 +7289,6 @@ static const OnigCodePoint CR_Cn[] = { 0x1cbb, 0x1cbc, 0x1cc8, 0x1ccf, 0x1cfb, 0x1cff, - 0x1dfa, 0x1dfa, 0x1f16, 0x1f17, 0x1f1e, 0x1f1f, 0x1f46, 0x1f47, @@ -6926,15 +7309,13 @@ static const OnigCodePoint CR_Cn[] = { 0x2072, 0x2073, 0x208f, 0x208f, 0x209d, 0x209f, - 0x20c0, 0x20cf, + 0x20c1, 0x20cf, 0x20f1, 0x20ff, 0x218c, 0x218f, 0x2427, 0x243f, 0x244b, 0x245f, 0x2b74, 0x2b75, - 0x2b96, 0x2b97, - 0x2c2f, 0x2c2f, - 0x2c5f, 0x2c5f, + 0x2b96, 0x2b96, 0x2cf4, 0x2cf8, 0x2d26, 0x2d26, 0x2d28, 0x2d2c, @@ -6950,7 +7331,7 @@ static const OnigCodePoint CR_Cn[] = { 0x2dcf, 0x2dcf, 0x2dd7, 0x2dd7, 0x2ddf, 0x2ddf, - 0x2e50, 0x2e7f, + 0x2e5e, 0x2e7f, 0x2e9a, 0x2e9a, 0x2ef4, 0x2eff, 0x2fd6, 0x2fef, @@ -6960,18 +7341,17 @@ static const OnigCodePoint CR_Cn[] = { 0x3100, 0x3104, 0x3130, 0x3130, 0x318f, 0x318f, - 0x31bb, 0x31bf, 0x31e4, 0x31ef, 0x321f, 0x321f, - 0x4db6, 0x4dbf, - 0x9ff0, 0x9fff, 0xa48d, 0xa48f, 0xa4c7, 0xa4cf, 0xa62c, 0xa63f, 0xa6f8, 0xa6ff, - 0xa7c0, 0xa7c1, - 0xa7c7, 0xa7f6, - 0xa82c, 0xa82f, + 0xa7cb, 0xa7cf, + 0xa7d2, 0xa7d2, + 0xa7d4, 0xa7d4, + 0xa7da, 0xa7f1, + 0xa82d, 0xa82f, 0xa83a, 0xa83f, 0xa878, 0xa87f, 0xa8c6, 0xa8cd, @@ -6991,7 +7371,7 @@ static const OnigCodePoint CR_Cn[] = { 0xab17, 0xab1f, 0xab27, 0xab27, 0xab2f, 0xab2f, - 0xab68, 0xab6f, + 0xab6c, 0xab6f, 0xabee, 0xabef, 0xabfa, 0xabff, 0xd7a4, 0xd7af, @@ -7006,11 +7386,10 @@ static const OnigCodePoint CR_Cn[] = { 0xfb3f, 0xfb3f, 0xfb42, 0xfb42, 0xfb45, 0xfb45, - 0xfbc2, 0xfbd2, - 0xfd40, 0xfd4f, + 0xfbc3, 0xfbd2, 0xfd90, 0xfd91, - 0xfdc8, 0xfdef, - 0xfdfe, 0xfdff, + 0xfdc8, 0xfdce, + 0xfdd0, 0xfdef, 0xfe1a, 0xfe1f, 0xfe53, 0xfe53, 0xfe67, 0xfe67, @@ -7036,7 +7415,7 @@ static const OnigCodePoint CR_Cn[] = { 0x10103, 0x10106, 0x10134, 0x10136, 0x1018f, 0x1018f, - 0x1019c, 0x1019f, + 0x1019d, 0x1019f, 0x101a1, 0x101cf, 0x101fe, 0x1027f, 0x1029d, 0x1029f, @@ -7054,10 +7433,20 @@ static const OnigCodePoint CR_Cn[] = { 0x104fc, 0x104ff, 0x10528, 0x1052f, 0x10564, 0x1056e, - 0x10570, 0x105ff, + 0x1057b, 0x1057b, + 0x1058b, 0x1058b, + 0x10593, 0x10593, + 0x10596, 0x10596, + 0x105a2, 0x105a2, + 0x105b2, 0x105b2, + 0x105ba, 0x105ba, + 0x105bd, 0x105ff, 0x10737, 0x1073f, 0x10756, 0x1075f, - 0x10768, 0x107ff, + 0x10768, 0x1077f, + 0x10786, 0x10786, + 0x107b1, 0x107b1, + 0x107bb, 0x107ff, 0x10806, 0x10807, 0x10809, 0x10809, 0x10836, 0x10836, @@ -7095,24 +7484,28 @@ static const OnigCodePoint CR_Cn[] = { 0x10cf3, 0x10cf9, 0x10d28, 0x10d2f, 0x10d3a, 0x10e5f, - 0x10e7f, 0x10eff, + 0x10e7f, 0x10e7f, + 0x10eaa, 0x10eaa, + 0x10eae, 0x10eaf, + 0x10eb2, 0x10efc, 0x10f28, 0x10f2f, - 0x10f5a, 0x10fdf, + 0x10f5a, 0x10f6f, + 0x10f8a, 0x10faf, + 0x10fcc, 0x10fdf, 0x10ff7, 0x10fff, 0x1104e, 0x11051, - 0x11070, 0x1107e, - 0x110c2, 0x110cc, + 0x11076, 0x1107e, + 0x110c3, 0x110cc, 0x110ce, 0x110cf, 0x110e9, 0x110ef, 0x110fa, 0x110ff, 0x11135, 0x11135, - 0x11147, 0x1114f, + 0x11148, 0x1114f, 0x11177, 0x1117f, - 0x111ce, 0x111cf, 0x111e0, 0x111e0, 0x111f5, 0x111ff, 0x11212, 0x11212, - 0x1123f, 0x1127f, + 0x11242, 0x1127f, 0x11287, 0x11287, 0x11289, 0x11289, 0x1128e, 0x1128e, @@ -7135,9 +7528,8 @@ static const OnigCodePoint CR_Cn[] = { 0x11364, 0x11365, 0x1136d, 0x1136f, 0x11375, 0x113ff, - 0x1145a, 0x1145a, 0x1145c, 0x1145c, - 0x11460, 0x1147f, + 0x11462, 0x1147f, 0x114c8, 0x114cf, 0x114da, 0x1157f, 0x115b6, 0x115b7, @@ -7145,20 +7537,28 @@ static const OnigCodePoint CR_Cn[] = { 0x11645, 0x1164f, 0x1165a, 0x1165f, 0x1166d, 0x1167f, - 0x116b9, 0x116bf, + 0x116ba, 0x116bf, 0x116ca, 0x116ff, 0x1171b, 0x1171c, 0x1172c, 0x1172f, - 0x11740, 0x117ff, + 0x11747, 0x117ff, 0x1183c, 0x1189f, 0x118f3, 0x118fe, - 0x11900, 0x1199f, + 0x11907, 0x11908, + 0x1190a, 0x1190b, + 0x11914, 0x11914, + 0x11917, 0x11917, + 0x11936, 0x11936, + 0x11939, 0x1193a, + 0x11947, 0x1194f, + 0x1195a, 0x1199f, 0x119a8, 0x119a9, 0x119d8, 0x119d9, 0x119e5, 0x119ff, 0x11a48, 0x11a4f, - 0x11aa3, 0x11abf, - 0x11af9, 0x11bff, + 0x11aa3, 0x11aaf, + 0x11af9, 0x11aff, + 0x11b0a, 0x11bff, 0x11c09, 0x11c09, 0x11c37, 0x11c37, 0x11c46, 0x11c4f, @@ -7179,19 +7579,24 @@ static const OnigCodePoint CR_Cn[] = { 0x11d92, 0x11d92, 0x11d99, 0x11d9f, 0x11daa, 0x11edf, - 0x11ef9, 0x11fbf, + 0x11ef9, 0x11eff, + 0x11f11, 0x11f11, + 0x11f3b, 0x11f3d, + 0x11f5a, 0x11faf, + 0x11fb1, 0x11fbf, 0x11ff2, 0x11ffe, 0x1239a, 0x123ff, 0x1246f, 0x1246f, 0x12475, 0x1247f, - 0x12544, 0x12fff, - 0x1342f, 0x1342f, - 0x13439, 0x143ff, + 0x12544, 0x12f8f, + 0x12ff3, 0x12fff, + 0x13456, 0x143ff, 0x14647, 0x167ff, 0x16a39, 0x16a3f, 0x16a5f, 0x16a5f, 0x16a6a, 0x16a6d, - 0x16a70, 0x16acf, + 0x16abf, 0x16abf, + 0x16aca, 0x16acf, 0x16aee, 0x16aef, 0x16af6, 0x16aff, 0x16b46, 0x16b4f, @@ -7203,22 +7608,33 @@ static const OnigCodePoint CR_Cn[] = { 0x16f4b, 0x16f4e, 0x16f88, 0x16f8e, 0x16fa0, 0x16fdf, - 0x16fe4, 0x16fff, + 0x16fe5, 0x16fef, + 0x16ff2, 0x16fff, 0x187f8, 0x187ff, - 0x18af3, 0x1afff, - 0x1b11f, 0x1b14f, - 0x1b153, 0x1b163, + 0x18cd6, 0x18cff, + 0x18d09, 0x1afef, + 0x1aff4, 0x1aff4, + 0x1affc, 0x1affc, + 0x1afff, 0x1afff, + 0x1b123, 0x1b131, + 0x1b133, 0x1b14f, + 0x1b153, 0x1b154, + 0x1b156, 0x1b163, 0x1b168, 0x1b16f, 0x1b2fc, 0x1bbff, 0x1bc6b, 0x1bc6f, 0x1bc7d, 0x1bc7f, 0x1bc89, 0x1bc8f, 0x1bc9a, 0x1bc9b, - 0x1bca4, 0x1cfff, + 0x1bca4, 0x1ceff, + 0x1cf2e, 0x1cf2f, + 0x1cf47, 0x1cf4f, + 0x1cfc4, 0x1cfff, 0x1d0f6, 0x1d0ff, 0x1d127, 0x1d128, - 0x1d1e9, 0x1d1ff, - 0x1d246, 0x1d2df, + 0x1d1eb, 0x1d1ff, + 0x1d246, 0x1d2bf, + 0x1d2d4, 0x1d2df, 0x1d2f4, 0x1d2ff, 0x1d357, 0x1d35f, 0x1d379, 0x1d3ff, @@ -7244,18 +7660,28 @@ static const OnigCodePoint CR_Cn[] = { 0x1d7cc, 0x1d7cd, 0x1da8c, 0x1da9a, 0x1daa0, 0x1daa0, - 0x1dab0, 0x1dfff, + 0x1dab0, 0x1deff, + 0x1df1f, 0x1df24, + 0x1df2b, 0x1dfff, 0x1e007, 0x1e007, 0x1e019, 0x1e01a, 0x1e022, 0x1e022, 0x1e025, 0x1e025, - 0x1e02b, 0x1e0ff, + 0x1e02b, 0x1e02f, + 0x1e06e, 0x1e08e, + 0x1e090, 0x1e0ff, 0x1e12d, 0x1e12f, 0x1e13e, 0x1e13f, 0x1e14a, 0x1e14d, - 0x1e150, 0x1e2bf, + 0x1e150, 0x1e28f, + 0x1e2af, 0x1e2bf, 0x1e2fa, 0x1e2fe, - 0x1e300, 0x1e7ff, + 0x1e300, 0x1e4cf, + 0x1e4fa, 0x1e7df, + 0x1e7e7, 0x1e7e7, + 0x1e7ec, 0x1e7ec, + 0x1e7ef, 0x1e7ef, + 0x1e7ff, 0x1e7ff, 0x1e8c5, 0x1e8c6, 0x1e8d7, 0x1e8ff, 0x1e94c, 0x1e94f, @@ -7303,43 +7729,45 @@ static const OnigCodePoint CR_Cn[] = { 0x1f0c0, 0x1f0c0, 0x1f0d0, 0x1f0d0, 0x1f0f6, 0x1f0ff, - 0x1f10d, 0x1f10f, - 0x1f16d, 0x1f16f, - 0x1f1ad, 0x1f1e5, + 0x1f1ae, 0x1f1e5, 0x1f203, 0x1f20f, 0x1f23c, 0x1f23f, 0x1f249, 0x1f24f, 0x1f252, 0x1f25f, 0x1f266, 0x1f2ff, - 0x1f6d6, 0x1f6df, + 0x1f6d8, 0x1f6db, 0x1f6ed, 0x1f6ef, - 0x1f6fb, 0x1f6ff, - 0x1f774, 0x1f77f, - 0x1f7d9, 0x1f7df, - 0x1f7ec, 0x1f7ff, + 0x1f6fd, 0x1f6ff, + 0x1f777, 0x1f77a, + 0x1f7da, 0x1f7df, + 0x1f7ec, 0x1f7ef, + 0x1f7f1, 0x1f7ff, 0x1f80c, 0x1f80f, 0x1f848, 0x1f84f, 0x1f85a, 0x1f85f, 0x1f888, 0x1f88f, - 0x1f8ae, 0x1f8ff, - 0x1f90c, 0x1f90c, - 0x1f972, 0x1f972, - 0x1f977, 0x1f979, - 0x1f9a3, 0x1f9a4, - 0x1f9ab, 0x1f9ad, - 0x1f9cb, 0x1f9cc, + 0x1f8ae, 0x1f8af, + 0x1f8b2, 0x1f8ff, 0x1fa54, 0x1fa5f, 0x1fa6e, 0x1fa6f, - 0x1fa74, 0x1fa77, - 0x1fa7b, 0x1fa7f, - 0x1fa83, 0x1fa8f, - 0x1fa96, 0x1ffff, - 0x2a6d7, 0x2a6ff, - 0x2b735, 0x2b73f, + 0x1fa7d, 0x1fa7f, + 0x1fa89, 0x1fa8f, + 0x1fabe, 0x1fabe, + 0x1fac6, 0x1facd, + 0x1fadc, 0x1fadf, + 0x1fae9, 0x1faef, + 0x1faf9, 0x1faff, + 0x1fb93, 0x1fb93, + 0x1fbcb, 0x1fbef, + 0x1fbfa, 0x1ffff, + 0x2a6e0, 0x2a6ff, + 0x2b73a, 0x2b73f, 0x2b81e, 0x2b81f, 0x2cea2, 0x2ceaf, 0x2ebe1, 0x2f7ff, - 0x2fa1e, 0xe0000, + 0x2fa1e, 0x2ffff, + 0x3134b, 0x3134f, + 0x323b0, 0xe0000, 0xe0002, 0xe001f, 0xe0080, 0xe00ff, 0xe01f0, 0xeffff, @@ -7363,7 +7791,7 @@ static const OnigCodePoint CR_Cs[] = { /* 'L': Major Category */ static const OnigCodePoint CR_L[] = { - 609, + 659, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -7413,8 +7841,9 @@ static const OnigCodePoint CR_L[] = { 0x0828, 0x0828, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c9, 0x0904, 0x0939, 0x093d, 0x093d, 0x0950, 0x0950, @@ -7479,6 +7908,7 @@ static const OnigCodePoint CR_L[] = { 0x0c2a, 0x0c39, 0x0c3d, 0x0c3d, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c61, 0x0c80, 0x0c80, 0x0c85, 0x0c8c, @@ -7487,10 +7917,10 @@ static const OnigCodePoint CR_L[] = { 0x0caa, 0x0cb3, 0x0cb5, 0x0cb9, 0x0cbd, 0x0cbd, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce1, 0x0cf1, 0x0cf2, - 0x0d05, 0x0d0c, + 0x0d04, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d3d, @@ -7558,9 +7988,8 @@ static const OnigCodePoint CR_L[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16f1, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1711, - 0x1720, 0x1731, + 0x1700, 0x1711, + 0x171f, 0x1731, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, @@ -7581,7 +8010,7 @@ static const OnigCodePoint CR_L[] = { 0x1a20, 0x1a54, 0x1aa7, 0x1aa7, 0x1b05, 0x1b33, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b83, 0x1ba0, 0x1bae, 0x1baf, 0x1bba, 0x1be5, @@ -7632,9 +8061,7 @@ static const OnigCodePoint CR_L[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2183, 0x2184, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -7661,11 +8088,10 @@ static const OnigCodePoint CR_L[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa61f, @@ -7675,9 +8101,11 @@ static const OnigCodePoint CR_L[] = { 0xa6a0, 0xa6e5, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa801, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa801, 0xa803, 0xa805, 0xa807, 0xa80a, 0xa80c, 0xa822, @@ -7714,7 +8142,7 @@ static const OnigCodePoint CR_L[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabe2, 0xac00, 0xd7a3, 0xd7b0, 0xd7c6, @@ -7765,9 +8193,20 @@ static const OnigCodePoint CR_L[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -7798,15 +8237,22 @@ static const OnigCodePoint CR_L[] = { 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x10d00, 0x10d23, + 0x10e80, 0x10ea9, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11003, 0x11037, + 0x11071, 0x11072, + 0x11075, 0x11075, 0x11083, 0x110af, 0x110d0, 0x110e8, 0x11103, 0x11126, 0x11144, 0x11144, + 0x11147, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111b2, @@ -7815,6 +8261,7 @@ static const OnigCodePoint CR_L[] = { 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x1122b, + 0x1123f, 0x11240, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -7832,7 +8279,7 @@ static const OnigCodePoint CR_L[] = { 0x1135d, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144a, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114af, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -7843,9 +8290,16 @@ static const OnigCodePoint CR_L[] = { 0x11680, 0x116aa, 0x116b8, 0x116b8, 0x11700, 0x1171a, + 0x11740, 0x11746, 0x11800, 0x1182b, 0x118a0, 0x118df, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x1192f, + 0x1193f, 0x1193f, + 0x11941, 0x11941, 0x119a0, 0x119a7, 0x119aa, 0x119d0, 0x119e1, 0x119e1, @@ -7856,7 +8310,7 @@ static const OnigCodePoint CR_L[] = { 0x11a50, 0x11a50, 0x11a5c, 0x11a89, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c2e, 0x11c40, 0x11c40, @@ -7870,12 +8324,19 @@ static const OnigCodePoint CR_L[] = { 0x11d6a, 0x11d89, 0x11d98, 0x11d98, 0x11ee0, 0x11ef2, + 0x11f02, 0x11f02, + 0x11f04, 0x11f10, + 0x11f12, 0x11f33, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, + 0x16a70, 0x16abe, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b40, 0x16b43, @@ -7888,9 +8349,15 @@ static const OnigCodePoint CR_L[] = { 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -7927,10 +8394,19 @@ static const OnigCodePoint CR_L[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, + 0x1e4d0, 0x1e4eb, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e900, 0x1e943, 0x1e94b, 0x1e94b, @@ -7967,17 +8443,19 @@ static const OnigCodePoint CR_L[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_L */ /* 'LC': General Category */ static const OnigCodePoint CR_LC[] = { - 131, + 143, 0x0041, 0x005a, 0x0061, 0x007a, 0x00b5, 0x00b5, @@ -8047,9 +8525,7 @@ static const OnigCodePoint CR_LC[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2183, 0x2184, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2c7b, + 0x2c00, 0x2c7b, 0x2c7e, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, @@ -8061,11 +8537,14 @@ static const OnigCodePoint CR_LC[] = { 0xa722, 0xa76f, 0xa771, 0xa787, 0xa78b, 0xa78e, - 0xa790, 0xa7bf, - 0xa7c2, 0xa7c6, + 0xa790, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f5, 0xa7f6, 0xa7fa, 0xa7fa, 0xab30, 0xab5a, - 0xab60, 0xab67, + 0xab60, 0xab68, 0xab70, 0xabbf, 0xfb00, 0xfb06, 0xfb13, 0xfb17, @@ -8074,6 +8553,14 @@ static const OnigCodePoint CR_LC[] = { 0x10400, 0x1044f, 0x104b0, 0x104d3, 0x104d8, 0x104fb, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x118a0, 0x118df, @@ -8108,12 +8595,15 @@ static const OnigCodePoint CR_LC[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df09, + 0x1df0b, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e900, 0x1e943, }; /* CR_LC */ /* 'Ll': General Category */ static const OnigCodePoint CR_Ll[] = { - 642, + 658, 0x0061, 0x007a, 0x00b5, 0x00b5, 0x00df, 0x00f6, @@ -8545,7 +9035,7 @@ static const OnigCodePoint CR_Ll[] = { 0x2146, 0x2149, 0x214e, 0x214e, 0x2184, 0x2184, - 0x2c30, 0x2c5e, + 0x2c30, 0x2c5f, 0x2c61, 0x2c61, 0x2c65, 0x2c66, 0x2c68, 0x2c68, @@ -8714,16 +9204,29 @@ static const OnigCodePoint CR_Ll[] = { 0xa7bb, 0xa7bb, 0xa7bd, 0xa7bd, 0xa7bf, 0xa7bf, + 0xa7c1, 0xa7c1, 0xa7c3, 0xa7c3, + 0xa7c8, 0xa7c8, + 0xa7ca, 0xa7ca, + 0xa7d1, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d5, + 0xa7d7, 0xa7d7, + 0xa7d9, 0xa7d9, + 0xa7f6, 0xa7f6, 0xa7fa, 0xa7fa, 0xab30, 0xab5a, - 0xab60, 0xab67, + 0xab60, 0xab68, 0xab70, 0xabbf, 0xfb00, 0xfb06, 0xfb13, 0xfb17, 0xff41, 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, @@ -8755,12 +9258,15 @@ static const OnigCodePoint CR_Ll[] = { 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7c9, 0x1d7cb, 0x1d7cb, + 0x1df00, 0x1df09, + 0x1df0b, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e922, 0x1e943, }; /* CR_Ll */ /* 'Lm': General Category */ static const OnigCodePoint CR_Lm[] = { - 60, + 71, 0x02b0, 0x02c1, 0x02c6, 0x02d1, 0x02e0, 0x02e4, @@ -8776,6 +9282,7 @@ static const OnigCodePoint CR_Lm[] = { 0x081a, 0x081a, 0x0824, 0x0824, 0x0828, 0x0828, + 0x08c9, 0x08c9, 0x0971, 0x0971, 0x0e46, 0x0e46, 0x0ec6, 0x0ec6, @@ -8806,6 +9313,7 @@ static const OnigCodePoint CR_Lm[] = { 0xa717, 0xa71f, 0xa770, 0xa770, 0xa788, 0xa788, + 0xa7f2, 0xa7f4, 0xa7f8, 0xa7f9, 0xa9cf, 0xa9cf, 0xa9e6, 0xa9e6, @@ -8813,19 +9321,28 @@ static const OnigCodePoint CR_Lm[] = { 0xaadd, 0xaadd, 0xaaf3, 0xaaf4, 0xab5c, 0xab5f, + 0xab69, 0xab69, 0xff70, 0xff70, 0xff9e, 0xff9f, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x16b40, 0x16b43, 0x16f93, 0x16f9f, 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1e030, 0x1e06d, 0x1e137, 0x1e13d, + 0x1e4eb, 0x1e4eb, 0x1e94b, 0x1e94b, }; /* CR_Lm */ /* 'Lo': General Category */ static const OnigCodePoint CR_Lo[] = { - 476, + 510, 0x00aa, 0x00aa, 0x00ba, 0x00ba, 0x01bb, 0x01bb, @@ -8849,8 +9366,9 @@ static const OnigCodePoint CR_Lo[] = { 0x0800, 0x0815, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c8, 0x0904, 0x0939, 0x093d, 0x093d, 0x0950, 0x0950, @@ -8915,6 +9433,7 @@ static const OnigCodePoint CR_Lo[] = { 0x0c2a, 0x0c39, 0x0c3d, 0x0c3d, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c61, 0x0c80, 0x0c80, 0x0c85, 0x0c8c, @@ -8923,10 +9442,10 @@ static const OnigCodePoint CR_Lo[] = { 0x0caa, 0x0cb3, 0x0cb5, 0x0cb9, 0x0cbd, 0x0cbd, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce1, 0x0cf1, 0x0cf2, - 0x0d05, 0x0d0c, + 0x0d04, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d3d, @@ -8987,9 +9506,8 @@ static const OnigCodePoint CR_Lo[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16f1, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1711, - 0x1720, 0x1731, + 0x1700, 0x1711, + 0x171f, 0x1731, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, @@ -9009,7 +9527,7 @@ static const OnigCodePoint CR_Lo[] = { 0x1a00, 0x1a16, 0x1a20, 0x1a54, 0x1b05, 0x1b33, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b83, 0x1ba0, 0x1bae, 0x1baf, 0x1bba, 0x1be5, @@ -9039,11 +9557,10 @@ static const OnigCodePoint CR_Lo[] = { 0x30ff, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa014, + 0x3400, 0x4dbf, + 0x4e00, 0xa014, 0xa016, 0xa48c, 0xa4d0, 0xa4f7, 0xa500, 0xa60b, @@ -9166,15 +9683,22 @@ static const OnigCodePoint CR_Lo[] = { 0x10b80, 0x10b91, 0x10c00, 0x10c48, 0x10d00, 0x10d23, + 0x10e80, 0x10ea9, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11003, 0x11037, + 0x11071, 0x11072, + 0x11075, 0x11075, 0x11083, 0x110af, 0x110d0, 0x110e8, 0x11103, 0x11126, 0x11144, 0x11144, + 0x11147, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111b2, @@ -9183,6 +9707,7 @@ static const OnigCodePoint CR_Lo[] = { 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x1122b, + 0x1123f, 0x11240, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -9200,7 +9725,7 @@ static const OnigCodePoint CR_Lo[] = { 0x1135d, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144a, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114af, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -9211,8 +9736,15 @@ static const OnigCodePoint CR_Lo[] = { 0x11680, 0x116aa, 0x116b8, 0x116b8, 0x11700, 0x1171a, + 0x11740, 0x11746, 0x11800, 0x1182b, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x1192f, + 0x1193f, 0x1193f, + 0x11941, 0x11941, 0x119a0, 0x119a7, 0x119aa, 0x119d0, 0x119e1, 0x119e1, @@ -9223,7 +9755,7 @@ static const OnigCodePoint CR_Lo[] = { 0x11a50, 0x11a50, 0x11a5c, 0x11a89, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c2e, 0x11c40, 0x11c40, @@ -9237,12 +9769,19 @@ static const OnigCodePoint CR_Lo[] = { 0x11d6a, 0x11d89, 0x11d98, 0x11d98, 0x11ee0, 0x11ef2, + 0x11f02, 0x11f02, + 0x11f04, 0x11f10, + 0x11f12, 0x11f33, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, + 0x16a70, 0x16abe, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b63, 0x16b77, @@ -9250,18 +9789,28 @@ static const OnigCodePoint CR_Lo[] = { 0x16f00, 0x16f4a, 0x16f50, 0x16f50, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, 0x1bc70, 0x1bc7c, 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, + 0x1df0a, 0x1df0a, 0x1e100, 0x1e12c, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, + 0x1e4d0, 0x1e4ea, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1ee00, 0x1ee03, 0x1ee05, 0x1ee1f, @@ -9296,12 +9845,14 @@ static const OnigCodePoint CR_Lo[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Lo */ /* 'Lt': General Category */ @@ -9321,7 +9872,7 @@ static const OnigCodePoint CR_Lt[] = { /* 'Lu': General Category */ static const OnigCodePoint CR_Lu[] = { - 636, + 646, 0x0041, 0x005a, 0x00c0, 0x00d6, 0x00d8, 0x00de, @@ -9753,7 +10304,7 @@ static const OnigCodePoint CR_Lu[] = { 0x213e, 0x213f, 0x2145, 0x2145, 0x2183, 0x2183, - 0x2c00, 0x2c2e, + 0x2c00, 0x2c2f, 0x2c60, 0x2c60, 0x2c62, 0x2c64, 0x2c67, 0x2c67, @@ -9918,11 +10469,21 @@ static const OnigCodePoint CR_Lu[] = { 0xa7ba, 0xa7ba, 0xa7bc, 0xa7bc, 0xa7be, 0xa7be, + 0xa7c0, 0xa7c0, 0xa7c2, 0xa7c2, - 0xa7c4, 0xa7c6, + 0xa7c4, 0xa7c7, + 0xa7c9, 0xa7c9, + 0xa7d0, 0xa7d0, + 0xa7d6, 0xa7d6, + 0xa7d8, 0xa7d8, + 0xa7f5, 0xa7f5, 0xff21, 0xff3a, 0x10400, 0x10427, 0x104b0, 0x104d3, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, 0x10c80, 0x10cb2, 0x118a0, 0x118bf, 0x16e40, 0x16e5f, @@ -9962,7 +10523,7 @@ static const OnigCodePoint CR_Lu[] = { /* 'M': Major Category */ static const OnigCodePoint CR_M[] = { - 280, + 310, 0x0300, 0x036f, 0x0483, 0x0489, 0x0591, 0x05bd, @@ -9987,7 +10548,8 @@ static const OnigCodePoint CR_M[] = { 0x0825, 0x0827, 0x0829, 0x082d, 0x0859, 0x085b, - 0x08d3, 0x08e1, + 0x0898, 0x089f, + 0x08ca, 0x08e1, 0x08e3, 0x0903, 0x093a, 0x093c, 0x093e, 0x094f, @@ -10021,7 +10583,7 @@ static const OnigCodePoint CR_M[] = { 0x0b3e, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b62, 0x0b63, 0x0b82, 0x0b82, 0x0bbe, 0x0bc2, @@ -10029,6 +10591,7 @@ static const OnigCodePoint CR_M[] = { 0x0bca, 0x0bcd, 0x0bd7, 0x0bd7, 0x0c00, 0x0c04, + 0x0c3c, 0x0c3c, 0x0c3e, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, @@ -10041,6 +10604,7 @@ static const OnigCodePoint CR_M[] = { 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, 0x0ce2, 0x0ce3, + 0x0cf3, 0x0cf3, 0x0d00, 0x0d03, 0x0d3b, 0x0d3c, 0x0d3e, 0x0d44, @@ -10048,7 +10612,7 @@ static const OnigCodePoint CR_M[] = { 0x0d4a, 0x0d4d, 0x0d57, 0x0d57, 0x0d62, 0x0d63, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0dca, 0x0dca, 0x0dcf, 0x0dd4, 0x0dd6, 0x0dd6, @@ -10059,7 +10623,7 @@ static const OnigCodePoint CR_M[] = { 0x0e47, 0x0e4e, 0x0eb1, 0x0eb1, 0x0eb4, 0x0ebc, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0f18, 0x0f19, 0x0f35, 0x0f35, 0x0f37, 0x0f37, @@ -10080,13 +10644,14 @@ static const OnigCodePoint CR_M[] = { 0x108f, 0x108f, 0x109a, 0x109d, 0x135d, 0x135f, - 0x1712, 0x1714, + 0x1712, 0x1715, 0x1732, 0x1734, 0x1752, 0x1753, 0x1772, 0x1773, 0x17b4, 0x17d3, 0x17dd, 0x17dd, 0x180b, 0x180d, + 0x180f, 0x180f, 0x1885, 0x1886, 0x18a9, 0x18a9, 0x1920, 0x192b, @@ -10095,7 +10660,7 @@ static const OnigCodePoint CR_M[] = { 0x1a55, 0x1a5e, 0x1a60, 0x1a7c, 0x1a7f, 0x1a7f, - 0x1ab0, 0x1abe, + 0x1ab0, 0x1ace, 0x1b00, 0x1b04, 0x1b34, 0x1b44, 0x1b6b, 0x1b73, @@ -10108,8 +10673,7 @@ static const OnigCodePoint CR_M[] = { 0x1ced, 0x1ced, 0x1cf4, 0x1cf4, 0x1cf7, 0x1cf9, - 0x1dc0, 0x1df9, - 0x1dfb, 0x1dff, + 0x1dc0, 0x1dff, 0x20d0, 0x20f0, 0x2cef, 0x2cf1, 0x2d7f, 0x2d7f, @@ -10124,6 +10688,7 @@ static const OnigCodePoint CR_M[] = { 0xa806, 0xa806, 0xa80b, 0xa80b, 0xa823, 0xa827, + 0xa82c, 0xa82c, 0xa880, 0xa881, 0xa8b4, 0xa8c5, 0xa8e0, 0xa8f1, @@ -10159,11 +10724,17 @@ static const OnigCodePoint CR_M[] = { 0x10a3f, 0x10a3f, 0x10ae5, 0x10ae6, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, 0x11000, 0x11002, 0x11038, 0x11046, + 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107f, 0x11082, 0x110b0, 0x110ba, + 0x110c2, 0x110c2, 0x11100, 0x11102, 0x11127, 0x11134, 0x11145, 0x11146, @@ -10171,8 +10742,10 @@ static const OnigCodePoint CR_M[] = { 0x11180, 0x11182, 0x111b3, 0x111c0, 0x111c9, 0x111cc, + 0x111ce, 0x111cf, 0x1122c, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112ea, 0x11300, 0x11303, 0x1133b, 0x1133c, @@ -10193,6 +10766,11 @@ static const OnigCodePoint CR_M[] = { 0x116ab, 0x116b7, 0x1171d, 0x1172b, 0x1182c, 0x1183a, + 0x11930, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x1193e, + 0x11940, 0x11940, + 0x11942, 0x11943, 0x119d1, 0x119d7, 0x119da, 0x119e0, 0x119e4, 0x119e4, @@ -10215,12 +10793,22 @@ static const OnigCodePoint CR_M[] = { 0x11d90, 0x11d91, 0x11d93, 0x11d97, 0x11ef3, 0x11ef6, + 0x11f00, 0x11f01, + 0x11f03, 0x11f03, + 0x11f34, 0x11f3a, + 0x11f3e, 0x11f42, + 0x13440, 0x13440, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16f4f, 0x16f4f, 0x16f51, 0x16f87, 0x16f8f, 0x16f92, + 0x16fe4, 0x16fe4, + 0x16ff0, 0x16ff1, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d169, 0x1d16d, 0x1d172, 0x1d17b, 0x1d182, @@ -10238,8 +10826,11 @@ static const OnigCodePoint CR_M[] = { 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e08f, 0x1e08f, 0x1e130, 0x1e136, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, + 0x1e4ec, 0x1e4ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e94a, 0xe0100, 0xe01ef, @@ -10247,7 +10838,7 @@ static const OnigCodePoint CR_M[] = { /* 'Mc': General Category */ static const OnigCodePoint CR_Mc[] = { - 168, + 182, 0x0903, 0x0903, 0x093b, 0x093b, 0x093e, 0x0940, @@ -10283,6 +10874,7 @@ static const OnigCodePoint CR_Mc[] = { 0x0cc7, 0x0cc8, 0x0cca, 0x0ccb, 0x0cd5, 0x0cd6, + 0x0cf3, 0x0cf3, 0x0d02, 0x0d03, 0x0d3e, 0x0d40, 0x0d46, 0x0d48, @@ -10305,6 +10897,8 @@ static const OnigCodePoint CR_Mc[] = { 0x1087, 0x108c, 0x108f, 0x108f, 0x109a, 0x109c, + 0x1715, 0x1715, + 0x1734, 0x1734, 0x17b6, 0x17b6, 0x17be, 0x17c5, 0x17c7, 0x17c8, @@ -10367,6 +10961,7 @@ static const OnigCodePoint CR_Mc[] = { 0x11182, 0x11182, 0x111b3, 0x111b5, 0x111bf, 0x111c0, + 0x111ce, 0x111ce, 0x1122c, 0x1122e, 0x11232, 0x11233, 0x11235, 0x11235, @@ -10398,6 +10993,11 @@ static const OnigCodePoint CR_Mc[] = { 0x11726, 0x11726, 0x1182c, 0x1182e, 0x11838, 0x11838, + 0x11930, 0x11935, + 0x11937, 0x11938, + 0x1193d, 0x1193d, + 0x11940, 0x11940, + 0x11942, 0x11942, 0x119d1, 0x119d3, 0x119dc, 0x119df, 0x119e4, 0x119e4, @@ -10413,7 +11013,12 @@ static const OnigCodePoint CR_Mc[] = { 0x11d93, 0x11d94, 0x11d96, 0x11d96, 0x11ef5, 0x11ef6, + 0x11f03, 0x11f03, + 0x11f34, 0x11f35, + 0x11f3e, 0x11f3f, + 0x11f41, 0x11f41, 0x16f51, 0x16f87, + 0x16ff0, 0x16ff1, 0x1d165, 0x1d166, 0x1d16d, 0x1d172, }; /* CR_Mc */ @@ -10430,7 +11035,7 @@ static const OnigCodePoint CR_Me[] = { /* 'Mn': General Category */ static const OnigCodePoint CR_Mn[] = { - 318, + 346, 0x0300, 0x036f, 0x0483, 0x0487, 0x0591, 0x05bd, @@ -10455,7 +11060,8 @@ static const OnigCodePoint CR_Mn[] = { 0x0825, 0x0827, 0x0829, 0x082d, 0x0859, 0x085b, - 0x08d3, 0x08e1, + 0x0898, 0x089f, + 0x08ca, 0x08e1, 0x08e3, 0x0902, 0x093a, 0x093a, 0x093c, 0x093c, @@ -10489,13 +11095,14 @@ static const OnigCodePoint CR_Mn[] = { 0x0b3f, 0x0b3f, 0x0b41, 0x0b44, 0x0b4d, 0x0b4d, - 0x0b56, 0x0b56, + 0x0b55, 0x0b56, 0x0b62, 0x0b63, 0x0b82, 0x0b82, 0x0bc0, 0x0bc0, 0x0bcd, 0x0bcd, 0x0c00, 0x0c00, 0x0c04, 0x0c04, + 0x0c3c, 0x0c3c, 0x0c3e, 0x0c40, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, @@ -10512,6 +11119,7 @@ static const OnigCodePoint CR_Mn[] = { 0x0d41, 0x0d44, 0x0d4d, 0x0d4d, 0x0d62, 0x0d63, + 0x0d81, 0x0d81, 0x0dca, 0x0dca, 0x0dd2, 0x0dd4, 0x0dd6, 0x0dd6, @@ -10520,7 +11128,7 @@ static const OnigCodePoint CR_Mn[] = { 0x0e47, 0x0e4e, 0x0eb1, 0x0eb1, 0x0eb4, 0x0ebc, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0f18, 0x0f19, 0x0f35, 0x0f35, 0x0f37, 0x0f37, @@ -10544,7 +11152,7 @@ static const OnigCodePoint CR_Mn[] = { 0x109d, 0x109d, 0x135d, 0x135f, 0x1712, 0x1714, - 0x1732, 0x1734, + 0x1732, 0x1733, 0x1752, 0x1753, 0x1772, 0x1773, 0x17b4, 0x17b5, @@ -10553,6 +11161,7 @@ static const OnigCodePoint CR_Mn[] = { 0x17c9, 0x17d3, 0x17dd, 0x17dd, 0x180b, 0x180d, + 0x180f, 0x180f, 0x1885, 0x1886, 0x18a9, 0x18a9, 0x1920, 0x1922, @@ -10569,6 +11178,7 @@ static const OnigCodePoint CR_Mn[] = { 0x1a73, 0x1a7c, 0x1a7f, 0x1a7f, 0x1ab0, 0x1abd, + 0x1abf, 0x1ace, 0x1b00, 0x1b03, 0x1b34, 0x1b34, 0x1b36, 0x1b3a, @@ -10591,8 +11201,7 @@ static const OnigCodePoint CR_Mn[] = { 0x1ced, 0x1ced, 0x1cf4, 0x1cf4, 0x1cf8, 0x1cf9, - 0x1dc0, 0x1df9, - 0x1dfb, 0x1dff, + 0x1dc0, 0x1dff, 0x20d0, 0x20dc, 0x20e1, 0x20e1, 0x20e5, 0x20f0, @@ -10609,6 +11218,7 @@ static const OnigCodePoint CR_Mn[] = { 0xa806, 0xa806, 0xa80b, 0xa80b, 0xa825, 0xa826, + 0xa82c, 0xa82c, 0xa8c4, 0xa8c5, 0xa8e0, 0xa8f1, 0xa8ff, 0xa8ff, @@ -10648,12 +11258,18 @@ static const OnigCodePoint CR_Mn[] = { 0x10a3f, 0x10a3f, 0x10ae5, 0x10ae6, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, 0x11001, 0x11001, 0x11038, 0x11046, + 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107f, 0x11081, 0x110b3, 0x110b6, 0x110b9, 0x110ba, + 0x110c2, 0x110c2, 0x11100, 0x11102, 0x11127, 0x1112b, 0x1112d, 0x11134, @@ -10661,10 +11277,12 @@ static const OnigCodePoint CR_Mn[] = { 0x11180, 0x11181, 0x111b6, 0x111be, 0x111c9, 0x111cc, + 0x111cf, 0x111cf, 0x1122f, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112df, 0x112e3, 0x112ea, 0x11300, 0x11301, @@ -10696,6 +11314,9 @@ static const OnigCodePoint CR_Mn[] = { 0x11727, 0x1172b, 0x1182f, 0x11837, 0x11839, 0x1183a, + 0x1193b, 0x1193c, + 0x1193e, 0x1193e, + 0x11943, 0x11943, 0x119d4, 0x119d7, 0x119da, 0x119db, 0x119e0, 0x119e0, @@ -10723,11 +11344,20 @@ static const OnigCodePoint CR_Mn[] = { 0x11d95, 0x11d95, 0x11d97, 0x11d97, 0x11ef3, 0x11ef4, + 0x11f00, 0x11f01, + 0x11f36, 0x11f3a, + 0x11f40, 0x11f40, + 0x11f42, 0x11f42, + 0x13440, 0x13440, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16f4f, 0x16f4f, 0x16f8f, 0x16f92, + 0x16fe4, 0x16fe4, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d167, 0x1d169, 0x1d17b, 0x1d182, 0x1d185, 0x1d18b, @@ -10744,8 +11374,11 @@ static const OnigCodePoint CR_Mn[] = { 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e08f, 0x1e08f, 0x1e130, 0x1e136, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, + 0x1e4ec, 0x1e4ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e94a, 0xe0100, 0xe01ef, @@ -10753,7 +11386,7 @@ static const OnigCodePoint CR_Mn[] = { /* 'N': Major Category */ static const OnigCodePoint CR_N[] = { - 130, + 137, 0x0030, 0x0039, 0x00b2, 0x00b3, 0x00b9, 0x00b9, @@ -10850,6 +11483,7 @@ static const OnigCodePoint CR_N[] = { 0x10e60, 0x10e7e, 0x10f1d, 0x10f26, 0x10f51, 0x10f54, + 0x10fc5, 0x10fcb, 0x11052, 0x1106f, 0x110f0, 0x110f9, 0x11136, 0x1113f, @@ -10862,20 +11496,25 @@ static const OnigCodePoint CR_N[] = { 0x116c0, 0x116c9, 0x11730, 0x1173b, 0x118e0, 0x118f2, + 0x11950, 0x11959, 0x11c50, 0x11c6c, 0x11d50, 0x11d59, 0x11da0, 0x11da9, + 0x11f50, 0x11f59, 0x11fc0, 0x11fd4, 0x12400, 0x1246e, 0x16a60, 0x16a69, + 0x16ac0, 0x16ac9, 0x16b50, 0x16b59, 0x16b5b, 0x16b61, 0x16e80, 0x16e96, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d360, 0x1d378, 0x1d7ce, 0x1d7ff, 0x1e140, 0x1e149, 0x1e2f0, 0x1e2f9, + 0x1e4f0, 0x1e4f9, 0x1e8c7, 0x1e8cf, 0x1e950, 0x1e959, 0x1ec71, 0x1ecab, @@ -10884,6 +11523,7 @@ static const OnigCodePoint CR_N[] = { 0x1ed01, 0x1ed2d, 0x1ed2f, 0x1ed3d, 0x1f100, 0x1f10c, + 0x1fbf0, 0x1fbf9, }; /* CR_N */ /* 'Nd': General Category */ @@ -10908,7 +11548,7 @@ static const OnigCodePoint CR_Nl[] = { /* 'No': General Category */ static const OnigCodePoint CR_No[] = { - 70, + 72, 0x00b2, 0x00b3, 0x00b9, 0x00b9, 0x00bc, 0x00be, @@ -10962,6 +11602,7 @@ static const OnigCodePoint CR_No[] = { 0x10e60, 0x10e7e, 0x10f1d, 0x10f26, 0x10f51, 0x10f54, + 0x10fc5, 0x10fcb, 0x11052, 0x11065, 0x111e1, 0x111f4, 0x1173a, 0x1173b, @@ -10970,6 +11611,7 @@ static const OnigCodePoint CR_No[] = { 0x11fc0, 0x11fd4, 0x16b5b, 0x16b61, 0x16e80, 0x16e96, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d360, 0x1d378, 0x1e8c7, 0x1e8cf, @@ -10997,7 +11639,7 @@ static const OnigCodePoint CR_Pc[] = { /* 'Pd': General Category */ static const OnigCodePoint CR_Pd[] = { - 17, + 19, 0x002d, 0x002d, 0x058a, 0x058a, 0x05be, 0x05be, @@ -11008,6 +11650,7 @@ static const OnigCodePoint CR_Pd[] = { 0x2e1a, 0x2e1a, 0x2e3a, 0x2e3b, 0x2e40, 0x2e40, + 0x2e5d, 0x2e5d, 0x301c, 0x301c, 0x3030, 0x3030, 0x30a0, 0x30a0, @@ -11015,11 +11658,12 @@ static const OnigCodePoint CR_Pd[] = { 0xfe58, 0xfe58, 0xfe63, 0xfe63, 0xff0d, 0xff0d, + 0x10ead, 0x10ead, }; /* CR_Pd */ /* 'Pe': General Category */ static const OnigCodePoint CR_Pe[] = { - 72, + 76, 0x0029, 0x0029, 0x005d, 0x005d, 0x007d, 0x007d, @@ -11063,6 +11707,10 @@ static const OnigCodePoint CR_Pe[] = { 0x2e25, 0x2e25, 0x2e27, 0x2e27, 0x2e29, 0x2e29, + 0x2e56, 0x2e56, + 0x2e58, 0x2e58, + 0x2e5a, 0x2e5a, + 0x2e5c, 0x2e5c, 0x3009, 0x3009, 0x300b, 0x300b, 0x300d, 0x300d, @@ -11127,7 +11775,7 @@ static const OnigCodePoint CR_Pi[] = { /* 'Po': General Category */ static const OnigCodePoint CR_Po[] = { - 179, + 187, 0x0021, 0x0023, 0x0025, 0x0027, 0x002a, 0x002a, @@ -11151,7 +11799,7 @@ static const OnigCodePoint CR_Po[] = { 0x0609, 0x060a, 0x060c, 0x060d, 0x061b, 0x061b, - 0x061e, 0x061f, + 0x061d, 0x061f, 0x066a, 0x066d, 0x06d4, 0x06d4, 0x0700, 0x070d, @@ -11188,6 +11836,7 @@ static const OnigCodePoint CR_Po[] = { 0x1aa0, 0x1aa6, 0x1aa8, 0x1aad, 0x1b5a, 0x1b60, + 0x1b7d, 0x1b7e, 0x1bfc, 0x1bff, 0x1c3b, 0x1c3f, 0x1c7e, 0x1c7f, @@ -11216,6 +11865,7 @@ static const OnigCodePoint CR_Po[] = { 0x2e3c, 0x2e3f, 0x2e41, 0x2e41, 0x2e43, 0x2e4f, + 0x2e52, 0x2e54, 0x3001, 0x3003, 0x303d, 0x303d, 0x30fb, 0x30fb, @@ -11269,6 +11919,7 @@ static const OnigCodePoint CR_Po[] = { 0x10b39, 0x10b3f, 0x10b99, 0x10b9c, 0x10f55, 0x10f59, + 0x10f86, 0x10f89, 0x11047, 0x1104d, 0x110bb, 0x110bc, 0x110be, 0x110c1, @@ -11281,23 +11932,28 @@ static const OnigCodePoint CR_Po[] = { 0x11238, 0x1123d, 0x112a9, 0x112a9, 0x1144b, 0x1144f, - 0x1145b, 0x1145b, + 0x1145a, 0x1145b, 0x1145d, 0x1145d, 0x114c6, 0x114c6, 0x115c1, 0x115d7, 0x11641, 0x11643, 0x11660, 0x1166c, + 0x116b9, 0x116b9, 0x1173c, 0x1173e, 0x1183b, 0x1183b, + 0x11944, 0x11946, 0x119e2, 0x119e2, 0x11a3f, 0x11a46, 0x11a9a, 0x11a9c, 0x11a9e, 0x11aa2, + 0x11b00, 0x11b09, 0x11c41, 0x11c45, 0x11c70, 0x11c71, 0x11ef7, 0x11ef8, + 0x11f43, 0x11f4f, 0x11fff, 0x11fff, 0x12470, 0x12474, + 0x12ff1, 0x12ff2, 0x16a6e, 0x16a6f, 0x16af5, 0x16af5, 0x16b37, 0x16b3b, @@ -11311,7 +11967,7 @@ static const OnigCodePoint CR_Po[] = { /* 'Ps': General Category */ static const OnigCodePoint CR_Ps[] = { - 75, + 79, 0x0028, 0x0028, 0x005b, 0x005b, 0x007b, 0x007b, @@ -11358,6 +12014,10 @@ static const OnigCodePoint CR_Ps[] = { 0x2e26, 0x2e26, 0x2e28, 0x2e28, 0x2e42, 0x2e42, + 0x2e55, 0x2e55, + 0x2e57, 0x2e57, + 0x2e59, 0x2e59, + 0x2e5b, 0x2e5b, 0x3008, 0x3008, 0x300a, 0x300a, 0x300c, 0x300c, @@ -11391,7 +12051,7 @@ static const OnigCodePoint CR_Ps[] = { /* 'S': Major Category */ static const OnigCodePoint CR_S[] = { - 226, + 232, 0x0024, 0x0024, 0x002b, 0x002b, 0x003c, 0x003e, @@ -11425,6 +12085,7 @@ static const OnigCodePoint CR_S[] = { 0x06fd, 0x06fe, 0x07f6, 0x07f6, 0x07fe, 0x07ff, + 0x0888, 0x0888, 0x09f2, 0x09f3, 0x09fa, 0x09fb, 0x0af1, 0x0af1, @@ -11463,7 +12124,7 @@ static const OnigCodePoint CR_S[] = { 0x2052, 0x2052, 0x207a, 0x207c, 0x208a, 0x208c, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x2100, 0x2101, 0x2103, 0x2106, 0x2108, 0x2109, @@ -11492,8 +12153,9 @@ static const OnigCodePoint CR_S[] = { 0x29dc, 0x29fb, 0x29fe, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2bff, + 0x2b97, 0x2bff, 0x2ce5, 0x2cea, + 0x2e50, 0x2e51, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -11522,9 +12184,12 @@ static const OnigCodePoint CR_S[] = { 0xa836, 0xa839, 0xaa77, 0xaa79, 0xab5b, 0xab5b, + 0xab6a, 0xab6b, 0xfb29, 0xfb29, - 0xfbb2, 0xfbc1, - 0xfdfc, 0xfdfd, + 0xfbb2, 0xfbc2, + 0xfd40, 0xfd4f, + 0xfdcf, 0xfdcf, + 0xfdfc, 0xfdff, 0xfe62, 0xfe62, 0xfe64, 0xfe66, 0xfe69, 0xfe69, @@ -11541,7 +12206,7 @@ static const OnigCodePoint CR_S[] = { 0x10137, 0x1013f, 0x10179, 0x10189, 0x1018c, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fc, 0x10877, 0x10878, @@ -11551,13 +12216,14 @@ static const OnigCodePoint CR_S[] = { 0x16b3c, 0x16b3f, 0x16b45, 0x16b45, 0x1bc9c, 0x1bc9c, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d129, 0x1d164, 0x1d16a, 0x1d16c, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, - 0x1d1ae, 0x1d1e8, + 0x1d1ae, 0x1d1ea, 0x1d200, 0x1d241, 0x1d245, 0x1d245, 0x1d300, 0x1d356, @@ -11588,36 +12254,36 @@ static const OnigCodePoint CR_S[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f10d, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, }; /* CR_S */ /* 'Sc': General Category */ @@ -11634,7 +12300,7 @@ static const OnigCodePoint CR_Sc[] = { 0x0bf9, 0x0bf9, 0x0e3f, 0x0e3f, 0x17db, 0x17db, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0xa838, 0xa838, 0xfdfc, 0xfdfc, 0xfe69, 0xfe69, @@ -11648,7 +12314,7 @@ static const OnigCodePoint CR_Sc[] = { /* 'Sk': General Category */ static const OnigCodePoint CR_Sk[] = { - 29, + 31, 0x005e, 0x005e, 0x0060, 0x0060, 0x00a8, 0x00a8, @@ -11662,6 +12328,7 @@ static const OnigCodePoint CR_Sk[] = { 0x02ef, 0x02ff, 0x0375, 0x0375, 0x0384, 0x0385, + 0x0888, 0x0888, 0x1fbd, 0x1fbd, 0x1fbf, 0x1fc1, 0x1fcd, 0x1fcf, @@ -11673,7 +12340,8 @@ static const OnigCodePoint CR_Sk[] = { 0xa720, 0xa721, 0xa789, 0xa78a, 0xab5b, 0xab5b, - 0xfbb2, 0xfbc1, + 0xab6a, 0xab6b, + 0xfbb2, 0xfbc2, 0xff3e, 0xff3e, 0xff40, 0xff40, 0xffe3, 0xffe3, @@ -11751,7 +12419,7 @@ static const OnigCodePoint CR_Sm[] = { /* 'So': General Category */ static const OnigCodePoint CR_So[] = { - 180, + 184, 0x00a6, 0x00a6, 0x00a9, 0x00a9, 0x00ae, 0x00ae, @@ -11832,8 +12500,9 @@ static const OnigCodePoint CR_So[] = { 0x2b45, 0x2b46, 0x2b4d, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2bff, + 0x2b97, 0x2bff, 0x2ce5, 0x2cea, + 0x2e50, 0x2e51, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -11858,7 +12527,9 @@ static const OnigCodePoint CR_So[] = { 0xa836, 0xa837, 0xa839, 0xa839, 0xaa77, 0xaa79, - 0xfdfd, 0xfdfd, + 0xfd40, 0xfd4f, + 0xfdcf, 0xfdcf, + 0xfdfd, 0xfdff, 0xffe4, 0xffe4, 0xffe8, 0xffe8, 0xffed, 0xffee, @@ -11866,7 +12537,7 @@ static const OnigCodePoint CR_So[] = { 0x10137, 0x1013f, 0x10179, 0x10189, 0x1018c, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fc, 0x10877, 0x10878, @@ -11877,13 +12548,14 @@ static const OnigCodePoint CR_So[] = { 0x16b3c, 0x16b3f, 0x16b45, 0x16b45, 0x1bc9c, 0x1bc9c, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d129, 0x1d164, 0x1d16a, 0x1d16c, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, - 0x1d1ae, 0x1d1e8, + 0x1d1ae, 0x1d1ea, 0x1d200, 0x1d241, 0x1d245, 0x1d245, 0x1d300, 0x1d356, @@ -11901,37 +12573,37 @@ static const OnigCodePoint CR_So[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f10d, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, 0x1f300, 0x1f3fa, - 0x1f400, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f400, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, }; /* CR_So */ /* 'Z': Major Category */ @@ -12125,7 +12797,7 @@ static const OnigCodePoint CR_Math[] = { /* 'Cased': Derived Property */ static const OnigCodePoint CR_Cased[] = { - 140, + 157, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -12157,7 +12829,7 @@ static const OnigCodePoint CR_Cased[] = { 0x10c7, 0x10c7, 0x10cd, 0x10cd, 0x10d0, 0x10fa, - 0x10fd, 0x10ff, + 0x10fc, 0x10ff, 0x13a0, 0x13f5, 0x13f8, 0x13fd, 0x1c80, 0x1c88, @@ -12203,9 +12875,7 @@ static const OnigCodePoint CR_Cased[] = { 0x2160, 0x217f, 0x2183, 0x2184, 0x24b6, 0x24e9, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -12215,11 +12885,14 @@ static const OnigCodePoint CR_Cased[] = { 0xa680, 0xa69d, 0xa722, 0xa787, 0xa78b, 0xa78e, - 0xa790, 0xa7bf, - 0xa7c2, 0xa7c6, + 0xa790, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa7f6, 0xa7f8, 0xa7fa, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabbf, 0xfb00, 0xfb06, 0xfb13, 0xfb17, @@ -12228,6 +12901,18 @@ static const OnigCodePoint CR_Cased[] = { 0x10400, 0x1044f, 0x104b0, 0x104d3, 0x104d8, 0x104fb, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, + 0x10780, 0x10780, + 0x10783, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x118a0, 0x118df, @@ -12262,6 +12947,10 @@ static const OnigCodePoint CR_Cased[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df09, + 0x1df0b, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e900, 0x1e943, 0x1f130, 0x1f149, 0x1f150, 0x1f169, @@ -12270,7 +12959,7 @@ static const OnigCodePoint CR_Cased[] = { /* 'Case_Ignorable': Derived Property */ static const OnigCodePoint CR_Case_Ignorable[] = { - 401, + 437, 0x0027, 0x0027, 0x002e, 0x002e, 0x003a, 0x003a, @@ -12288,6 +12977,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x0387, 0x0387, 0x0483, 0x0489, 0x0559, 0x0559, + 0x055f, 0x055f, 0x0591, 0x05bd, 0x05bf, 0x05bf, 0x05c1, 0x05c2, @@ -12312,7 +13002,10 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x07fd, 0x07fd, 0x0816, 0x082d, 0x0859, 0x085b, - 0x08d3, 0x0902, + 0x0888, 0x0888, + 0x0890, 0x0891, + 0x0898, 0x089f, + 0x08c9, 0x0902, 0x093a, 0x093a, 0x093c, 0x093c, 0x0941, 0x0948, @@ -12346,13 +13039,14 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x0b3f, 0x0b3f, 0x0b41, 0x0b44, 0x0b4d, 0x0b4d, - 0x0b56, 0x0b56, + 0x0b55, 0x0b56, 0x0b62, 0x0b63, 0x0b82, 0x0b82, 0x0bc0, 0x0bc0, 0x0bcd, 0x0bcd, 0x0c00, 0x0c00, 0x0c04, 0x0c04, + 0x0c3c, 0x0c3c, 0x0c3e, 0x0c40, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, @@ -12369,6 +13063,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x0d41, 0x0d44, 0x0d4d, 0x0d4d, 0x0d62, 0x0d63, + 0x0d81, 0x0d81, 0x0dca, 0x0dca, 0x0dd2, 0x0dd4, 0x0dd6, 0x0dd6, @@ -12378,7 +13073,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x0eb1, 0x0eb1, 0x0eb4, 0x0ebc, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0f18, 0x0f19, 0x0f35, 0x0f35, 0x0f37, 0x0f37, @@ -12403,7 +13098,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x10fc, 0x10fc, 0x135d, 0x135f, 0x1712, 0x1714, - 0x1732, 0x1734, + 0x1732, 0x1733, 0x1752, 0x1753, 0x1772, 0x1773, 0x17b4, 0x17b5, @@ -12412,7 +13107,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x17c9, 0x17d3, 0x17d7, 0x17d7, 0x17dd, 0x17dd, - 0x180b, 0x180e, + 0x180b, 0x180f, 0x1843, 0x1843, 0x1885, 0x1886, 0x18a9, 0x18a9, @@ -12430,7 +13125,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x1a73, 0x1a7c, 0x1a7f, 0x1a7f, 0x1aa7, 0x1aa7, - 0x1ab0, 0x1abe, + 0x1ab0, 0x1ace, 0x1b00, 0x1b03, 0x1b34, 0x1b34, 0x1b36, 0x1b3a, @@ -12456,8 +13151,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x1cf8, 0x1cf9, 0x1d2c, 0x1d6a, 0x1d78, 0x1d78, - 0x1d9b, 0x1df9, - 0x1dfb, 0x1dff, + 0x1d9b, 0x1dff, 0x1fbd, 0x1fbd, 0x1fbf, 0x1fc1, 0x1fcd, 0x1fcf, @@ -12498,11 +13192,13 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0xa700, 0xa721, 0xa770, 0xa770, 0xa788, 0xa78a, + 0xa7f2, 0xa7f4, 0xa7f8, 0xa7f9, 0xa802, 0xa802, 0xa806, 0xa806, 0xa80b, 0xa80b, 0xa825, 0xa826, + 0xa82c, 0xa82c, 0xa8c4, 0xa8c5, 0xa8e0, 0xa8f1, 0xa8ff, 0xa8ff, @@ -12531,11 +13227,12 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0xaaf3, 0xaaf4, 0xaaf6, 0xaaf6, 0xab5b, 0xab5f, + 0xab69, 0xab6b, 0xabe5, 0xabe5, 0xabe8, 0xabe8, 0xabed, 0xabed, 0xfb1e, 0xfb1e, - 0xfbb2, 0xfbc1, + 0xfbb2, 0xfbc2, 0xfe00, 0xfe0f, 0xfe13, 0xfe13, 0xfe20, 0xfe2f, @@ -12554,6 +13251,9 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x101fd, 0x101fd, 0x102e0, 0x102e0, 0x10376, 0x1037a, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10a01, 0x10a03, 0x10a05, 0x10a06, 0x10a0c, 0x10a0f, @@ -12561,13 +13261,19 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x10a3f, 0x10a3f, 0x10ae5, 0x10ae6, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, 0x11001, 0x11001, 0x11038, 0x11046, + 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107f, 0x11081, 0x110b3, 0x110b6, 0x110b9, 0x110ba, 0x110bd, 0x110bd, + 0x110c2, 0x110c2, 0x110cd, 0x110cd, 0x11100, 0x11102, 0x11127, 0x1112b, @@ -12576,10 +13282,12 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x11180, 0x11181, 0x111b6, 0x111be, 0x111c9, 0x111cc, + 0x111cf, 0x111cf, 0x1122f, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112df, 0x112e3, 0x112ea, 0x11300, 0x11301, @@ -12611,6 +13319,9 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x11727, 0x1172b, 0x1182f, 0x11837, 0x11839, 0x1183a, + 0x1193b, 0x1193c, + 0x1193e, 0x1193e, + 0x11943, 0x11943, 0x119d4, 0x119d7, 0x119da, 0x119db, 0x119e0, 0x119e0, @@ -12638,16 +13349,26 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x11d95, 0x11d95, 0x11d97, 0x11d97, 0x11ef3, 0x11ef4, - 0x13430, 0x13438, + 0x11f00, 0x11f01, + 0x11f36, 0x11f3a, + 0x11f40, 0x11f40, + 0x11f42, 0x11f42, + 0x13430, 0x13440, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16b40, 0x16b43, 0x16f4f, 0x16f4f, 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, - 0x16fe3, 0x16fe3, + 0x16fe3, 0x16fe4, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, 0x1bc9d, 0x1bc9e, 0x1bca0, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d167, 0x1d169, 0x1d173, 0x1d182, 0x1d185, 0x1d18b, @@ -12664,8 +13385,12 @@ static const OnigCodePoint CR_Case_Ignorable[] = { 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e130, 0x1e13d, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, + 0x1e4eb, 0x1e4ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e94b, 0x1f3fb, 0x1f3ff, @@ -12676,7 +13401,7 @@ static const OnigCodePoint CR_Case_Ignorable[] = { /* 'Changes_When_Lowercased': Derived Property */ static const OnigCodePoint CR_Changes_When_Lowercased[] = { - 599, + 609, 0x0041, 0x005a, 0x00c0, 0x00d6, 0x00d8, 0x00de, @@ -13102,7 +13827,7 @@ static const OnigCodePoint CR_Changes_When_Lowercased[] = { 0x2160, 0x216f, 0x2183, 0x2183, 0x24b6, 0x24cf, - 0x2c00, 0x2c2e, + 0x2c00, 0x2c2f, 0x2c60, 0x2c60, 0x2c62, 0x2c64, 0x2c67, 0x2c67, @@ -13267,11 +13992,21 @@ static const OnigCodePoint CR_Changes_When_Lowercased[] = { 0xa7ba, 0xa7ba, 0xa7bc, 0xa7bc, 0xa7be, 0xa7be, + 0xa7c0, 0xa7c0, 0xa7c2, 0xa7c2, - 0xa7c4, 0xa7c6, + 0xa7c4, 0xa7c7, + 0xa7c9, 0xa7c9, + 0xa7d0, 0xa7d0, + 0xa7d6, 0xa7d6, + 0xa7d8, 0xa7d8, + 0xa7f5, 0xa7f5, 0xff21, 0xff3a, 0x10400, 0x10427, 0x104b0, 0x104d3, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, 0x10c80, 0x10cb2, 0x118a0, 0x118bf, 0x16e40, 0x16e5f, @@ -13280,7 +14015,7 @@ static const OnigCodePoint CR_Changes_When_Lowercased[] = { /* 'Changes_When_Uppercased': Derived Property */ static const OnigCodePoint CR_Changes_When_Uppercased[] = { - 616, + 627, 0x0061, 0x007a, 0x00b5, 0x00b5, 0x00df, 0x00f6, @@ -13720,7 +14455,7 @@ static const OnigCodePoint CR_Changes_When_Uppercased[] = { 0x2170, 0x217f, 0x2184, 0x2184, 0x24d0, 0x24e9, - 0x2c30, 0x2c5e, + 0x2c30, 0x2c5f, 0x2c61, 0x2c61, 0x2c65, 0x2c66, 0x2c68, 0x2c68, @@ -13885,7 +14620,14 @@ static const OnigCodePoint CR_Changes_When_Uppercased[] = { 0xa7bb, 0xa7bb, 0xa7bd, 0xa7bd, 0xa7bf, 0xa7bf, + 0xa7c1, 0xa7c1, 0xa7c3, 0xa7c3, + 0xa7c8, 0xa7c8, + 0xa7ca, 0xa7ca, + 0xa7d1, 0xa7d1, + 0xa7d7, 0xa7d7, + 0xa7d9, 0xa7d9, + 0xa7f6, 0xa7f6, 0xab53, 0xab53, 0xab70, 0xabbf, 0xfb00, 0xfb06, @@ -13893,6 +14635,10 @@ static const OnigCodePoint CR_Changes_When_Uppercased[] = { 0xff41, 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, @@ -13901,7 +14647,7 @@ static const OnigCodePoint CR_Changes_When_Uppercased[] = { /* 'Changes_When_Titlecased': Derived Property */ static const OnigCodePoint CR_Changes_When_Titlecased[] = { - 615, + 626, 0x0061, 0x007a, 0x00b5, 0x00b5, 0x00df, 0x00f6, @@ -14340,7 +15086,7 @@ static const OnigCodePoint CR_Changes_When_Titlecased[] = { 0x2170, 0x217f, 0x2184, 0x2184, 0x24d0, 0x24e9, - 0x2c30, 0x2c5e, + 0x2c30, 0x2c5f, 0x2c61, 0x2c61, 0x2c65, 0x2c66, 0x2c68, 0x2c68, @@ -14505,7 +15251,14 @@ static const OnigCodePoint CR_Changes_When_Titlecased[] = { 0xa7bb, 0xa7bb, 0xa7bd, 0xa7bd, 0xa7bf, 0xa7bf, + 0xa7c1, 0xa7c1, 0xa7c3, 0xa7c3, + 0xa7c8, 0xa7c8, + 0xa7ca, 0xa7ca, + 0xa7d1, 0xa7d1, + 0xa7d7, 0xa7d7, + 0xa7d9, 0xa7d9, + 0xa7f6, 0xa7f6, 0xab53, 0xab53, 0xab70, 0xabbf, 0xfb00, 0xfb06, @@ -14513,6 +15266,10 @@ static const OnigCodePoint CR_Changes_When_Titlecased[] = { 0xff41, 0xff5a, 0x10428, 0x1044f, 0x104d8, 0x104fb, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10cc0, 0x10cf2, 0x118c0, 0x118df, 0x16e60, 0x16e7f, @@ -14521,7 +15278,7 @@ static const OnigCodePoint CR_Changes_When_Titlecased[] = { /* 'Changes_When_Casefolded': Derived Property */ static const OnigCodePoint CR_Changes_When_Casefolded[] = { - 612, + 622, 0x0041, 0x005a, 0x00b5, 0x00b5, 0x00c0, 0x00d6, @@ -14957,7 +15714,7 @@ static const OnigCodePoint CR_Changes_When_Casefolded[] = { 0x2160, 0x216f, 0x2183, 0x2183, 0x24b6, 0x24cf, - 0x2c00, 0x2c2e, + 0x2c00, 0x2c2f, 0x2c60, 0x2c60, 0x2c62, 0x2c64, 0x2c67, 0x2c67, @@ -15122,14 +15879,24 @@ static const OnigCodePoint CR_Changes_When_Casefolded[] = { 0xa7ba, 0xa7ba, 0xa7bc, 0xa7bc, 0xa7be, 0xa7be, + 0xa7c0, 0xa7c0, 0xa7c2, 0xa7c2, - 0xa7c4, 0xa7c6, + 0xa7c4, 0xa7c7, + 0xa7c9, 0xa7c9, + 0xa7d0, 0xa7d0, + 0xa7d6, 0xa7d6, + 0xa7d8, 0xa7d8, + 0xa7f5, 0xa7f5, 0xab70, 0xabbf, 0xfb00, 0xfb06, 0xfb13, 0xfb17, 0xff21, 0xff3a, 0x10400, 0x10427, 0x104b0, 0x104d3, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, 0x10c80, 0x10cb2, 0x118a0, 0x118bf, 0x16e40, 0x16e5f, @@ -15138,7 +15905,7 @@ static const OnigCodePoint CR_Changes_When_Casefolded[] = { /* 'Changes_When_Casemapped': Derived Property */ static const OnigCodePoint CR_Changes_When_Casemapped[] = { - 123, + 131, 0x0041, 0x005a, 0x0061, 0x007a, 0x00b5, 0x00b5, @@ -15227,9 +15994,7 @@ static const OnigCodePoint CR_Changes_When_Casemapped[] = { 0x2160, 0x217f, 0x2183, 0x2184, 0x24b6, 0x24e9, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2c70, + 0x2c00, 0x2c70, 0x2c72, 0x2c73, 0x2c75, 0x2c76, 0x2c7e, 0x2ce3, @@ -15246,8 +16011,10 @@ static const OnigCodePoint CR_Changes_When_Casemapped[] = { 0xa78b, 0xa78d, 0xa790, 0xa794, 0xa796, 0xa7ae, - 0xa7b0, 0xa7bf, - 0xa7c2, 0xa7c6, + 0xa7b0, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d6, 0xa7d9, + 0xa7f5, 0xa7f6, 0xab53, 0xab53, 0xab70, 0xabbf, 0xfb00, 0xfb06, @@ -15257,6 +16024,14 @@ static const OnigCodePoint CR_Changes_When_Casemapped[] = { 0x10400, 0x1044f, 0x104b0, 0x104d3, 0x104d8, 0x104fb, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x118a0, 0x118df, @@ -15266,7 +16041,7 @@ static const OnigCodePoint CR_Changes_When_Casemapped[] = { /* 'ID_Start': Derived Property */ static const OnigCodePoint CR_ID_Start[] = { - 609, + 659, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -15316,8 +16091,9 @@ static const OnigCodePoint CR_ID_Start[] = { 0x0828, 0x0828, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c9, 0x0904, 0x0939, 0x093d, 0x093d, 0x0950, 0x0950, @@ -15382,6 +16158,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x0c2a, 0x0c39, 0x0c3d, 0x0c3d, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c61, 0x0c80, 0x0c80, 0x0c85, 0x0c8c, @@ -15390,10 +16167,10 @@ static const OnigCodePoint CR_ID_Start[] = { 0x0caa, 0x0cb3, 0x0cb5, 0x0cb9, 0x0cbd, 0x0cbd, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce1, 0x0cf1, 0x0cf2, - 0x0d05, 0x0d0c, + 0x0d04, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d3d, @@ -15461,9 +16238,8 @@ static const OnigCodePoint CR_ID_Start[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1711, - 0x1720, 0x1731, + 0x1700, 0x1711, + 0x171f, 0x1731, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, @@ -15483,7 +16259,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x1a20, 0x1a54, 0x1aa7, 0x1aa7, 0x1b05, 0x1b33, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b83, 0x1ba0, 0x1bae, 0x1baf, 0x1bba, 0x1be5, @@ -15533,9 +16309,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2160, 0x2188, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -15562,11 +16336,10 @@ static const OnigCodePoint CR_ID_Start[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa61f, @@ -15576,9 +16349,11 @@ static const OnigCodePoint CR_ID_Start[] = { 0xa6a0, 0xa6ef, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa801, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa801, 0xa803, 0xa805, 0xa807, 0xa80a, 0xa80c, 0xa822, @@ -15615,7 +16390,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabe2, 0xac00, 0xd7a3, 0xd7b0, 0xd7c6, @@ -15667,9 +16442,20 @@ static const OnigCodePoint CR_ID_Start[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -15700,15 +16486,22 @@ static const OnigCodePoint CR_ID_Start[] = { 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x10d00, 0x10d23, + 0x10e80, 0x10ea9, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11003, 0x11037, + 0x11071, 0x11072, + 0x11075, 0x11075, 0x11083, 0x110af, 0x110d0, 0x110e8, 0x11103, 0x11126, 0x11144, 0x11144, + 0x11147, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111b2, @@ -15717,6 +16510,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x1122b, + 0x1123f, 0x11240, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -15734,7 +16528,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x1135d, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144a, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114af, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -15745,9 +16539,16 @@ static const OnigCodePoint CR_ID_Start[] = { 0x11680, 0x116aa, 0x116b8, 0x116b8, 0x11700, 0x1171a, + 0x11740, 0x11746, 0x11800, 0x1182b, 0x118a0, 0x118df, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x1192f, + 0x1193f, 0x1193f, + 0x11941, 0x11941, 0x119a0, 0x119a7, 0x119aa, 0x119d0, 0x119e1, 0x119e1, @@ -15758,7 +16559,7 @@ static const OnigCodePoint CR_ID_Start[] = { 0x11a50, 0x11a50, 0x11a5c, 0x11a89, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c2e, 0x11c40, 0x11c40, @@ -15772,13 +16573,20 @@ static const OnigCodePoint CR_ID_Start[] = { 0x11d6a, 0x11d89, 0x11d98, 0x11d98, 0x11ee0, 0x11ef2, + 0x11f02, 0x11f02, + 0x11f04, 0x11f10, + 0x11f12, 0x11f33, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, + 0x16a70, 0x16abe, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b40, 0x16b43, @@ -15791,9 +16599,15 @@ static const OnigCodePoint CR_ID_Start[] = { 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -15830,10 +16644,19 @@ static const OnigCodePoint CR_ID_Start[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, + 0x1e4d0, 0x1e4eb, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e900, 0x1e943, 0x1e94b, 0x1e94b, @@ -15870,17 +16693,19 @@ static const OnigCodePoint CR_ID_Start[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_ID_Start */ /* 'ID_Continue': Derived Property */ static const OnigCodePoint CR_ID_Continue[] = { - 713, + 768, 0x0030, 0x0039, 0x0041, 0x005a, 0x005f, 0x005f, @@ -15932,9 +16757,9 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0800, 0x082d, 0x0840, 0x085b, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x08e1, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x0898, 0x08e1, 0x08e3, 0x0963, 0x0966, 0x096f, 0x0971, 0x0983, @@ -15993,7 +16818,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b6f, @@ -16018,11 +16843,12 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c80, 0x0c83, @@ -16035,12 +16861,11 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, @@ -16049,7 +16874,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0d5f, 0x0d63, 0x0d66, 0x0d6f, 0x0d7a, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -16072,7 +16897,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f00, @@ -16119,9 +16944,8 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1734, + 0x1700, 0x1715, + 0x171f, 0x1734, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -16131,7 +16955,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x17dc, 0x17dd, 0x17e0, 0x17e9, 0x180b, 0x180d, - 0x1810, 0x1819, + 0x180f, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -16150,7 +16974,8 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1a90, 0x1a99, 0x1aa7, 0x1aa7, 0x1ab0, 0x1abd, - 0x1b00, 0x1b4b, + 0x1abf, 0x1ace, + 0x1b00, 0x1b4c, 0x1b50, 0x1b59, 0x1b6b, 0x1b73, 0x1b80, 0x1bf3, @@ -16162,8 +16987,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1cbd, 0x1cbf, 0x1cd0, 0x1cd2, 0x1cd4, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -16203,9 +17027,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2160, 0x2188, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cf3, 0x2d00, 0x2d25, 0x2d27, 0x2d27, @@ -16232,11 +17054,10 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa62b, @@ -16245,9 +17066,12 @@ static const OnigCodePoint CR_ID_Continue[] = { 0xa67f, 0xa6f1, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa827, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa827, + 0xa82c, 0xa82c, 0xa840, 0xa873, 0xa880, 0xa8c5, 0xa8d0, 0xa8d9, @@ -16273,7 +17097,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabea, 0xabec, 0xabed, 0xabf0, 0xabf9, @@ -16335,9 +17159,20 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -16372,27 +17207,33 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x10cc0, 0x10cf2, 0x10d00, 0x10d27, 0x10d30, 0x10d39, - 0x10f00, 0x10f1c, + 0x10e80, 0x10ea9, + 0x10eab, 0x10eac, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f50, + 0x10f70, 0x10f85, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11000, 0x11046, - 0x11066, 0x1106f, + 0x11066, 0x11075, 0x1107f, 0x110ba, + 0x110c2, 0x110c2, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, 0x11136, 0x1113f, - 0x11144, 0x11146, + 0x11144, 0x11147, 0x11150, 0x11173, 0x11176, 0x11176, 0x11180, 0x111c4, 0x111c9, 0x111cc, - 0x111d0, 0x111da, + 0x111ce, 0x111da, 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x11237, - 0x1123e, 0x1123e, + 0x1123e, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -16417,7 +17258,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x11370, 0x11374, 0x11400, 0x1144a, 0x11450, 0x11459, - 0x1145e, 0x1145f, + 0x1145e, 0x11461, 0x11480, 0x114c5, 0x114c7, 0x114c7, 0x114d0, 0x114d9, @@ -16432,9 +17273,17 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x11700, 0x1171a, 0x1171d, 0x1172b, 0x11730, 0x11739, + 0x11740, 0x11746, 0x11800, 0x1183a, 0x118a0, 0x118e9, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11943, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e1, @@ -16443,7 +17292,7 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x11a47, 0x11a47, 0x11a50, 0x11a99, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c40, @@ -16465,14 +17314,23 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef6, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f42, + 0x11f50, 0x11f59, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13440, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, + 0x16a70, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af4, 0x16b00, 0x16b36, @@ -16485,11 +17343,18 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, - 0x16fe3, 0x16fe3, + 0x16fe3, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -16497,6 +17362,8 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d169, 0x1d16d, 0x1d172, 0x1d17b, 0x1d182, @@ -16540,16 +17407,26 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1da84, 0x1da84, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8d0, 0x1e8d6, 0x1e900, 0x1e94b, @@ -16587,18 +17464,21 @@ static const OnigCodePoint CR_ID_Continue[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0100, 0xe01ef, }; /* CR_ID_Continue */ /* 'XID_Start': Derived Property */ static const OnigCodePoint CR_XID_Start[] = { - 616, + 666, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -16648,8 +17528,9 @@ static const OnigCodePoint CR_XID_Start[] = { 0x0828, 0x0828, 0x0840, 0x0858, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x08a0, 0x08c9, 0x0904, 0x0939, 0x093d, 0x093d, 0x0950, 0x0950, @@ -16714,6 +17595,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x0c2a, 0x0c39, 0x0c3d, 0x0c3d, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c61, 0x0c80, 0x0c80, 0x0c85, 0x0c8c, @@ -16722,10 +17604,10 @@ static const OnigCodePoint CR_XID_Start[] = { 0x0caa, 0x0cb3, 0x0cb5, 0x0cb9, 0x0cbd, 0x0cbd, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce1, 0x0cf1, 0x0cf2, - 0x0d05, 0x0d0c, + 0x0d04, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d3d, @@ -16793,9 +17675,8 @@ static const OnigCodePoint CR_XID_Start[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1711, - 0x1720, 0x1731, + 0x1700, 0x1711, + 0x171f, 0x1731, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, @@ -16815,7 +17696,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x1a20, 0x1a54, 0x1aa7, 0x1aa7, 0x1b05, 0x1b33, - 0x1b45, 0x1b4b, + 0x1b45, 0x1b4c, 0x1b83, 0x1ba0, 0x1bae, 0x1baf, 0x1bba, 0x1be5, @@ -16865,9 +17746,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2160, 0x2188, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cee, 0x2cf2, 0x2cf3, 0x2d00, 0x2d25, @@ -16894,11 +17773,10 @@ static const OnigCodePoint CR_XID_Start[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa61f, @@ -16908,9 +17786,11 @@ static const OnigCodePoint CR_XID_Start[] = { 0xa6a0, 0xa6ef, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa801, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa801, 0xa803, 0xa805, 0xa807, 0xa80a, 0xa80c, 0xa822, @@ -16947,7 +17827,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabe2, 0xac00, 0xd7a3, 0xd7b0, 0xd7c6, @@ -17006,9 +17886,20 @@ static const OnigCodePoint CR_XID_Start[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -17039,15 +17930,22 @@ static const OnigCodePoint CR_XID_Start[] = { 0x10c80, 0x10cb2, 0x10cc0, 0x10cf2, 0x10d00, 0x10d23, + 0x10e80, 0x10ea9, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f45, + 0x10f70, 0x10f81, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11003, 0x11037, + 0x11071, 0x11072, + 0x11075, 0x11075, 0x11083, 0x110af, 0x110d0, 0x110e8, 0x11103, 0x11126, 0x11144, 0x11144, + 0x11147, 0x11147, 0x11150, 0x11172, 0x11176, 0x11176, 0x11183, 0x111b2, @@ -17056,6 +17954,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x1122b, + 0x1123f, 0x11240, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -17073,7 +17972,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x1135d, 0x11361, 0x11400, 0x11434, 0x11447, 0x1144a, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114af, 0x114c4, 0x114c5, 0x114c7, 0x114c7, @@ -17084,9 +17983,16 @@ static const OnigCodePoint CR_XID_Start[] = { 0x11680, 0x116aa, 0x116b8, 0x116b8, 0x11700, 0x1171a, + 0x11740, 0x11746, 0x11800, 0x1182b, 0x118a0, 0x118df, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x1192f, + 0x1193f, 0x1193f, + 0x11941, 0x11941, 0x119a0, 0x119a7, 0x119aa, 0x119d0, 0x119e1, 0x119e1, @@ -17097,7 +18003,7 @@ static const OnigCodePoint CR_XID_Start[] = { 0x11a50, 0x11a50, 0x11a5c, 0x11a89, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c2e, 0x11c40, 0x11c40, @@ -17111,13 +18017,20 @@ static const OnigCodePoint CR_XID_Start[] = { 0x11d6a, 0x11d89, 0x11d98, 0x11d98, 0x11ee0, 0x11ef2, + 0x11f02, 0x11f02, + 0x11f04, 0x11f10, + 0x11f12, 0x11f33, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, + 0x16a70, 0x16abe, 0x16ad0, 0x16aed, 0x16b00, 0x16b2f, 0x16b40, 0x16b43, @@ -17130,9 +18043,15 @@ static const OnigCodePoint CR_XID_Start[] = { 0x16fe0, 0x16fe1, 0x16fe3, 0x16fe3, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -17169,10 +18088,19 @@ static const OnigCodePoint CR_XID_Start[] = { 0x1d78a, 0x1d7a8, 0x1d7aa, 0x1d7c2, 0x1d7c4, 0x1d7cb, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, + 0x1e4d0, 0x1e4eb, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e900, 0x1e943, 0x1e94b, 0x1e94b, @@ -17209,17 +18137,19 @@ static const OnigCodePoint CR_XID_Start[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_XID_Start */ /* 'XID_Continue': Derived Property */ static const OnigCodePoint CR_XID_Continue[] = { - 720, + 775, 0x0030, 0x0039, 0x0041, 0x005a, 0x005f, 0x005f, @@ -17271,9 +18201,9 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0800, 0x082d, 0x0840, 0x085b, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x08e1, + 0x0870, 0x0887, + 0x0889, 0x088e, + 0x0898, 0x08e1, 0x08e3, 0x0963, 0x0966, 0x096f, 0x0971, 0x0983, @@ -17332,7 +18262,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b6f, @@ -17357,11 +18287,12 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c80, 0x0c83, @@ -17374,12 +18305,11 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, @@ -17388,7 +18318,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0d5f, 0x0d63, 0x0d66, 0x0d6f, 0x0d7a, 0x0d7f, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -17411,7 +18341,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, 0x0f00, 0x0f00, @@ -17458,9 +18388,8 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1681, 0x169a, 0x16a0, 0x16ea, 0x16ee, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1714, - 0x1720, 0x1734, + 0x1700, 0x1715, + 0x171f, 0x1734, 0x1740, 0x1753, 0x1760, 0x176c, 0x176e, 0x1770, @@ -17470,7 +18399,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x17dc, 0x17dd, 0x17e0, 0x17e9, 0x180b, 0x180d, - 0x1810, 0x1819, + 0x180f, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x18b0, 0x18f5, @@ -17489,7 +18418,8 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1a90, 0x1a99, 0x1aa7, 0x1aa7, 0x1ab0, 0x1abd, - 0x1b00, 0x1b4b, + 0x1abf, 0x1ace, + 0x1b00, 0x1b4c, 0x1b50, 0x1b59, 0x1b6b, 0x1b73, 0x1b80, 0x1bf3, @@ -17501,8 +18431,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1cbd, 0x1cbf, 0x1cd0, 0x1cd2, 0x1cd4, 0x1cfa, - 0x1d00, 0x1df9, - 0x1dfb, 0x1f15, + 0x1d00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, @@ -17542,9 +18471,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x2145, 0x2149, 0x214e, 0x214e, 0x2160, 0x2188, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2ce4, + 0x2c00, 0x2ce4, 0x2ceb, 0x2cf3, 0x2d00, 0x2d25, 0x2d27, 0x2d27, @@ -17572,11 +18499,10 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x30fc, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, 0x31f0, 0x31ff, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, - 0xa000, 0xa48c, + 0x3400, 0x4dbf, + 0x4e00, 0xa48c, 0xa4d0, 0xa4fd, 0xa500, 0xa60c, 0xa610, 0xa62b, @@ -17585,9 +18511,12 @@ static const OnigCodePoint CR_XID_Continue[] = { 0xa67f, 0xa6f1, 0xa717, 0xa71f, 0xa722, 0xa788, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa827, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa827, + 0xa82c, 0xa82c, 0xa840, 0xa873, 0xa880, 0xa8c5, 0xa8d0, 0xa8d9, @@ -17613,7 +18542,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0xab20, 0xab26, 0xab28, 0xab2e, 0xab30, 0xab5a, - 0xab5c, 0xab67, + 0xab5c, 0xab69, 0xab70, 0xabea, 0xabec, 0xabed, 0xabf0, 0xabf9, @@ -17681,9 +18610,20 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -17718,27 +18658,33 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x10cc0, 0x10cf2, 0x10d00, 0x10d27, 0x10d30, 0x10d39, - 0x10f00, 0x10f1c, + 0x10e80, 0x10ea9, + 0x10eab, 0x10eac, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f1c, 0x10f27, 0x10f27, 0x10f30, 0x10f50, + 0x10f70, 0x10f85, + 0x10fb0, 0x10fc4, 0x10fe0, 0x10ff6, 0x11000, 0x11046, - 0x11066, 0x1106f, + 0x11066, 0x11075, 0x1107f, 0x110ba, + 0x110c2, 0x110c2, 0x110d0, 0x110e8, 0x110f0, 0x110f9, 0x11100, 0x11134, 0x11136, 0x1113f, - 0x11144, 0x11146, + 0x11144, 0x11147, 0x11150, 0x11173, 0x11176, 0x11176, 0x11180, 0x111c4, 0x111c9, 0x111cc, - 0x111d0, 0x111da, + 0x111ce, 0x111da, 0x111dc, 0x111dc, 0x11200, 0x11211, 0x11213, 0x11237, - 0x1123e, 0x1123e, + 0x1123e, 0x11241, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -17763,7 +18709,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x11370, 0x11374, 0x11400, 0x1144a, 0x11450, 0x11459, - 0x1145e, 0x1145f, + 0x1145e, 0x11461, 0x11480, 0x114c5, 0x114c7, 0x114c7, 0x114d0, 0x114d9, @@ -17778,9 +18724,17 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x11700, 0x1171a, 0x1171d, 0x1172b, 0x11730, 0x11739, + 0x11740, 0x11746, 0x11800, 0x1183a, 0x118a0, 0x118e9, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11943, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d7, 0x119da, 0x119e1, @@ -17789,7 +18743,7 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x11a47, 0x11a47, 0x11a50, 0x11a99, 0x11a9d, 0x11a9d, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, 0x11c00, 0x11c08, 0x11c0a, 0x11c36, 0x11c38, 0x11c40, @@ -17811,14 +18765,23 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x11d93, 0x11d98, 0x11da0, 0x11da9, 0x11ee0, 0x11ef6, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f42, + 0x11f50, 0x11f59, + 0x11fb0, 0x11fb0, 0x12000, 0x12399, 0x12400, 0x1246e, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff0, + 0x13000, 0x1342f, + 0x13440, 0x13455, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, + 0x16a70, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af0, 0x16af4, 0x16b00, 0x16b36, @@ -17831,11 +18794,18 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x16f4f, 0x16f87, 0x16f8f, 0x16f9f, 0x16fe0, 0x16fe1, - 0x16fe3, 0x16fe3, + 0x16fe3, 0x16fe4, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -17843,6 +18813,8 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1bc80, 0x1bc88, 0x1bc90, 0x1bc99, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d169, 0x1d16d, 0x1d172, 0x1d17b, 0x1d182, @@ -17886,16 +18858,26 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1da84, 0x1da84, 0x1da9b, 0x1da9f, 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, 0x1e100, 0x1e12c, 0x1e130, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14e, + 0x1e290, 0x1e2ae, 0x1e2c0, 0x1e2f9, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8d0, 0x1e8d6, 0x1e900, 0x1e94b, @@ -17933,12 +18915,15 @@ static const OnigCodePoint CR_XID_Continue[] = { 0x1eea1, 0x1eea3, 0x1eea5, 0x1eea9, 0x1eeab, 0x1eebb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, 0xe0100, 0xe01ef, }; /* CR_XID_Continue */ @@ -17950,7 +18935,7 @@ static const OnigCodePoint CR_Default_Ignorable_Code_Point[] = { 0x061c, 0x061c, 0x115f, 0x1160, 0x17b4, 0x17b5, - 0x180b, 0x180e, + 0x180b, 0x180f, 0x200b, 0x200f, 0x202a, 0x202e, 0x2060, 0x206f, @@ -17966,7 +18951,7 @@ static const OnigCodePoint CR_Default_Ignorable_Code_Point[] = { /* 'Grapheme_Extend': Derived Property */ static const OnigCodePoint CR_Grapheme_Extend[] = { - 335, + 363, 0x0300, 0x036f, 0x0483, 0x0489, 0x0591, 0x05bd, @@ -17991,7 +18976,8 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x0825, 0x0827, 0x0829, 0x082d, 0x0859, 0x085b, - 0x08d3, 0x08e1, + 0x0898, 0x089f, + 0x08ca, 0x08e1, 0x08e3, 0x0902, 0x093a, 0x093a, 0x093c, 0x093c, @@ -18027,7 +19013,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x0b3e, 0x0b3f, 0x0b41, 0x0b44, 0x0b4d, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b62, 0x0b63, 0x0b82, 0x0b82, 0x0bbe, 0x0bbe, @@ -18036,6 +19022,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x0bd7, 0x0bd7, 0x0c00, 0x0c00, 0x0c04, 0x0c04, + 0x0c3c, 0x0c3c, 0x0c3e, 0x0c40, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, @@ -18056,6 +19043,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x0d4d, 0x0d4d, 0x0d57, 0x0d57, 0x0d62, 0x0d63, + 0x0d81, 0x0d81, 0x0dca, 0x0dca, 0x0dcf, 0x0dcf, 0x0dd2, 0x0dd4, @@ -18066,7 +19054,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x0e47, 0x0e4e, 0x0eb1, 0x0eb1, 0x0eb4, 0x0ebc, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0f18, 0x0f19, 0x0f35, 0x0f35, 0x0f37, 0x0f37, @@ -18090,7 +19078,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x109d, 0x109d, 0x135d, 0x135f, 0x1712, 0x1714, - 0x1732, 0x1734, + 0x1732, 0x1733, 0x1752, 0x1753, 0x1772, 0x1773, 0x17b4, 0x17b5, @@ -18099,6 +19087,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x17c9, 0x17d3, 0x17dd, 0x17dd, 0x180b, 0x180d, + 0x180f, 0x180f, 0x1885, 0x1886, 0x18a9, 0x18a9, 0x1920, 0x1922, @@ -18114,7 +19103,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x1a65, 0x1a6c, 0x1a73, 0x1a7c, 0x1a7f, 0x1a7f, - 0x1ab0, 0x1abe, + 0x1ab0, 0x1ace, 0x1b00, 0x1b03, 0x1b34, 0x1b3a, 0x1b3c, 0x1b3c, @@ -18136,8 +19125,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x1ced, 0x1ced, 0x1cf4, 0x1cf4, 0x1cf8, 0x1cf9, - 0x1dc0, 0x1df9, - 0x1dfb, 0x1dff, + 0x1dc0, 0x1dff, 0x200c, 0x200c, 0x20d0, 0x20f0, 0x2cef, 0x2cf1, @@ -18153,6 +19141,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0xa806, 0xa806, 0xa80b, 0xa80b, 0xa825, 0xa826, + 0xa82c, 0xa82c, 0xa8c4, 0xa8c5, 0xa8e0, 0xa8f1, 0xa8ff, 0xa8ff, @@ -18193,12 +19182,18 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x10a3f, 0x10a3f, 0x10ae5, 0x10ae6, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, 0x11001, 0x11001, 0x11038, 0x11046, + 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107f, 0x11081, 0x110b3, 0x110b6, 0x110b9, 0x110ba, + 0x110c2, 0x110c2, 0x11100, 0x11102, 0x11127, 0x1112b, 0x1112d, 0x11134, @@ -18206,10 +19201,12 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x11180, 0x11181, 0x111b6, 0x111be, 0x111c9, 0x111cc, + 0x111cf, 0x111cf, 0x1122f, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112df, 0x112e3, 0x112ea, 0x11300, 0x11301, @@ -18246,6 +19243,10 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x11727, 0x1172b, 0x1182f, 0x11837, 0x11839, 0x1183a, + 0x11930, 0x11930, + 0x1193b, 0x1193c, + 0x1193e, 0x1193e, + 0x11943, 0x11943, 0x119d4, 0x119d7, 0x119da, 0x119db, 0x119e0, 0x119e0, @@ -18273,11 +19274,20 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x11d95, 0x11d95, 0x11d97, 0x11d97, 0x11ef3, 0x11ef4, + 0x11f00, 0x11f01, + 0x11f36, 0x11f3a, + 0x11f40, 0x11f40, + 0x11f42, 0x11f42, + 0x13440, 0x13440, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16f4f, 0x16f4f, 0x16f8f, 0x16f92, + 0x16fe4, 0x16fe4, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d165, 0x1d167, 0x1d169, 0x1d16e, 0x1d172, @@ -18296,8 +19306,11 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e08f, 0x1e08f, 0x1e130, 0x1e136, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, + 0x1e4ec, 0x1e4ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e94a, 0xe0020, 0xe007f, @@ -18306,7 +19319,7 @@ static const OnigCodePoint CR_Grapheme_Extend[] = { /* 'Grapheme_Base': Derived Property */ static const OnigCodePoint CR_Grapheme_Base[] = { - 819, + 875, 0x0020, 0x007e, 0x00a0, 0x00ac, 0x00ae, 0x02ff, @@ -18328,7 +19341,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x05ef, 0x05f4, 0x0606, 0x060f, 0x061b, 0x061b, - 0x061e, 0x064a, + 0x061d, 0x064a, 0x0660, 0x066f, 0x0671, 0x06d5, 0x06de, 0x06de, @@ -18349,8 +19362,8 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x0840, 0x0858, 0x085e, 0x085e, 0x0860, 0x086a, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, + 0x0870, 0x088e, + 0x08a0, 0x08c9, 0x0903, 0x0939, 0x093b, 0x093b, 0x093d, 0x0940, @@ -18439,6 +19452,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x0c3d, 0x0c3d, 0x0c41, 0x0c44, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c61, 0x0c66, 0x0c6f, 0x0c77, 0x0c80, @@ -18452,12 +19466,11 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x0cc3, 0x0cc4, 0x0cc7, 0x0cc8, 0x0cca, 0x0ccb, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce1, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, - 0x0d02, 0x0d03, - 0x0d05, 0x0d0c, + 0x0cf1, 0x0cf3, + 0x0d02, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d3a, 0x0d3d, 0x0d3d, @@ -18542,10 +19555,10 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x13f8, 0x13fd, 0x1400, 0x169c, 0x16a0, 0x16f8, - 0x1700, 0x170c, - 0x170e, 0x1711, - 0x1720, 0x1731, - 0x1735, 0x1736, + 0x1700, 0x1711, + 0x1715, 0x1715, + 0x171f, 0x1731, + 0x1734, 0x1736, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, @@ -18587,9 +19600,9 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x1b04, 0x1b33, 0x1b3b, 0x1b3b, 0x1b3d, 0x1b41, - 0x1b43, 0x1b4b, + 0x1b43, 0x1b4c, 0x1b50, 0x1b6a, - 0x1b74, 0x1b7c, + 0x1b74, 0x1b7e, 0x1b82, 0x1ba1, 0x1ba6, 0x1ba7, 0x1baa, 0x1baa, @@ -18633,15 +19646,13 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x2070, 0x2071, 0x2074, 0x208e, 0x2090, 0x209c, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x2100, 0x218b, 0x2190, 0x2426, 0x2440, 0x244a, 0x2460, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2c2e, - 0x2c30, 0x2c5e, - 0x2c60, 0x2cee, + 0x2b97, 0x2cee, 0x2cf2, 0x2cf3, 0x2cf9, 0x2d25, 0x2d27, 0x2d27, @@ -18657,7 +19668,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x2dc8, 0x2dce, 0x2dd0, 0x2dd6, 0x2dd8, 0x2dde, - 0x2e00, 0x2e4f, + 0x2e00, 0x2e5d, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -18668,12 +19679,9 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x309b, 0x30ff, 0x3105, 0x312f, 0x3131, 0x318e, - 0x3190, 0x31ba, - 0x31c0, 0x31e3, + 0x3190, 0x31e3, 0x31f0, 0x321e, - 0x3220, 0x4db5, - 0x4dc0, 0x9fef, - 0xa000, 0xa48c, + 0x3220, 0xa48c, 0xa490, 0xa4c6, 0xa4d0, 0xa62b, 0xa640, 0xa66e, @@ -18681,9 +19689,11 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0xa67e, 0xa69d, 0xa6a0, 0xa6ef, 0xa6f2, 0xa6f7, - 0xa700, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa801, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa801, 0xa803, 0xa805, 0xa807, 0xa80a, 0xa80c, 0xa824, @@ -18725,7 +19735,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0xab11, 0xab16, 0xab20, 0xab26, 0xab28, 0xab2e, - 0xab30, 0xab67, + 0xab30, 0xab6b, 0xab70, 0xabe4, 0xabe6, 0xabe7, 0xabe9, 0xabec, @@ -18743,11 +19753,11 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, - 0xfb46, 0xfbc1, - 0xfbd3, 0xfd3f, - 0xfd50, 0xfd8f, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, 0xfd92, 0xfdc7, - 0xfdf0, 0xfdfd, + 0xfdcf, 0xfdcf, + 0xfdf0, 0xfdff, 0xfe10, 0xfe19, 0xfe30, 0xfe52, 0xfe54, 0xfe66, @@ -18773,7 +19783,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1018e, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101a0, 0x101a0, 0x101d0, 0x101fc, 0x10280, 0x1029c, @@ -18791,10 +19801,20 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x104d8, 0x104fb, 0x10500, 0x10527, 0x10530, 0x10563, - 0x1056f, 0x1056f, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080a, 0x10835, @@ -18831,14 +19851,22 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x10cfa, 0x10d23, 0x10d30, 0x10d39, 0x10e60, 0x10e7e, + 0x10e80, 0x10ea9, + 0x10ead, 0x10ead, + 0x10eb0, 0x10eb1, 0x10f00, 0x10f27, 0x10f30, 0x10f45, 0x10f51, 0x10f59, + 0x10f70, 0x10f81, + 0x10f86, 0x10f89, + 0x10fb0, 0x10fcb, 0x10fe0, 0x10ff6, 0x11000, 0x11000, 0x11002, 0x11037, 0x11047, 0x1104d, 0x11052, 0x1106f, + 0x11071, 0x11072, + 0x11075, 0x11075, 0x11082, 0x110b2, 0x110b7, 0x110b8, 0x110bb, 0x110bc, @@ -18847,12 +19875,12 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x110f0, 0x110f9, 0x11103, 0x11126, 0x1112c, 0x1112c, - 0x11136, 0x11146, + 0x11136, 0x11147, 0x11150, 0x11172, 0x11174, 0x11176, 0x11182, 0x111b5, 0x111bf, 0x111c8, - 0x111cd, 0x111cd, + 0x111cd, 0x111ce, 0x111d0, 0x111df, 0x111e1, 0x111f4, 0x11200, 0x11211, @@ -18860,6 +19888,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x11232, 0x11233, 0x11235, 0x11235, 0x11238, 0x1123d, + 0x1123f, 0x11240, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128a, 0x1128d, @@ -18885,10 +19914,9 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x11400, 0x11437, 0x11440, 0x11441, 0x11445, 0x11445, - 0x11447, 0x11459, - 0x1145b, 0x1145b, + 0x11447, 0x1145b, 0x1145d, 0x1145d, - 0x1145f, 0x1145f, + 0x1145f, 0x11461, 0x11480, 0x114af, 0x114b1, 0x114b2, 0x114b9, 0x114b9, @@ -18912,17 +19940,27 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x116ac, 0x116ac, 0x116ae, 0x116af, 0x116b6, 0x116b6, - 0x116b8, 0x116b8, + 0x116b8, 0x116b9, 0x116c0, 0x116c9, 0x11700, 0x1171a, 0x11720, 0x11721, 0x11726, 0x11726, - 0x11730, 0x1173f, + 0x11730, 0x11746, 0x11800, 0x1182e, 0x11838, 0x11838, 0x1183b, 0x1183b, 0x118a0, 0x118f2, - 0x118ff, 0x118ff, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x1192f, + 0x11931, 0x11935, + 0x11937, 0x11938, + 0x1193d, 0x1193d, + 0x1193f, 0x11942, + 0x11944, 0x11946, + 0x11950, 0x11959, 0x119a0, 0x119a7, 0x119aa, 0x119d3, 0x119dc, 0x119df, @@ -18936,7 +19974,8 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x11a5c, 0x11a89, 0x11a97, 0x11a97, 0x11a9a, 0x11aa2, - 0x11ac0, 0x11af8, + 0x11ab0, 0x11af8, + 0x11b00, 0x11b09, 0x11c00, 0x11c08, 0x11c0a, 0x11c2f, 0x11c3e, 0x11c3e, @@ -18960,17 +19999,26 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x11da0, 0x11da9, 0x11ee0, 0x11ef2, 0x11ef5, 0x11ef8, + 0x11f02, 0x11f10, + 0x11f12, 0x11f35, + 0x11f3e, 0x11f3f, + 0x11f41, 0x11f41, + 0x11f43, 0x11f59, + 0x11fb0, 0x11fb0, 0x11fc0, 0x11ff1, 0x11fff, 0x12399, 0x12400, 0x1246e, 0x12470, 0x12474, 0x12480, 0x12543, - 0x13000, 0x1342e, + 0x12f90, 0x12ff2, + 0x13000, 0x1342f, + 0x13441, 0x13446, 0x14400, 0x14646, 0x16800, 0x16a38, 0x16a40, 0x16a5e, 0x16a60, 0x16a69, - 0x16a6e, 0x16a6f, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, 0x16ad0, 0x16aed, 0x16af5, 0x16af5, 0x16b00, 0x16b2f, @@ -18984,10 +20032,17 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x16f50, 0x16f87, 0x16f93, 0x16f9f, 0x16fe0, 0x16fe3, + 0x16ff0, 0x16ff1, 0x17000, 0x187f7, - 0x18800, 0x18af2, - 0x1b000, 0x1b11e, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, 0x1b170, 0x1b2fb, 0x1bc00, 0x1bc6a, @@ -18996,6 +20051,7 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x1bc90, 0x1bc99, 0x1bc9c, 0x1bc9c, 0x1bc9f, 0x1bc9f, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d129, 0x1d164, @@ -19003,9 +20059,10 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x1d16a, 0x1d16d, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, - 0x1d1ae, 0x1d1e8, + 0x1d1ae, 0x1d1ea, 0x1d200, 0x1d241, 0x1d245, 0x1d245, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d300, 0x1d356, 0x1d360, 0x1d378, @@ -19034,13 +20091,23 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x1da6d, 0x1da74, 0x1da76, 0x1da83, 0x1da85, 0x1da8b, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e030, 0x1e06d, 0x1e100, 0x1e12c, 0x1e137, 0x1e13d, 0x1e140, 0x1e149, 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ad, 0x1e2c0, 0x1e2eb, 0x1e2f0, 0x1e2f9, 0x1e2ff, 0x1e2ff, + 0x1e4d0, 0x1e4eb, + 0x1e4f0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, 0x1e800, 0x1e8c4, 0x1e8c7, 0x1e8cf, 0x1e900, 0x1e943, @@ -19089,48 +20156,50 @@ static const OnigCodePoint CR_Grapheme_Base[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f100, 0x1f10c, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f100, 0x1f1ad, 0x1f1e6, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Grapheme_Base */ /* 'Grapheme_Link': Derived Property */ static const OnigCodePoint CR_Grapheme_Link[] = { - 52, + 56, 0x094d, 0x094d, 0x09cd, 0x09cd, 0x0a4d, 0x0a4d, @@ -19146,7 +20215,7 @@ static const OnigCodePoint CR_Grapheme_Link[] = { 0x0eba, 0x0eba, 0x0f84, 0x0f84, 0x1039, 0x103a, - 0x1714, 0x1714, + 0x1714, 0x1715, 0x1734, 0x1734, 0x17d2, 0x17d2, 0x1a60, 0x1a60, @@ -19155,6 +20224,7 @@ static const OnigCodePoint CR_Grapheme_Link[] = { 0x1bf2, 0x1bf3, 0x2d7f, 0x2d7f, 0xa806, 0xa806, + 0xa82c, 0xa82c, 0xa8c4, 0xa8c4, 0xa953, 0xa953, 0xa9c0, 0xa9c0, @@ -19162,6 +20232,7 @@ static const OnigCodePoint CR_Grapheme_Link[] = { 0xabed, 0xabed, 0x10a3f, 0x10a3f, 0x11046, 0x11046, + 0x11070, 0x11070, 0x1107f, 0x1107f, 0x110b9, 0x110b9, 0x11133, 0x11134, @@ -19176,6 +20247,7 @@ static const OnigCodePoint CR_Grapheme_Link[] = { 0x116b6, 0x116b6, 0x1172b, 0x1172b, 0x11839, 0x11839, + 0x1193d, 0x1193e, 0x119e0, 0x119e0, 0x11a34, 0x11a34, 0x11a47, 0x11a47, @@ -19183,11 +20255,12 @@ static const OnigCodePoint CR_Grapheme_Link[] = { 0x11c3f, 0x11c3f, 0x11d44, 0x11d45, 0x11d97, 0x11d97, + 0x11f41, 0x11f42, }; /* CR_Grapheme_Link */ /* 'Common': Script */ static const OnigCodePoint CR_Common[] = { - 172, + 173, 0x0000, 0x0040, 0x005b, 0x0060, 0x007b, 0x00a9, @@ -19202,7 +20275,6 @@ static const OnigCodePoint CR_Common[] = { 0x037e, 0x037e, 0x0385, 0x0385, 0x0387, 0x0387, - 0x0589, 0x0589, 0x0605, 0x0605, 0x060c, 0x060c, 0x061b, 0x061b, @@ -19229,7 +20301,7 @@ static const OnigCodePoint CR_Common[] = { 0x2066, 0x2070, 0x2074, 0x207e, 0x2080, 0x208e, - 0x20a0, 0x20bf, + 0x20a0, 0x20c0, 0x2100, 0x2125, 0x2127, 0x2129, 0x212c, 0x2131, @@ -19241,8 +20313,8 @@ static const OnigCodePoint CR_Common[] = { 0x2460, 0x27ff, 0x2900, 0x2b73, 0x2b76, 0x2b95, - 0x2b98, 0x2bff, - 0x2e00, 0x2e4f, + 0x2b97, 0x2bff, + 0x2e00, 0x2e5d, 0x2ff0, 0x2ffb, 0x3000, 0x3004, 0x3006, 0x3006, @@ -19265,6 +20337,7 @@ static const OnigCodePoint CR_Common[] = { 0xa92e, 0xa92e, 0xa9cf, 0xa9cf, 0xab5b, 0xab5b, + 0xab6a, 0xab6b, 0xfd3e, 0xfd3f, 0xfe10, 0xfe19, 0xfe30, 0xfe52, @@ -19282,18 +20355,19 @@ static const OnigCodePoint CR_Common[] = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013f, - 0x10190, 0x1019b, + 0x10190, 0x1019c, 0x101d0, 0x101fc, 0x102e1, 0x102fb, - 0x16fe2, 0x16fe3, 0x1bca0, 0x1bca3, + 0x1cf50, 0x1cfc3, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d129, 0x1d166, 0x1d16a, 0x1d17a, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, - 0x1d1ae, 0x1d1e8, + 0x1d1ae, 0x1d1ea, + 0x1d2c0, 0x1d2d3, 0x1d2e0, 0x1d2f3, 0x1d300, 0x1d356, 0x1d360, 0x1d378, @@ -19326,45 +20400,45 @@ static const OnigCodePoint CR_Common[] = { 0x1f0b1, 0x1f0bf, 0x1f0c1, 0x1f0cf, 0x1f0d1, 0x1f0f5, - 0x1f100, 0x1f10c, - 0x1f110, 0x1f16c, - 0x1f170, 0x1f1ac, + 0x1f100, 0x1f1ad, 0x1f1e6, 0x1f1ff, 0x1f201, 0x1f202, 0x1f210, 0x1f23b, 0x1f240, 0x1f248, 0x1f250, 0x1f251, 0x1f260, 0x1f265, - 0x1f300, 0x1f6d5, - 0x1f6e0, 0x1f6ec, - 0x1f6f0, 0x1f6fa, - 0x1f700, 0x1f773, - 0x1f780, 0x1f7d8, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, 0x1f800, 0x1f80b, 0x1f810, 0x1f847, 0x1f850, 0x1f859, 0x1f860, 0x1f887, 0x1f890, 0x1f8ad, - 0x1f900, 0x1f90b, - 0x1f90d, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1fa53, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, 0x1fa60, 0x1fa6d, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, 0xe0001, 0xe0001, 0xe0020, 0xe007f, }; /* CR_Common */ /* 'Latin': Script */ static const OnigCodePoint CR_Latin[] = { - 32, + 39, 0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, @@ -19388,15 +20462,22 @@ static const OnigCodePoint CR_Latin[] = { 0x2160, 0x2188, 0x2c60, 0x2c7f, 0xa722, 0xa787, - 0xa78b, 0xa7bf, - 0xa7c2, 0xa7c6, - 0xa7f7, 0xa7ff, + 0xa78b, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa7ff, 0xab30, 0xab5a, 0xab5c, 0xab64, - 0xab66, 0xab67, + 0xab66, 0xab69, 0xfb00, 0xfb06, 0xff21, 0xff3a, 0xff41, 0xff5a, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, }; /* CR_Latin */ /* 'Greek': Script */ @@ -19442,7 +20523,7 @@ static const OnigCodePoint CR_Greek[] = { /* 'Cyrillic': Script */ static const OnigCodePoint CR_Cyrillic[] = { - 8, + 10, 0x0400, 0x0484, 0x0487, 0x052f, 0x1c80, 0x1c88, @@ -19451,14 +20532,15 @@ static const OnigCodePoint CR_Cyrillic[] = { 0x2de0, 0x2dff, 0xa640, 0xa69f, 0xfe2e, 0xfe2f, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, }; /* CR_Cyrillic */ /* 'Armenian': Script */ static const OnigCodePoint CR_Armenian[] = { - 5, + 4, 0x0531, 0x0556, - 0x0559, 0x0588, - 0x058a, 0x058a, + 0x0559, 0x058a, 0x058d, 0x058f, 0xfb13, 0xfb17, }; /* CR_Armenian */ @@ -19479,30 +20561,31 @@ static const OnigCodePoint CR_Hebrew[] = { /* 'Arabic': Script */ static const OnigCodePoint CR_Arabic[] = { - 57, + 58, 0x0600, 0x0604, 0x0606, 0x060b, 0x060d, 0x061a, - 0x061c, 0x061c, - 0x061e, 0x061e, + 0x061c, 0x061e, 0x0620, 0x063f, 0x0641, 0x064a, 0x0656, 0x066f, 0x0671, 0x06dc, 0x06de, 0x06ff, 0x0750, 0x077f, - 0x08a0, 0x08b4, - 0x08b6, 0x08bd, - 0x08d3, 0x08e1, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x08e1, 0x08e3, 0x08ff, - 0xfb50, 0xfbc1, + 0xfb50, 0xfbc2, 0xfbd3, 0xfd3d, - 0xfd50, 0xfd8f, + 0xfd40, 0xfd8f, 0xfd92, 0xfdc7, - 0xfdf0, 0xfdfd, + 0xfdcf, 0xfdcf, + 0xfdf0, 0xfdff, 0xfe70, 0xfe74, 0xfe76, 0xfefc, 0x10e60, 0x10e7e, + 0x10efd, 0x10eff, 0x1ee00, 0x1ee03, 0x1ee05, 0x1ee1f, 0x1ee21, 0x1ee22, @@ -19556,11 +20639,12 @@ static const OnigCodePoint CR_Thaana[] = { /* 'Devanagari': Script */ static const OnigCodePoint CR_Devanagari[] = { - 4, + 5, 0x0900, 0x0950, 0x0955, 0x0963, 0x0966, 0x097f, 0xa8e0, 0xa8ff, + 0x11b00, 0x11b09, }; /* CR_Devanagari */ /* 'Bengali': Script */ @@ -19635,7 +20719,7 @@ static const OnigCodePoint CR_Oriya[] = { 0x0b3c, 0x0b44, 0x0b47, 0x0b48, 0x0b4b, 0x0b4d, - 0x0b56, 0x0b57, + 0x0b55, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b63, 0x0b66, 0x0b77, @@ -19666,16 +20750,17 @@ static const OnigCodePoint CR_Tamil[] = { /* 'Telugu': Script */ static const OnigCodePoint CR_Telugu[] = { - 12, + 13, 0x0c00, 0x0c0c, 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c39, - 0x0c3d, 0x0c44, + 0x0c3c, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, 0x0c60, 0x0c63, 0x0c66, 0x0c6f, 0x0c77, 0x0c7f, @@ -19693,17 +20778,16 @@ static const OnigCodePoint CR_Kannada[] = { 0x0cc6, 0x0cc8, 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0cde, 0x0cde, + 0x0cdd, 0x0cde, 0x0ce0, 0x0ce3, 0x0ce6, 0x0cef, - 0x0cf1, 0x0cf2, + 0x0cf1, 0x0cf3, }; /* CR_Kannada */ /* 'Malayalam': Script */ static const OnigCodePoint CR_Malayalam[] = { - 8, - 0x0d00, 0x0d03, - 0x0d05, 0x0d0c, + 7, + 0x0d00, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d44, 0x0d46, 0x0d48, @@ -19715,7 +20799,7 @@ static const OnigCodePoint CR_Malayalam[] = { /* 'Sinhala': Script */ static const OnigCodePoint CR_Sinhala[] = { 13, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, @@ -19748,7 +20832,7 @@ static const OnigCodePoint CR_Lao[] = { 0x0ea7, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, - 0x0ec8, 0x0ecd, + 0x0ec8, 0x0ece, 0x0ed0, 0x0ed9, 0x0edc, 0x0edf, }; /* CR_Lao */ @@ -19809,7 +20893,7 @@ static const OnigCodePoint CR_Hangul[] = { /* 'Ethiopic': Script */ static const OnigCodePoint CR_Ethiopic[] = { - 32, + 36, 0x1200, 0x1248, 0x124a, 0x124d, 0x1250, 0x1256, @@ -19842,6 +20926,10 @@ static const OnigCodePoint CR_Ethiopic[] = { 0xab11, 0xab16, 0xab20, 0xab26, 0xab28, 0xab2e, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, }; /* CR_Ethiopic */ /* 'Cherokee': Script */ @@ -19854,9 +20942,10 @@ static const OnigCodePoint CR_Cherokee[] = { /* 'Canadian_Aboriginal': Script */ static const OnigCodePoint CR_Canadian_Aboriginal[] = { - 2, + 3, 0x1400, 0x167f, 0x18b0, 0x18f5, + 0x11ab0, 0x11abf, }; /* CR_Canadian_Aboriginal */ /* 'Ogham': Script */ @@ -19883,11 +20972,10 @@ static const OnigCodePoint CR_Khmer[] = { /* 'Mongolian': Script */ static const OnigCodePoint CR_Mongolian[] = { - 7, + 6, 0x1800, 0x1801, 0x1804, 0x1804, - 0x1806, 0x180e, - 0x1810, 0x1819, + 0x1806, 0x1819, 0x1820, 0x1878, 0x1880, 0x18aa, 0x11660, 0x1166c, @@ -19895,17 +20983,18 @@ static const OnigCodePoint CR_Mongolian[] = { /* 'Hiragana': Script */ static const OnigCodePoint CR_Hiragana[] = { - 5, + 6, 0x3041, 0x3096, 0x309d, 0x309f, - 0x1b001, 0x1b11e, + 0x1b001, 0x1b11f, + 0x1b132, 0x1b132, 0x1b150, 0x1b152, 0x1f200, 0x1f200, }; /* CR_Hiragana */ /* 'Katakana': Script */ static const OnigCodePoint CR_Katakana[] = { - 9, + 14, 0x30a1, 0x30fa, 0x30fd, 0x30ff, 0x31f0, 0x31ff, @@ -19913,7 +21002,12 @@ static const OnigCodePoint CR_Katakana[] = { 0x3300, 0x3357, 0xff66, 0xff6f, 0xff71, 0xff9d, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, 0x1b000, 0x1b000, + 0x1b120, 0x1b122, + 0x1b155, 0x1b155, 0x1b164, 0x1b167, }; /* CR_Katakana */ @@ -19922,12 +21016,12 @@ static const OnigCodePoint CR_Bopomofo[] = { 3, 0x02ea, 0x02eb, 0x3105, 0x312f, - 0x31a0, 0x31ba, + 0x31a0, 0x31bf, }; /* CR_Bopomofo */ /* 'Han': Script */ static const OnigCodePoint CR_Han[] = { - 17, + 21, 0x2e80, 0x2e99, 0x2e9b, 0x2ef3, 0x2f00, 0x2fd5, @@ -19935,16 +21029,20 @@ static const OnigCodePoint CR_Han[] = { 0x3007, 0x3007, 0x3021, 0x3029, 0x3038, 0x303b, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, + 0x3400, 0x4dbf, + 0x4e00, 0x9fff, 0xf900, 0xfa6d, 0xfa70, 0xfad9, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x16fe2, 0x16fe3, + 0x16ff0, 0x16ff1, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Han */ /* 'Yi': Script */ @@ -19975,21 +21073,20 @@ static const OnigCodePoint CR_Deseret[] = { /* 'Inherited': Script */ static const OnigCodePoint CR_Inherited[] = { - 28, + 29, 0x0300, 0x036f, 0x0485, 0x0486, 0x064b, 0x0655, 0x0670, 0x0670, 0x0951, 0x0954, - 0x1ab0, 0x1abe, + 0x1ab0, 0x1ace, 0x1cd0, 0x1cd2, 0x1cd4, 0x1ce0, 0x1ce2, 0x1ce8, 0x1ced, 0x1ced, 0x1cf4, 0x1cf4, 0x1cf8, 0x1cf9, - 0x1dc0, 0x1df9, - 0x1dfb, 0x1dff, + 0x1dc0, 0x1dff, 0x200c, 0x200d, 0x20d0, 0x20f0, 0x302a, 0x302d, @@ -19999,6 +21096,8 @@ static const OnigCodePoint CR_Inherited[] = { 0x101fd, 0x101fd, 0x102e0, 0x102e0, 0x1133b, 0x1133b, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d167, 0x1d169, 0x1d17b, 0x1d182, 0x1d185, 0x1d18b, @@ -20009,8 +21108,8 @@ static const OnigCodePoint CR_Inherited[] = { /* 'Tagalog': Script */ static const OnigCodePoint CR_Tagalog[] = { 2, - 0x1700, 0x170c, - 0x170e, 0x1714, + 0x1700, 0x1715, + 0x171f, 0x171f, }; /* CR_Tagalog */ /* 'Hanunoo': Script */ @@ -20125,9 +21224,8 @@ static const OnigCodePoint CR_New_Tai_Lue[] = { /* 'Glagolitic': Script */ static const OnigCodePoint CR_Glagolitic[] = { - 7, - 0x2c00, 0x2c2e, - 0x2c30, 0x2c5e, + 6, + 0x2c00, 0x2c5f, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, @@ -20146,7 +21244,7 @@ static const OnigCodePoint CR_Tifinagh[] = { /* 'Syloti_Nagri': Script */ static const OnigCodePoint CR_Syloti_Nagri[] = { 1, - 0xa800, 0xa82b, + 0xa800, 0xa82c, }; /* CR_Syloti_Nagri */ /* 'Old_Persian': Script */ @@ -20172,8 +21270,8 @@ static const OnigCodePoint CR_Kharoshthi[] = { /* 'Balinese': Script */ static const OnigCodePoint CR_Balinese[] = { 2, - 0x1b00, 0x1b4b, - 0x1b50, 0x1b7c, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, }; /* CR_Balinese */ /* 'Cuneiform': Script */ @@ -20307,9 +21405,8 @@ static const OnigCodePoint CR_Avestan[] = { /* 'Egyptian_Hieroglyphs': Script */ static const OnigCodePoint CR_Egyptian_Hieroglyphs[] = { - 2, - 0x13000, 0x1342e, - 0x13430, 0x13438, + 1, + 0x13000, 0x13455, }; /* CR_Egyptian_Hieroglyphs */ /* 'Samaritan': Script */ @@ -20321,8 +21418,9 @@ static const OnigCodePoint CR_Samaritan[] = { /* 'Lisu': Script */ static const OnigCodePoint CR_Lisu[] = { - 1, + 2, 0xa4d0, 0xa4ff, + 0x11fb0, 0x11fb0, }; /* CR_Lisu */ /* 'Bamum': Script */ @@ -20384,7 +21482,7 @@ static const OnigCodePoint CR_Old_Turkic[] = { /* 'Kaithi': Script */ static const OnigCodePoint CR_Kaithi[] = { 2, - 0x11080, 0x110c1, + 0x11080, 0x110c2, 0x110cd, 0x110cd, }; /* CR_Kaithi */ @@ -20399,7 +21497,7 @@ static const OnigCodePoint CR_Batak[] = { static const OnigCodePoint CR_Brahmi[] = { 3, 0x11000, 0x1104d, - 0x11052, 0x1106f, + 0x11052, 0x11075, 0x1107f, 0x1107f, }; /* CR_Brahmi */ @@ -20414,7 +21512,7 @@ static const OnigCodePoint CR_Mandaic[] = { static const OnigCodePoint CR_Chakma[] = { 2, 0x11100, 0x11134, - 0x11136, 0x11146, + 0x11136, 0x11147, }; /* CR_Chakma */ /* 'Meroitic_Cursive': Script */ @@ -20441,9 +21539,8 @@ static const OnigCodePoint CR_Miao[] = { /* 'Sharada': Script */ static const OnigCodePoint CR_Sharada[] = { - 2, - 0x11180, 0x111cd, - 0x111d0, 0x111df, + 1, + 0x11180, 0x111df, }; /* CR_Sharada */ /* 'Sora_Sompeng': Script */ @@ -20456,7 +21553,7 @@ static const OnigCodePoint CR_Sora_Sompeng[] = { /* 'Takri': Script */ static const OnigCodePoint CR_Takri[] = { 2, - 0x11680, 0x116b8, + 0x11680, 0x116b9, 0x116c0, 0x116c9, }; /* CR_Takri */ @@ -20524,7 +21621,7 @@ static const OnigCodePoint CR_Pahawh_Hmong[] = { static const OnigCodePoint CR_Khojki[] = { 2, 0x11200, 0x11211, - 0x11213, 0x1123e, + 0x11213, 0x11241, }; /* CR_Khojki */ /* 'Linear_A': Script */ @@ -20642,7 +21739,7 @@ static const OnigCodePoint CR_Ahom[] = { 3, 0x11700, 0x1171a, 0x1171d, 0x1172b, - 0x11730, 0x1173f, + 0x11730, 0x11746, }; /* CR_Ahom */ /* 'Anatolian_Hieroglyphs': Script */ @@ -20712,10 +21809,9 @@ static const OnigCodePoint CR_Marchen[] = { /* 'Newa': Script */ static const OnigCodePoint CR_Newa[] = { - 3, - 0x11400, 0x11459, - 0x1145b, 0x1145b, - 0x1145d, 0x1145f, + 2, + 0x11400, 0x1145b, + 0x1145d, 0x11461, }; /* CR_Newa */ /* 'Osage': Script */ @@ -20727,10 +21823,11 @@ static const OnigCodePoint CR_Osage[] = { /* 'Tangut': Script */ static const OnigCodePoint CR_Tangut[] = { - 3, + 4, 0x16fe0, 0x16fe0, 0x17000, 0x187f7, - 0x18800, 0x18af2, + 0x18800, 0x18aff, + 0x18d00, 0x18d08, }; /* CR_Tangut */ /* 'Masaram_Gondi': Script */ @@ -20842,6 +21939,92 @@ static const OnigCodePoint CR_Wancho[] = { 0x1e2ff, 0x1e2ff, }; /* CR_Wancho */ +/* 'Chorasmian': Script */ +static const OnigCodePoint CR_Chorasmian[] = { + 1, + 0x10fb0, 0x10fcb, +}; /* CR_Chorasmian */ + +/* 'Dives_Akuru': Script */ +static const OnigCodePoint CR_Dives_Akuru[] = { + 8, + 0x11900, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, +}; /* CR_Dives_Akuru */ + +/* 'Khitan_Small_Script': Script */ +static const OnigCodePoint CR_Khitan_Small_Script[] = { + 2, + 0x16fe4, 0x16fe4, + 0x18b00, 0x18cd5, +}; /* CR_Khitan_Small_Script */ + +/* 'Yezidi': Script */ +static const OnigCodePoint CR_Yezidi[] = { + 3, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, +}; /* CR_Yezidi */ + +/* 'Cypro_Minoan': Script */ +static const OnigCodePoint CR_Cypro_Minoan[] = { + 1, + 0x12f90, 0x12ff2, +}; /* CR_Cypro_Minoan */ + +/* 'Old_Uyghur': Script */ +static const OnigCodePoint CR_Old_Uyghur[] = { + 1, + 0x10f70, 0x10f89, +}; /* CR_Old_Uyghur */ + +/* 'Tangsa': Script */ +static const OnigCodePoint CR_Tangsa[] = { + 2, + 0x16a70, 0x16abe, + 0x16ac0, 0x16ac9, +}; /* CR_Tangsa */ + +/* 'Toto': Script */ +static const OnigCodePoint CR_Toto[] = { + 1, + 0x1e290, 0x1e2ae, +}; /* CR_Toto */ + +/* 'Vithkuqi': Script */ +static const OnigCodePoint CR_Vithkuqi[] = { + 8, + 0x10570, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, +}; /* CR_Vithkuqi */ + +/* 'Kawi': Script */ +static const OnigCodePoint CR_Kawi[] = { + 3, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f59, +}; /* CR_Kawi */ + +/* 'Nag_Mundari': Script */ +static const OnigCodePoint CR_Nag_Mundari[] = { + 1, + 0x1e4d0, 0x1e4f9, +}; /* CR_Nag_Mundari */ + /* 'White_Space': Binary Property */ #define CR_White_Space CR_Space @@ -20862,7 +22045,7 @@ static const OnigCodePoint CR_Join_Control[] = { /* 'Dash': Binary Property */ static const OnigCodePoint CR_Dash[] = { - 21, + 23, 0x002d, 0x002d, 0x058a, 0x058a, 0x05be, 0x05be, @@ -20877,6 +22060,7 @@ static const OnigCodePoint CR_Dash[] = { 0x2e1a, 0x2e1a, 0x2e3a, 0x2e3b, 0x2e40, 0x2e40, + 0x2e5d, 0x2e5d, 0x301c, 0x301c, 0x3030, 0x3030, 0x30a0, 0x30a0, @@ -20884,6 +22068,7 @@ static const OnigCodePoint CR_Dash[] = { 0xfe58, 0xfe58, 0xfe63, 0xfe63, 0xff0d, 0xff0d, + 0x10ead, 0x10ead, }; /* CR_Dash */ /* 'Hyphen': Binary Property */ @@ -20921,7 +22106,7 @@ static const OnigCodePoint CR_Quotation_Mark[] = { /* 'Terminal_Punctuation': Binary Property */ static const OnigCodePoint CR_Terminal_Punctuation[] = { - 102, + 108, 0x0021, 0x0021, 0x002c, 0x002c, 0x002e, 0x002e, @@ -20933,7 +22118,7 @@ static const OnigCodePoint CR_Terminal_Punctuation[] = { 0x05c3, 0x05c3, 0x060c, 0x060c, 0x061b, 0x061b, - 0x061e, 0x061f, + 0x061d, 0x061f, 0x06d4, 0x06d4, 0x0700, 0x070a, 0x070c, 0x070c, @@ -20957,6 +22142,7 @@ static const OnigCodePoint CR_Terminal_Punctuation[] = { 0x1aa8, 0x1aab, 0x1b5a, 0x1b5b, 0x1b5d, 0x1b5f, + 0x1b7d, 0x1b7e, 0x1c3b, 0x1c3f, 0x1c7e, 0x1c7f, 0x203c, 0x203d, @@ -20966,6 +22152,7 @@ static const OnigCodePoint CR_Terminal_Punctuation[] = { 0x2e41, 0x2e41, 0x2e4c, 0x2e4c, 0x2e4e, 0x2e4f, + 0x2e53, 0x2e54, 0x3001, 0x3002, 0xa4fe, 0xa4ff, 0xa60d, 0xa60f, @@ -20996,6 +22183,7 @@ static const OnigCodePoint CR_Terminal_Punctuation[] = { 0x10b3a, 0x10b3f, 0x10b99, 0x10b9c, 0x10f55, 0x10f59, + 0x10f86, 0x10f89, 0x11047, 0x1104d, 0x110be, 0x110c1, 0x11141, 0x11143, @@ -21005,17 +22193,20 @@ static const OnigCodePoint CR_Terminal_Punctuation[] = { 0x11238, 0x1123c, 0x112a9, 0x112a9, 0x1144b, 0x1144d, - 0x1145b, 0x1145b, + 0x1145a, 0x1145b, 0x115c2, 0x115c5, 0x115c9, 0x115d7, 0x11641, 0x11642, 0x1173c, 0x1173e, + 0x11944, 0x11944, + 0x11946, 0x11946, 0x11a42, 0x11a43, 0x11a9b, 0x11a9c, 0x11aa1, 0x11aa2, 0x11c41, 0x11c43, 0x11c71, 0x11c71, 0x11ef7, 0x11ef8, + 0x11f43, 0x11f44, 0x12470, 0x12474, 0x16a6e, 0x16a6f, 0x16af5, 0x16af5, @@ -21181,7 +22372,7 @@ static const OnigCodePoint CR_Hex_Digit[] = { /* 'Other_Alphabetic': Binary Property */ static const OnigCodePoint CR_Other_Alphabetic[] = { - 221, + 240, 0x0345, 0x0345, 0x05b0, 0x05bd, 0x05bf, 0x05bf, @@ -21241,7 +22432,7 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x0bc6, 0x0bc8, 0x0bca, 0x0bcc, 0x0bd7, 0x0bd7, - 0x0c00, 0x0c03, + 0x0c00, 0x0c04, 0x0c3e, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4c, @@ -21253,13 +22444,14 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x0cca, 0x0ccc, 0x0cd5, 0x0cd6, 0x0ce2, 0x0ce3, + 0x0cf3, 0x0cf3, 0x0d00, 0x0d03, 0x0d3e, 0x0d44, 0x0d46, 0x0d48, 0x0d4a, 0x0d4c, 0x0d57, 0x0d57, 0x0d62, 0x0d63, - 0x0d82, 0x0d83, + 0x0d81, 0x0d83, 0x0dcf, 0x0dd4, 0x0dd6, 0x0dd6, 0x0dd8, 0x0ddf, @@ -21271,7 +22463,7 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x0eb4, 0x0eb9, 0x0ebb, 0x0ebc, 0x0ecd, 0x0ecd, - 0x0f71, 0x0f81, + 0x0f71, 0x0f83, 0x0f8d, 0x0f97, 0x0f99, 0x0fbc, 0x102b, 0x1036, @@ -21297,6 +22489,8 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x1a17, 0x1a1b, 0x1a55, 0x1a5e, 0x1a61, 0x1a74, + 0x1abf, 0x1ac0, + 0x1acc, 0x1ace, 0x1b00, 0x1b04, 0x1b35, 0x1b43, 0x1b80, 0x1b82, @@ -21338,18 +22532,23 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x10a05, 0x10a06, 0x10a0c, 0x10a0f, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, 0x11000, 0x11002, 0x11038, 0x11045, - 0x11082, 0x11082, + 0x11073, 0x11074, + 0x11080, 0x11082, 0x110b0, 0x110b8, + 0x110c2, 0x110c2, 0x11100, 0x11102, 0x11127, 0x11132, 0x11145, 0x11146, 0x11180, 0x11182, 0x111b3, 0x111bf, + 0x111ce, 0x111cf, 0x1122c, 0x11234, 0x11237, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112e8, 0x11300, 0x11303, 0x1133e, 0x11344, @@ -21368,6 +22567,11 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x116ab, 0x116b5, 0x1171d, 0x1172a, 0x1182c, 0x11838, + 0x11930, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x1193c, + 0x11940, 0x11940, + 0x11942, 0x11942, 0x119d1, 0x119d7, 0x119da, 0x119df, 0x119e4, 0x119e4, @@ -21390,15 +22594,21 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { 0x11d90, 0x11d91, 0x11d93, 0x11d96, 0x11ef3, 0x11ef6, + 0x11f00, 0x11f01, + 0x11f03, 0x11f03, + 0x11f34, 0x11f3a, + 0x11f3e, 0x11f40, 0x16f4f, 0x16f4f, 0x16f51, 0x16f87, 0x16f8f, 0x16f92, + 0x16ff0, 0x16ff1, 0x1bc9e, 0x1bc9e, 0x1e000, 0x1e006, 0x1e008, 0x1e018, 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e08f, 0x1e08f, 0x1e947, 0x1e947, 0x1f130, 0x1f149, 0x1f150, 0x1f169, @@ -21407,28 +22617,32 @@ static const OnigCodePoint CR_Other_Alphabetic[] = { /* 'Ideographic': Binary Property */ static const OnigCodePoint CR_Ideographic[] = { - 16, + 20, 0x3006, 0x3007, 0x3021, 0x3029, 0x3038, 0x303a, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, + 0x3400, 0x4dbf, + 0x4e00, 0x9fff, 0xf900, 0xfa6d, 0xfa70, 0xfad9, + 0x16fe4, 0x16fe4, 0x17000, 0x187f7, - 0x18800, 0x18af2, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, 0x1b170, 0x1b2fb, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, 0x2f800, 0x2fa1d, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Ideographic */ /* 'Diacritic': Binary Property */ static const OnigCodePoint CR_Diacritic[] = { - 171, + 195, 0x005e, 0x005e, 0x0060, 0x0060, 0x00a8, 0x00a8, @@ -21457,6 +22671,8 @@ static const OnigCodePoint CR_Diacritic[] = { 0x07a6, 0x07b0, 0x07eb, 0x07f5, 0x0818, 0x0819, + 0x0898, 0x089f, + 0x08c9, 0x08d2, 0x08e3, 0x08fe, 0x093c, 0x093c, 0x094d, 0x094d, @@ -21471,7 +22687,9 @@ static const OnigCodePoint CR_Diacritic[] = { 0x0afd, 0x0aff, 0x0b3c, 0x0b3c, 0x0b4d, 0x0b4d, + 0x0b55, 0x0b55, 0x0bcd, 0x0bcd, + 0x0c3c, 0x0c3c, 0x0c4d, 0x0c4d, 0x0cbc, 0x0cbc, 0x0ccd, 0x0ccd, @@ -21498,12 +22716,14 @@ static const OnigCodePoint CR_Diacritic[] = { 0x108f, 0x108f, 0x109a, 0x109b, 0x135d, 0x135f, + 0x1714, 0x1715, 0x17c9, 0x17d3, 0x17dd, 0x17dd, 0x1939, 0x193b, 0x1a75, 0x1a7c, 0x1a7f, 0x1a7f, - 0x1ab0, 0x1abd, + 0x1ab0, 0x1abe, + 0x1ac1, 0x1acb, 0x1b34, 0x1b34, 0x1b44, 0x1b44, 0x1b6b, 0x1b73, @@ -21516,8 +22736,7 @@ static const OnigCodePoint CR_Diacritic[] = { 0x1cf7, 0x1cf9, 0x1d2c, 0x1d6a, 0x1dc4, 0x1dcf, - 0x1df5, 0x1df9, - 0x1dfd, 0x1dff, + 0x1df5, 0x1dff, 0x1fbd, 0x1fbd, 0x1fbf, 0x1fc1, 0x1fcd, 0x1fcf, @@ -21548,6 +22767,7 @@ static const OnigCodePoint CR_Diacritic[] = { 0xaabf, 0xaac2, 0xaaf6, 0xaaf6, 0xab5b, 0xab5f, + 0xab69, 0xab6b, 0xabec, 0xabed, 0xfb1e, 0xfb1e, 0xfe20, 0xfe2f, @@ -21557,9 +22777,16 @@ static const OnigCodePoint CR_Diacritic[] = { 0xff9e, 0xff9f, 0xffe3, 0xffe3, 0x102e0, 0x102e0, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, 0x10ae5, 0x10ae6, 0x10d22, 0x10d27, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, + 0x11046, 0x11046, + 0x11070, 0x11070, 0x110b9, 0x110ba, 0x11133, 0x11134, 0x11173, 0x11173, @@ -21579,6 +22806,8 @@ static const OnigCodePoint CR_Diacritic[] = { 0x116b6, 0x116b7, 0x1172b, 0x1172b, 0x11839, 0x1183a, + 0x1193d, 0x1193e, + 0x11943, 0x11943, 0x119e0, 0x119e0, 0x11a34, 0x11a34, 0x11a47, 0x11a47, @@ -21587,15 +22816,24 @@ static const OnigCodePoint CR_Diacritic[] = { 0x11d42, 0x11d42, 0x11d44, 0x11d45, 0x11d97, 0x11d97, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16f8f, 0x16f9f, + 0x16ff0, 0x16ff1, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d167, 0x1d169, 0x1d16d, 0x1d172, 0x1d17b, 0x1d182, 0x1d185, 0x1d18b, 0x1d1aa, 0x1d1ad, + 0x1e030, 0x1e06d, 0x1e130, 0x1e136, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e946, @@ -21604,11 +22842,12 @@ static const OnigCodePoint CR_Diacritic[] = { /* 'Extender': Binary Property */ static const OnigCodePoint CR_Extender[] = { - 31, + 33, 0x00b7, 0x00b7, 0x02d0, 0x02d1, 0x0640, 0x0640, 0x07fa, 0x07fa, + 0x0b55, 0x0b55, 0x0e46, 0x0e46, 0x0ec6, 0x0ec6, 0x180a, 0x180a, @@ -21628,6 +22867,7 @@ static const OnigCodePoint CR_Extender[] = { 0xaadd, 0xaadd, 0xaaf3, 0xaaf4, 0xff70, 0xff70, + 0x10781, 0x10782, 0x1135d, 0x1135d, 0x115c6, 0x115c8, 0x11a98, 0x11a98, @@ -21640,7 +22880,7 @@ static const OnigCodePoint CR_Extender[] = { /* 'Other_Lowercase': Binary Property */ static const OnigCodePoint CR_Other_Lowercase[] = { - 20, + 28, 0x00aa, 0x00aa, 0x00ba, 0x00ba, 0x02b0, 0x02b8, @@ -21648,6 +22888,7 @@ static const OnigCodePoint CR_Other_Lowercase[] = { 0x02e0, 0x02e4, 0x0345, 0x0345, 0x037a, 0x037a, + 0x10fc, 0x10fc, 0x1d2c, 0x1d6a, 0x1d78, 0x1d78, 0x1d9b, 0x1dbf, @@ -21659,8 +22900,15 @@ static const OnigCodePoint CR_Other_Lowercase[] = { 0x2c7c, 0x2c7d, 0xa69c, 0xa69d, 0xa770, 0xa770, + 0xa7f2, 0xa7f4, 0xa7f8, 0xa7f9, 0xab5c, 0xab5f, + 0xab69, 0xab69, + 0x10780, 0x10780, + 0x10783, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, + 0x1e030, 0x1e06d, }; /* CR_Other_Lowercase */ /* 'Other_Uppercase': Binary Property */ @@ -21698,7 +22946,7 @@ static const OnigCodePoint CR_Noncharacter_Code_Point[] = { /* 'Other_Grapheme_Extend': Binary Property */ static const OnigCodePoint CR_Other_Grapheme_Extend[] = { - 24, + 25, 0x09be, 0x09be, 0x09d7, 0x09d7, 0x0b3e, 0x0b3e, @@ -21720,6 +22968,7 @@ static const OnigCodePoint CR_Other_Grapheme_Extend[] = { 0x114b0, 0x114b0, 0x114bd, 0x114bd, 0x115af, 0x115af, + 0x11930, 0x11930, 0x1d165, 0x1d165, 0x1d16e, 0x1d172, 0xe0020, 0xe007f, @@ -21748,9 +22997,9 @@ static const OnigCodePoint CR_Radical[] = { /* 'Unified_Ideograph': Binary Property */ static const OnigCodePoint CR_Unified_Ideograph[] = { - 14, - 0x3400, 0x4db5, - 0x4e00, 0x9fef, + 16, + 0x3400, 0x4dbf, + 0x4e00, 0x9fff, 0xfa0e, 0xfa0f, 0xfa11, 0xfa11, 0xfa13, 0xfa14, @@ -21758,11 +23007,13 @@ static const OnigCodePoint CR_Unified_Ideograph[] = { 0xfa21, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa29, - 0x20000, 0x2a6d6, - 0x2a700, 0x2b734, + 0x20000, 0x2a6df, + 0x2a700, 0x2b739, 0x2b740, 0x2b81d, 0x2b820, 0x2cea1, 0x2ceb0, 0x2ebe0, + 0x30000, 0x3134a, + 0x31350, 0x323af, }; /* CR_Unified_Ideograph */ /* 'Other_Default_Ignorable_Code_Point': Binary Property */ @@ -21796,7 +23047,7 @@ static const OnigCodePoint CR_Deprecated[] = { /* 'Soft_Dotted': Binary Property */ static const OnigCodePoint CR_Soft_Dotted[] = { - 31, + 34, 0x0069, 0x006a, 0x012f, 0x012f, 0x0249, 0x0249, @@ -21828,6 +23079,9 @@ static const OnigCodePoint CR_Soft_Dotted[] = { 0x1d62a, 0x1d62b, 0x1d65e, 0x1d65f, 0x1d692, 0x1d693, + 0x1df1a, 0x1df1a, + 0x1e04c, 0x1e04d, + 0x1e068, 0x1e068, }; /* CR_Soft_Dotted */ /* 'Logical_Order_Exception': Binary Property */ @@ -21862,12 +23116,12 @@ static const OnigCodePoint CR_Other_ID_Continue[] = { /* 'Sentence_Terminal': Binary Property */ static const OnigCodePoint CR_Sentence_Terminal[] = { - 74, + 80, 0x0021, 0x0021, 0x002e, 0x002e, 0x003f, 0x003f, 0x0589, 0x0589, - 0x061e, 0x061f, + 0x061d, 0x061f, 0x06d4, 0x06d4, 0x0700, 0x0702, 0x07f9, 0x07f9, @@ -21886,12 +23140,14 @@ static const OnigCodePoint CR_Sentence_Terminal[] = { 0x1aa8, 0x1aab, 0x1b5a, 0x1b5b, 0x1b5e, 0x1b5f, + 0x1b7d, 0x1b7e, 0x1c3b, 0x1c3c, 0x1c7e, 0x1c7f, 0x203c, 0x203d, 0x2047, 0x2049, 0x2e2e, 0x2e2e, 0x2e3c, 0x2e3c, + 0x2e53, 0x2e54, 0x3002, 0x3002, 0xa4ff, 0xa4ff, 0xa60e, 0xa60f, @@ -21912,6 +23168,7 @@ static const OnigCodePoint CR_Sentence_Terminal[] = { 0xff61, 0xff61, 0x10a56, 0x10a57, 0x10f55, 0x10f59, + 0x10f86, 0x10f89, 0x11047, 0x11048, 0x110be, 0x110c1, 0x11141, 0x11143, @@ -21926,10 +23183,13 @@ static const OnigCodePoint CR_Sentence_Terminal[] = { 0x115c9, 0x115d7, 0x11641, 0x11642, 0x1173c, 0x1173e, + 0x11944, 0x11944, + 0x11946, 0x11946, 0x11a42, 0x11a43, 0x11a9b, 0x11a9c, 0x11c41, 0x11c42, 0x11ef7, 0x11ef8, + 0x11f43, 0x11f44, 0x16a6e, 0x16a6f, 0x16af5, 0x16af5, 0x16b37, 0x16b38, @@ -21941,8 +23201,9 @@ static const OnigCodePoint CR_Sentence_Terminal[] = { /* 'Variation_Selector': Binary Property */ static const OnigCodePoint CR_Variation_Selector[] = { - 3, + 4, 0x180b, 0x180d, + 0x180f, 0x180f, 0xfe00, 0xfe0f, 0xe0100, 0xe01ef, }; /* CR_Variation_Selector */ @@ -21992,10 +23253,11 @@ static const OnigCodePoint CR_Pattern_Syntax[] = { /* 'Prepended_Concatenation_Mark': Binary Property */ static const OnigCodePoint CR_Prepended_Concatenation_Mark[] = { - 6, + 7, 0x0600, 0x0605, 0x06dd, 0x06dd, 0x070f, 0x070f, + 0x0890, 0x0891, 0x08e2, 0x08e2, 0x110bd, 0x110bd, 0x110cd, 0x110cd, @@ -22056,6 +23318,7 @@ static const OnigCodePoint CR_Emoji[] = { 0x2699, 0x2699, 0x269b, 0x269c, 0x26a0, 0x26a1, + 0x26a7, 0x26a7, 0x26aa, 0x26ab, 0x26b0, 0x26b1, 0x26bd, 0x26be, @@ -22142,25 +23405,24 @@ static const OnigCodePoint CR_Emoji[] = { 0x1f5fa, 0x1f64f, 0x1f680, 0x1f6c5, 0x1f6cb, 0x1f6d2, - 0x1f6d5, 0x1f6d5, - 0x1f6e0, 0x1f6e5, + 0x1f6d5, 0x1f6d7, + 0x1f6dc, 0x1f6e5, 0x1f6e9, 0x1f6e9, 0x1f6eb, 0x1f6ec, 0x1f6f0, 0x1f6f0, - 0x1f6f3, 0x1f6fa, + 0x1f6f3, 0x1f6fc, 0x1f7e0, 0x1f7eb, - 0x1f90d, 0x1f93a, + 0x1f7f0, 0x1f7f0, + 0x1f90c, 0x1f93a, 0x1f93c, 0x1f945, - 0x1f947, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1f9ff, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, + 0x1f947, 0x1f9ff, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, }; /* CR_Emoji */ /* 'Emoji_Presentation': Emoji */ @@ -22231,22 +23493,22 @@ static const OnigCodePoint CR_Emoji_Presentation[] = { 0x1f680, 0x1f6c5, 0x1f6cc, 0x1f6cc, 0x1f6d0, 0x1f6d2, - 0x1f6d5, 0x1f6d5, + 0x1f6d5, 0x1f6d7, + 0x1f6dc, 0x1f6df, 0x1f6eb, 0x1f6ec, - 0x1f6f4, 0x1f6fa, + 0x1f6f4, 0x1f6fc, 0x1f7e0, 0x1f7eb, - 0x1f90d, 0x1f93a, + 0x1f7f0, 0x1f7f0, + 0x1f90c, 0x1f93a, 0x1f93c, 0x1f945, - 0x1f947, 0x1f971, - 0x1f973, 0x1f976, - 0x1f97a, 0x1f9a2, - 0x1f9a5, 0x1f9aa, - 0x1f9ae, 0x1f9ca, - 0x1f9cd, 0x1f9ff, - 0x1fa70, 0x1fa73, - 0x1fa78, 0x1fa7a, - 0x1fa80, 0x1fa82, - 0x1fa90, 0x1fa95, + 0x1f947, 0x1f9ff, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, }; /* CR_Emoji_Presentation */ /* 'Emoji_Modifier': Emoji */ @@ -22257,7 +23519,7 @@ static const OnigCodePoint CR_Emoji_Modifier[] = { /* 'Emoji_Modifier_Base': Emoji */ static const OnigCodePoint CR_Emoji_Modifier_Base[] = { - 36, + 40, 0x261d, 0x261d, 0x26f9, 0x26f9, 0x270a, 0x270d, @@ -22284,16 +23546,20 @@ static const OnigCodePoint CR_Emoji_Modifier_Base[] = { 0x1f6b4, 0x1f6b6, 0x1f6c0, 0x1f6c0, 0x1f6cc, 0x1f6cc, + 0x1f90c, 0x1f90c, 0x1f90f, 0x1f90f, 0x1f918, 0x1f91f, 0x1f926, 0x1f926, 0x1f930, 0x1f939, 0x1f93c, 0x1f93e, + 0x1f977, 0x1f977, 0x1f9b5, 0x1f9b6, 0x1f9b8, 0x1f9b9, 0x1f9bb, 0x1f9bb, 0x1f9cd, 0x1f9cf, 0x1f9d1, 0x1f9dd, + 0x1fac3, 0x1fac5, + 0x1faf0, 0x1faf8, }; /* CR_Emoji_Modifier_Base */ /* 'Emoji_Component': Emoji */ @@ -22313,7 +23579,7 @@ static const OnigCodePoint CR_Emoji_Component[] = { /* 'Extended_Pictographic': Emoji */ static const OnigCodePoint CR_Extended_Pictographic[] = { - 77, + 78, 0x00a9, 0x00a9, 0x00ae, 0x00ae, 0x203c, 0x203c, @@ -22390,12 +23656,13 @@ static const OnigCodePoint CR_Extended_Pictographic[] = { 0x1f8ae, 0x1f8ff, 0x1f90c, 0x1f93a, 0x1f93c, 0x1f945, - 0x1f947, 0x1fffd, + 0x1f947, 0x1faff, + 0x1fc00, 0x1fffd, }; /* CR_Extended_Pictographic */ /* 'Unknown': Script */ static const OnigCodePoint CR_Unknown[] = { - 664, + 705, 0x0378, 0x0379, 0x0380, 0x0383, 0x038b, 0x038b, @@ -22408,7 +23675,6 @@ static const OnigCodePoint CR_Unknown[] = { 0x05c8, 0x05cf, 0x05eb, 0x05ee, 0x05f5, 0x05ff, - 0x061d, 0x061d, 0x070e, 0x070e, 0x074b, 0x074c, 0x07b2, 0x07bf, @@ -22417,9 +23683,9 @@ static const OnigCodePoint CR_Unknown[] = { 0x083f, 0x083f, 0x085c, 0x085d, 0x085f, 0x085f, - 0x086b, 0x089f, - 0x08b5, 0x08b5, - 0x08be, 0x08d2, + 0x086b, 0x086f, + 0x088f, 0x088f, + 0x0892, 0x0897, 0x0984, 0x0984, 0x098d, 0x098e, 0x0991, 0x0992, @@ -22473,7 +23739,7 @@ static const OnigCodePoint CR_Unknown[] = { 0x0b3a, 0x0b3b, 0x0b45, 0x0b46, 0x0b49, 0x0b4a, - 0x0b4e, 0x0b55, + 0x0b4e, 0x0b54, 0x0b58, 0x0b5b, 0x0b5e, 0x0b5e, 0x0b64, 0x0b65, @@ -22497,12 +23763,13 @@ static const OnigCodePoint CR_Unknown[] = { 0x0c0d, 0x0c0d, 0x0c11, 0x0c11, 0x0c29, 0x0c29, - 0x0c3a, 0x0c3c, + 0x0c3a, 0x0c3b, 0x0c45, 0x0c45, 0x0c49, 0x0c49, 0x0c4e, 0x0c54, 0x0c57, 0x0c57, - 0x0c5b, 0x0c5f, + 0x0c5b, 0x0c5c, + 0x0c5e, 0x0c5f, 0x0c64, 0x0c65, 0x0c70, 0x0c76, 0x0c8d, 0x0c8d, @@ -22513,19 +23780,18 @@ static const OnigCodePoint CR_Unknown[] = { 0x0cc5, 0x0cc5, 0x0cc9, 0x0cc9, 0x0cce, 0x0cd4, - 0x0cd7, 0x0cdd, + 0x0cd7, 0x0cdc, 0x0cdf, 0x0cdf, 0x0ce4, 0x0ce5, 0x0cf0, 0x0cf0, - 0x0cf3, 0x0cff, - 0x0d04, 0x0d04, + 0x0cf4, 0x0cff, 0x0d0d, 0x0d0d, 0x0d11, 0x0d11, 0x0d45, 0x0d45, 0x0d49, 0x0d49, 0x0d50, 0x0d53, 0x0d64, 0x0d65, - 0x0d80, 0x0d81, + 0x0d80, 0x0d80, 0x0d84, 0x0d84, 0x0d97, 0x0d99, 0x0db2, 0x0db2, @@ -22548,7 +23814,7 @@ static const OnigCodePoint CR_Unknown[] = { 0x0ebe, 0x0ebf, 0x0ec5, 0x0ec5, 0x0ec7, 0x0ec7, - 0x0ece, 0x0ecf, + 0x0ecf, 0x0ecf, 0x0eda, 0x0edb, 0x0ee0, 0x0eff, 0x0f48, 0x0f48, @@ -22582,8 +23848,7 @@ static const OnigCodePoint CR_Unknown[] = { 0x13fe, 0x13ff, 0x169d, 0x169f, 0x16f9, 0x16ff, - 0x170d, 0x170d, - 0x1715, 0x171f, + 0x1716, 0x171e, 0x1737, 0x173f, 0x1754, 0x175f, 0x176d, 0x176d, @@ -22592,7 +23857,6 @@ static const OnigCodePoint CR_Unknown[] = { 0x17de, 0x17df, 0x17ea, 0x17ef, 0x17fa, 0x17ff, - 0x180f, 0x180f, 0x181a, 0x181f, 0x1879, 0x187f, 0x18ab, 0x18af, @@ -22612,9 +23876,9 @@ static const OnigCodePoint CR_Unknown[] = { 0x1a8a, 0x1a8f, 0x1a9a, 0x1a9f, 0x1aae, 0x1aaf, - 0x1abf, 0x1aff, - 0x1b4c, 0x1b4f, - 0x1b7d, 0x1b7f, + 0x1acf, 0x1aff, + 0x1b4d, 0x1b4f, + 0x1b7f, 0x1b7f, 0x1bf4, 0x1bfb, 0x1c38, 0x1c3a, 0x1c4a, 0x1c4c, @@ -22622,7 +23886,6 @@ static const OnigCodePoint CR_Unknown[] = { 0x1cbb, 0x1cbc, 0x1cc8, 0x1ccf, 0x1cfb, 0x1cff, - 0x1dfa, 0x1dfa, 0x1f16, 0x1f17, 0x1f1e, 0x1f1f, 0x1f46, 0x1f47, @@ -22643,15 +23906,13 @@ static const OnigCodePoint CR_Unknown[] = { 0x2072, 0x2073, 0x208f, 0x208f, 0x209d, 0x209f, - 0x20c0, 0x20cf, + 0x20c1, 0x20cf, 0x20f1, 0x20ff, 0x218c, 0x218f, 0x2427, 0x243f, 0x244b, 0x245f, 0x2b74, 0x2b75, - 0x2b96, 0x2b97, - 0x2c2f, 0x2c2f, - 0x2c5f, 0x2c5f, + 0x2b96, 0x2b96, 0x2cf4, 0x2cf8, 0x2d26, 0x2d26, 0x2d28, 0x2d2c, @@ -22667,7 +23928,7 @@ static const OnigCodePoint CR_Unknown[] = { 0x2dcf, 0x2dcf, 0x2dd7, 0x2dd7, 0x2ddf, 0x2ddf, - 0x2e50, 0x2e7f, + 0x2e5e, 0x2e7f, 0x2e9a, 0x2e9a, 0x2ef4, 0x2eff, 0x2fd6, 0x2fef, @@ -22677,18 +23938,17 @@ static const OnigCodePoint CR_Unknown[] = { 0x3100, 0x3104, 0x3130, 0x3130, 0x318f, 0x318f, - 0x31bb, 0x31bf, 0x31e4, 0x31ef, 0x321f, 0x321f, - 0x4db6, 0x4dbf, - 0x9ff0, 0x9fff, 0xa48d, 0xa48f, 0xa4c7, 0xa4cf, 0xa62c, 0xa63f, 0xa6f8, 0xa6ff, - 0xa7c0, 0xa7c1, - 0xa7c7, 0xa7f6, - 0xa82c, 0xa82f, + 0xa7cb, 0xa7cf, + 0xa7d2, 0xa7d2, + 0xa7d4, 0xa7d4, + 0xa7da, 0xa7f1, + 0xa82d, 0xa82f, 0xa83a, 0xa83f, 0xa878, 0xa87f, 0xa8c6, 0xa8cd, @@ -22708,7 +23968,7 @@ static const OnigCodePoint CR_Unknown[] = { 0xab17, 0xab1f, 0xab27, 0xab27, 0xab2f, 0xab2f, - 0xab68, 0xab6f, + 0xab6c, 0xab6f, 0xabee, 0xabef, 0xabfa, 0xabff, 0xd7a4, 0xd7af, @@ -22723,11 +23983,10 @@ static const OnigCodePoint CR_Unknown[] = { 0xfb3f, 0xfb3f, 0xfb42, 0xfb42, 0xfb45, 0xfb45, - 0xfbc2, 0xfbd2, - 0xfd40, 0xfd4f, + 0xfbc3, 0xfbd2, 0xfd90, 0xfd91, - 0xfdc8, 0xfdef, - 0xfdfe, 0xfdff, + 0xfdc8, 0xfdce, + 0xfdd0, 0xfdef, 0xfe1a, 0xfe1f, 0xfe53, 0xfe53, 0xfe67, 0xfe67, @@ -22753,7 +24012,7 @@ static const OnigCodePoint CR_Unknown[] = { 0x10103, 0x10106, 0x10134, 0x10136, 0x1018f, 0x1018f, - 0x1019c, 0x1019f, + 0x1019d, 0x1019f, 0x101a1, 0x101cf, 0x101fe, 0x1027f, 0x1029d, 0x1029f, @@ -22771,10 +24030,20 @@ static const OnigCodePoint CR_Unknown[] = { 0x104fc, 0x104ff, 0x10528, 0x1052f, 0x10564, 0x1056e, - 0x10570, 0x105ff, + 0x1057b, 0x1057b, + 0x1058b, 0x1058b, + 0x10593, 0x10593, + 0x10596, 0x10596, + 0x105a2, 0x105a2, + 0x105b2, 0x105b2, + 0x105ba, 0x105ba, + 0x105bd, 0x105ff, 0x10737, 0x1073f, 0x10756, 0x1075f, - 0x10768, 0x107ff, + 0x10768, 0x1077f, + 0x10786, 0x10786, + 0x107b1, 0x107b1, + 0x107bb, 0x107ff, 0x10806, 0x10807, 0x10809, 0x10809, 0x10836, 0x10836, @@ -22812,24 +24081,28 @@ static const OnigCodePoint CR_Unknown[] = { 0x10cf3, 0x10cf9, 0x10d28, 0x10d2f, 0x10d3a, 0x10e5f, - 0x10e7f, 0x10eff, + 0x10e7f, 0x10e7f, + 0x10eaa, 0x10eaa, + 0x10eae, 0x10eaf, + 0x10eb2, 0x10efc, 0x10f28, 0x10f2f, - 0x10f5a, 0x10fdf, + 0x10f5a, 0x10f6f, + 0x10f8a, 0x10faf, + 0x10fcc, 0x10fdf, 0x10ff7, 0x10fff, 0x1104e, 0x11051, - 0x11070, 0x1107e, - 0x110c2, 0x110cc, + 0x11076, 0x1107e, + 0x110c3, 0x110cc, 0x110ce, 0x110cf, 0x110e9, 0x110ef, 0x110fa, 0x110ff, 0x11135, 0x11135, - 0x11147, 0x1114f, + 0x11148, 0x1114f, 0x11177, 0x1117f, - 0x111ce, 0x111cf, 0x111e0, 0x111e0, 0x111f5, 0x111ff, 0x11212, 0x11212, - 0x1123f, 0x1127f, + 0x11242, 0x1127f, 0x11287, 0x11287, 0x11289, 0x11289, 0x1128e, 0x1128e, @@ -22852,9 +24125,8 @@ static const OnigCodePoint CR_Unknown[] = { 0x11364, 0x11365, 0x1136d, 0x1136f, 0x11375, 0x113ff, - 0x1145a, 0x1145a, 0x1145c, 0x1145c, - 0x11460, 0x1147f, + 0x11462, 0x1147f, 0x114c8, 0x114cf, 0x114da, 0x1157f, 0x115b6, 0x115b7, @@ -22862,20 +24134,28 @@ static const OnigCodePoint CR_Unknown[] = { 0x11645, 0x1164f, 0x1165a, 0x1165f, 0x1166d, 0x1167f, - 0x116b9, 0x116bf, + 0x116ba, 0x116bf, 0x116ca, 0x116ff, 0x1171b, 0x1171c, 0x1172c, 0x1172f, - 0x11740, 0x117ff, + 0x11747, 0x117ff, 0x1183c, 0x1189f, 0x118f3, 0x118fe, - 0x11900, 0x1199f, + 0x11907, 0x11908, + 0x1190a, 0x1190b, + 0x11914, 0x11914, + 0x11917, 0x11917, + 0x11936, 0x11936, + 0x11939, 0x1193a, + 0x11947, 0x1194f, + 0x1195a, 0x1199f, 0x119a8, 0x119a9, 0x119d8, 0x119d9, 0x119e5, 0x119ff, 0x11a48, 0x11a4f, - 0x11aa3, 0x11abf, - 0x11af9, 0x11bff, + 0x11aa3, 0x11aaf, + 0x11af9, 0x11aff, + 0x11b0a, 0x11bff, 0x11c09, 0x11c09, 0x11c37, 0x11c37, 0x11c46, 0x11c4f, @@ -22896,19 +24176,24 @@ static const OnigCodePoint CR_Unknown[] = { 0x11d92, 0x11d92, 0x11d99, 0x11d9f, 0x11daa, 0x11edf, - 0x11ef9, 0x11fbf, + 0x11ef9, 0x11eff, + 0x11f11, 0x11f11, + 0x11f3b, 0x11f3d, + 0x11f5a, 0x11faf, + 0x11fb1, 0x11fbf, 0x11ff2, 0x11ffe, 0x1239a, 0x123ff, 0x1246f, 0x1246f, 0x12475, 0x1247f, - 0x12544, 0x12fff, - 0x1342f, 0x1342f, - 0x13439, 0x143ff, + 0x12544, 0x12f8f, + 0x12ff3, 0x12fff, + 0x13456, 0x143ff, 0x14647, 0x167ff, 0x16a39, 0x16a3f, 0x16a5f, 0x16a5f, 0x16a6a, 0x16a6d, - 0x16a70, 0x16acf, + 0x16abf, 0x16abf, + 0x16aca, 0x16acf, 0x16aee, 0x16aef, 0x16af6, 0x16aff, 0x16b46, 0x16b4f, @@ -22920,22 +24205,33 @@ static const OnigCodePoint CR_Unknown[] = { 0x16f4b, 0x16f4e, 0x16f88, 0x16f8e, 0x16fa0, 0x16fdf, - 0x16fe4, 0x16fff, + 0x16fe5, 0x16fef, + 0x16ff2, 0x16fff, 0x187f8, 0x187ff, - 0x18af3, 0x1afff, - 0x1b11f, 0x1b14f, - 0x1b153, 0x1b163, + 0x18cd6, 0x18cff, + 0x18d09, 0x1afef, + 0x1aff4, 0x1aff4, + 0x1affc, 0x1affc, + 0x1afff, 0x1afff, + 0x1b123, 0x1b131, + 0x1b133, 0x1b14f, + 0x1b153, 0x1b154, + 0x1b156, 0x1b163, 0x1b168, 0x1b16f, 0x1b2fc, 0x1bbff, 0x1bc6b, 0x1bc6f, 0x1bc7d, 0x1bc7f, 0x1bc89, 0x1bc8f, 0x1bc9a, 0x1bc9b, - 0x1bca4, 0x1cfff, + 0x1bca4, 0x1ceff, + 0x1cf2e, 0x1cf2f, + 0x1cf47, 0x1cf4f, + 0x1cfc4, 0x1cfff, 0x1d0f6, 0x1d0ff, 0x1d127, 0x1d128, - 0x1d1e9, 0x1d1ff, - 0x1d246, 0x1d2df, + 0x1d1eb, 0x1d1ff, + 0x1d246, 0x1d2bf, + 0x1d2d4, 0x1d2df, 0x1d2f4, 0x1d2ff, 0x1d357, 0x1d35f, 0x1d379, 0x1d3ff, @@ -22961,18 +24257,28 @@ static const OnigCodePoint CR_Unknown[] = { 0x1d7cc, 0x1d7cd, 0x1da8c, 0x1da9a, 0x1daa0, 0x1daa0, - 0x1dab0, 0x1dfff, + 0x1dab0, 0x1deff, + 0x1df1f, 0x1df24, + 0x1df2b, 0x1dfff, 0x1e007, 0x1e007, 0x1e019, 0x1e01a, 0x1e022, 0x1e022, 0x1e025, 0x1e025, - 0x1e02b, 0x1e0ff, + 0x1e02b, 0x1e02f, + 0x1e06e, 0x1e08e, + 0x1e090, 0x1e0ff, 0x1e12d, 0x1e12f, 0x1e13e, 0x1e13f, 0x1e14a, 0x1e14d, - 0x1e150, 0x1e2bf, + 0x1e150, 0x1e28f, + 0x1e2af, 0x1e2bf, 0x1e2fa, 0x1e2fe, - 0x1e300, 0x1e7ff, + 0x1e300, 0x1e4cf, + 0x1e4fa, 0x1e7df, + 0x1e7e7, 0x1e7e7, + 0x1e7ec, 0x1e7ec, + 0x1e7ef, 0x1e7ef, + 0x1e7ff, 0x1e7ff, 0x1e8c5, 0x1e8c6, 0x1e8d7, 0x1e8ff, 0x1e94c, 0x1e94f, @@ -23020,43 +24326,45 @@ static const OnigCodePoint CR_Unknown[] = { 0x1f0c0, 0x1f0c0, 0x1f0d0, 0x1f0d0, 0x1f0f6, 0x1f0ff, - 0x1f10d, 0x1f10f, - 0x1f16d, 0x1f16f, - 0x1f1ad, 0x1f1e5, + 0x1f1ae, 0x1f1e5, 0x1f203, 0x1f20f, 0x1f23c, 0x1f23f, 0x1f249, 0x1f24f, 0x1f252, 0x1f25f, 0x1f266, 0x1f2ff, - 0x1f6d6, 0x1f6df, + 0x1f6d8, 0x1f6db, 0x1f6ed, 0x1f6ef, - 0x1f6fb, 0x1f6ff, - 0x1f774, 0x1f77f, - 0x1f7d9, 0x1f7df, - 0x1f7ec, 0x1f7ff, + 0x1f6fd, 0x1f6ff, + 0x1f777, 0x1f77a, + 0x1f7da, 0x1f7df, + 0x1f7ec, 0x1f7ef, + 0x1f7f1, 0x1f7ff, 0x1f80c, 0x1f80f, 0x1f848, 0x1f84f, 0x1f85a, 0x1f85f, 0x1f888, 0x1f88f, - 0x1f8ae, 0x1f8ff, - 0x1f90c, 0x1f90c, - 0x1f972, 0x1f972, - 0x1f977, 0x1f979, - 0x1f9a3, 0x1f9a4, - 0x1f9ab, 0x1f9ad, - 0x1f9cb, 0x1f9cc, + 0x1f8ae, 0x1f8af, + 0x1f8b2, 0x1f8ff, 0x1fa54, 0x1fa5f, 0x1fa6e, 0x1fa6f, - 0x1fa74, 0x1fa77, - 0x1fa7b, 0x1fa7f, - 0x1fa83, 0x1fa8f, - 0x1fa96, 0x1ffff, - 0x2a6d7, 0x2a6ff, - 0x2b735, 0x2b73f, + 0x1fa7d, 0x1fa7f, + 0x1fa89, 0x1fa8f, + 0x1fabe, 0x1fabe, + 0x1fac6, 0x1facd, + 0x1fadc, 0x1fadf, + 0x1fae9, 0x1faef, + 0x1faf9, 0x1faff, + 0x1fb93, 0x1fb93, + 0x1fbcb, 0x1fbef, + 0x1fbfa, 0x1ffff, + 0x2a6e0, 0x2a6ff, + 0x2b73a, 0x2b73f, 0x2b81e, 0x2b81f, 0x2cea2, 0x2ceaf, 0x2ebe1, 0x2f7ff, - 0x2fa1e, 0xe0000, + 0x2fa1e, 0x2ffff, + 0x3134b, 0x3134f, + 0x323b0, 0xe0000, 0xe0002, 0xe001f, 0xe0080, 0xe00ff, 0xe01f0, 0x10ffff, @@ -34204,236 +35512,2365 @@ static const OnigCodePoint CR_Age_12_1[] = { 0xefffe, 0x10ffff, }; /* CR_Age_12_1 */ -#endif /* USE_UNICODE_AGE_PROPERTIES */ -/* 'Grapheme_Cluster_Break_Prepend': Grapheme_Cluster_Break=Prepend */ -static const OnigCodePoint CR_Grapheme_Cluster_Break_Prepend[] = { - 11, - 0x0600, 0x0605, - 0x06dd, 0x06dd, - 0x070f, 0x070f, - 0x08e2, 0x08e2, - 0x0d4e, 0x0d4e, - 0x110bd, 0x110bd, - 0x110cd, 0x110cd, - 0x111c2, 0x111c3, - 0x11a3a, 0x11a3a, - 0x11a84, 0x11a89, - 0x11d46, 0x11d46, -}; /* CR_Grapheme_Cluster_Break_Prepend */ - -/* 'Grapheme_Cluster_Break_CR': Grapheme_Cluster_Break=CR */ -static const OnigCodePoint CR_Grapheme_Cluster_Break_CR[] = { - 1, - 0x000d, 0x000d, -}; /* CR_Grapheme_Cluster_Break_CR */ - -/* 'Grapheme_Cluster_Break_LF': Grapheme_Cluster_Break=LF */ -#define CR_Grapheme_Cluster_Break_LF CR_NEWLINE - -/* 'Grapheme_Cluster_Break_Control': Grapheme_Cluster_Break=Control */ -static const OnigCodePoint CR_Grapheme_Cluster_Break_Control[] = { - 19, - 0x0000, 0x0009, - 0x000b, 0x000c, - 0x000e, 0x001f, - 0x007f, 0x009f, - 0x00ad, 0x00ad, - 0x061c, 0x061c, - 0x180e, 0x180e, - 0x200b, 0x200b, - 0x200e, 0x200f, - 0x2028, 0x202e, - 0x2060, 0x206f, - 0xfeff, 0xfeff, - 0xfff0, 0xfffb, - 0x13430, 0x13438, - 0x1bca0, 0x1bca3, - 0x1d173, 0x1d17a, - 0xe0000, 0xe001f, - 0xe0080, 0xe00ff, - 0xe01f0, 0xe0fff, -}; /* CR_Grapheme_Cluster_Break_Control */ - -/* 'Grapheme_Cluster_Break_Extend': Grapheme_Cluster_Break=Extend */ -static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { - 336, - 0x0300, 0x036f, - 0x0483, 0x0489, - 0x0591, 0x05bd, - 0x05bf, 0x05bf, - 0x05c1, 0x05c2, - 0x05c4, 0x05c5, - 0x05c7, 0x05c7, - 0x0610, 0x061a, - 0x064b, 0x065f, - 0x0670, 0x0670, - 0x06d6, 0x06dc, - 0x06df, 0x06e4, - 0x06e7, 0x06e8, - 0x06ea, 0x06ed, - 0x0711, 0x0711, - 0x0730, 0x074a, - 0x07a6, 0x07b0, - 0x07eb, 0x07f3, - 0x07fd, 0x07fd, - 0x0816, 0x0819, - 0x081b, 0x0823, - 0x0825, 0x0827, - 0x0829, 0x082d, - 0x0859, 0x085b, - 0x08d3, 0x08e1, - 0x08e3, 0x0902, - 0x093a, 0x093a, - 0x093c, 0x093c, - 0x0941, 0x0948, - 0x094d, 0x094d, - 0x0951, 0x0957, - 0x0962, 0x0963, - 0x0981, 0x0981, - 0x09bc, 0x09bc, - 0x09be, 0x09be, - 0x09c1, 0x09c4, - 0x09cd, 0x09cd, +/* 'Age_13_0': Derived Age 13.0 */ +static const OnigCodePoint CR_Age_13_0[] = { + 686, + 0x0000, 0x0377, + 0x037a, 0x037f, + 0x0384, 0x038a, + 0x038c, 0x038c, + 0x038e, 0x03a1, + 0x03a3, 0x052f, + 0x0531, 0x0556, + 0x0559, 0x058a, + 0x058d, 0x058f, + 0x0591, 0x05c7, + 0x05d0, 0x05ea, + 0x05ef, 0x05f4, + 0x0600, 0x061c, + 0x061e, 0x070d, + 0x070f, 0x074a, + 0x074d, 0x07b1, + 0x07c0, 0x07fa, + 0x07fd, 0x082d, + 0x0830, 0x083e, + 0x0840, 0x085b, + 0x085e, 0x085e, + 0x0860, 0x086a, + 0x08a0, 0x08b4, + 0x08b6, 0x08c7, + 0x08d3, 0x0983, + 0x0985, 0x098c, + 0x098f, 0x0990, + 0x0993, 0x09a8, + 0x09aa, 0x09b0, + 0x09b2, 0x09b2, + 0x09b6, 0x09b9, + 0x09bc, 0x09c4, + 0x09c7, 0x09c8, + 0x09cb, 0x09ce, 0x09d7, 0x09d7, - 0x09e2, 0x09e3, - 0x09fe, 0x09fe, - 0x0a01, 0x0a02, + 0x09dc, 0x09dd, + 0x09df, 0x09e3, + 0x09e6, 0x09fe, + 0x0a01, 0x0a03, + 0x0a05, 0x0a0a, + 0x0a0f, 0x0a10, + 0x0a13, 0x0a28, + 0x0a2a, 0x0a30, + 0x0a32, 0x0a33, + 0x0a35, 0x0a36, + 0x0a38, 0x0a39, 0x0a3c, 0x0a3c, - 0x0a41, 0x0a42, + 0x0a3e, 0x0a42, 0x0a47, 0x0a48, 0x0a4b, 0x0a4d, 0x0a51, 0x0a51, - 0x0a70, 0x0a71, - 0x0a75, 0x0a75, - 0x0a81, 0x0a82, - 0x0abc, 0x0abc, - 0x0ac1, 0x0ac5, - 0x0ac7, 0x0ac8, - 0x0acd, 0x0acd, - 0x0ae2, 0x0ae3, - 0x0afa, 0x0aff, - 0x0b01, 0x0b01, - 0x0b3c, 0x0b3c, - 0x0b3e, 0x0b3f, - 0x0b41, 0x0b44, - 0x0b4d, 0x0b4d, - 0x0b56, 0x0b57, - 0x0b62, 0x0b63, - 0x0b82, 0x0b82, - 0x0bbe, 0x0bbe, - 0x0bc0, 0x0bc0, - 0x0bcd, 0x0bcd, + 0x0a59, 0x0a5c, + 0x0a5e, 0x0a5e, + 0x0a66, 0x0a76, + 0x0a81, 0x0a83, + 0x0a85, 0x0a8d, + 0x0a8f, 0x0a91, + 0x0a93, 0x0aa8, + 0x0aaa, 0x0ab0, + 0x0ab2, 0x0ab3, + 0x0ab5, 0x0ab9, + 0x0abc, 0x0ac5, + 0x0ac7, 0x0ac9, + 0x0acb, 0x0acd, + 0x0ad0, 0x0ad0, + 0x0ae0, 0x0ae3, + 0x0ae6, 0x0af1, + 0x0af9, 0x0aff, + 0x0b01, 0x0b03, + 0x0b05, 0x0b0c, + 0x0b0f, 0x0b10, + 0x0b13, 0x0b28, + 0x0b2a, 0x0b30, + 0x0b32, 0x0b33, + 0x0b35, 0x0b39, + 0x0b3c, 0x0b44, + 0x0b47, 0x0b48, + 0x0b4b, 0x0b4d, + 0x0b55, 0x0b57, + 0x0b5c, 0x0b5d, + 0x0b5f, 0x0b63, + 0x0b66, 0x0b77, + 0x0b82, 0x0b83, + 0x0b85, 0x0b8a, + 0x0b8e, 0x0b90, + 0x0b92, 0x0b95, + 0x0b99, 0x0b9a, + 0x0b9c, 0x0b9c, + 0x0b9e, 0x0b9f, + 0x0ba3, 0x0ba4, + 0x0ba8, 0x0baa, + 0x0bae, 0x0bb9, + 0x0bbe, 0x0bc2, + 0x0bc6, 0x0bc8, + 0x0bca, 0x0bcd, + 0x0bd0, 0x0bd0, 0x0bd7, 0x0bd7, - 0x0c00, 0x0c00, - 0x0c04, 0x0c04, - 0x0c3e, 0x0c40, + 0x0be6, 0x0bfa, + 0x0c00, 0x0c0c, + 0x0c0e, 0x0c10, + 0x0c12, 0x0c28, + 0x0c2a, 0x0c39, + 0x0c3d, 0x0c44, 0x0c46, 0x0c48, 0x0c4a, 0x0c4d, 0x0c55, 0x0c56, - 0x0c62, 0x0c63, - 0x0c81, 0x0c81, - 0x0cbc, 0x0cbc, - 0x0cbf, 0x0cbf, - 0x0cc2, 0x0cc2, - 0x0cc6, 0x0cc6, - 0x0ccc, 0x0ccd, + 0x0c58, 0x0c5a, + 0x0c60, 0x0c63, + 0x0c66, 0x0c6f, + 0x0c77, 0x0c8c, + 0x0c8e, 0x0c90, + 0x0c92, 0x0ca8, + 0x0caa, 0x0cb3, + 0x0cb5, 0x0cb9, + 0x0cbc, 0x0cc4, + 0x0cc6, 0x0cc8, + 0x0cca, 0x0ccd, 0x0cd5, 0x0cd6, - 0x0ce2, 0x0ce3, - 0x0d00, 0x0d01, - 0x0d3b, 0x0d3c, - 0x0d3e, 0x0d3e, - 0x0d41, 0x0d44, - 0x0d4d, 0x0d4d, - 0x0d57, 0x0d57, - 0x0d62, 0x0d63, + 0x0cde, 0x0cde, + 0x0ce0, 0x0ce3, + 0x0ce6, 0x0cef, + 0x0cf1, 0x0cf2, + 0x0d00, 0x0d0c, + 0x0d0e, 0x0d10, + 0x0d12, 0x0d44, + 0x0d46, 0x0d48, + 0x0d4a, 0x0d4f, + 0x0d54, 0x0d63, + 0x0d66, 0x0d7f, + 0x0d81, 0x0d83, + 0x0d85, 0x0d96, + 0x0d9a, 0x0db1, + 0x0db3, 0x0dbb, + 0x0dbd, 0x0dbd, + 0x0dc0, 0x0dc6, 0x0dca, 0x0dca, - 0x0dcf, 0x0dcf, - 0x0dd2, 0x0dd4, + 0x0dcf, 0x0dd4, 0x0dd6, 0x0dd6, - 0x0ddf, 0x0ddf, - 0x0e31, 0x0e31, - 0x0e34, 0x0e3a, - 0x0e47, 0x0e4e, - 0x0eb1, 0x0eb1, - 0x0eb4, 0x0ebc, + 0x0dd8, 0x0ddf, + 0x0de6, 0x0def, + 0x0df2, 0x0df4, + 0x0e01, 0x0e3a, + 0x0e3f, 0x0e5b, + 0x0e81, 0x0e82, + 0x0e84, 0x0e84, + 0x0e86, 0x0e8a, + 0x0e8c, 0x0ea3, + 0x0ea5, 0x0ea5, + 0x0ea7, 0x0ebd, + 0x0ec0, 0x0ec4, + 0x0ec6, 0x0ec6, 0x0ec8, 0x0ecd, - 0x0f18, 0x0f19, - 0x0f35, 0x0f35, - 0x0f37, 0x0f37, - 0x0f39, 0x0f39, - 0x0f71, 0x0f7e, - 0x0f80, 0x0f84, - 0x0f86, 0x0f87, - 0x0f8d, 0x0f97, + 0x0ed0, 0x0ed9, + 0x0edc, 0x0edf, + 0x0f00, 0x0f47, + 0x0f49, 0x0f6c, + 0x0f71, 0x0f97, 0x0f99, 0x0fbc, - 0x0fc6, 0x0fc6, - 0x102d, 0x1030, - 0x1032, 0x1037, - 0x1039, 0x103a, - 0x103d, 0x103e, - 0x1058, 0x1059, - 0x105e, 0x1060, - 0x1071, 0x1074, - 0x1082, 0x1082, - 0x1085, 0x1086, - 0x108d, 0x108d, - 0x109d, 0x109d, - 0x135d, 0x135f, - 0x1712, 0x1714, - 0x1732, 0x1734, - 0x1752, 0x1753, + 0x0fbe, 0x0fcc, + 0x0fce, 0x0fda, + 0x1000, 0x10c5, + 0x10c7, 0x10c7, + 0x10cd, 0x10cd, + 0x10d0, 0x1248, + 0x124a, 0x124d, + 0x1250, 0x1256, + 0x1258, 0x1258, + 0x125a, 0x125d, + 0x1260, 0x1288, + 0x128a, 0x128d, + 0x1290, 0x12b0, + 0x12b2, 0x12b5, + 0x12b8, 0x12be, + 0x12c0, 0x12c0, + 0x12c2, 0x12c5, + 0x12c8, 0x12d6, + 0x12d8, 0x1310, + 0x1312, 0x1315, + 0x1318, 0x135a, + 0x135d, 0x137c, + 0x1380, 0x1399, + 0x13a0, 0x13f5, + 0x13f8, 0x13fd, + 0x1400, 0x169c, + 0x16a0, 0x16f8, + 0x1700, 0x170c, + 0x170e, 0x1714, + 0x1720, 0x1736, + 0x1740, 0x1753, + 0x1760, 0x176c, + 0x176e, 0x1770, 0x1772, 0x1773, - 0x17b4, 0x17b5, - 0x17b7, 0x17bd, - 0x17c6, 0x17c6, - 0x17c9, 0x17d3, - 0x17dd, 0x17dd, - 0x180b, 0x180d, - 0x1885, 0x1886, - 0x18a9, 0x18a9, - 0x1920, 0x1922, - 0x1927, 0x1928, - 0x1932, 0x1932, - 0x1939, 0x193b, - 0x1a17, 0x1a18, - 0x1a1b, 0x1a1b, - 0x1a56, 0x1a56, - 0x1a58, 0x1a5e, - 0x1a60, 0x1a60, - 0x1a62, 0x1a62, - 0x1a65, 0x1a6c, - 0x1a73, 0x1a7c, - 0x1a7f, 0x1a7f, - 0x1ab0, 0x1abe, - 0x1b00, 0x1b03, - 0x1b34, 0x1b3a, - 0x1b3c, 0x1b3c, - 0x1b42, 0x1b42, - 0x1b6b, 0x1b73, - 0x1b80, 0x1b81, - 0x1ba2, 0x1ba5, - 0x1ba8, 0x1ba9, - 0x1bab, 0x1bad, - 0x1be6, 0x1be6, - 0x1be8, 0x1be9, - 0x1bed, 0x1bed, - 0x1bef, 0x1bf1, - 0x1c2c, 0x1c33, - 0x1c36, 0x1c37, - 0x1cd0, 0x1cd2, - 0x1cd4, 0x1ce0, - 0x1ce2, 0x1ce8, - 0x1ced, 0x1ced, - 0x1cf4, 0x1cf4, - 0x1cf8, 0x1cf9, - 0x1dc0, 0x1df9, - 0x1dfb, 0x1dff, - 0x200c, 0x200c, - 0x20d0, 0x20f0, - 0x2cef, 0x2cf1, - 0x2d7f, 0x2d7f, - 0x2de0, 0x2dff, - 0x302a, 0x302f, + 0x1780, 0x17dd, + 0x17e0, 0x17e9, + 0x17f0, 0x17f9, + 0x1800, 0x180e, + 0x1810, 0x1819, + 0x1820, 0x1878, + 0x1880, 0x18aa, + 0x18b0, 0x18f5, + 0x1900, 0x191e, + 0x1920, 0x192b, + 0x1930, 0x193b, + 0x1940, 0x1940, + 0x1944, 0x196d, + 0x1970, 0x1974, + 0x1980, 0x19ab, + 0x19b0, 0x19c9, + 0x19d0, 0x19da, + 0x19de, 0x1a1b, + 0x1a1e, 0x1a5e, + 0x1a60, 0x1a7c, + 0x1a7f, 0x1a89, + 0x1a90, 0x1a99, + 0x1aa0, 0x1aad, + 0x1ab0, 0x1ac0, + 0x1b00, 0x1b4b, + 0x1b50, 0x1b7c, + 0x1b80, 0x1bf3, + 0x1bfc, 0x1c37, + 0x1c3b, 0x1c49, + 0x1c4d, 0x1c88, + 0x1c90, 0x1cba, + 0x1cbd, 0x1cc7, + 0x1cd0, 0x1cfa, + 0x1d00, 0x1df9, + 0x1dfb, 0x1f15, + 0x1f18, 0x1f1d, + 0x1f20, 0x1f45, + 0x1f48, 0x1f4d, + 0x1f50, 0x1f57, + 0x1f59, 0x1f59, + 0x1f5b, 0x1f5b, + 0x1f5d, 0x1f5d, + 0x1f5f, 0x1f7d, + 0x1f80, 0x1fb4, + 0x1fb6, 0x1fc4, + 0x1fc6, 0x1fd3, + 0x1fd6, 0x1fdb, + 0x1fdd, 0x1fef, + 0x1ff2, 0x1ff4, + 0x1ff6, 0x1ffe, + 0x2000, 0x2064, + 0x2066, 0x2071, + 0x2074, 0x208e, + 0x2090, 0x209c, + 0x20a0, 0x20bf, + 0x20d0, 0x20f0, + 0x2100, 0x218b, + 0x2190, 0x2426, + 0x2440, 0x244a, + 0x2460, 0x2b73, + 0x2b76, 0x2b95, + 0x2b97, 0x2c2e, + 0x2c30, 0x2c5e, + 0x2c60, 0x2cf3, + 0x2cf9, 0x2d25, + 0x2d27, 0x2d27, + 0x2d2d, 0x2d2d, + 0x2d30, 0x2d67, + 0x2d6f, 0x2d70, + 0x2d7f, 0x2d96, + 0x2da0, 0x2da6, + 0x2da8, 0x2dae, + 0x2db0, 0x2db6, + 0x2db8, 0x2dbe, + 0x2dc0, 0x2dc6, + 0x2dc8, 0x2dce, + 0x2dd0, 0x2dd6, + 0x2dd8, 0x2dde, + 0x2de0, 0x2e52, + 0x2e80, 0x2e99, + 0x2e9b, 0x2ef3, + 0x2f00, 0x2fd5, + 0x2ff0, 0x2ffb, + 0x3000, 0x303f, + 0x3041, 0x3096, + 0x3099, 0x30ff, + 0x3105, 0x312f, + 0x3131, 0x318e, + 0x3190, 0x31e3, + 0x31f0, 0x321e, + 0x3220, 0x9ffc, + 0xa000, 0xa48c, + 0xa490, 0xa4c6, + 0xa4d0, 0xa62b, + 0xa640, 0xa6f7, + 0xa700, 0xa7bf, + 0xa7c2, 0xa7ca, + 0xa7f5, 0xa82c, + 0xa830, 0xa839, + 0xa840, 0xa877, + 0xa880, 0xa8c5, + 0xa8ce, 0xa8d9, + 0xa8e0, 0xa953, + 0xa95f, 0xa97c, + 0xa980, 0xa9cd, + 0xa9cf, 0xa9d9, + 0xa9de, 0xa9fe, + 0xaa00, 0xaa36, + 0xaa40, 0xaa4d, + 0xaa50, 0xaa59, + 0xaa5c, 0xaac2, + 0xaadb, 0xaaf6, + 0xab01, 0xab06, + 0xab09, 0xab0e, + 0xab11, 0xab16, + 0xab20, 0xab26, + 0xab28, 0xab2e, + 0xab30, 0xab6b, + 0xab70, 0xabed, + 0xabf0, 0xabf9, + 0xac00, 0xd7a3, + 0xd7b0, 0xd7c6, + 0xd7cb, 0xd7fb, + 0xd800, 0xfa6d, + 0xfa70, 0xfad9, + 0xfb00, 0xfb06, + 0xfb13, 0xfb17, + 0xfb1d, 0xfb36, + 0xfb38, 0xfb3c, + 0xfb3e, 0xfb3e, + 0xfb40, 0xfb41, + 0xfb43, 0xfb44, + 0xfb46, 0xfbc1, + 0xfbd3, 0xfd3f, + 0xfd50, 0xfd8f, + 0xfd92, 0xfdc7, + 0xfdd0, 0xfdfd, + 0xfe00, 0xfe19, + 0xfe20, 0xfe52, + 0xfe54, 0xfe66, + 0xfe68, 0xfe6b, + 0xfe70, 0xfe74, + 0xfe76, 0xfefc, + 0xfeff, 0xfeff, + 0xff01, 0xffbe, + 0xffc2, 0xffc7, + 0xffca, 0xffcf, + 0xffd2, 0xffd7, + 0xffda, 0xffdc, + 0xffe0, 0xffe6, + 0xffe8, 0xffee, + 0xfff9, 0x1000b, + 0x1000d, 0x10026, + 0x10028, 0x1003a, + 0x1003c, 0x1003d, + 0x1003f, 0x1004d, + 0x10050, 0x1005d, + 0x10080, 0x100fa, + 0x10100, 0x10102, + 0x10107, 0x10133, + 0x10137, 0x1018e, + 0x10190, 0x1019c, + 0x101a0, 0x101a0, + 0x101d0, 0x101fd, + 0x10280, 0x1029c, + 0x102a0, 0x102d0, + 0x102e0, 0x102fb, + 0x10300, 0x10323, + 0x1032d, 0x1034a, + 0x10350, 0x1037a, + 0x10380, 0x1039d, + 0x1039f, 0x103c3, + 0x103c8, 0x103d5, + 0x10400, 0x1049d, + 0x104a0, 0x104a9, + 0x104b0, 0x104d3, + 0x104d8, 0x104fb, + 0x10500, 0x10527, + 0x10530, 0x10563, + 0x1056f, 0x1056f, + 0x10600, 0x10736, + 0x10740, 0x10755, + 0x10760, 0x10767, + 0x10800, 0x10805, + 0x10808, 0x10808, + 0x1080a, 0x10835, + 0x10837, 0x10838, + 0x1083c, 0x1083c, + 0x1083f, 0x10855, + 0x10857, 0x1089e, + 0x108a7, 0x108af, + 0x108e0, 0x108f2, + 0x108f4, 0x108f5, + 0x108fb, 0x1091b, + 0x1091f, 0x10939, + 0x1093f, 0x1093f, + 0x10980, 0x109b7, + 0x109bc, 0x109cf, + 0x109d2, 0x10a03, + 0x10a05, 0x10a06, + 0x10a0c, 0x10a13, + 0x10a15, 0x10a17, + 0x10a19, 0x10a35, + 0x10a38, 0x10a3a, + 0x10a3f, 0x10a48, + 0x10a50, 0x10a58, + 0x10a60, 0x10a9f, + 0x10ac0, 0x10ae6, + 0x10aeb, 0x10af6, + 0x10b00, 0x10b35, + 0x10b39, 0x10b55, + 0x10b58, 0x10b72, + 0x10b78, 0x10b91, + 0x10b99, 0x10b9c, + 0x10ba9, 0x10baf, + 0x10c00, 0x10c48, + 0x10c80, 0x10cb2, + 0x10cc0, 0x10cf2, + 0x10cfa, 0x10d27, + 0x10d30, 0x10d39, + 0x10e60, 0x10e7e, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10f00, 0x10f27, + 0x10f30, 0x10f59, + 0x10fb0, 0x10fcb, + 0x10fe0, 0x10ff6, + 0x11000, 0x1104d, + 0x11052, 0x1106f, + 0x1107f, 0x110c1, + 0x110cd, 0x110cd, + 0x110d0, 0x110e8, + 0x110f0, 0x110f9, + 0x11100, 0x11134, + 0x11136, 0x11147, + 0x11150, 0x11176, + 0x11180, 0x111df, + 0x111e1, 0x111f4, + 0x11200, 0x11211, + 0x11213, 0x1123e, + 0x11280, 0x11286, + 0x11288, 0x11288, + 0x1128a, 0x1128d, + 0x1128f, 0x1129d, + 0x1129f, 0x112a9, + 0x112b0, 0x112ea, + 0x112f0, 0x112f9, + 0x11300, 0x11303, + 0x11305, 0x1130c, + 0x1130f, 0x11310, + 0x11313, 0x11328, + 0x1132a, 0x11330, + 0x11332, 0x11333, + 0x11335, 0x11339, + 0x1133b, 0x11344, + 0x11347, 0x11348, + 0x1134b, 0x1134d, + 0x11350, 0x11350, + 0x11357, 0x11357, + 0x1135d, 0x11363, + 0x11366, 0x1136c, + 0x11370, 0x11374, + 0x11400, 0x1145b, + 0x1145d, 0x11461, + 0x11480, 0x114c7, + 0x114d0, 0x114d9, + 0x11580, 0x115b5, + 0x115b8, 0x115dd, + 0x11600, 0x11644, + 0x11650, 0x11659, + 0x11660, 0x1166c, + 0x11680, 0x116b8, + 0x116c0, 0x116c9, + 0x11700, 0x1171a, + 0x1171d, 0x1172b, + 0x11730, 0x1173f, + 0x11800, 0x1183b, + 0x118a0, 0x118f2, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, + 0x119a0, 0x119a7, + 0x119aa, 0x119d7, + 0x119da, 0x119e4, + 0x11a00, 0x11a47, + 0x11a50, 0x11aa2, + 0x11ac0, 0x11af8, + 0x11c00, 0x11c08, + 0x11c0a, 0x11c36, + 0x11c38, 0x11c45, + 0x11c50, 0x11c6c, + 0x11c70, 0x11c8f, + 0x11c92, 0x11ca7, + 0x11ca9, 0x11cb6, + 0x11d00, 0x11d06, + 0x11d08, 0x11d09, + 0x11d0b, 0x11d36, + 0x11d3a, 0x11d3a, + 0x11d3c, 0x11d3d, + 0x11d3f, 0x11d47, + 0x11d50, 0x11d59, + 0x11d60, 0x11d65, + 0x11d67, 0x11d68, + 0x11d6a, 0x11d8e, + 0x11d90, 0x11d91, + 0x11d93, 0x11d98, + 0x11da0, 0x11da9, + 0x11ee0, 0x11ef8, + 0x11fb0, 0x11fb0, + 0x11fc0, 0x11ff1, + 0x11fff, 0x12399, + 0x12400, 0x1246e, + 0x12470, 0x12474, + 0x12480, 0x12543, + 0x13000, 0x1342e, + 0x13430, 0x13438, + 0x14400, 0x14646, + 0x16800, 0x16a38, + 0x16a40, 0x16a5e, + 0x16a60, 0x16a69, + 0x16a6e, 0x16a6f, + 0x16ad0, 0x16aed, + 0x16af0, 0x16af5, + 0x16b00, 0x16b45, + 0x16b50, 0x16b59, + 0x16b5b, 0x16b61, + 0x16b63, 0x16b77, + 0x16b7d, 0x16b8f, + 0x16e40, 0x16e9a, + 0x16f00, 0x16f4a, + 0x16f4f, 0x16f87, + 0x16f8f, 0x16f9f, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, + 0x17000, 0x187f7, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1b000, 0x1b11e, + 0x1b150, 0x1b152, + 0x1b164, 0x1b167, + 0x1b170, 0x1b2fb, + 0x1bc00, 0x1bc6a, + 0x1bc70, 0x1bc7c, + 0x1bc80, 0x1bc88, + 0x1bc90, 0x1bc99, + 0x1bc9c, 0x1bca3, + 0x1d000, 0x1d0f5, + 0x1d100, 0x1d126, + 0x1d129, 0x1d1e8, + 0x1d200, 0x1d245, + 0x1d2e0, 0x1d2f3, + 0x1d300, 0x1d356, + 0x1d360, 0x1d378, + 0x1d400, 0x1d454, + 0x1d456, 0x1d49c, + 0x1d49e, 0x1d49f, + 0x1d4a2, 0x1d4a2, + 0x1d4a5, 0x1d4a6, + 0x1d4a9, 0x1d4ac, + 0x1d4ae, 0x1d4b9, + 0x1d4bb, 0x1d4bb, + 0x1d4bd, 0x1d4c3, + 0x1d4c5, 0x1d505, + 0x1d507, 0x1d50a, + 0x1d50d, 0x1d514, + 0x1d516, 0x1d51c, + 0x1d51e, 0x1d539, + 0x1d53b, 0x1d53e, + 0x1d540, 0x1d544, + 0x1d546, 0x1d546, + 0x1d54a, 0x1d550, + 0x1d552, 0x1d6a5, + 0x1d6a8, 0x1d7cb, + 0x1d7ce, 0x1da8b, + 0x1da9b, 0x1da9f, + 0x1daa1, 0x1daaf, + 0x1e000, 0x1e006, + 0x1e008, 0x1e018, + 0x1e01b, 0x1e021, + 0x1e023, 0x1e024, + 0x1e026, 0x1e02a, + 0x1e100, 0x1e12c, + 0x1e130, 0x1e13d, + 0x1e140, 0x1e149, + 0x1e14e, 0x1e14f, + 0x1e2c0, 0x1e2f9, + 0x1e2ff, 0x1e2ff, + 0x1e800, 0x1e8c4, + 0x1e8c7, 0x1e8d6, + 0x1e900, 0x1e94b, + 0x1e950, 0x1e959, + 0x1e95e, 0x1e95f, + 0x1ec71, 0x1ecb4, + 0x1ed01, 0x1ed3d, + 0x1ee00, 0x1ee03, + 0x1ee05, 0x1ee1f, + 0x1ee21, 0x1ee22, + 0x1ee24, 0x1ee24, + 0x1ee27, 0x1ee27, + 0x1ee29, 0x1ee32, + 0x1ee34, 0x1ee37, + 0x1ee39, 0x1ee39, + 0x1ee3b, 0x1ee3b, + 0x1ee42, 0x1ee42, + 0x1ee47, 0x1ee47, + 0x1ee49, 0x1ee49, + 0x1ee4b, 0x1ee4b, + 0x1ee4d, 0x1ee4f, + 0x1ee51, 0x1ee52, + 0x1ee54, 0x1ee54, + 0x1ee57, 0x1ee57, + 0x1ee59, 0x1ee59, + 0x1ee5b, 0x1ee5b, + 0x1ee5d, 0x1ee5d, + 0x1ee5f, 0x1ee5f, + 0x1ee61, 0x1ee62, + 0x1ee64, 0x1ee64, + 0x1ee67, 0x1ee6a, + 0x1ee6c, 0x1ee72, + 0x1ee74, 0x1ee77, + 0x1ee79, 0x1ee7c, + 0x1ee7e, 0x1ee7e, + 0x1ee80, 0x1ee89, + 0x1ee8b, 0x1ee9b, + 0x1eea1, 0x1eea3, + 0x1eea5, 0x1eea9, + 0x1eeab, 0x1eebb, + 0x1eef0, 0x1eef1, + 0x1f000, 0x1f02b, + 0x1f030, 0x1f093, + 0x1f0a0, 0x1f0ae, + 0x1f0b1, 0x1f0bf, + 0x1f0c1, 0x1f0cf, + 0x1f0d1, 0x1f0f5, + 0x1f100, 0x1f1ad, + 0x1f1e6, 0x1f202, + 0x1f210, 0x1f23b, + 0x1f240, 0x1f248, + 0x1f250, 0x1f251, + 0x1f260, 0x1f265, + 0x1f300, 0x1f6d7, + 0x1f6e0, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f773, + 0x1f780, 0x1f7d8, + 0x1f7e0, 0x1f7eb, + 0x1f800, 0x1f80b, + 0x1f810, 0x1f847, + 0x1f850, 0x1f859, + 0x1f860, 0x1f887, + 0x1f890, 0x1f8ad, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1f978, + 0x1f97a, 0x1f9cb, + 0x1f9cd, 0x1fa53, + 0x1fa60, 0x1fa6d, + 0x1fa70, 0x1fa74, + 0x1fa78, 0x1fa7a, + 0x1fa80, 0x1fa86, + 0x1fa90, 0x1faa8, + 0x1fab0, 0x1fab6, + 0x1fac0, 0x1fac2, + 0x1fad0, 0x1fad6, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x1fffe, 0x2a6dd, + 0x2a700, 0x2b734, + 0x2b740, 0x2b81d, + 0x2b820, 0x2cea1, + 0x2ceb0, 0x2ebe0, + 0x2f800, 0x2fa1d, + 0x2fffe, 0x3134a, + 0x3fffe, 0x3ffff, + 0x4fffe, 0x4ffff, + 0x5fffe, 0x5ffff, + 0x6fffe, 0x6ffff, + 0x7fffe, 0x7ffff, + 0x8fffe, 0x8ffff, + 0x9fffe, 0x9ffff, + 0xafffe, 0xaffff, + 0xbfffe, 0xbffff, + 0xcfffe, 0xcffff, + 0xdfffe, 0xdffff, + 0xe0001, 0xe0001, + 0xe0020, 0xe007f, + 0xe0100, 0xe01ef, + 0xefffe, 0x10ffff, +}; /* CR_Age_13_0 */ + +/* 'Age_14_0': Derived Age 14.0 */ +static const OnigCodePoint CR_Age_14_0[] = { + 706, + 0x0000, 0x0377, + 0x037a, 0x037f, + 0x0384, 0x038a, + 0x038c, 0x038c, + 0x038e, 0x03a1, + 0x03a3, 0x052f, + 0x0531, 0x0556, + 0x0559, 0x058a, + 0x058d, 0x058f, + 0x0591, 0x05c7, + 0x05d0, 0x05ea, + 0x05ef, 0x05f4, + 0x0600, 0x070d, + 0x070f, 0x074a, + 0x074d, 0x07b1, + 0x07c0, 0x07fa, + 0x07fd, 0x082d, + 0x0830, 0x083e, + 0x0840, 0x085b, + 0x085e, 0x085e, + 0x0860, 0x086a, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x0983, + 0x0985, 0x098c, + 0x098f, 0x0990, + 0x0993, 0x09a8, + 0x09aa, 0x09b0, + 0x09b2, 0x09b2, + 0x09b6, 0x09b9, + 0x09bc, 0x09c4, + 0x09c7, 0x09c8, + 0x09cb, 0x09ce, + 0x09d7, 0x09d7, + 0x09dc, 0x09dd, + 0x09df, 0x09e3, + 0x09e6, 0x09fe, + 0x0a01, 0x0a03, + 0x0a05, 0x0a0a, + 0x0a0f, 0x0a10, + 0x0a13, 0x0a28, + 0x0a2a, 0x0a30, + 0x0a32, 0x0a33, + 0x0a35, 0x0a36, + 0x0a38, 0x0a39, + 0x0a3c, 0x0a3c, + 0x0a3e, 0x0a42, + 0x0a47, 0x0a48, + 0x0a4b, 0x0a4d, + 0x0a51, 0x0a51, + 0x0a59, 0x0a5c, + 0x0a5e, 0x0a5e, + 0x0a66, 0x0a76, + 0x0a81, 0x0a83, + 0x0a85, 0x0a8d, + 0x0a8f, 0x0a91, + 0x0a93, 0x0aa8, + 0x0aaa, 0x0ab0, + 0x0ab2, 0x0ab3, + 0x0ab5, 0x0ab9, + 0x0abc, 0x0ac5, + 0x0ac7, 0x0ac9, + 0x0acb, 0x0acd, + 0x0ad0, 0x0ad0, + 0x0ae0, 0x0ae3, + 0x0ae6, 0x0af1, + 0x0af9, 0x0aff, + 0x0b01, 0x0b03, + 0x0b05, 0x0b0c, + 0x0b0f, 0x0b10, + 0x0b13, 0x0b28, + 0x0b2a, 0x0b30, + 0x0b32, 0x0b33, + 0x0b35, 0x0b39, + 0x0b3c, 0x0b44, + 0x0b47, 0x0b48, + 0x0b4b, 0x0b4d, + 0x0b55, 0x0b57, + 0x0b5c, 0x0b5d, + 0x0b5f, 0x0b63, + 0x0b66, 0x0b77, + 0x0b82, 0x0b83, + 0x0b85, 0x0b8a, + 0x0b8e, 0x0b90, + 0x0b92, 0x0b95, + 0x0b99, 0x0b9a, + 0x0b9c, 0x0b9c, + 0x0b9e, 0x0b9f, + 0x0ba3, 0x0ba4, + 0x0ba8, 0x0baa, + 0x0bae, 0x0bb9, + 0x0bbe, 0x0bc2, + 0x0bc6, 0x0bc8, + 0x0bca, 0x0bcd, + 0x0bd0, 0x0bd0, + 0x0bd7, 0x0bd7, + 0x0be6, 0x0bfa, + 0x0c00, 0x0c0c, + 0x0c0e, 0x0c10, + 0x0c12, 0x0c28, + 0x0c2a, 0x0c39, + 0x0c3c, 0x0c44, + 0x0c46, 0x0c48, + 0x0c4a, 0x0c4d, + 0x0c55, 0x0c56, + 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, + 0x0c60, 0x0c63, + 0x0c66, 0x0c6f, + 0x0c77, 0x0c8c, + 0x0c8e, 0x0c90, + 0x0c92, 0x0ca8, + 0x0caa, 0x0cb3, + 0x0cb5, 0x0cb9, + 0x0cbc, 0x0cc4, + 0x0cc6, 0x0cc8, + 0x0cca, 0x0ccd, + 0x0cd5, 0x0cd6, + 0x0cdd, 0x0cde, + 0x0ce0, 0x0ce3, + 0x0ce6, 0x0cef, + 0x0cf1, 0x0cf2, + 0x0d00, 0x0d0c, + 0x0d0e, 0x0d10, + 0x0d12, 0x0d44, + 0x0d46, 0x0d48, + 0x0d4a, 0x0d4f, + 0x0d54, 0x0d63, + 0x0d66, 0x0d7f, + 0x0d81, 0x0d83, + 0x0d85, 0x0d96, + 0x0d9a, 0x0db1, + 0x0db3, 0x0dbb, + 0x0dbd, 0x0dbd, + 0x0dc0, 0x0dc6, + 0x0dca, 0x0dca, + 0x0dcf, 0x0dd4, + 0x0dd6, 0x0dd6, + 0x0dd8, 0x0ddf, + 0x0de6, 0x0def, + 0x0df2, 0x0df4, + 0x0e01, 0x0e3a, + 0x0e3f, 0x0e5b, + 0x0e81, 0x0e82, + 0x0e84, 0x0e84, + 0x0e86, 0x0e8a, + 0x0e8c, 0x0ea3, + 0x0ea5, 0x0ea5, + 0x0ea7, 0x0ebd, + 0x0ec0, 0x0ec4, + 0x0ec6, 0x0ec6, + 0x0ec8, 0x0ecd, + 0x0ed0, 0x0ed9, + 0x0edc, 0x0edf, + 0x0f00, 0x0f47, + 0x0f49, 0x0f6c, + 0x0f71, 0x0f97, + 0x0f99, 0x0fbc, + 0x0fbe, 0x0fcc, + 0x0fce, 0x0fda, + 0x1000, 0x10c5, + 0x10c7, 0x10c7, + 0x10cd, 0x10cd, + 0x10d0, 0x1248, + 0x124a, 0x124d, + 0x1250, 0x1256, + 0x1258, 0x1258, + 0x125a, 0x125d, + 0x1260, 0x1288, + 0x128a, 0x128d, + 0x1290, 0x12b0, + 0x12b2, 0x12b5, + 0x12b8, 0x12be, + 0x12c0, 0x12c0, + 0x12c2, 0x12c5, + 0x12c8, 0x12d6, + 0x12d8, 0x1310, + 0x1312, 0x1315, + 0x1318, 0x135a, + 0x135d, 0x137c, + 0x1380, 0x1399, + 0x13a0, 0x13f5, + 0x13f8, 0x13fd, + 0x1400, 0x169c, + 0x16a0, 0x16f8, + 0x1700, 0x1715, + 0x171f, 0x1736, + 0x1740, 0x1753, + 0x1760, 0x176c, + 0x176e, 0x1770, + 0x1772, 0x1773, + 0x1780, 0x17dd, + 0x17e0, 0x17e9, + 0x17f0, 0x17f9, + 0x1800, 0x1819, + 0x1820, 0x1878, + 0x1880, 0x18aa, + 0x18b0, 0x18f5, + 0x1900, 0x191e, + 0x1920, 0x192b, + 0x1930, 0x193b, + 0x1940, 0x1940, + 0x1944, 0x196d, + 0x1970, 0x1974, + 0x1980, 0x19ab, + 0x19b0, 0x19c9, + 0x19d0, 0x19da, + 0x19de, 0x1a1b, + 0x1a1e, 0x1a5e, + 0x1a60, 0x1a7c, + 0x1a7f, 0x1a89, + 0x1a90, 0x1a99, + 0x1aa0, 0x1aad, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, + 0x1b80, 0x1bf3, + 0x1bfc, 0x1c37, + 0x1c3b, 0x1c49, + 0x1c4d, 0x1c88, + 0x1c90, 0x1cba, + 0x1cbd, 0x1cc7, + 0x1cd0, 0x1cfa, + 0x1d00, 0x1f15, + 0x1f18, 0x1f1d, + 0x1f20, 0x1f45, + 0x1f48, 0x1f4d, + 0x1f50, 0x1f57, + 0x1f59, 0x1f59, + 0x1f5b, 0x1f5b, + 0x1f5d, 0x1f5d, + 0x1f5f, 0x1f7d, + 0x1f80, 0x1fb4, + 0x1fb6, 0x1fc4, + 0x1fc6, 0x1fd3, + 0x1fd6, 0x1fdb, + 0x1fdd, 0x1fef, + 0x1ff2, 0x1ff4, + 0x1ff6, 0x1ffe, + 0x2000, 0x2064, + 0x2066, 0x2071, + 0x2074, 0x208e, + 0x2090, 0x209c, + 0x20a0, 0x20c0, + 0x20d0, 0x20f0, + 0x2100, 0x218b, + 0x2190, 0x2426, + 0x2440, 0x244a, + 0x2460, 0x2b73, + 0x2b76, 0x2b95, + 0x2b97, 0x2cf3, + 0x2cf9, 0x2d25, + 0x2d27, 0x2d27, + 0x2d2d, 0x2d2d, + 0x2d30, 0x2d67, + 0x2d6f, 0x2d70, + 0x2d7f, 0x2d96, + 0x2da0, 0x2da6, + 0x2da8, 0x2dae, + 0x2db0, 0x2db6, + 0x2db8, 0x2dbe, + 0x2dc0, 0x2dc6, + 0x2dc8, 0x2dce, + 0x2dd0, 0x2dd6, + 0x2dd8, 0x2dde, + 0x2de0, 0x2e5d, + 0x2e80, 0x2e99, + 0x2e9b, 0x2ef3, + 0x2f00, 0x2fd5, + 0x2ff0, 0x2ffb, + 0x3000, 0x303f, + 0x3041, 0x3096, + 0x3099, 0x30ff, + 0x3105, 0x312f, + 0x3131, 0x318e, + 0x3190, 0x31e3, + 0x31f0, 0x321e, + 0x3220, 0xa48c, + 0xa490, 0xa4c6, + 0xa4d0, 0xa62b, + 0xa640, 0xa6f7, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa82c, + 0xa830, 0xa839, + 0xa840, 0xa877, + 0xa880, 0xa8c5, + 0xa8ce, 0xa8d9, + 0xa8e0, 0xa953, + 0xa95f, 0xa97c, + 0xa980, 0xa9cd, + 0xa9cf, 0xa9d9, + 0xa9de, 0xa9fe, + 0xaa00, 0xaa36, + 0xaa40, 0xaa4d, + 0xaa50, 0xaa59, + 0xaa5c, 0xaac2, + 0xaadb, 0xaaf6, + 0xab01, 0xab06, + 0xab09, 0xab0e, + 0xab11, 0xab16, + 0xab20, 0xab26, + 0xab28, 0xab2e, + 0xab30, 0xab6b, + 0xab70, 0xabed, + 0xabf0, 0xabf9, + 0xac00, 0xd7a3, + 0xd7b0, 0xd7c6, + 0xd7cb, 0xd7fb, + 0xd800, 0xfa6d, + 0xfa70, 0xfad9, + 0xfb00, 0xfb06, + 0xfb13, 0xfb17, + 0xfb1d, 0xfb36, + 0xfb38, 0xfb3c, + 0xfb3e, 0xfb3e, + 0xfb40, 0xfb41, + 0xfb43, 0xfb44, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, + 0xfd92, 0xfdc7, + 0xfdcf, 0xfe19, + 0xfe20, 0xfe52, + 0xfe54, 0xfe66, + 0xfe68, 0xfe6b, + 0xfe70, 0xfe74, + 0xfe76, 0xfefc, + 0xfeff, 0xfeff, + 0xff01, 0xffbe, + 0xffc2, 0xffc7, + 0xffca, 0xffcf, + 0xffd2, 0xffd7, + 0xffda, 0xffdc, + 0xffe0, 0xffe6, + 0xffe8, 0xffee, + 0xfff9, 0x1000b, + 0x1000d, 0x10026, + 0x10028, 0x1003a, + 0x1003c, 0x1003d, + 0x1003f, 0x1004d, + 0x10050, 0x1005d, + 0x10080, 0x100fa, + 0x10100, 0x10102, + 0x10107, 0x10133, + 0x10137, 0x1018e, + 0x10190, 0x1019c, + 0x101a0, 0x101a0, + 0x101d0, 0x101fd, + 0x10280, 0x1029c, + 0x102a0, 0x102d0, + 0x102e0, 0x102fb, + 0x10300, 0x10323, + 0x1032d, 0x1034a, + 0x10350, 0x1037a, + 0x10380, 0x1039d, + 0x1039f, 0x103c3, + 0x103c8, 0x103d5, + 0x10400, 0x1049d, + 0x104a0, 0x104a9, + 0x104b0, 0x104d3, + 0x104d8, 0x104fb, + 0x10500, 0x10527, + 0x10530, 0x10563, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, + 0x10600, 0x10736, + 0x10740, 0x10755, + 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, + 0x10800, 0x10805, + 0x10808, 0x10808, + 0x1080a, 0x10835, + 0x10837, 0x10838, + 0x1083c, 0x1083c, + 0x1083f, 0x10855, + 0x10857, 0x1089e, + 0x108a7, 0x108af, + 0x108e0, 0x108f2, + 0x108f4, 0x108f5, + 0x108fb, 0x1091b, + 0x1091f, 0x10939, + 0x1093f, 0x1093f, + 0x10980, 0x109b7, + 0x109bc, 0x109cf, + 0x109d2, 0x10a03, + 0x10a05, 0x10a06, + 0x10a0c, 0x10a13, + 0x10a15, 0x10a17, + 0x10a19, 0x10a35, + 0x10a38, 0x10a3a, + 0x10a3f, 0x10a48, + 0x10a50, 0x10a58, + 0x10a60, 0x10a9f, + 0x10ac0, 0x10ae6, + 0x10aeb, 0x10af6, + 0x10b00, 0x10b35, + 0x10b39, 0x10b55, + 0x10b58, 0x10b72, + 0x10b78, 0x10b91, + 0x10b99, 0x10b9c, + 0x10ba9, 0x10baf, + 0x10c00, 0x10c48, + 0x10c80, 0x10cb2, + 0x10cc0, 0x10cf2, + 0x10cfa, 0x10d27, + 0x10d30, 0x10d39, + 0x10e60, 0x10e7e, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10f00, 0x10f27, + 0x10f30, 0x10f59, + 0x10f70, 0x10f89, + 0x10fb0, 0x10fcb, + 0x10fe0, 0x10ff6, + 0x11000, 0x1104d, + 0x11052, 0x11075, + 0x1107f, 0x110c2, + 0x110cd, 0x110cd, + 0x110d0, 0x110e8, + 0x110f0, 0x110f9, + 0x11100, 0x11134, + 0x11136, 0x11147, + 0x11150, 0x11176, + 0x11180, 0x111df, + 0x111e1, 0x111f4, + 0x11200, 0x11211, + 0x11213, 0x1123e, + 0x11280, 0x11286, + 0x11288, 0x11288, + 0x1128a, 0x1128d, + 0x1128f, 0x1129d, + 0x1129f, 0x112a9, + 0x112b0, 0x112ea, + 0x112f0, 0x112f9, + 0x11300, 0x11303, + 0x11305, 0x1130c, + 0x1130f, 0x11310, + 0x11313, 0x11328, + 0x1132a, 0x11330, + 0x11332, 0x11333, + 0x11335, 0x11339, + 0x1133b, 0x11344, + 0x11347, 0x11348, + 0x1134b, 0x1134d, + 0x11350, 0x11350, + 0x11357, 0x11357, + 0x1135d, 0x11363, + 0x11366, 0x1136c, + 0x11370, 0x11374, + 0x11400, 0x1145b, + 0x1145d, 0x11461, + 0x11480, 0x114c7, + 0x114d0, 0x114d9, + 0x11580, 0x115b5, + 0x115b8, 0x115dd, + 0x11600, 0x11644, + 0x11650, 0x11659, + 0x11660, 0x1166c, + 0x11680, 0x116b9, + 0x116c0, 0x116c9, + 0x11700, 0x1171a, + 0x1171d, 0x1172b, + 0x11730, 0x11746, + 0x11800, 0x1183b, + 0x118a0, 0x118f2, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, + 0x119a0, 0x119a7, + 0x119aa, 0x119d7, + 0x119da, 0x119e4, + 0x11a00, 0x11a47, + 0x11a50, 0x11aa2, + 0x11ab0, 0x11af8, + 0x11c00, 0x11c08, + 0x11c0a, 0x11c36, + 0x11c38, 0x11c45, + 0x11c50, 0x11c6c, + 0x11c70, 0x11c8f, + 0x11c92, 0x11ca7, + 0x11ca9, 0x11cb6, + 0x11d00, 0x11d06, + 0x11d08, 0x11d09, + 0x11d0b, 0x11d36, + 0x11d3a, 0x11d3a, + 0x11d3c, 0x11d3d, + 0x11d3f, 0x11d47, + 0x11d50, 0x11d59, + 0x11d60, 0x11d65, + 0x11d67, 0x11d68, + 0x11d6a, 0x11d8e, + 0x11d90, 0x11d91, + 0x11d93, 0x11d98, + 0x11da0, 0x11da9, + 0x11ee0, 0x11ef8, + 0x11fb0, 0x11fb0, + 0x11fc0, 0x11ff1, + 0x11fff, 0x12399, + 0x12400, 0x1246e, + 0x12470, 0x12474, + 0x12480, 0x12543, + 0x12f90, 0x12ff2, + 0x13000, 0x1342e, + 0x13430, 0x13438, + 0x14400, 0x14646, + 0x16800, 0x16a38, + 0x16a40, 0x16a5e, + 0x16a60, 0x16a69, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, + 0x16ad0, 0x16aed, + 0x16af0, 0x16af5, + 0x16b00, 0x16b45, + 0x16b50, 0x16b59, + 0x16b5b, 0x16b61, + 0x16b63, 0x16b77, + 0x16b7d, 0x16b8f, + 0x16e40, 0x16e9a, + 0x16f00, 0x16f4a, + 0x16f4f, 0x16f87, + 0x16f8f, 0x16f9f, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, + 0x17000, 0x187f7, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b150, 0x1b152, + 0x1b164, 0x1b167, + 0x1b170, 0x1b2fb, + 0x1bc00, 0x1bc6a, + 0x1bc70, 0x1bc7c, + 0x1bc80, 0x1bc88, + 0x1bc90, 0x1bc99, + 0x1bc9c, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, + 0x1cf50, 0x1cfc3, + 0x1d000, 0x1d0f5, + 0x1d100, 0x1d126, + 0x1d129, 0x1d1ea, + 0x1d200, 0x1d245, + 0x1d2e0, 0x1d2f3, + 0x1d300, 0x1d356, + 0x1d360, 0x1d378, + 0x1d400, 0x1d454, + 0x1d456, 0x1d49c, + 0x1d49e, 0x1d49f, + 0x1d4a2, 0x1d4a2, + 0x1d4a5, 0x1d4a6, + 0x1d4a9, 0x1d4ac, + 0x1d4ae, 0x1d4b9, + 0x1d4bb, 0x1d4bb, + 0x1d4bd, 0x1d4c3, + 0x1d4c5, 0x1d505, + 0x1d507, 0x1d50a, + 0x1d50d, 0x1d514, + 0x1d516, 0x1d51c, + 0x1d51e, 0x1d539, + 0x1d53b, 0x1d53e, + 0x1d540, 0x1d544, + 0x1d546, 0x1d546, + 0x1d54a, 0x1d550, + 0x1d552, 0x1d6a5, + 0x1d6a8, 0x1d7cb, + 0x1d7ce, 0x1da8b, + 0x1da9b, 0x1da9f, + 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1e000, 0x1e006, + 0x1e008, 0x1e018, + 0x1e01b, 0x1e021, + 0x1e023, 0x1e024, + 0x1e026, 0x1e02a, + 0x1e100, 0x1e12c, + 0x1e130, 0x1e13d, + 0x1e140, 0x1e149, + 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ae, + 0x1e2c0, 0x1e2f9, + 0x1e2ff, 0x1e2ff, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, + 0x1e800, 0x1e8c4, + 0x1e8c7, 0x1e8d6, + 0x1e900, 0x1e94b, + 0x1e950, 0x1e959, + 0x1e95e, 0x1e95f, + 0x1ec71, 0x1ecb4, + 0x1ed01, 0x1ed3d, + 0x1ee00, 0x1ee03, + 0x1ee05, 0x1ee1f, + 0x1ee21, 0x1ee22, + 0x1ee24, 0x1ee24, + 0x1ee27, 0x1ee27, + 0x1ee29, 0x1ee32, + 0x1ee34, 0x1ee37, + 0x1ee39, 0x1ee39, + 0x1ee3b, 0x1ee3b, + 0x1ee42, 0x1ee42, + 0x1ee47, 0x1ee47, + 0x1ee49, 0x1ee49, + 0x1ee4b, 0x1ee4b, + 0x1ee4d, 0x1ee4f, + 0x1ee51, 0x1ee52, + 0x1ee54, 0x1ee54, + 0x1ee57, 0x1ee57, + 0x1ee59, 0x1ee59, + 0x1ee5b, 0x1ee5b, + 0x1ee5d, 0x1ee5d, + 0x1ee5f, 0x1ee5f, + 0x1ee61, 0x1ee62, + 0x1ee64, 0x1ee64, + 0x1ee67, 0x1ee6a, + 0x1ee6c, 0x1ee72, + 0x1ee74, 0x1ee77, + 0x1ee79, 0x1ee7c, + 0x1ee7e, 0x1ee7e, + 0x1ee80, 0x1ee89, + 0x1ee8b, 0x1ee9b, + 0x1eea1, 0x1eea3, + 0x1eea5, 0x1eea9, + 0x1eeab, 0x1eebb, + 0x1eef0, 0x1eef1, + 0x1f000, 0x1f02b, + 0x1f030, 0x1f093, + 0x1f0a0, 0x1f0ae, + 0x1f0b1, 0x1f0bf, + 0x1f0c1, 0x1f0cf, + 0x1f0d1, 0x1f0f5, + 0x1f100, 0x1f1ad, + 0x1f1e6, 0x1f202, + 0x1f210, 0x1f23b, + 0x1f240, 0x1f248, + 0x1f250, 0x1f251, + 0x1f260, 0x1f265, + 0x1f300, 0x1f6d7, + 0x1f6dd, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f773, + 0x1f780, 0x1f7d8, + 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, + 0x1f800, 0x1f80b, + 0x1f810, 0x1f847, + 0x1f850, 0x1f859, + 0x1f860, 0x1f887, + 0x1f890, 0x1f8ad, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, + 0x1fa60, 0x1fa6d, + 0x1fa70, 0x1fa74, + 0x1fa78, 0x1fa7c, + 0x1fa80, 0x1fa86, + 0x1fa90, 0x1faac, + 0x1fab0, 0x1faba, + 0x1fac0, 0x1fac5, + 0x1fad0, 0x1fad9, + 0x1fae0, 0x1fae7, + 0x1faf0, 0x1faf6, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x1fffe, 0x2a6df, + 0x2a700, 0x2b738, + 0x2b740, 0x2b81d, + 0x2b820, 0x2cea1, + 0x2ceb0, 0x2ebe0, + 0x2f800, 0x2fa1d, + 0x2fffe, 0x3134a, + 0x3fffe, 0x3ffff, + 0x4fffe, 0x4ffff, + 0x5fffe, 0x5ffff, + 0x6fffe, 0x6ffff, + 0x7fffe, 0x7ffff, + 0x8fffe, 0x8ffff, + 0x9fffe, 0x9ffff, + 0xafffe, 0xaffff, + 0xbfffe, 0xbffff, + 0xcfffe, 0xcffff, + 0xdfffe, 0xdffff, + 0xe0001, 0xe0001, + 0xe0020, 0xe007f, + 0xe0100, 0xe01ef, + 0xefffe, 0x10ffff, +}; /* CR_Age_14_0 */ + +/* 'Age_15_0': Derived Age 15.0 */ +static const OnigCodePoint CR_Age_15_0[] = { + 715, + 0x0000, 0x0377, + 0x037a, 0x037f, + 0x0384, 0x038a, + 0x038c, 0x038c, + 0x038e, 0x03a1, + 0x03a3, 0x052f, + 0x0531, 0x0556, + 0x0559, 0x058a, + 0x058d, 0x058f, + 0x0591, 0x05c7, + 0x05d0, 0x05ea, + 0x05ef, 0x05f4, + 0x0600, 0x070d, + 0x070f, 0x074a, + 0x074d, 0x07b1, + 0x07c0, 0x07fa, + 0x07fd, 0x082d, + 0x0830, 0x083e, + 0x0840, 0x085b, + 0x085e, 0x085e, + 0x0860, 0x086a, + 0x0870, 0x088e, + 0x0890, 0x0891, + 0x0898, 0x0983, + 0x0985, 0x098c, + 0x098f, 0x0990, + 0x0993, 0x09a8, + 0x09aa, 0x09b0, + 0x09b2, 0x09b2, + 0x09b6, 0x09b9, + 0x09bc, 0x09c4, + 0x09c7, 0x09c8, + 0x09cb, 0x09ce, + 0x09d7, 0x09d7, + 0x09dc, 0x09dd, + 0x09df, 0x09e3, + 0x09e6, 0x09fe, + 0x0a01, 0x0a03, + 0x0a05, 0x0a0a, + 0x0a0f, 0x0a10, + 0x0a13, 0x0a28, + 0x0a2a, 0x0a30, + 0x0a32, 0x0a33, + 0x0a35, 0x0a36, + 0x0a38, 0x0a39, + 0x0a3c, 0x0a3c, + 0x0a3e, 0x0a42, + 0x0a47, 0x0a48, + 0x0a4b, 0x0a4d, + 0x0a51, 0x0a51, + 0x0a59, 0x0a5c, + 0x0a5e, 0x0a5e, + 0x0a66, 0x0a76, + 0x0a81, 0x0a83, + 0x0a85, 0x0a8d, + 0x0a8f, 0x0a91, + 0x0a93, 0x0aa8, + 0x0aaa, 0x0ab0, + 0x0ab2, 0x0ab3, + 0x0ab5, 0x0ab9, + 0x0abc, 0x0ac5, + 0x0ac7, 0x0ac9, + 0x0acb, 0x0acd, + 0x0ad0, 0x0ad0, + 0x0ae0, 0x0ae3, + 0x0ae6, 0x0af1, + 0x0af9, 0x0aff, + 0x0b01, 0x0b03, + 0x0b05, 0x0b0c, + 0x0b0f, 0x0b10, + 0x0b13, 0x0b28, + 0x0b2a, 0x0b30, + 0x0b32, 0x0b33, + 0x0b35, 0x0b39, + 0x0b3c, 0x0b44, + 0x0b47, 0x0b48, + 0x0b4b, 0x0b4d, + 0x0b55, 0x0b57, + 0x0b5c, 0x0b5d, + 0x0b5f, 0x0b63, + 0x0b66, 0x0b77, + 0x0b82, 0x0b83, + 0x0b85, 0x0b8a, + 0x0b8e, 0x0b90, + 0x0b92, 0x0b95, + 0x0b99, 0x0b9a, + 0x0b9c, 0x0b9c, + 0x0b9e, 0x0b9f, + 0x0ba3, 0x0ba4, + 0x0ba8, 0x0baa, + 0x0bae, 0x0bb9, + 0x0bbe, 0x0bc2, + 0x0bc6, 0x0bc8, + 0x0bca, 0x0bcd, + 0x0bd0, 0x0bd0, + 0x0bd7, 0x0bd7, + 0x0be6, 0x0bfa, + 0x0c00, 0x0c0c, + 0x0c0e, 0x0c10, + 0x0c12, 0x0c28, + 0x0c2a, 0x0c39, + 0x0c3c, 0x0c44, + 0x0c46, 0x0c48, + 0x0c4a, 0x0c4d, + 0x0c55, 0x0c56, + 0x0c58, 0x0c5a, + 0x0c5d, 0x0c5d, + 0x0c60, 0x0c63, + 0x0c66, 0x0c6f, + 0x0c77, 0x0c8c, + 0x0c8e, 0x0c90, + 0x0c92, 0x0ca8, + 0x0caa, 0x0cb3, + 0x0cb5, 0x0cb9, + 0x0cbc, 0x0cc4, + 0x0cc6, 0x0cc8, + 0x0cca, 0x0ccd, + 0x0cd5, 0x0cd6, + 0x0cdd, 0x0cde, + 0x0ce0, 0x0ce3, + 0x0ce6, 0x0cef, + 0x0cf1, 0x0cf3, + 0x0d00, 0x0d0c, + 0x0d0e, 0x0d10, + 0x0d12, 0x0d44, + 0x0d46, 0x0d48, + 0x0d4a, 0x0d4f, + 0x0d54, 0x0d63, + 0x0d66, 0x0d7f, + 0x0d81, 0x0d83, + 0x0d85, 0x0d96, + 0x0d9a, 0x0db1, + 0x0db3, 0x0dbb, + 0x0dbd, 0x0dbd, + 0x0dc0, 0x0dc6, + 0x0dca, 0x0dca, + 0x0dcf, 0x0dd4, + 0x0dd6, 0x0dd6, + 0x0dd8, 0x0ddf, + 0x0de6, 0x0def, + 0x0df2, 0x0df4, + 0x0e01, 0x0e3a, + 0x0e3f, 0x0e5b, + 0x0e81, 0x0e82, + 0x0e84, 0x0e84, + 0x0e86, 0x0e8a, + 0x0e8c, 0x0ea3, + 0x0ea5, 0x0ea5, + 0x0ea7, 0x0ebd, + 0x0ec0, 0x0ec4, + 0x0ec6, 0x0ec6, + 0x0ec8, 0x0ece, + 0x0ed0, 0x0ed9, + 0x0edc, 0x0edf, + 0x0f00, 0x0f47, + 0x0f49, 0x0f6c, + 0x0f71, 0x0f97, + 0x0f99, 0x0fbc, + 0x0fbe, 0x0fcc, + 0x0fce, 0x0fda, + 0x1000, 0x10c5, + 0x10c7, 0x10c7, + 0x10cd, 0x10cd, + 0x10d0, 0x1248, + 0x124a, 0x124d, + 0x1250, 0x1256, + 0x1258, 0x1258, + 0x125a, 0x125d, + 0x1260, 0x1288, + 0x128a, 0x128d, + 0x1290, 0x12b0, + 0x12b2, 0x12b5, + 0x12b8, 0x12be, + 0x12c0, 0x12c0, + 0x12c2, 0x12c5, + 0x12c8, 0x12d6, + 0x12d8, 0x1310, + 0x1312, 0x1315, + 0x1318, 0x135a, + 0x135d, 0x137c, + 0x1380, 0x1399, + 0x13a0, 0x13f5, + 0x13f8, 0x13fd, + 0x1400, 0x169c, + 0x16a0, 0x16f8, + 0x1700, 0x1715, + 0x171f, 0x1736, + 0x1740, 0x1753, + 0x1760, 0x176c, + 0x176e, 0x1770, + 0x1772, 0x1773, + 0x1780, 0x17dd, + 0x17e0, 0x17e9, + 0x17f0, 0x17f9, + 0x1800, 0x1819, + 0x1820, 0x1878, + 0x1880, 0x18aa, + 0x18b0, 0x18f5, + 0x1900, 0x191e, + 0x1920, 0x192b, + 0x1930, 0x193b, + 0x1940, 0x1940, + 0x1944, 0x196d, + 0x1970, 0x1974, + 0x1980, 0x19ab, + 0x19b0, 0x19c9, + 0x19d0, 0x19da, + 0x19de, 0x1a1b, + 0x1a1e, 0x1a5e, + 0x1a60, 0x1a7c, + 0x1a7f, 0x1a89, + 0x1a90, 0x1a99, + 0x1aa0, 0x1aad, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b4c, + 0x1b50, 0x1b7e, + 0x1b80, 0x1bf3, + 0x1bfc, 0x1c37, + 0x1c3b, 0x1c49, + 0x1c4d, 0x1c88, + 0x1c90, 0x1cba, + 0x1cbd, 0x1cc7, + 0x1cd0, 0x1cfa, + 0x1d00, 0x1f15, + 0x1f18, 0x1f1d, + 0x1f20, 0x1f45, + 0x1f48, 0x1f4d, + 0x1f50, 0x1f57, + 0x1f59, 0x1f59, + 0x1f5b, 0x1f5b, + 0x1f5d, 0x1f5d, + 0x1f5f, 0x1f7d, + 0x1f80, 0x1fb4, + 0x1fb6, 0x1fc4, + 0x1fc6, 0x1fd3, + 0x1fd6, 0x1fdb, + 0x1fdd, 0x1fef, + 0x1ff2, 0x1ff4, + 0x1ff6, 0x1ffe, + 0x2000, 0x2064, + 0x2066, 0x2071, + 0x2074, 0x208e, + 0x2090, 0x209c, + 0x20a0, 0x20c0, + 0x20d0, 0x20f0, + 0x2100, 0x218b, + 0x2190, 0x2426, + 0x2440, 0x244a, + 0x2460, 0x2b73, + 0x2b76, 0x2b95, + 0x2b97, 0x2cf3, + 0x2cf9, 0x2d25, + 0x2d27, 0x2d27, + 0x2d2d, 0x2d2d, + 0x2d30, 0x2d67, + 0x2d6f, 0x2d70, + 0x2d7f, 0x2d96, + 0x2da0, 0x2da6, + 0x2da8, 0x2dae, + 0x2db0, 0x2db6, + 0x2db8, 0x2dbe, + 0x2dc0, 0x2dc6, + 0x2dc8, 0x2dce, + 0x2dd0, 0x2dd6, + 0x2dd8, 0x2dde, + 0x2de0, 0x2e5d, + 0x2e80, 0x2e99, + 0x2e9b, 0x2ef3, + 0x2f00, 0x2fd5, + 0x2ff0, 0x2ffb, + 0x3000, 0x303f, + 0x3041, 0x3096, + 0x3099, 0x30ff, + 0x3105, 0x312f, + 0x3131, 0x318e, + 0x3190, 0x31e3, + 0x31f0, 0x321e, + 0x3220, 0xa48c, + 0xa490, 0xa4c6, + 0xa4d0, 0xa62b, + 0xa640, 0xa6f7, + 0xa700, 0xa7ca, + 0xa7d0, 0xa7d1, + 0xa7d3, 0xa7d3, + 0xa7d5, 0xa7d9, + 0xa7f2, 0xa82c, + 0xa830, 0xa839, + 0xa840, 0xa877, + 0xa880, 0xa8c5, + 0xa8ce, 0xa8d9, + 0xa8e0, 0xa953, + 0xa95f, 0xa97c, + 0xa980, 0xa9cd, + 0xa9cf, 0xa9d9, + 0xa9de, 0xa9fe, + 0xaa00, 0xaa36, + 0xaa40, 0xaa4d, + 0xaa50, 0xaa59, + 0xaa5c, 0xaac2, + 0xaadb, 0xaaf6, + 0xab01, 0xab06, + 0xab09, 0xab0e, + 0xab11, 0xab16, + 0xab20, 0xab26, + 0xab28, 0xab2e, + 0xab30, 0xab6b, + 0xab70, 0xabed, + 0xabf0, 0xabf9, + 0xac00, 0xd7a3, + 0xd7b0, 0xd7c6, + 0xd7cb, 0xd7fb, + 0xd800, 0xfa6d, + 0xfa70, 0xfad9, + 0xfb00, 0xfb06, + 0xfb13, 0xfb17, + 0xfb1d, 0xfb36, + 0xfb38, 0xfb3c, + 0xfb3e, 0xfb3e, + 0xfb40, 0xfb41, + 0xfb43, 0xfb44, + 0xfb46, 0xfbc2, + 0xfbd3, 0xfd8f, + 0xfd92, 0xfdc7, + 0xfdcf, 0xfe19, + 0xfe20, 0xfe52, + 0xfe54, 0xfe66, + 0xfe68, 0xfe6b, + 0xfe70, 0xfe74, + 0xfe76, 0xfefc, + 0xfeff, 0xfeff, + 0xff01, 0xffbe, + 0xffc2, 0xffc7, + 0xffca, 0xffcf, + 0xffd2, 0xffd7, + 0xffda, 0xffdc, + 0xffe0, 0xffe6, + 0xffe8, 0xffee, + 0xfff9, 0x1000b, + 0x1000d, 0x10026, + 0x10028, 0x1003a, + 0x1003c, 0x1003d, + 0x1003f, 0x1004d, + 0x10050, 0x1005d, + 0x10080, 0x100fa, + 0x10100, 0x10102, + 0x10107, 0x10133, + 0x10137, 0x1018e, + 0x10190, 0x1019c, + 0x101a0, 0x101a0, + 0x101d0, 0x101fd, + 0x10280, 0x1029c, + 0x102a0, 0x102d0, + 0x102e0, 0x102fb, + 0x10300, 0x10323, + 0x1032d, 0x1034a, + 0x10350, 0x1037a, + 0x10380, 0x1039d, + 0x1039f, 0x103c3, + 0x103c8, 0x103d5, + 0x10400, 0x1049d, + 0x104a0, 0x104a9, + 0x104b0, 0x104d3, + 0x104d8, 0x104fb, + 0x10500, 0x10527, + 0x10530, 0x10563, + 0x1056f, 0x1057a, + 0x1057c, 0x1058a, + 0x1058c, 0x10592, + 0x10594, 0x10595, + 0x10597, 0x105a1, + 0x105a3, 0x105b1, + 0x105b3, 0x105b9, + 0x105bb, 0x105bc, + 0x10600, 0x10736, + 0x10740, 0x10755, + 0x10760, 0x10767, + 0x10780, 0x10785, + 0x10787, 0x107b0, + 0x107b2, 0x107ba, + 0x10800, 0x10805, + 0x10808, 0x10808, + 0x1080a, 0x10835, + 0x10837, 0x10838, + 0x1083c, 0x1083c, + 0x1083f, 0x10855, + 0x10857, 0x1089e, + 0x108a7, 0x108af, + 0x108e0, 0x108f2, + 0x108f4, 0x108f5, + 0x108fb, 0x1091b, + 0x1091f, 0x10939, + 0x1093f, 0x1093f, + 0x10980, 0x109b7, + 0x109bc, 0x109cf, + 0x109d2, 0x10a03, + 0x10a05, 0x10a06, + 0x10a0c, 0x10a13, + 0x10a15, 0x10a17, + 0x10a19, 0x10a35, + 0x10a38, 0x10a3a, + 0x10a3f, 0x10a48, + 0x10a50, 0x10a58, + 0x10a60, 0x10a9f, + 0x10ac0, 0x10ae6, + 0x10aeb, 0x10af6, + 0x10b00, 0x10b35, + 0x10b39, 0x10b55, + 0x10b58, 0x10b72, + 0x10b78, 0x10b91, + 0x10b99, 0x10b9c, + 0x10ba9, 0x10baf, + 0x10c00, 0x10c48, + 0x10c80, 0x10cb2, + 0x10cc0, 0x10cf2, + 0x10cfa, 0x10d27, + 0x10d30, 0x10d39, + 0x10e60, 0x10e7e, + 0x10e80, 0x10ea9, + 0x10eab, 0x10ead, + 0x10eb0, 0x10eb1, + 0x10efd, 0x10f27, + 0x10f30, 0x10f59, + 0x10f70, 0x10f89, + 0x10fb0, 0x10fcb, + 0x10fe0, 0x10ff6, + 0x11000, 0x1104d, + 0x11052, 0x11075, + 0x1107f, 0x110c2, + 0x110cd, 0x110cd, + 0x110d0, 0x110e8, + 0x110f0, 0x110f9, + 0x11100, 0x11134, + 0x11136, 0x11147, + 0x11150, 0x11176, + 0x11180, 0x111df, + 0x111e1, 0x111f4, + 0x11200, 0x11211, + 0x11213, 0x11241, + 0x11280, 0x11286, + 0x11288, 0x11288, + 0x1128a, 0x1128d, + 0x1128f, 0x1129d, + 0x1129f, 0x112a9, + 0x112b0, 0x112ea, + 0x112f0, 0x112f9, + 0x11300, 0x11303, + 0x11305, 0x1130c, + 0x1130f, 0x11310, + 0x11313, 0x11328, + 0x1132a, 0x11330, + 0x11332, 0x11333, + 0x11335, 0x11339, + 0x1133b, 0x11344, + 0x11347, 0x11348, + 0x1134b, 0x1134d, + 0x11350, 0x11350, + 0x11357, 0x11357, + 0x1135d, 0x11363, + 0x11366, 0x1136c, + 0x11370, 0x11374, + 0x11400, 0x1145b, + 0x1145d, 0x11461, + 0x11480, 0x114c7, + 0x114d0, 0x114d9, + 0x11580, 0x115b5, + 0x115b8, 0x115dd, + 0x11600, 0x11644, + 0x11650, 0x11659, + 0x11660, 0x1166c, + 0x11680, 0x116b9, + 0x116c0, 0x116c9, + 0x11700, 0x1171a, + 0x1171d, 0x1172b, + 0x11730, 0x11746, + 0x11800, 0x1183b, + 0x118a0, 0x118f2, + 0x118ff, 0x11906, + 0x11909, 0x11909, + 0x1190c, 0x11913, + 0x11915, 0x11916, + 0x11918, 0x11935, + 0x11937, 0x11938, + 0x1193b, 0x11946, + 0x11950, 0x11959, + 0x119a0, 0x119a7, + 0x119aa, 0x119d7, + 0x119da, 0x119e4, + 0x11a00, 0x11a47, + 0x11a50, 0x11aa2, + 0x11ab0, 0x11af8, + 0x11b00, 0x11b09, + 0x11c00, 0x11c08, + 0x11c0a, 0x11c36, + 0x11c38, 0x11c45, + 0x11c50, 0x11c6c, + 0x11c70, 0x11c8f, + 0x11c92, 0x11ca7, + 0x11ca9, 0x11cb6, + 0x11d00, 0x11d06, + 0x11d08, 0x11d09, + 0x11d0b, 0x11d36, + 0x11d3a, 0x11d3a, + 0x11d3c, 0x11d3d, + 0x11d3f, 0x11d47, + 0x11d50, 0x11d59, + 0x11d60, 0x11d65, + 0x11d67, 0x11d68, + 0x11d6a, 0x11d8e, + 0x11d90, 0x11d91, + 0x11d93, 0x11d98, + 0x11da0, 0x11da9, + 0x11ee0, 0x11ef8, + 0x11f00, 0x11f10, + 0x11f12, 0x11f3a, + 0x11f3e, 0x11f59, + 0x11fb0, 0x11fb0, + 0x11fc0, 0x11ff1, + 0x11fff, 0x12399, + 0x12400, 0x1246e, + 0x12470, 0x12474, + 0x12480, 0x12543, + 0x12f90, 0x12ff2, + 0x13000, 0x13455, + 0x14400, 0x14646, + 0x16800, 0x16a38, + 0x16a40, 0x16a5e, + 0x16a60, 0x16a69, + 0x16a6e, 0x16abe, + 0x16ac0, 0x16ac9, + 0x16ad0, 0x16aed, + 0x16af0, 0x16af5, + 0x16b00, 0x16b45, + 0x16b50, 0x16b59, + 0x16b5b, 0x16b61, + 0x16b63, 0x16b77, + 0x16b7d, 0x16b8f, + 0x16e40, 0x16e9a, + 0x16f00, 0x16f4a, + 0x16f4f, 0x16f87, + 0x16f8f, 0x16f9f, + 0x16fe0, 0x16fe4, + 0x16ff0, 0x16ff1, + 0x17000, 0x187f7, + 0x18800, 0x18cd5, + 0x18d00, 0x18d08, + 0x1aff0, 0x1aff3, + 0x1aff5, 0x1affb, + 0x1affd, 0x1affe, + 0x1b000, 0x1b122, + 0x1b132, 0x1b132, + 0x1b150, 0x1b152, + 0x1b155, 0x1b155, + 0x1b164, 0x1b167, + 0x1b170, 0x1b2fb, + 0x1bc00, 0x1bc6a, + 0x1bc70, 0x1bc7c, + 0x1bc80, 0x1bc88, + 0x1bc90, 0x1bc99, + 0x1bc9c, 0x1bca3, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, + 0x1cf50, 0x1cfc3, + 0x1d000, 0x1d0f5, + 0x1d100, 0x1d126, + 0x1d129, 0x1d1ea, + 0x1d200, 0x1d245, + 0x1d2c0, 0x1d2d3, + 0x1d2e0, 0x1d2f3, + 0x1d300, 0x1d356, + 0x1d360, 0x1d378, + 0x1d400, 0x1d454, + 0x1d456, 0x1d49c, + 0x1d49e, 0x1d49f, + 0x1d4a2, 0x1d4a2, + 0x1d4a5, 0x1d4a6, + 0x1d4a9, 0x1d4ac, + 0x1d4ae, 0x1d4b9, + 0x1d4bb, 0x1d4bb, + 0x1d4bd, 0x1d4c3, + 0x1d4c5, 0x1d505, + 0x1d507, 0x1d50a, + 0x1d50d, 0x1d514, + 0x1d516, 0x1d51c, + 0x1d51e, 0x1d539, + 0x1d53b, 0x1d53e, + 0x1d540, 0x1d544, + 0x1d546, 0x1d546, + 0x1d54a, 0x1d550, + 0x1d552, 0x1d6a5, + 0x1d6a8, 0x1d7cb, + 0x1d7ce, 0x1da8b, + 0x1da9b, 0x1da9f, + 0x1daa1, 0x1daaf, + 0x1df00, 0x1df1e, + 0x1df25, 0x1df2a, + 0x1e000, 0x1e006, + 0x1e008, 0x1e018, + 0x1e01b, 0x1e021, + 0x1e023, 0x1e024, + 0x1e026, 0x1e02a, + 0x1e030, 0x1e06d, + 0x1e08f, 0x1e08f, + 0x1e100, 0x1e12c, + 0x1e130, 0x1e13d, + 0x1e140, 0x1e149, + 0x1e14e, 0x1e14f, + 0x1e290, 0x1e2ae, + 0x1e2c0, 0x1e2f9, + 0x1e2ff, 0x1e2ff, + 0x1e4d0, 0x1e4f9, + 0x1e7e0, 0x1e7e6, + 0x1e7e8, 0x1e7eb, + 0x1e7ed, 0x1e7ee, + 0x1e7f0, 0x1e7fe, + 0x1e800, 0x1e8c4, + 0x1e8c7, 0x1e8d6, + 0x1e900, 0x1e94b, + 0x1e950, 0x1e959, + 0x1e95e, 0x1e95f, + 0x1ec71, 0x1ecb4, + 0x1ed01, 0x1ed3d, + 0x1ee00, 0x1ee03, + 0x1ee05, 0x1ee1f, + 0x1ee21, 0x1ee22, + 0x1ee24, 0x1ee24, + 0x1ee27, 0x1ee27, + 0x1ee29, 0x1ee32, + 0x1ee34, 0x1ee37, + 0x1ee39, 0x1ee39, + 0x1ee3b, 0x1ee3b, + 0x1ee42, 0x1ee42, + 0x1ee47, 0x1ee47, + 0x1ee49, 0x1ee49, + 0x1ee4b, 0x1ee4b, + 0x1ee4d, 0x1ee4f, + 0x1ee51, 0x1ee52, + 0x1ee54, 0x1ee54, + 0x1ee57, 0x1ee57, + 0x1ee59, 0x1ee59, + 0x1ee5b, 0x1ee5b, + 0x1ee5d, 0x1ee5d, + 0x1ee5f, 0x1ee5f, + 0x1ee61, 0x1ee62, + 0x1ee64, 0x1ee64, + 0x1ee67, 0x1ee6a, + 0x1ee6c, 0x1ee72, + 0x1ee74, 0x1ee77, + 0x1ee79, 0x1ee7c, + 0x1ee7e, 0x1ee7e, + 0x1ee80, 0x1ee89, + 0x1ee8b, 0x1ee9b, + 0x1eea1, 0x1eea3, + 0x1eea5, 0x1eea9, + 0x1eeab, 0x1eebb, + 0x1eef0, 0x1eef1, + 0x1f000, 0x1f02b, + 0x1f030, 0x1f093, + 0x1f0a0, 0x1f0ae, + 0x1f0b1, 0x1f0bf, + 0x1f0c1, 0x1f0cf, + 0x1f0d1, 0x1f0f5, + 0x1f100, 0x1f1ad, + 0x1f1e6, 0x1f202, + 0x1f210, 0x1f23b, + 0x1f240, 0x1f248, + 0x1f250, 0x1f251, + 0x1f260, 0x1f265, + 0x1f300, 0x1f6d7, + 0x1f6dc, 0x1f6ec, + 0x1f6f0, 0x1f6fc, + 0x1f700, 0x1f776, + 0x1f77b, 0x1f7d9, + 0x1f7e0, 0x1f7eb, + 0x1f7f0, 0x1f7f0, + 0x1f800, 0x1f80b, + 0x1f810, 0x1f847, + 0x1f850, 0x1f859, + 0x1f860, 0x1f887, + 0x1f890, 0x1f8ad, + 0x1f8b0, 0x1f8b1, + 0x1f900, 0x1fa53, + 0x1fa60, 0x1fa6d, + 0x1fa70, 0x1fa7c, + 0x1fa80, 0x1fa88, + 0x1fa90, 0x1fabd, + 0x1fabf, 0x1fac5, + 0x1face, 0x1fadb, + 0x1fae0, 0x1fae8, + 0x1faf0, 0x1faf8, + 0x1fb00, 0x1fb92, + 0x1fb94, 0x1fbca, + 0x1fbf0, 0x1fbf9, + 0x1fffe, 0x2a6df, + 0x2a700, 0x2b739, + 0x2b740, 0x2b81d, + 0x2b820, 0x2cea1, + 0x2ceb0, 0x2ebe0, + 0x2f800, 0x2fa1d, + 0x2fffe, 0x3134a, + 0x31350, 0x323af, + 0x3fffe, 0x3ffff, + 0x4fffe, 0x4ffff, + 0x5fffe, 0x5ffff, + 0x6fffe, 0x6ffff, + 0x7fffe, 0x7ffff, + 0x8fffe, 0x8ffff, + 0x9fffe, 0x9ffff, + 0xafffe, 0xaffff, + 0xbfffe, 0xbffff, + 0xcfffe, 0xcffff, + 0xdfffe, 0xdffff, + 0xe0001, 0xe0001, + 0xe0020, 0xe007f, + 0xe0100, 0xe01ef, + 0xefffe, 0x10ffff, +}; /* CR_Age_15_0 */ + +#endif /* USE_UNICODE_AGE_PROPERTIES */ +/* 'Grapheme_Cluster_Break_Prepend': Grapheme_Cluster_Break=Prepend */ +static const OnigCodePoint CR_Grapheme_Cluster_Break_Prepend[] = { + 15, + 0x0600, 0x0605, + 0x06dd, 0x06dd, + 0x070f, 0x070f, + 0x0890, 0x0891, + 0x08e2, 0x08e2, + 0x0d4e, 0x0d4e, + 0x110bd, 0x110bd, + 0x110cd, 0x110cd, + 0x111c2, 0x111c3, + 0x1193f, 0x1193f, + 0x11941, 0x11941, + 0x11a3a, 0x11a3a, + 0x11a84, 0x11a89, + 0x11d46, 0x11d46, + 0x11f02, 0x11f02, +}; /* CR_Grapheme_Cluster_Break_Prepend */ + +/* 'Grapheme_Cluster_Break_CR': Grapheme_Cluster_Break=CR */ +static const OnigCodePoint CR_Grapheme_Cluster_Break_CR[] = { + 1, + 0x000d, 0x000d, +}; /* CR_Grapheme_Cluster_Break_CR */ + +/* 'Grapheme_Cluster_Break_LF': Grapheme_Cluster_Break=LF */ +#define CR_Grapheme_Cluster_Break_LF CR_NEWLINE + +/* 'Grapheme_Cluster_Break_Control': Grapheme_Cluster_Break=Control */ +static const OnigCodePoint CR_Grapheme_Cluster_Break_Control[] = { + 19, + 0x0000, 0x0009, + 0x000b, 0x000c, + 0x000e, 0x001f, + 0x007f, 0x009f, + 0x00ad, 0x00ad, + 0x061c, 0x061c, + 0x180e, 0x180e, + 0x200b, 0x200b, + 0x200e, 0x200f, + 0x2028, 0x202e, + 0x2060, 0x206f, + 0xfeff, 0xfeff, + 0xfff0, 0xfffb, + 0x13430, 0x1343f, + 0x1bca0, 0x1bca3, + 0x1d173, 0x1d17a, + 0xe0000, 0xe001f, + 0xe0080, 0xe00ff, + 0xe01f0, 0xe0fff, +}; /* CR_Grapheme_Cluster_Break_Control */ + +/* 'Grapheme_Cluster_Break_Extend': Grapheme_Cluster_Break=Extend */ +static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { + 364, + 0x0300, 0x036f, + 0x0483, 0x0489, + 0x0591, 0x05bd, + 0x05bf, 0x05bf, + 0x05c1, 0x05c2, + 0x05c4, 0x05c5, + 0x05c7, 0x05c7, + 0x0610, 0x061a, + 0x064b, 0x065f, + 0x0670, 0x0670, + 0x06d6, 0x06dc, + 0x06df, 0x06e4, + 0x06e7, 0x06e8, + 0x06ea, 0x06ed, + 0x0711, 0x0711, + 0x0730, 0x074a, + 0x07a6, 0x07b0, + 0x07eb, 0x07f3, + 0x07fd, 0x07fd, + 0x0816, 0x0819, + 0x081b, 0x0823, + 0x0825, 0x0827, + 0x0829, 0x082d, + 0x0859, 0x085b, + 0x0898, 0x089f, + 0x08ca, 0x08e1, + 0x08e3, 0x0902, + 0x093a, 0x093a, + 0x093c, 0x093c, + 0x0941, 0x0948, + 0x094d, 0x094d, + 0x0951, 0x0957, + 0x0962, 0x0963, + 0x0981, 0x0981, + 0x09bc, 0x09bc, + 0x09be, 0x09be, + 0x09c1, 0x09c4, + 0x09cd, 0x09cd, + 0x09d7, 0x09d7, + 0x09e2, 0x09e3, + 0x09fe, 0x09fe, + 0x0a01, 0x0a02, + 0x0a3c, 0x0a3c, + 0x0a41, 0x0a42, + 0x0a47, 0x0a48, + 0x0a4b, 0x0a4d, + 0x0a51, 0x0a51, + 0x0a70, 0x0a71, + 0x0a75, 0x0a75, + 0x0a81, 0x0a82, + 0x0abc, 0x0abc, + 0x0ac1, 0x0ac5, + 0x0ac7, 0x0ac8, + 0x0acd, 0x0acd, + 0x0ae2, 0x0ae3, + 0x0afa, 0x0aff, + 0x0b01, 0x0b01, + 0x0b3c, 0x0b3c, + 0x0b3e, 0x0b3f, + 0x0b41, 0x0b44, + 0x0b4d, 0x0b4d, + 0x0b55, 0x0b57, + 0x0b62, 0x0b63, + 0x0b82, 0x0b82, + 0x0bbe, 0x0bbe, + 0x0bc0, 0x0bc0, + 0x0bcd, 0x0bcd, + 0x0bd7, 0x0bd7, + 0x0c00, 0x0c00, + 0x0c04, 0x0c04, + 0x0c3c, 0x0c3c, + 0x0c3e, 0x0c40, + 0x0c46, 0x0c48, + 0x0c4a, 0x0c4d, + 0x0c55, 0x0c56, + 0x0c62, 0x0c63, + 0x0c81, 0x0c81, + 0x0cbc, 0x0cbc, + 0x0cbf, 0x0cbf, + 0x0cc2, 0x0cc2, + 0x0cc6, 0x0cc6, + 0x0ccc, 0x0ccd, + 0x0cd5, 0x0cd6, + 0x0ce2, 0x0ce3, + 0x0d00, 0x0d01, + 0x0d3b, 0x0d3c, + 0x0d3e, 0x0d3e, + 0x0d41, 0x0d44, + 0x0d4d, 0x0d4d, + 0x0d57, 0x0d57, + 0x0d62, 0x0d63, + 0x0d81, 0x0d81, + 0x0dca, 0x0dca, + 0x0dcf, 0x0dcf, + 0x0dd2, 0x0dd4, + 0x0dd6, 0x0dd6, + 0x0ddf, 0x0ddf, + 0x0e31, 0x0e31, + 0x0e34, 0x0e3a, + 0x0e47, 0x0e4e, + 0x0eb1, 0x0eb1, + 0x0eb4, 0x0ebc, + 0x0ec8, 0x0ece, + 0x0f18, 0x0f19, + 0x0f35, 0x0f35, + 0x0f37, 0x0f37, + 0x0f39, 0x0f39, + 0x0f71, 0x0f7e, + 0x0f80, 0x0f84, + 0x0f86, 0x0f87, + 0x0f8d, 0x0f97, + 0x0f99, 0x0fbc, + 0x0fc6, 0x0fc6, + 0x102d, 0x1030, + 0x1032, 0x1037, + 0x1039, 0x103a, + 0x103d, 0x103e, + 0x1058, 0x1059, + 0x105e, 0x1060, + 0x1071, 0x1074, + 0x1082, 0x1082, + 0x1085, 0x1086, + 0x108d, 0x108d, + 0x109d, 0x109d, + 0x135d, 0x135f, + 0x1712, 0x1714, + 0x1732, 0x1733, + 0x1752, 0x1753, + 0x1772, 0x1773, + 0x17b4, 0x17b5, + 0x17b7, 0x17bd, + 0x17c6, 0x17c6, + 0x17c9, 0x17d3, + 0x17dd, 0x17dd, + 0x180b, 0x180d, + 0x180f, 0x180f, + 0x1885, 0x1886, + 0x18a9, 0x18a9, + 0x1920, 0x1922, + 0x1927, 0x1928, + 0x1932, 0x1932, + 0x1939, 0x193b, + 0x1a17, 0x1a18, + 0x1a1b, 0x1a1b, + 0x1a56, 0x1a56, + 0x1a58, 0x1a5e, + 0x1a60, 0x1a60, + 0x1a62, 0x1a62, + 0x1a65, 0x1a6c, + 0x1a73, 0x1a7c, + 0x1a7f, 0x1a7f, + 0x1ab0, 0x1ace, + 0x1b00, 0x1b03, + 0x1b34, 0x1b3a, + 0x1b3c, 0x1b3c, + 0x1b42, 0x1b42, + 0x1b6b, 0x1b73, + 0x1b80, 0x1b81, + 0x1ba2, 0x1ba5, + 0x1ba8, 0x1ba9, + 0x1bab, 0x1bad, + 0x1be6, 0x1be6, + 0x1be8, 0x1be9, + 0x1bed, 0x1bed, + 0x1bef, 0x1bf1, + 0x1c2c, 0x1c33, + 0x1c36, 0x1c37, + 0x1cd0, 0x1cd2, + 0x1cd4, 0x1ce0, + 0x1ce2, 0x1ce8, + 0x1ced, 0x1ced, + 0x1cf4, 0x1cf4, + 0x1cf8, 0x1cf9, + 0x1dc0, 0x1dff, + 0x200c, 0x200c, + 0x20d0, 0x20f0, + 0x2cef, 0x2cf1, + 0x2d7f, 0x2d7f, + 0x2de0, 0x2dff, + 0x302a, 0x302f, 0x3099, 0x309a, 0xa66f, 0xa672, 0xa674, 0xa67d, @@ -34443,6 +37880,7 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0xa806, 0xa806, 0xa80b, 0xa80b, 0xa825, 0xa826, + 0xa82c, 0xa82c, 0xa8c4, 0xa8c5, 0xa8e0, 0xa8f1, 0xa8ff, 0xa8ff, @@ -34483,12 +37921,18 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0x10a3f, 0x10a3f, 0x10ae5, 0x10ae6, 0x10d24, 0x10d27, + 0x10eab, 0x10eac, + 0x10efd, 0x10eff, 0x10f46, 0x10f50, + 0x10f82, 0x10f85, 0x11001, 0x11001, 0x11038, 0x11046, + 0x11070, 0x11070, + 0x11073, 0x11074, 0x1107f, 0x11081, 0x110b3, 0x110b6, 0x110b9, 0x110ba, + 0x110c2, 0x110c2, 0x11100, 0x11102, 0x11127, 0x1112b, 0x1112d, 0x11134, @@ -34496,10 +37940,12 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0x11180, 0x11181, 0x111b6, 0x111be, 0x111c9, 0x111cc, + 0x111cf, 0x111cf, 0x1122f, 0x11231, 0x11234, 0x11234, 0x11236, 0x11237, 0x1123e, 0x1123e, + 0x11241, 0x11241, 0x112df, 0x112df, 0x112e3, 0x112ea, 0x11300, 0x11301, @@ -34536,6 +37982,10 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0x11727, 0x1172b, 0x1182f, 0x11837, 0x11839, 0x1183a, + 0x11930, 0x11930, + 0x1193b, 0x1193c, + 0x1193e, 0x1193e, + 0x11943, 0x11943, 0x119d4, 0x119d7, 0x119da, 0x119db, 0x119e0, 0x119e0, @@ -34563,11 +38013,20 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0x11d95, 0x11d95, 0x11d97, 0x11d97, 0x11ef3, 0x11ef4, + 0x11f00, 0x11f01, + 0x11f36, 0x11f3a, + 0x11f40, 0x11f40, + 0x11f42, 0x11f42, + 0x13440, 0x13440, + 0x13447, 0x13455, 0x16af0, 0x16af4, 0x16b30, 0x16b36, 0x16f4f, 0x16f4f, 0x16f8f, 0x16f92, + 0x16fe4, 0x16fe4, 0x1bc9d, 0x1bc9e, + 0x1cf00, 0x1cf2d, + 0x1cf30, 0x1cf46, 0x1d165, 0x1d165, 0x1d167, 0x1d169, 0x1d16e, 0x1d172, @@ -34586,8 +38045,11 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { 0x1e01b, 0x1e021, 0x1e023, 0x1e024, 0x1e026, 0x1e02a, + 0x1e08f, 0x1e08f, 0x1e130, 0x1e136, + 0x1e2ae, 0x1e2ae, 0x1e2ec, 0x1e2ef, + 0x1e4ec, 0x1e4ef, 0x1e8d0, 0x1e8d6, 0x1e944, 0x1e94a, 0x1f3fb, 0x1f3ff, @@ -34600,7 +38062,7 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_Extend[] = { /* 'Grapheme_Cluster_Break_SpacingMark': Grapheme_Cluster_Break=SpacingMark */ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { - 152, + 165, 0x0903, 0x0903, 0x093b, 0x093b, 0x093e, 0x0940, @@ -34632,6 +38094,7 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { 0x0cc3, 0x0cc4, 0x0cc7, 0x0cc8, 0x0cca, 0x0ccb, + 0x0cf3, 0x0cf3, 0x0d02, 0x0d03, 0x0d3f, 0x0d40, 0x0d46, 0x0d48, @@ -34648,6 +38111,8 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { 0x103b, 0x103c, 0x1056, 0x1057, 0x1084, 0x1084, + 0x1715, 0x1715, + 0x1734, 0x1734, 0x17b6, 0x17b6, 0x17be, 0x17c5, 0x17c7, 0x17c8, @@ -34704,6 +38169,7 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { 0x11182, 0x11182, 0x111b3, 0x111b5, 0x111bf, 0x111c0, + 0x111ce, 0x111ce, 0x1122c, 0x1122e, 0x11232, 0x11233, 0x11235, 0x11235, @@ -34731,10 +38197,14 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { 0x116ac, 0x116ac, 0x116ae, 0x116af, 0x116b6, 0x116b6, - 0x11720, 0x11721, 0x11726, 0x11726, 0x1182c, 0x1182e, 0x11838, 0x11838, + 0x11931, 0x11935, + 0x11937, 0x11938, + 0x1193d, 0x1193d, + 0x11940, 0x11940, + 0x11942, 0x11942, 0x119d1, 0x119d3, 0x119dc, 0x119df, 0x119e4, 0x119e4, @@ -34750,7 +38220,12 @@ static const OnigCodePoint CR_Grapheme_Cluster_Break_SpacingMark[] = { 0x11d93, 0x11d94, 0x11d96, 0x11d96, 0x11ef5, 0x11ef6, + 0x11f03, 0x11f03, + 0x11f34, 0x11f35, + 0x11f3e, 0x11f3f, + 0x11f41, 0x11f41, 0x16f51, 0x16f87, + 0x16ff0, 0x16ff1, 0x1d166, 0x1d166, 0x1d16d, 0x1d16d, }; /* CR_Grapheme_Cluster_Break_SpacingMark */ @@ -35707,6 +39182,12 @@ static const OnigCodePoint CR_In_Syriac_Supplement[] = { 0x0860, 0x086f, }; /* CR_In_Syriac_Supplement */ +/* 'In_Arabic_Extended_B': Block */ +static const OnigCodePoint CR_In_Arabic_Extended_B[] = { + 1, + 0x0870, 0x089f, +}; /* CR_In_Arabic_Extended_B */ + /* 'In_Arabic_Extended_A': Block */ static const OnigCodePoint CR_In_Arabic_Extended_A[] = { 1, @@ -36314,7 +39795,10 @@ static const OnigCodePoint CR_In_Yi_Radicals[] = { }; /* CR_In_Yi_Radicals */ /* 'In_Lisu': Block */ -#define CR_In_Lisu CR_Lisu +static const OnigCodePoint CR_In_Lisu[] = { + 1, + 0xa4d0, 0xa4ff, +}; /* CR_In_Lisu */ /* 'In_Vai': Block */ static const OnigCodePoint CR_In_Vai[] = { @@ -36670,12 +40154,24 @@ static const OnigCodePoint CR_In_Caucasian_Albanian[] = { 0x10530, 0x1056f, }; /* CR_In_Caucasian_Albanian */ +/* 'In_Vithkuqi': Block */ +static const OnigCodePoint CR_In_Vithkuqi[] = { + 1, + 0x10570, 0x105bf, +}; /* CR_In_Vithkuqi */ + /* 'In_Linear_A': Block */ static const OnigCodePoint CR_In_Linear_A[] = { 1, 0x10600, 0x1077f, }; /* CR_In_Linear_A */ +/* 'In_Latin_Extended_F': Block */ +static const OnigCodePoint CR_In_Latin_Extended_F[] = { + 1, + 0x10780, 0x107bf, +}; /* CR_In_Latin_Extended_F */ + /* 'In_Cypriot_Syllabary': Block */ static const OnigCodePoint CR_In_Cypriot_Syllabary[] = { 1, @@ -36790,6 +40286,18 @@ static const OnigCodePoint CR_In_Rumi_Numeral_Symbols[] = { 0x10e60, 0x10e7f, }; /* CR_In_Rumi_Numeral_Symbols */ +/* 'In_Yezidi': Block */ +static const OnigCodePoint CR_In_Yezidi[] = { + 1, + 0x10e80, 0x10ebf, +}; /* CR_In_Yezidi */ + +/* 'In_Arabic_Extended_C': Block */ +static const OnigCodePoint CR_In_Arabic_Extended_C[] = { + 1, + 0x10ec0, 0x10eff, +}; /* CR_In_Arabic_Extended_C */ + /* 'In_Old_Sogdian': Block */ static const OnigCodePoint CR_In_Old_Sogdian[] = { 1, @@ -36802,6 +40310,18 @@ static const OnigCodePoint CR_In_Sogdian[] = { 0x10f30, 0x10f6f, }; /* CR_In_Sogdian */ +/* 'In_Old_Uyghur': Block */ +static const OnigCodePoint CR_In_Old_Uyghur[] = { + 1, + 0x10f70, 0x10faf, +}; /* CR_In_Old_Uyghur */ + +/* 'In_Chorasmian': Block */ +static const OnigCodePoint CR_In_Chorasmian[] = { + 1, + 0x10fb0, 0x10fdf, +}; /* CR_In_Chorasmian */ + /* 'In_Elymaic': Block */ static const OnigCodePoint CR_In_Elymaic[] = { 1, @@ -36839,10 +40359,7 @@ static const OnigCodePoint CR_In_Mahajani[] = { }; /* CR_In_Mahajani */ /* 'In_Sharada': Block */ -static const OnigCodePoint CR_In_Sharada[] = { - 1, - 0x11180, 0x111df, -}; /* CR_In_Sharada */ +#define CR_In_Sharada CR_Sharada /* 'In_Sinhala_Archaic_Numbers': Block */ static const OnigCodePoint CR_In_Sinhala_Archaic_Numbers[] = { @@ -36913,7 +40430,7 @@ static const OnigCodePoint CR_In_Takri[] = { /* 'In_Ahom': Block */ static const OnigCodePoint CR_In_Ahom[] = { 1, - 0x11700, 0x1173f, + 0x11700, 0x1174f, }; /* CR_In_Ahom */ /* 'In_Dogra': Block */ @@ -36928,6 +40445,12 @@ static const OnigCodePoint CR_In_Warang_Citi[] = { 0x118a0, 0x118ff, }; /* CR_In_Warang_Citi */ +/* 'In_Dives_Akuru': Block */ +static const OnigCodePoint CR_In_Dives_Akuru[] = { + 1, + 0x11900, 0x1195f, +}; /* CR_In_Dives_Akuru */ + /* 'In_Nandinagari': Block */ static const OnigCodePoint CR_In_Nandinagari[] = { 1, @@ -36946,12 +40469,24 @@ static const OnigCodePoint CR_In_Soyombo[] = { 0x11a50, 0x11aaf, }; /* CR_In_Soyombo */ +/* 'In_Unified_Canadian_Aboriginal_Syllabics_Extended_A': Block */ +static const OnigCodePoint CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A[] = { + 1, + 0x11ab0, 0x11abf, +}; /* CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A */ + /* 'In_Pau_Cin_Hau': Block */ static const OnigCodePoint CR_In_Pau_Cin_Hau[] = { 1, 0x11ac0, 0x11aff, }; /* CR_In_Pau_Cin_Hau */ +/* 'In_Devanagari_Extended_A': Block */ +static const OnigCodePoint CR_In_Devanagari_Extended_A[] = { + 1, + 0x11b00, 0x11b5f, +}; /* CR_In_Devanagari_Extended_A */ + /* 'In_Bhaiksuki': Block */ static const OnigCodePoint CR_In_Bhaiksuki[] = { 1, @@ -36982,6 +40517,18 @@ static const OnigCodePoint CR_In_Makasar[] = { 0x11ee0, 0x11eff, }; /* CR_In_Makasar */ +/* 'In_Kawi': Block */ +static const OnigCodePoint CR_In_Kawi[] = { + 1, + 0x11f00, 0x11f5f, +}; /* CR_In_Kawi */ + +/* 'In_Lisu_Supplement': Block */ +static const OnigCodePoint CR_In_Lisu_Supplement[] = { + 1, + 0x11fb0, 0x11fbf, +}; /* CR_In_Lisu_Supplement */ + /* 'In_Tamil_Supplement': Block */ static const OnigCodePoint CR_In_Tamil_Supplement[] = { 1, @@ -37006,6 +40553,12 @@ static const OnigCodePoint CR_In_Early_Dynastic_Cuneiform[] = { 0x12480, 0x1254f, }; /* CR_In_Early_Dynastic_Cuneiform */ +/* 'In_Cypro_Minoan': Block */ +static const OnigCodePoint CR_In_Cypro_Minoan[] = { + 1, + 0x12f90, 0x12fff, +}; /* CR_In_Cypro_Minoan */ + /* 'In_Egyptian_Hieroglyphs': Block */ static const OnigCodePoint CR_In_Egyptian_Hieroglyphs[] = { 1, @@ -37015,7 +40568,7 @@ static const OnigCodePoint CR_In_Egyptian_Hieroglyphs[] = { /* 'In_Egyptian_Hieroglyph_Format_Controls': Block */ static const OnigCodePoint CR_In_Egyptian_Hieroglyph_Format_Controls[] = { 1, - 0x13430, 0x1343f, + 0x13430, 0x1345f, }; /* CR_In_Egyptian_Hieroglyph_Format_Controls */ /* 'In_Anatolian_Hieroglyphs': Block */ @@ -37036,6 +40589,12 @@ static const OnigCodePoint CR_In_Mro[] = { 0x16a40, 0x16a6f, }; /* CR_In_Mro */ +/* 'In_Tangsa': Block */ +static const OnigCodePoint CR_In_Tangsa[] = { + 1, + 0x16a70, 0x16acf, +}; /* CR_In_Tangsa */ + /* 'In_Bassa_Vah': Block */ static const OnigCodePoint CR_In_Bassa_Vah[] = { 1, @@ -37078,6 +40637,24 @@ static const OnigCodePoint CR_In_Tangut_Components[] = { 0x18800, 0x18aff, }; /* CR_In_Tangut_Components */ +/* 'In_Khitan_Small_Script': Block */ +static const OnigCodePoint CR_In_Khitan_Small_Script[] = { + 1, + 0x18b00, 0x18cff, +}; /* CR_In_Khitan_Small_Script */ + +/* 'In_Tangut_Supplement': Block */ +static const OnigCodePoint CR_In_Tangut_Supplement[] = { + 1, + 0x18d00, 0x18d7f, +}; /* CR_In_Tangut_Supplement */ + +/* 'In_Kana_Extended_B': Block */ +static const OnigCodePoint CR_In_Kana_Extended_B[] = { + 1, + 0x1aff0, 0x1afff, +}; /* CR_In_Kana_Extended_B */ + /* 'In_Kana_Supplement': Block */ static const OnigCodePoint CR_In_Kana_Supplement[] = { 1, @@ -37114,6 +40691,12 @@ static const OnigCodePoint CR_In_Shorthand_Format_Controls[] = { 0x1bca0, 0x1bcaf, }; /* CR_In_Shorthand_Format_Controls */ +/* 'In_Znamenny_Musical_Notation': Block */ +static const OnigCodePoint CR_In_Znamenny_Musical_Notation[] = { + 1, + 0x1cf00, 0x1cfcf, +}; /* CR_In_Znamenny_Musical_Notation */ + /* 'In_Byzantine_Musical_Symbols': Block */ static const OnigCodePoint CR_In_Byzantine_Musical_Symbols[] = { 1, @@ -37132,6 +40715,12 @@ static const OnigCodePoint CR_In_Ancient_Greek_Musical_Notation[] = { 0x1d200, 0x1d24f, }; /* CR_In_Ancient_Greek_Musical_Notation */ +/* 'In_Kaktovik_Numerals': Block */ +static const OnigCodePoint CR_In_Kaktovik_Numerals[] = { + 1, + 0x1d2c0, 0x1d2df, +}; /* CR_In_Kaktovik_Numerals */ + /* 'In_Mayan_Numerals': Block */ static const OnigCodePoint CR_In_Mayan_Numerals[] = { 1, @@ -37162,24 +40751,54 @@ static const OnigCodePoint CR_In_Sutton_SignWriting[] = { 0x1d800, 0x1daaf, }; /* CR_In_Sutton_SignWriting */ +/* 'In_Latin_Extended_G': Block */ +static const OnigCodePoint CR_In_Latin_Extended_G[] = { + 1, + 0x1df00, 0x1dfff, +}; /* CR_In_Latin_Extended_G */ + /* 'In_Glagolitic_Supplement': Block */ static const OnigCodePoint CR_In_Glagolitic_Supplement[] = { 1, 0x1e000, 0x1e02f, }; /* CR_In_Glagolitic_Supplement */ +/* 'In_Cyrillic_Extended_D': Block */ +static const OnigCodePoint CR_In_Cyrillic_Extended_D[] = { + 1, + 0x1e030, 0x1e08f, +}; /* CR_In_Cyrillic_Extended_D */ + /* 'In_Nyiakeng_Puachue_Hmong': Block */ static const OnigCodePoint CR_In_Nyiakeng_Puachue_Hmong[] = { 1, 0x1e100, 0x1e14f, }; /* CR_In_Nyiakeng_Puachue_Hmong */ +/* 'In_Toto': Block */ +static const OnigCodePoint CR_In_Toto[] = { + 1, + 0x1e290, 0x1e2bf, +}; /* CR_In_Toto */ + /* 'In_Wancho': Block */ static const OnigCodePoint CR_In_Wancho[] = { 1, 0x1e2c0, 0x1e2ff, }; /* CR_In_Wancho */ +/* 'In_Nag_Mundari': Block */ +static const OnigCodePoint CR_In_Nag_Mundari[] = { + 1, + 0x1e4d0, 0x1e4ff, +}; /* CR_In_Nag_Mundari */ + +/* 'In_Ethiopic_Extended_B': Block */ +static const OnigCodePoint CR_In_Ethiopic_Extended_B[] = { + 1, + 0x1e7e0, 0x1e7ff, +}; /* CR_In_Ethiopic_Extended_B */ + /* 'In_Mende_Kikakui': Block */ static const OnigCodePoint CR_In_Mende_Kikakui[] = { 1, @@ -37300,6 +40919,12 @@ static const OnigCodePoint CR_In_Symbols_and_Pictographs_Extended_A[] = { 0x1fa70, 0x1faff, }; /* CR_In_Symbols_and_Pictographs_Extended_A */ +/* 'In_Symbols_for_Legacy_Computing': Block */ +static const OnigCodePoint CR_In_Symbols_for_Legacy_Computing[] = { + 1, + 0x1fb00, 0x1fbff, +}; /* CR_In_Symbols_for_Legacy_Computing */ + /* 'In_CJK_Unified_Ideographs_Extension_B': Block */ static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_B[] = { 1, @@ -37336,6 +40961,18 @@ static const OnigCodePoint CR_In_CJK_Compatibility_Ideographs_Supplement[] = { 0x2f800, 0x2fa1f, }; /* CR_In_CJK_Compatibility_Ideographs_Supplement */ +/* 'In_CJK_Unified_Ideographs_Extension_G': Block */ +static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_G[] = { + 1, + 0x30000, 0x3134f, +}; /* CR_In_CJK_Unified_Ideographs_Extension_G */ + +/* 'In_CJK_Unified_Ideographs_Extension_H': Block */ +static const OnigCodePoint CR_In_CJK_Unified_Ideographs_Extension_H[] = { + 1, + 0x31350, 0x323af, +}; /* CR_In_CJK_Unified_Ideographs_Extension_H */ + /* 'In_Tags': Block */ static const OnigCodePoint CR_In_Tags[] = { 1, @@ -37362,58 +40999,56 @@ static const OnigCodePoint CR_In_Supplementary_Private_Use_Area_B[] = { /* 'In_No_Block': Block */ static const OnigCodePoint CR_In_No_Block[] = { - 53, - 0x0870, 0x089f, + 51, 0x2fe0, 0x2fef, 0x10200, 0x1027f, 0x103e0, 0x103ff, - 0x10570, 0x105ff, - 0x10780, 0x107ff, + 0x105c0, 0x105ff, + 0x107c0, 0x107ff, 0x108b0, 0x108df, 0x10940, 0x1097f, 0x10aa0, 0x10abf, 0x10bb0, 0x10bff, 0x10c50, 0x10c7f, 0x10d40, 0x10e5f, - 0x10e80, 0x10eff, - 0x10f70, 0x10fdf, 0x11250, 0x1127f, 0x11380, 0x113ff, 0x114e0, 0x1157f, 0x116d0, 0x116ff, - 0x11740, 0x117ff, + 0x11750, 0x117ff, 0x11850, 0x1189f, - 0x11900, 0x1199f, - 0x11ab0, 0x11abf, - 0x11b00, 0x11bff, + 0x11960, 0x1199f, + 0x11b60, 0x11bff, 0x11cc0, 0x11cff, 0x11db0, 0x11edf, - 0x11f00, 0x11fbf, - 0x12550, 0x12fff, - 0x13440, 0x143ff, + 0x11f60, 0x11faf, + 0x12550, 0x12f8f, + 0x13460, 0x143ff, 0x14680, 0x167ff, - 0x16a70, 0x16acf, 0x16b90, 0x16e3f, 0x16ea0, 0x16eff, 0x16fa0, 0x16fdf, - 0x18b00, 0x1afff, + 0x18d80, 0x1afef, 0x1b300, 0x1bbff, - 0x1bcb0, 0x1cfff, - 0x1d250, 0x1d2df, + 0x1bcb0, 0x1ceff, + 0x1cfd0, 0x1cfff, + 0x1d250, 0x1d2bf, 0x1d380, 0x1d3ff, - 0x1dab0, 0x1dfff, - 0x1e030, 0x1e0ff, - 0x1e150, 0x1e2bf, - 0x1e300, 0x1e7ff, + 0x1dab0, 0x1deff, + 0x1e090, 0x1e0ff, + 0x1e150, 0x1e28f, + 0x1e300, 0x1e4cf, + 0x1e500, 0x1e7df, 0x1e8e0, 0x1e8ff, 0x1e960, 0x1ec6f, 0x1ecc0, 0x1ecff, 0x1ed50, 0x1edff, 0x1ef00, 0x1efff, - 0x1fb00, 0x1ffff, + 0x1fc00, 0x1ffff, 0x2a6e0, 0x2a6ff, 0x2ebf0, 0x2f7ff, - 0x2fa20, 0xdffff, + 0x2fa20, 0x2ffff, + 0x323b0, 0xdffff, 0xe0080, 0xe00ff, 0xe01f0, 0xeffff, }; /* CR_In_No_Block */ @@ -37648,6 +41283,17 @@ static const OnigCodePoint* const CodeRanges[] = { CR_Nandinagari, CR_Nyiakeng_Puachue_Hmong, CR_Wancho, + CR_Chorasmian, + CR_Dives_Akuru, + CR_Khitan_Small_Script, + CR_Yezidi, + CR_Cypro_Minoan, + CR_Old_Uyghur, + CR_Tangsa, + CR_Toto, + CR_Vithkuqi, + CR_Kawi, + CR_Nag_Mundari, CR_White_Space, CR_Bidi_Control, CR_Join_Control, @@ -37712,6 +41358,9 @@ static const OnigCodePoint* const CodeRanges[] = { CR_Age_11_0, CR_Age_12_0, CR_Age_12_1, + CR_Age_13_0, + CR_Age_14_0, + CR_Age_15_0, #endif /* USE_UNICODE_AGE_PROPERTIES */ CR_Grapheme_Cluster_Break_Prepend, CR_Grapheme_Cluster_Break_CR, @@ -37746,6 +41395,7 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Samaritan, CR_In_Mandaic, CR_In_Syriac_Supplement, + CR_In_Arabic_Extended_B, CR_In_Arabic_Extended_A, CR_In_Devanagari, CR_In_Bengali, @@ -37909,7 +41559,9 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Osage, CR_In_Elbasan, CR_In_Caucasian_Albanian, + CR_In_Vithkuqi, CR_In_Linear_A, + CR_In_Latin_Extended_F, CR_In_Cypriot_Syllabary, CR_In_Imperial_Aramaic, CR_In_Palmyrene, @@ -37931,8 +41583,12 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Old_Hungarian, CR_In_Hanifi_Rohingya, CR_In_Rumi_Numeral_Symbols, + CR_In_Yezidi, + CR_In_Arabic_Extended_C, CR_In_Old_Sogdian, CR_In_Sogdian, + CR_In_Old_Uyghur, + CR_In_Chorasmian, CR_In_Elymaic, CR_In_Brahmi, CR_In_Kaithi, @@ -37954,24 +41610,31 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Ahom, CR_In_Dogra, CR_In_Warang_Citi, + CR_In_Dives_Akuru, CR_In_Nandinagari, CR_In_Zanabazar_Square, CR_In_Soyombo, + CR_In_Unified_Canadian_Aboriginal_Syllabics_Extended_A, CR_In_Pau_Cin_Hau, + CR_In_Devanagari_Extended_A, CR_In_Bhaiksuki, CR_In_Marchen, CR_In_Masaram_Gondi, CR_In_Gunjala_Gondi, CR_In_Makasar, + CR_In_Kawi, + CR_In_Lisu_Supplement, CR_In_Tamil_Supplement, CR_In_Cuneiform, CR_In_Cuneiform_Numbers_and_Punctuation, CR_In_Early_Dynastic_Cuneiform, + CR_In_Cypro_Minoan, CR_In_Egyptian_Hieroglyphs, CR_In_Egyptian_Hieroglyph_Format_Controls, CR_In_Anatolian_Hieroglyphs, CR_In_Bamum_Supplement, CR_In_Mro, + CR_In_Tangsa, CR_In_Bassa_Vah, CR_In_Pahawh_Hmong, CR_In_Medefaidrin, @@ -37979,23 +41642,33 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Ideographic_Symbols_and_Punctuation, CR_In_Tangut, CR_In_Tangut_Components, + CR_In_Khitan_Small_Script, + CR_In_Tangut_Supplement, + CR_In_Kana_Extended_B, CR_In_Kana_Supplement, CR_In_Kana_Extended_A, CR_In_Small_Kana_Extension, CR_In_Nushu, CR_In_Duployan, CR_In_Shorthand_Format_Controls, + CR_In_Znamenny_Musical_Notation, CR_In_Byzantine_Musical_Symbols, CR_In_Musical_Symbols, CR_In_Ancient_Greek_Musical_Notation, + CR_In_Kaktovik_Numerals, CR_In_Mayan_Numerals, CR_In_Tai_Xuan_Jing_Symbols, CR_In_Counting_Rod_Numerals, CR_In_Mathematical_Alphanumeric_Symbols, CR_In_Sutton_SignWriting, + CR_In_Latin_Extended_G, CR_In_Glagolitic_Supplement, + CR_In_Cyrillic_Extended_D, CR_In_Nyiakeng_Puachue_Hmong, + CR_In_Toto, CR_In_Wancho, + CR_In_Nag_Mundari, + CR_In_Ethiopic_Extended_B, CR_In_Mende_Kikakui, CR_In_Adlam, CR_In_Indic_Siyaq_Numbers, @@ -38016,12 +41689,15 @@ static const OnigCodePoint* const CodeRanges[] = { CR_In_Supplemental_Symbols_and_Pictographs, CR_In_Chess_Symbols, CR_In_Symbols_and_Pictographs_Extended_A, + CR_In_Symbols_for_Legacy_Computing, CR_In_CJK_Unified_Ideographs_Extension_B, CR_In_CJK_Unified_Ideographs_Extension_C, CR_In_CJK_Unified_Ideographs_Extension_D, CR_In_CJK_Unified_Ideographs_Extension_E, CR_In_CJK_Unified_Ideographs_Extension_F, CR_In_CJK_Compatibility_Ideographs_Supplement, + CR_In_CJK_Unified_Ideographs_Extension_G, + CR_In_CJK_Unified_Ideographs_Extension_H, CR_In_Tags, CR_In_Variation_Selectors_Supplement, CR_In_Supplementary_Private_Use_Area_A, @@ -38046,12 +41722,12 @@ static const struct uniname2ctype_struct *uniname2ctype_p(const char *, size_t); /* maximum key range = 15, duplicates = 0 */ #else /* USE_UNICODE_PROPERTIES */ #ifndef USE_UNICODE_AGE_PROPERTIES -#define TOTAL_KEYWORDS 814 +#define TOTAL_KEYWORDS 866 #else /* USE_UNICODE_AGE_PROPERTIES */ -#define TOTAL_KEYWORDS 836 +#define TOTAL_KEYWORDS 891 #endif /* USE_UNICODE_AGE_PROPERTIES */ #define MIN_WORD_LENGTH 1 -#define MAX_WORD_LENGTH 44 +#define MAX_WORD_LENGTH 45 #define MIN_HASH_VALUE 11 #define MAX_HASH_VALUE 6098 /* maximum key range = 6088, duplicates = 0 */ @@ -38096,16 +41772,16 @@ uniname2ctype_hash (register const char *str, register size_t len) 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, #else /* USE_UNICODE_AGE_PROPERTIES */ - 6099, 6099, 6099, 6099, 6099, 6099, 17, 6099, 3, 1, - 4, 13, 3, 22, 9, 16, 12, 5, 6099, 6099, + 6099, 6099, 6099, 6099, 6099, 6099, 12, 6099, 3, 1, + 4, 8, 32, 26, 14, 17, 10, 7, 6099, 6099, #endif /* USE_UNICODE_AGE_PROPERTIES */ 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 6099, 1, 1425, 113, - 437, 37, 1023, 1071, 1051, 4, 1492, 9, 500, 88, - 8, 18, 1371, 797, 54, 203, 310, 619, 1608, 603, - 364, 1438, 20, 1, 3, 6099, 6099, 6099, 6099, 6099 + 437, 37, 1086, 1071, 1051, 4, 1984, 9, 500, 88, + 8, 18, 1371, 1287, 54, 203, 310, 619, 1958, 603, + 275, 1624, 44, 1, 22, 6099, 6099, 6099, 6099, 6099 #endif /* USE_UNICODE_PROPERTIES */ }; #ifndef USE_UNICODE_PROPERTIES @@ -38172,7 +41848,6 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str11[sizeof("yi")]; char uniname2ctype_pool_str17[sizeof("yiii")]; char uniname2ctype_pool_str22[sizeof("lana")]; - char uniname2ctype_pool_str24[sizeof("z")]; char uniname2ctype_pool_str25[sizeof("lina")]; char uniname2ctype_pool_str33[sizeof("maka")]; char uniname2ctype_pool_str35[sizeof("mani")]; @@ -38186,11 +41861,12 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str55[sizeof("cn")]; char uniname2ctype_pool_str64[sizeof("pi")]; char uniname2ctype_pool_str66[sizeof("innko")]; - char uniname2ctype_pool_str67[sizeof("zzzz")]; + char uniname2ctype_pool_str67[sizeof("z")]; char uniname2ctype_pool_str71[sizeof("gran")]; char uniname2ctype_pool_str75[sizeof("co")]; char uniname2ctype_pool_str83[sizeof("lineara")]; char uniname2ctype_pool_str86[sizeof("mark")]; + char uniname2ctype_pool_str90[sizeof("yezi")]; char uniname2ctype_pool_str92[sizeof("po")]; char uniname2ctype_pool_str94[sizeof("me")]; char uniname2ctype_pool_str100[sizeof("cari")]; @@ -38217,6 +41893,7 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str151[sizeof("c")]; char uniname2ctype_pool_str152[sizeof("mandaic")]; char uniname2ctype_pool_str153[sizeof("meeteimayek")]; + char uniname2ctype_pool_str158[sizeof("zzzz")]; char uniname2ctype_pool_str161[sizeof("inarmenian")]; char uniname2ctype_pool_str177[sizeof("inmyanmar")]; char uniname2ctype_pool_str178[sizeof("inmakasar")]; @@ -38230,6 +41907,7 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str213[sizeof("qaai")]; char uniname2ctype_pool_str218[sizeof("inahom")]; char uniname2ctype_pool_str226[sizeof("merc")]; + char uniname2ctype_pool_str230[sizeof("inchorasmian")]; char uniname2ctype_pool_str231[sizeof("combiningmark")]; char uniname2ctype_pool_str236[sizeof("lc")]; char uniname2ctype_pool_str237[sizeof("perm")]; @@ -38248,6 +41926,8 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str282[sizeof("pc")]; char uniname2ctype_pool_str283[sizeof("armenian")]; char uniname2ctype_pool_str285[sizeof("insharada")]; + char uniname2ctype_pool_str287[sizeof("vai")]; + char uniname2ctype_pool_str288[sizeof("vaii")]; char uniname2ctype_pool_str289[sizeof("inmarchen")]; char uniname2ctype_pool_str293[sizeof("makasar")]; char uniname2ctype_pool_str297[sizeof("masaramgondi")]; @@ -38267,19 +41947,17 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str346[sizeof("pcm")]; char uniname2ctype_pool_str348[sizeof("inkatakana")]; char uniname2ctype_pool_str352[sizeof("inkaithi")]; - char uniname2ctype_pool_str357[sizeof("inzanabazarsquare")]; char uniname2ctype_pool_str362[sizeof("inscriptionalparthian")]; char uniname2ctype_pool_str366[sizeof("initialpunctuation")]; char uniname2ctype_pool_str373[sizeof("mtei")]; - char uniname2ctype_pool_str376[sizeof("vai")]; - char uniname2ctype_pool_str377[sizeof("vaii")]; + char uniname2ctype_pool_str381[sizeof("inzanabazarsquare")]; char uniname2ctype_pool_str386[sizeof("inkhmersymbols")]; char uniname2ctype_pool_str399[sizeof("insyriac")]; char uniname2ctype_pool_str401[sizeof("intakri")]; char uniname2ctype_pool_str404[sizeof("arabic")]; - char uniname2ctype_pool_str411[sizeof("zs")]; char uniname2ctype_pool_str418[sizeof("katakana")]; char uniname2ctype_pool_str426[sizeof("prti")]; + char uniname2ctype_pool_str430[sizeof("zs")]; char uniname2ctype_pool_str442[sizeof("ascii")]; char uniname2ctype_pool_str445[sizeof("cs")]; char uniname2ctype_pool_str462[sizeof("ps")]; @@ -38298,19 +41976,19 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str509[sizeof("l")]; char uniname2ctype_pool_str511[sizeof("inmeeteimayek")]; char uniname2ctype_pool_str520[sizeof("inideographicdescriptioncharacters")]; - char uniname2ctype_pool_str535[sizeof("xidcontinue")]; + char uniname2ctype_pool_str533[sizeof("yezidi")]; char uniname2ctype_pool_str538[sizeof("knda")]; char uniname2ctype_pool_str541[sizeof("innandinagari")]; char uniname2ctype_pool_str543[sizeof("kannada")]; char uniname2ctype_pool_str556[sizeof("inmodi")]; char uniname2ctype_pool_str558[sizeof("inlao")]; + char uniname2ctype_pool_str559[sizeof("xidcontinue")]; char uniname2ctype_pool_str560[sizeof("inoldnortharabian")]; char uniname2ctype_pool_str565[sizeof("intransportandmapsymbols")]; char uniname2ctype_pool_str566[sizeof("letternumber")]; char uniname2ctype_pool_str568[sizeof("gothic")]; char uniname2ctype_pool_str572[sizeof("inlineara")]; char uniname2ctype_pool_str577[sizeof("inmendekikakui")]; - char uniname2ctype_pool_str578[sizeof("xidc")]; char uniname2ctype_pool_str579[sizeof("mongolian")]; char uniname2ctype_pool_str582[sizeof("inmiscellaneousmathematicalsymbolsa")]; char uniname2ctype_pool_str583[sizeof("inspecials")]; @@ -38319,9 +41997,11 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str596[sizeof("inemoticons")]; char uniname2ctype_pool_str597[sizeof("kali")]; char uniname2ctype_pool_str600[sizeof("inolditalic")]; + char uniname2ctype_pool_str602[sizeof("xidc")]; char uniname2ctype_pool_str604[sizeof("inmedefaidrin")]; char uniname2ctype_pool_str605[sizeof("inchesssymbols")]; char uniname2ctype_pool_str608[sizeof("incjkcompatibilityideographssupplement")]; + char uniname2ctype_pool_str609[sizeof("kits")]; char uniname2ctype_pool_str614[sizeof("inadlam")]; char uniname2ctype_pool_str624[sizeof("psalterpahlavi")]; char uniname2ctype_pool_str625[sizeof("incommonindicnumberforms")]; @@ -38329,18 +42009,22 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str636[sizeof("innewa")]; char uniname2ctype_pool_str639[sizeof("sk")]; char uniname2ctype_pool_str642[sizeof("control")]; + char uniname2ctype_pool_str643[sizeof("inkawi")]; char uniname2ctype_pool_str645[sizeof("inancientsymbols")]; char uniname2ctype_pool_str647[sizeof("palm")]; char uniname2ctype_pool_str650[sizeof("inlycian")]; char uniname2ctype_pool_str657[sizeof("so")]; char uniname2ctype_pool_str660[sizeof("patternwhitespace")]; - char uniname2ctype_pool_str668[sizeof("xids")]; char uniname2ctype_pool_str672[sizeof("inmandaic")]; char uniname2ctype_pool_str675[sizeof("idc")]; char uniname2ctype_pool_str678[sizeof("meroiticcursive")]; + char uniname2ctype_pool_str679[sizeof("intoto")]; + char uniname2ctype_pool_str683[sizeof("vs")]; + char uniname2ctype_pool_str692[sizeof("xids")]; char uniname2ctype_pool_str695[sizeof("inwarangciti")]; char uniname2ctype_pool_str696[sizeof("sora")]; char uniname2ctype_pool_str697[sizeof("inopticalcharacterrecognition")]; + char uniname2ctype_pool_str700[sizeof("kawi")]; char uniname2ctype_pool_str703[sizeof("inoldsogdian")]; char uniname2ctype_pool_str705[sizeof("inmalayalam")]; char uniname2ctype_pool_str707[sizeof("bamum")]; @@ -38350,6 +42034,7 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str737[sizeof("print")]; char uniname2ctype_pool_str738[sizeof("intaitham")]; char uniname2ctype_pool_str742[sizeof("lower")]; + char uniname2ctype_pool_str745[sizeof("patternsyntax")]; char uniname2ctype_pool_str753[sizeof("joinc")]; char uniname2ctype_pool_str755[sizeof("inoldsoutharabian")]; char uniname2ctype_pool_str760[sizeof("incjkstrokes")]; @@ -38357,7 +42042,6 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str766[sizeof("samr")]; char uniname2ctype_pool_str767[sizeof("inwancho")]; char uniname2ctype_pool_str771[sizeof("batak")]; - char uniname2ctype_pool_str772[sizeof("vs")]; char uniname2ctype_pool_str776[sizeof("patws")]; char uniname2ctype_pool_str783[sizeof("samaritan")]; char uniname2ctype_pool_str787[sizeof("idsbinaryoperator")]; @@ -38366,6 +42050,7 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str797[sizeof("sm")]; char uniname2ctype_pool_str799[sizeof("indominotiles")]; char uniname2ctype_pool_str802[sizeof("alnum")]; + char uniname2ctype_pool_str803[sizeof("inznamennymusicalnotation")]; char uniname2ctype_pool_str809[sizeof("insylotinagri")]; char uniname2ctype_pool_str814[sizeof("inugaritic")]; char uniname2ctype_pool_str818[sizeof("incontrolpictures")]; @@ -38375,7 +42060,6 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str824[sizeof("ital")]; char uniname2ctype_pool_str825[sizeof("inmodifiertoneletters")]; char uniname2ctype_pool_str828[sizeof("inancientgreekmusicalnotation")]; - char uniname2ctype_pool_str834[sizeof("patternsyntax")]; char uniname2ctype_pool_str838[sizeof("lisu")]; char uniname2ctype_pool_str842[sizeof("lowercase")]; char uniname2ctype_pool_str845[sizeof("cwcm")]; @@ -38383,7 +42067,6 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str848[sizeof("bass")]; char uniname2ctype_pool_str855[sizeof("ids")]; char uniname2ctype_pool_str857[sizeof("inlatinextendeda")]; - char uniname2ctype_pool_str862[sizeof("oriya")]; char uniname2ctype_pool_str875[sizeof("intaile")]; char uniname2ctype_pool_str886[sizeof("inmiscellaneoussymbols")]; char uniname2ctype_pool_str895[sizeof("inmiscellaneoussymbolsandarrows")]; @@ -38391,7 +42074,9 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str900[sizeof("inmiscellaneoussymbolsandpictographs")]; char uniname2ctype_pool_str906[sizeof("inoldturkic")]; char uniname2ctype_pool_str907[sizeof("insaurashtra")]; + char uniname2ctype_pool_str920[sizeof("incyrillicextendeda")]; char uniname2ctype_pool_str924[sizeof("idcontinue")]; + char uniname2ctype_pool_str925[sizeof("intaixuanjingsymbols")]; char uniname2ctype_pool_str926[sizeof("intamil")]; char uniname2ctype_pool_str928[sizeof("inmultani")]; char uniname2ctype_pool_str929[sizeof("inlatinextendede")]; @@ -38403,41 +42088,39 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str986[sizeof("innewtailue")]; char uniname2ctype_pool_str994[sizeof("bengali")]; char uniname2ctype_pool_str995[sizeof("runr")]; - char uniname2ctype_pool_str1005[sizeof("zl")]; - char uniname2ctype_pool_str1009[sizeof("incyrillicextendeda")]; char uniname2ctype_pool_str1010[sizeof("ll")]; char uniname2ctype_pool_str1013[sizeof("indeseret")]; - char uniname2ctype_pool_str1014[sizeof("intaixuanjingsymbols")]; char uniname2ctype_pool_str1015[sizeof("inancientgreeknumbers")]; char uniname2ctype_pool_str1021[sizeof("idstart")]; + char uniname2ctype_pool_str1024[sizeof("zl")]; char uniname2ctype_pool_str1025[sizeof("inmeeteimayekextensions")]; char uniname2ctype_pool_str1028[sizeof("balinese")]; - char uniname2ctype_pool_str1032[sizeof("dia")]; - char uniname2ctype_pool_str1033[sizeof("di")]; + char uniname2ctype_pool_str1032[sizeof("incyrillicextendedc")]; char uniname2ctype_pool_str1035[sizeof("inspacingmodifierletters")]; char uniname2ctype_pool_str1036[sizeof("inearlydynasticcuneiform")]; char uniname2ctype_pool_str1049[sizeof("plrd")]; char uniname2ctype_pool_str1067[sizeof("canadianaboriginal")]; - char uniname2ctype_pool_str1070[sizeof("zinh")]; char uniname2ctype_pool_str1072[sizeof("sind")]; - char uniname2ctype_pool_str1080[sizeof("osage")]; char uniname2ctype_pool_str1081[sizeof("inlatinextendedc")]; char uniname2ctype_pool_str1085[sizeof("uideo")]; char uniname2ctype_pool_str1087[sizeof("incountingrodnumerals")]; - char uniname2ctype_pool_str1090[sizeof("xidstart")]; - char uniname2ctype_pool_str1091[sizeof("xdigit")]; - char uniname2ctype_pool_str1093[sizeof("osma")]; + char uniname2ctype_pool_str1089[sizeof("zinh")]; + char uniname2ctype_pool_str1095[sizeof("dia")]; + char uniname2ctype_pool_str1096[sizeof("di")]; char uniname2ctype_pool_str1097[sizeof("inkhudawadi")]; char uniname2ctype_pool_str1102[sizeof("inhanifirohingya")]; + char uniname2ctype_pool_str1104[sizeof("diak")]; char uniname2ctype_pool_str1105[sizeof("gong")]; char uniname2ctype_pool_str1107[sizeof("ingrantha")]; char uniname2ctype_pool_str1109[sizeof("bidic")]; + char uniname2ctype_pool_str1114[sizeof("xidstart")]; + char uniname2ctype_pool_str1115[sizeof("xdigit")]; char uniname2ctype_pool_str1119[sizeof("mong")]; char uniname2ctype_pool_str1120[sizeof("cased")]; - char uniname2ctype_pool_str1121[sizeof("incyrillicextendedc")]; char uniname2ctype_pool_str1134[sizeof("inhiragana")]; char uniname2ctype_pool_str1140[sizeof("sinhala")]; char uniname2ctype_pool_str1142[sizeof("adlm")]; + char uniname2ctype_pool_str1145[sizeof("xsux")]; char uniname2ctype_pool_str1146[sizeof("glagolitic")]; char uniname2ctype_pool_str1147[sizeof("sterm")]; char uniname2ctype_pool_str1149[sizeof("bamu")]; @@ -38445,6 +42128,7 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1151[sizeof("inosage")]; char uniname2ctype_pool_str1152[sizeof("gunjalagondi")]; char uniname2ctype_pool_str1153[sizeof("phoenician")]; + char uniname2ctype_pool_str1156[sizeof("inolduyghur")]; char uniname2ctype_pool_str1157[sizeof("multani")]; char uniname2ctype_pool_str1158[sizeof("kaithi")]; char uniname2ctype_pool_str1164[sizeof("joincontrol")]; @@ -38461,17 +42145,20 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1182[sizeof("inogham")]; char uniname2ctype_pool_str1183[sizeof("cher")]; char uniname2ctype_pool_str1185[sizeof("chakma")]; + char uniname2ctype_pool_str1186[sizeof("inkaktoviknumerals")]; char uniname2ctype_pool_str1190[sizeof("emoji")]; char uniname2ctype_pool_str1191[sizeof("insiddham")]; char uniname2ctype_pool_str1197[sizeof("cherokee")]; char uniname2ctype_pool_str1198[sizeof("khar")]; char uniname2ctype_pool_str1203[sizeof("inmongolian")]; + char uniname2ctype_pool_str1204[sizeof("innagmundari")]; char uniname2ctype_pool_str1207[sizeof("incherokeesupplement")]; - char uniname2ctype_pool_str1208[sizeof("diacritic")]; char uniname2ctype_pool_str1209[sizeof("manichaean")]; - char uniname2ctype_pool_str1210[sizeof("xsux")]; char uniname2ctype_pool_str1212[sizeof("inolchiki")]; + char uniname2ctype_pool_str1223[sizeof("inkhitansmallscript")]; char uniname2ctype_pool_str1227[sizeof("quotationmark")]; + char uniname2ctype_pool_str1229[sizeof("vithkuqi")]; + char uniname2ctype_pool_str1230[sizeof("variationselector")]; char uniname2ctype_pool_str1231[sizeof("adlam")]; char uniname2ctype_pool_str1232[sizeof("inethiopic")]; char uniname2ctype_pool_str1233[sizeof("graphemebase")]; @@ -38480,21 +42167,25 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1235[sizeof("age=12.1")]; char uniname2ctype_pool_str1236[sizeof("age=10.0")]; char uniname2ctype_pool_str1237[sizeof("age=12.0")]; + char uniname2ctype_pool_str1241[sizeof("age=13.0")]; + char uniname2ctype_pool_str1242[sizeof("age=1.1")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1243[sizeof("casedletter")]; char uniname2ctype_pool_str1244[sizeof("ingurmukhi")]; - char uniname2ctype_pool_str1245[sizeof("odi")]; +#ifdef USE_UNICODE_AGE_PROPERTIES + char uniname2ctype_pool_str1245[sizeof("age=2.1")]; +#endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1246[sizeof("incjkunifiedideographsextensiona")]; #ifdef USE_UNICODE_AGE_PROPERTIES - char uniname2ctype_pool_str1247[sizeof("age=1.1")]; + char uniname2ctype_pool_str1247[sizeof("age=2.0")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1248[sizeof("lu")]; #ifdef USE_UNICODE_AGE_PROPERTIES - char uniname2ctype_pool_str1249[sizeof("age=4.1")]; - char uniname2ctype_pool_str1250[sizeof("age=2.1")]; - char uniname2ctype_pool_str1251[sizeof("age=4.0")]; - char uniname2ctype_pool_str1252[sizeof("age=2.0")]; - char uniname2ctype_pool_str1253[sizeof("age=9.0")]; + char uniname2ctype_pool_str1249[sizeof("age=3.1")]; + char uniname2ctype_pool_str1250[sizeof("age=9.0")]; + char uniname2ctype_pool_str1251[sizeof("age=3.0")]; + char uniname2ctype_pool_str1252[sizeof("age=3.2")]; + char uniname2ctype_pool_str1253[sizeof("age=8.0")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1254[sizeof("intamilsupplement")]; #ifdef USE_UNICODE_AGE_PROPERTIES @@ -38504,23 +42195,28 @@ struct uniname2ctype_pool_t #ifdef USE_UNICODE_AGE_PROPERTIES char uniname2ctype_pool_str1257[sizeof("age=6.0")]; char uniname2ctype_pool_str1258[sizeof("age=6.2")]; - char uniname2ctype_pool_str1259[sizeof("age=3.1")]; - char uniname2ctype_pool_str1260[sizeof("age=8.0")]; - char uniname2ctype_pool_str1261[sizeof("age=3.0")]; - char uniname2ctype_pool_str1262[sizeof("age=3.2")]; + char uniname2ctype_pool_str1259[sizeof("age=15.0")]; + char uniname2ctype_pool_str1260[sizeof("age=7.0")]; + char uniname2ctype_pool_str1262[sizeof("age=6.3")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1263[sizeof("cwt")]; #ifdef USE_UNICODE_AGE_PROPERTIES - char uniname2ctype_pool_str1264[sizeof("age=7.0")]; + char uniname2ctype_pool_str1265[sizeof("age=14.0")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1266[sizeof("unassigned")]; #ifdef USE_UNICODE_AGE_PROPERTIES - char uniname2ctype_pool_str1267[sizeof("age=6.3")]; - char uniname2ctype_pool_str1268[sizeof("age=5.1")]; - char uniname2ctype_pool_str1270[sizeof("age=5.0")]; - char uniname2ctype_pool_str1271[sizeof("age=5.2")]; + char uniname2ctype_pool_str1267[sizeof("age=5.1")]; + char uniname2ctype_pool_str1269[sizeof("age=5.0")]; + char uniname2ctype_pool_str1270[sizeof("age=5.2")]; +#endif /* USE_UNICODE_AGE_PROPERTIES */ + char uniname2ctype_pool_str1271[sizeof("diacritic")]; +#ifdef USE_UNICODE_AGE_PROPERTIES + char uniname2ctype_pool_str1273[sizeof("age=4.1")]; #endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1274[sizeof("ahom")]; +#ifdef USE_UNICODE_AGE_PROPERTIES + char uniname2ctype_pool_str1275[sizeof("age=4.0")]; +#endif /* USE_UNICODE_AGE_PROPERTIES */ char uniname2ctype_pool_str1282[sizeof("incjkunifiedideographsextensione")]; char uniname2ctype_pool_str1285[sizeof("khmr")]; char uniname2ctype_pool_str1289[sizeof("insinhala")]; @@ -38531,16 +42227,17 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1306[sizeof("punct")]; char uniname2ctype_pool_str1314[sizeof("paucinhau")]; char uniname2ctype_pool_str1317[sizeof("gurmukhi")]; - char uniname2ctype_pool_str1319[sizeof("variationselector")]; + char uniname2ctype_pool_str1328[sizeof("chorasmian")]; char uniname2ctype_pool_str1331[sizeof("logicalorderexception")]; char uniname2ctype_pool_str1340[sizeof("khmer")]; char uniname2ctype_pool_str1343[sizeof("limbu")]; + char uniname2ctype_pool_str1349[sizeof("chrs")]; + char uniname2ctype_pool_str1352[sizeof("oriya")]; char uniname2ctype_pool_str1354[sizeof("inscriptionalpahlavi")]; - char uniname2ctype_pool_str1355[sizeof("oidc")]; + char uniname2ctype_pool_str1356[sizeof("incyrillicextendedd")]; char uniname2ctype_pool_str1358[sizeof("incjkunifiedideographsextensionc")]; char uniname2ctype_pool_str1360[sizeof("cntrl")]; char uniname2ctype_pool_str1365[sizeof("inlatinextendedadditional")]; - char uniname2ctype_pool_str1366[sizeof("decimalnumber")]; char uniname2ctype_pool_str1367[sizeof("insorasompeng")]; char uniname2ctype_pool_str1369[sizeof("radical")]; char uniname2ctype_pool_str1373[sizeof("emojimodifier")]; @@ -38548,103 +42245,90 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1380[sizeof("n")]; char uniname2ctype_pool_str1384[sizeof("math")]; char uniname2ctype_pool_str1387[sizeof("goth")]; + char uniname2ctype_pool_str1392[sizeof("phnx")]; char uniname2ctype_pool_str1400[sizeof("anatolianhieroglyphs")]; char uniname2ctype_pool_str1401[sizeof("inenclosedalphanumerics")]; char uniname2ctype_pool_str1407[sizeof("nandinagari")]; char uniname2ctype_pool_str1409[sizeof("no")]; + char uniname2ctype_pool_str1415[sizeof("intangsa")]; char uniname2ctype_pool_str1419[sizeof("nko")]; char uniname2ctype_pool_str1420[sizeof("nkoo")]; char uniname2ctype_pool_str1422[sizeof("ingreekandcoptic")]; - char uniname2ctype_pool_str1423[sizeof("olck")]; char uniname2ctype_pool_str1426[sizeof("p")]; char uniname2ctype_pool_str1428[sizeof("grantha")]; - char uniname2ctype_pool_str1434[sizeof("olchiki")]; + char uniname2ctype_pool_str1429[sizeof("decimalnumber")]; char uniname2ctype_pool_str1438[sizeof("incjkunifiedideographs")]; - char uniname2ctype_pool_str1441[sizeof("zanb")]; char uniname2ctype_pool_str1442[sizeof("intirhuta")]; - char uniname2ctype_pool_str1445[sizeof("oids")]; char uniname2ctype_pool_str1448[sizeof("inhatran")]; char uniname2ctype_pool_str1449[sizeof("linb")]; - char uniname2ctype_pool_str1450[sizeof("xpeo")]; char uniname2ctype_pool_str1451[sizeof("mult")]; char uniname2ctype_pool_str1454[sizeof("saurashtra")]; char uniname2ctype_pool_str1457[sizeof("kthi")]; + char uniname2ctype_pool_str1460[sizeof("zanb")]; char uniname2ctype_pool_str1462[sizeof("inbhaiksuki")]; - char uniname2ctype_pool_str1466[sizeof("olower")]; char uniname2ctype_pool_str1470[sizeof("innabataean")]; char uniname2ctype_pool_str1471[sizeof("inphoenician")]; + char uniname2ctype_pool_str1474[sizeof("xpeo")]; char uniname2ctype_pool_str1475[sizeof("inkanbun")]; char uniname2ctype_pool_str1476[sizeof("inmeroitichieroglyphs")]; - char uniname2ctype_pool_str1478[sizeof("inkayahli")]; - char uniname2ctype_pool_str1481[sizeof("phnx")]; - char uniname2ctype_pool_str1485[sizeof("inoriya")]; + char uniname2ctype_pool_str1480[sizeof("ahex")]; char uniname2ctype_pool_str1489[sizeof("enclosingmark")]; char uniname2ctype_pool_str1495[sizeof("sd")]; char uniname2ctype_pool_str1497[sizeof("inelbasan")]; - char uniname2ctype_pool_str1498[sizeof("wara")]; char uniname2ctype_pool_str1499[sizeof("inenclosedideographicsupplement")]; char uniname2ctype_pool_str1501[sizeof("sidd")]; char uniname2ctype_pool_str1507[sizeof("linearb")]; - char uniname2ctype_pool_str1509[sizeof("hani")]; - char uniname2ctype_pool_str1512[sizeof("han")]; + char uniname2ctype_pool_str1508[sizeof("cpmn")]; char uniname2ctype_pool_str1517[sizeof("inenclosedalphanumericsupplement")]; - char uniname2ctype_pool_str1519[sizeof("medf")]; char uniname2ctype_pool_str1520[sizeof("bidicontrol")]; - char uniname2ctype_pool_str1523[sizeof("hano")]; char uniname2ctype_pool_str1524[sizeof("inphaistosdisc")]; char uniname2ctype_pool_str1529[sizeof("limb")]; char uniname2ctype_pool_str1531[sizeof("inkangxiradicals")]; char uniname2ctype_pool_str1533[sizeof("lepc")]; - char uniname2ctype_pool_str1535[sizeof("medefaidrin")]; char uniname2ctype_pool_str1536[sizeof("braille")]; char uniname2ctype_pool_str1537[sizeof("regionalindicator")]; char uniname2ctype_pool_str1542[sizeof("inlowsurrogates")]; - char uniname2ctype_pool_str1544[sizeof("inshorthandformatcontrols")]; char uniname2ctype_pool_str1547[sizeof("brah")]; - char uniname2ctype_pool_str1548[sizeof("inkhojki")]; char uniname2ctype_pool_str1549[sizeof("inoldhungarian")]; - char uniname2ctype_pool_str1552[sizeof("hanunoo")]; - char uniname2ctype_pool_str1555[sizeof("hira")]; char uniname2ctype_pool_str1557[sizeof("beng")]; char uniname2ctype_pool_str1563[sizeof("emojimodifierbase")]; char uniname2ctype_pool_str1565[sizeof("inarabic")]; - char uniname2ctype_pool_str1567[sizeof("lyci")]; - char uniname2ctype_pool_str1569[sizeof("ahex")]; + char uniname2ctype_pool_str1570[sizeof("osage")]; char uniname2ctype_pool_str1572[sizeof("inherited")]; + char uniname2ctype_pool_str1577[sizeof("incyprominoan")]; char uniname2ctype_pool_str1580[sizeof("glag")]; - char uniname2ctype_pool_str1582[sizeof("lycian")]; + char uniname2ctype_pool_str1582[sizeof("medf")]; + char uniname2ctype_pool_str1583[sizeof("osma")]; char uniname2ctype_pool_str1587[sizeof("indogra")]; - char uniname2ctype_pool_str1594[sizeof("dsrt")]; char uniname2ctype_pool_str1597[sizeof("arab")]; - char uniname2ctype_pool_str1602[sizeof("mymr")]; - char uniname2ctype_pool_str1607[sizeof("myanmar")]; + char uniname2ctype_pool_str1598[sizeof("medefaidrin")]; + char uniname2ctype_pool_str1607[sizeof("inshorthandformatcontrols")]; char uniname2ctype_pool_str1613[sizeof("phli")]; char uniname2ctype_pool_str1617[sizeof("inimperialaramaic")]; + char uniname2ctype_pool_str1618[sizeof("emod")]; char uniname2ctype_pool_str1622[sizeof("ingreekextended")]; char uniname2ctype_pool_str1623[sizeof("inanatolianhieroglyphs")]; char uniname2ctype_pool_str1629[sizeof("punctuation")]; - char uniname2ctype_pool_str1631[sizeof("takri")]; char uniname2ctype_pool_str1635[sizeof("graphemeextend")]; - char uniname2ctype_pool_str1638[sizeof("invai")]; char uniname2ctype_pool_str1643[sizeof("cwl")]; + char uniname2ctype_pool_str1644[sizeof("vith")]; char uniname2ctype_pool_str1654[sizeof("ingeometricshapes")]; char uniname2ctype_pool_str1655[sizeof("emojicomponent")]; + char uniname2ctype_pool_str1657[sizeof("dsrt")]; char uniname2ctype_pool_str1662[sizeof("coptic")]; - char uniname2ctype_pool_str1671[sizeof("deseret")]; + char uniname2ctype_pool_str1664[sizeof("inkayahli")]; + char uniname2ctype_pool_str1671[sizeof("inoriya")]; char uniname2ctype_pool_str1675[sizeof("inarabicpresentationformsa")]; - char uniname2ctype_pool_str1676[sizeof("takr")]; char uniname2ctype_pool_str1677[sizeof("inbasiclatin")]; char uniname2ctype_pool_str1682[sizeof("incjkunifiedideographsextensiond")]; + char uniname2ctype_pool_str1684[sizeof("wara")]; char uniname2ctype_pool_str1686[sizeof("sinh")]; char uniname2ctype_pool_str1687[sizeof("sund")]; char uniname2ctype_pool_str1691[sizeof("shavian")]; - char uniname2ctype_pool_str1692[sizeof("taile")]; char uniname2ctype_pool_str1699[sizeof("insundanesesupplement")]; - char uniname2ctype_pool_str1702[sizeof("inelymaic")]; - char uniname2ctype_pool_str1703[sizeof("insoyombo")]; + char uniname2ctype_pool_str1701[sizeof("inyezidi")]; char uniname2ctype_pool_str1704[sizeof("bhks")]; char uniname2ctype_pool_str1714[sizeof("bhaiksuki")]; - char uniname2ctype_pool_str1716[sizeof("incjkcompatibility")]; char uniname2ctype_pool_str1722[sizeof("inhanunoo")]; char uniname2ctype_pool_str1724[sizeof("intangut")]; char uniname2ctype_pool_str1728[sizeof("sogdian")]; @@ -38653,371 +42337,424 @@ struct uniname2ctype_pool_t char uniname2ctype_pool_str1731[sizeof("insinhalaarchaicnumbers")]; char uniname2ctype_pool_str1732[sizeof("ideographic")]; char uniname2ctype_pool_str1733[sizeof("ugar")]; + char uniname2ctype_pool_str1734[sizeof("deseret")]; + char uniname2ctype_pool_str1735[sizeof("odi")]; char uniname2ctype_pool_str1740[sizeof("copt")]; char uniname2ctype_pool_str1742[sizeof("imperialaramaic")]; char uniname2ctype_pool_str1745[sizeof("insogdian")]; char uniname2ctype_pool_str1746[sizeof("indingbats")]; char uniname2ctype_pool_str1750[sizeof("format")]; char uniname2ctype_pool_str1752[sizeof("ininscriptionalpahlavi")]; + char uniname2ctype_pool_str1753[sizeof("lyci")]; char uniname2ctype_pool_str1757[sizeof("ininscriptionalparthian")]; char uniname2ctype_pool_str1766[sizeof("grbase")]; + char uniname2ctype_pool_str1768[sizeof("lycian")]; char uniname2ctype_pool_str1769[sizeof("inbatak")]; char uniname2ctype_pool_str1776[sizeof("cprt")]; - char uniname2ctype_pool_str1780[sizeof("cwcf")]; - char uniname2ctype_pool_str1788[sizeof("cuneiform")]; - char uniname2ctype_pool_str1791[sizeof("term")]; + char uniname2ctype_pool_str1781[sizeof("inunifiedcanadianaboriginalsyllabicsextendeda")]; + char uniname2ctype_pool_str1788[sizeof("mymr")]; + char uniname2ctype_pool_str1793[sizeof("myanmar")]; char uniname2ctype_pool_str1806[sizeof("intibetan")]; char uniname2ctype_pool_str1810[sizeof("intags")]; char uniname2ctype_pool_str1811[sizeof("asciihexdigit")]; char uniname2ctype_pool_str1813[sizeof("sentenceterminal")]; - char uniname2ctype_pool_str1816[sizeof("inmayannumerals")]; char uniname2ctype_pool_str1821[sizeof("nand")]; - char uniname2ctype_pool_str1825[sizeof("patsyn")]; - char uniname2ctype_pool_str1826[sizeof("hatran")]; char uniname2ctype_pool_str1828[sizeof("inblockelements")]; char uniname2ctype_pool_str1838[sizeof("inornamentaldingbats")]; + char uniname2ctype_pool_str1841[sizeof("inethiopicextendeda")]; char uniname2ctype_pool_str1842[sizeof("innumberforms")]; - char uniname2ctype_pool_str1843[sizeof("oldpersian")]; - char uniname2ctype_pool_str1846[sizeof("inshavian")]; + char uniname2ctype_pool_str1843[sizeof("cwcf")]; + char uniname2ctype_pool_str1845[sizeof("oidc")]; char uniname2ctype_pool_str1848[sizeof("bopo")]; - char uniname2ctype_pool_str1861[sizeof("hatr")]; + char uniname2ctype_pool_str1851[sizeof("cuneiform")]; char uniname2ctype_pool_str1866[sizeof("caseignorable")]; char uniname2ctype_pool_str1871[sizeof("inoldpersian")]; - char uniname2ctype_pool_str1878[sizeof("modifierletter")]; char uniname2ctype_pool_str1881[sizeof("cwu")]; - char uniname2ctype_pool_str1891[sizeof("lydi")]; - char uniname2ctype_pool_str1892[sizeof("inbyzantinemusicalsymbols")]; + char uniname2ctype_pool_str1888[sizeof("inelymaic")]; + char uniname2ctype_pool_str1889[sizeof("insoyombo")]; char uniname2ctype_pool_str1896[sizeof("ingeometricshapesextended")]; + char uniname2ctype_pool_str1902[sizeof("incjkcompatibility")]; char uniname2ctype_pool_str1904[sizeof("inmyanmarextendedb")]; char uniname2ctype_pool_str1905[sizeof("innushu")]; - char uniname2ctype_pool_str1906[sizeof("lydian")]; - char uniname2ctype_pool_str1911[sizeof("inunifiedcanadianaboriginalsyllabics")]; - char uniname2ctype_pool_str1915[sizeof("orkh")]; - char uniname2ctype_pool_str1928[sizeof("inyiradicals")]; + char uniname2ctype_pool_str1912[sizeof("inkanaextendedb")]; + char uniname2ctype_pool_str1913[sizeof("olck")]; + char uniname2ctype_pool_str1916[sizeof("inbyzantinemusicalsymbols")]; + char uniname2ctype_pool_str1924[sizeof("olchiki")]; char uniname2ctype_pool_str1929[sizeof("inkatakanaphoneticextensions")]; - char uniname2ctype_pool_str1930[sizeof("inethiopicextendeda")]; char uniname2ctype_pool_str1932[sizeof("incoptic")]; + char uniname2ctype_pool_str1935[sizeof("oids")]; char uniname2ctype_pool_str1936[sizeof("inarabicextendeda")]; - char uniname2ctype_pool_str1947[sizeof("oldpermic")]; + char uniname2ctype_pool_str1941[sizeof("modifierletter")]; char uniname2ctype_pool_str1950[sizeof("incjksymbolsandpunctuation")]; - char uniname2ctype_pool_str1951[sizeof("word")]; + char uniname2ctype_pool_str1956[sizeof("olower")]; char uniname2ctype_pool_str1958[sizeof("bopomofo")]; - char uniname2ctype_pool_str1961[sizeof("ogam")]; char uniname2ctype_pool_str1964[sizeof("inlisu")]; char uniname2ctype_pool_str1967[sizeof("inoldpermic")]; char uniname2ctype_pool_str1968[sizeof("innoblock")]; - char uniname2ctype_pool_str1971[sizeof("taiviet")]; + char uniname2ctype_pool_str1969[sizeof("ext")]; + char uniname2ctype_pool_str1974[sizeof("inunifiedcanadianaboriginalsyllabics")]; + char uniname2ctype_pool_str1981[sizeof("takri")]; char uniname2ctype_pool_str1985[sizeof("inbraillepatterns")]; + char uniname2ctype_pool_str1988[sizeof("invai")]; char uniname2ctype_pool_str1991[sizeof("alpha")]; char uniname2ctype_pool_str1993[sizeof("inbalinese")]; char uniname2ctype_pool_str1994[sizeof("sorasompeng")]; char uniname2ctype_pool_str1996[sizeof("closepunctuation")]; + char uniname2ctype_pool_str2001[sizeof("hani")]; + char uniname2ctype_pool_str2002[sizeof("inmayannumerals")]; + char uniname2ctype_pool_str2004[sizeof("han")]; char uniname2ctype_pool_str2006[sizeof("inmiscellaneousmathematicalsymbolsb")]; char uniname2ctype_pool_str2010[sizeof("inlepcha")]; + char uniname2ctype_pool_str2011[sizeof("patsyn")]; + char uniname2ctype_pool_str2012[sizeof("inlisusupplement")]; char uniname2ctype_pool_str2014[sizeof("insyriacsupplement")]; + char uniname2ctype_pool_str2015[sizeof("hano")]; char uniname2ctype_pool_str2016[sizeof("newa")]; char uniname2ctype_pool_str2023[sizeof("spacingmark")]; char uniname2ctype_pool_str2024[sizeof("inpalmyrene")]; - char uniname2ctype_pool_str2033[sizeof("cyrl")]; + char uniname2ctype_pool_str2026[sizeof("takr")]; + char uniname2ctype_pool_str2033[sizeof("xposixpunct")]; + char uniname2ctype_pool_str2040[sizeof("inkhojki")]; + char uniname2ctype_pool_str2042[sizeof("taile")]; char uniname2ctype_pool_str2043[sizeof("assigned")]; - char uniname2ctype_pool_str2048[sizeof("mlym")]; - char uniname2ctype_pool_str2055[sizeof("malayalam")]; - char uniname2ctype_pool_str2058[sizeof("ext")]; + char uniname2ctype_pool_str2044[sizeof("hanunoo")]; + char uniname2ctype_pool_str2047[sizeof("hira")]; + char uniname2ctype_pool_str2048[sizeof("inarabicextendedc")]; char uniname2ctype_pool_str2062[sizeof("newtailue")]; char uniname2ctype_pool_str2070[sizeof("space")]; char uniname2ctype_pool_str2073[sizeof("intelugu")]; + char uniname2ctype_pool_str2077[sizeof("lydi")]; char uniname2ctype_pool_str2078[sizeof("idsb")]; - char uniname2ctype_pool_str2083[sizeof("indevanagari")]; - char uniname2ctype_pool_str2084[sizeof("avestan")]; - char uniname2ctype_pool_str2085[sizeof("cf")]; - char uniname2ctype_pool_str2093[sizeof("palmyrene")]; + char uniname2ctype_pool_str2090[sizeof("extpict")]; + char uniname2ctype_pool_str2092[sizeof("lydian")]; char uniname2ctype_pool_str2095[sizeof("inethiopicsupplement")]; - char uniname2ctype_pool_str2097[sizeof("soyo")]; - char uniname2ctype_pool_str2098[sizeof("xposixpunct")]; - char uniname2ctype_pool_str2102[sizeof("pf")]; char uniname2ctype_pool_str2103[sizeof("sarb")]; - char uniname2ctype_pool_str2109[sizeof("zanabazarsquare")]; char uniname2ctype_pool_str2110[sizeof("ugaritic")]; - char uniname2ctype_pool_str2112[sizeof("osge")]; - char uniname2ctype_pool_str2114[sizeof("java")]; + char uniname2ctype_pool_str2114[sizeof("inyiradicals")]; + char uniname2ctype_pool_str2115[sizeof("inphoneticextensions")]; char uniname2ctype_pool_str2117[sizeof("sharada")]; - char uniname2ctype_pool_str2119[sizeof("dogra")]; + char uniname2ctype_pool_str2128[sizeof("zanabazarsquare")]; char uniname2ctype_pool_str2135[sizeof("bugi")]; - char uniname2ctype_pool_str2137[sizeof("meroitichieroglyphs")]; + char uniname2ctype_pool_str2137[sizeof("word")]; + char uniname2ctype_pool_str2141[sizeof("term")]; char uniname2ctype_pool_str2145[sizeof("separator")]; char uniname2ctype_pool_str2146[sizeof("ingeorgiansupplement")]; char uniname2ctype_pool_str2149[sizeof("sogd")]; - char uniname2ctype_pool_str2150[sizeof("tale")]; - char uniname2ctype_pool_str2153[sizeof("inunifiedcanadianaboriginalsyllabicsextended")]; - char uniname2ctype_pool_str2161[sizeof("terminalpunctuation")]; + char uniname2ctype_pool_str2163[sizeof("extender")]; char uniname2ctype_pool_str2165[sizeof("shrd")]; char uniname2ctype_pool_str2166[sizeof("graph")]; - char uniname2ctype_pool_str2167[sizeof("olditalic")]; - char uniname2ctype_pool_str2170[sizeof("dogr")]; - char uniname2ctype_pool_str2173[sizeof("gujr")]; + char uniname2ctype_pool_str2174[sizeof("tnsa")]; + char uniname2ctype_pool_str2178[sizeof("tangsa")]; char uniname2ctype_pool_str2181[sizeof("phag")]; - char uniname2ctype_pool_str2182[sizeof("gujarati")]; + char uniname2ctype_pool_str2182[sizeof("dogra")]; char uniname2ctype_pool_str2195[sizeof("inhanguljamo")]; - char uniname2ctype_pool_str2199[sizeof("javanese")]; - char uniname2ctype_pool_str2201[sizeof("taml")]; - char uniname2ctype_pool_str2204[sizeof("inphoneticextensions")]; + char uniname2ctype_pool_str2196[sizeof("inshavian")]; char uniname2ctype_pool_str2207[sizeof("siddham")]; + char uniname2ctype_pool_str2211[sizeof("cf")]; + char uniname2ctype_pool_str2216[sizeof("inunifiedcanadianaboriginalsyllabicsextended")]; char uniname2ctype_pool_str2217[sizeof("buginese")]; char uniname2ctype_pool_str2218[sizeof("inmongoliansupplement")]; - char uniname2ctype_pool_str2222[sizeof("invariationselectors")]; + char uniname2ctype_pool_str2219[sizeof("cyrl")]; char uniname2ctype_pool_str2224[sizeof("inhanguljamoextendeda")]; - char uniname2ctype_pool_str2225[sizeof("inverticalforms")]; - char uniname2ctype_pool_str2228[sizeof("syrc")]; + char uniname2ctype_pool_str2228[sizeof("pf")]; char uniname2ctype_pool_str2229[sizeof("number")]; + char uniname2ctype_pool_str2232[sizeof("inphoneticextensionssupplement")]; + char uniname2ctype_pool_str2233[sizeof("dogr")]; + char uniname2ctype_pool_str2234[sizeof("mlym")]; char uniname2ctype_pool_str2235[sizeof("incopticepactnumbers")]; - char uniname2ctype_pool_str2238[sizeof("avst")]; + char uniname2ctype_pool_str2241[sizeof("malayalam")]; char uniname2ctype_pool_str2244[sizeof("inbamum")]; char uniname2ctype_pool_str2247[sizeof("nd")]; char uniname2ctype_pool_str2248[sizeof("insuttonsignwriting")]; - char uniname2ctype_pool_str2252[sizeof("extender")]; - char uniname2ctype_pool_str2258[sizeof("intaiviet")]; - char uniname2ctype_pool_str2260[sizeof("hex")]; - char uniname2ctype_pool_str2268[sizeof("incjkunifiedideographsextensionf")]; - char uniname2ctype_pool_str2271[sizeof("other")]; - char uniname2ctype_pool_str2272[sizeof("otheridcontinue")]; + char uniname2ctype_pool_str2276[sizeof("inethiopicextended")]; char uniname2ctype_pool_str2278[sizeof("shaw")]; - char uniname2ctype_pool_str2282[sizeof("dash")]; - char uniname2ctype_pool_str2285[sizeof("othernumber")]; - char uniname2ctype_pool_str2294[sizeof("orya")]; - char uniname2ctype_pool_str2302[sizeof("invedicextensions")]; + char uniname2ctype_pool_str2279[sizeof("palmyrene")]; + char uniname2ctype_pool_str2283[sizeof("soyo")]; + char uniname2ctype_pool_str2296[sizeof("incjkunifiedideographsextensionh")]; char uniname2ctype_pool_str2305[sizeof("sgnw")]; + char uniname2ctype_pool_str2308[sizeof("toto")]; char uniname2ctype_pool_str2312[sizeof("caucasianalbanian")]; char uniname2ctype_pool_str2315[sizeof("inmathematicalalphanumericsymbols")]; - char uniname2ctype_pool_str2321[sizeof("inphoneticextensionssupplement")]; - char uniname2ctype_pool_str2339[sizeof("invariationselectorssupplement")]; + char uniname2ctype_pool_str2316[sizeof("incjkunifiedideographsextensiong")]; + char uniname2ctype_pool_str2318[sizeof("hatran")]; + char uniname2ctype_pool_str2321[sizeof("taiviet")]; + char uniname2ctype_pool_str2323[sizeof("meroitichieroglyphs")]; + char uniname2ctype_pool_str2327[sizeof("ingeorgianextended")]; + char uniname2ctype_pool_str2331[sizeof("incjkunifiedideographsextensionf")]; + char uniname2ctype_pool_str2333[sizeof("oldpersian")]; char uniname2ctype_pool_str2343[sizeof("induployan")]; - char uniname2ctype_pool_str2344[sizeof("syriac")]; - char uniname2ctype_pool_str2357[sizeof("oalpha")]; + char uniname2ctype_pool_str2344[sizeof("incyrillicextendedb")]; + char uniname2ctype_pool_str2345[sizeof("dash")]; + char uniname2ctype_pool_str2353[sizeof("hatr")]; char uniname2ctype_pool_str2361[sizeof("innyiakengpuachuehmong")]; char uniname2ctype_pool_str2364[sizeof("incombiningdiacriticalmarks")]; - char uniname2ctype_pool_str2365[sizeof("inethiopicextended")]; char uniname2ctype_pool_str2373[sizeof("nl")]; char uniname2ctype_pool_str2374[sizeof("incombiningdiacriticalmarksforsymbols")]; char uniname2ctype_pool_str2375[sizeof("khudawadi")]; - char uniname2ctype_pool_str2378[sizeof("otheralphabetic")]; - char uniname2ctype_pool_str2389[sizeof("oldhungarian")]; - char uniname2ctype_pool_str2396[sizeof("incurrencysymbols")]; char uniname2ctype_pool_str2397[sizeof("incjkradicalssupplement")]; char uniname2ctype_pool_str2398[sizeof("inglagolitic")]; - char uniname2ctype_pool_str2415[sizeof("intifinagh")]; - char uniname2ctype_pool_str2416[sizeof("ingeorgianextended")]; + char uniname2ctype_pool_str2405[sizeof("orkh")]; + char uniname2ctype_pool_str2414[sizeof("syrc")]; char uniname2ctype_pool_str2427[sizeof("surrogate")]; - char uniname2ctype_pool_str2433[sizeof("incyrillicextendedb")]; + char uniname2ctype_pool_str2433[sizeof("indevanagari")]; + char uniname2ctype_pool_str2434[sizeof("avestan")]; + char uniname2ctype_pool_str2437[sizeof("oldpermic")]; char uniname2ctype_pool_str2440[sizeof("ethi")]; - char uniname2ctype_pool_str2451[sizeof("titlecaseletter")]; + char uniname2ctype_pool_str2451[sizeof("ogam")]; char uniname2ctype_pool_str2454[sizeof("rohg")]; - char uniname2ctype_pool_str2458[sizeof("inmeroiticcursive")]; char uniname2ctype_pool_str2460[sizeof("idstrinaryoperator")]; + char uniname2ctype_pool_str2464[sizeof("java")]; char uniname2ctype_pool_str2470[sizeof("inphagspa")]; char uniname2ctype_pool_str2475[sizeof("lepcha")]; + char uniname2ctype_pool_str2476[sizeof("indevanagariextendeda")]; + char uniname2ctype_pool_str2478[sizeof("intifinagh")]; char uniname2ctype_pool_str2479[sizeof("intagalog")]; - char uniname2ctype_pool_str2480[sizeof("mathsymbol")]; char uniname2ctype_pool_str2481[sizeof("incombiningdiacriticalmarkssupplement")]; + char uniname2ctype_pool_str2500[sizeof("tale")]; char uniname2ctype_pool_str2506[sizeof("inbrahmi")]; + char uniname2ctype_pool_str2511[sizeof("terminalpunctuation")]; char uniname2ctype_pool_str2513[sizeof("insymbolsandpictographsextendeda")]; - char uniname2ctype_pool_str2519[sizeof("inlinearbsyllabary")]; - char uniname2ctype_pool_str2529[sizeof("oldturkic")]; + char uniname2ctype_pool_str2530[sizeof("syriac")]; char uniname2ctype_pool_str2534[sizeof("inbengali")]; - char uniname2ctype_pool_str2540[sizeof("wancho")]; - char uniname2ctype_pool_str2542[sizeof("osmanya")]; + char uniname2ctype_pool_str2535[sizeof("nagm")]; + char uniname2ctype_pool_str2545[sizeof("extendedpictographic")]; char uniname2ctype_pool_str2548[sizeof("buhd")]; - char uniname2ctype_pool_str2552[sizeof("insmallformvariants")]; - char uniname2ctype_pool_str2561[sizeof("indevanagariextended")]; - char uniname2ctype_pool_str2562[sizeof("softdotted")]; + char uniname2ctype_pool_str2549[sizeof("javanese")]; + char uniname2ctype_pool_str2551[sizeof("taml")]; char uniname2ctype_pool_str2564[sizeof("inbuginese")]; - char uniname2ctype_pool_str2566[sizeof("mahj")]; char uniname2ctype_pool_str2567[sizeof("inlatin1supplement")]; char uniname2ctype_pool_str2570[sizeof("ingothic")]; - char uniname2ctype_pool_str2575[sizeof("mahajani")]; - char uniname2ctype_pool_str2576[sizeof("hang")]; - char uniname2ctype_pool_str2579[sizeof("sylo")]; - char uniname2ctype_pool_str2586[sizeof("warangciti")]; - char uniname2ctype_pool_str2595[sizeof("ingujarati")]; - char uniname2ctype_pool_str2603[sizeof("tirhuta")]; + char uniname2ctype_pool_str2572[sizeof("invariationselectors")]; + char uniname2ctype_pool_str2574[sizeof("hex")]; + char uniname2ctype_pool_str2575[sizeof("inverticalforms")]; + char uniname2ctype_pool_str2576[sizeof("ebase")]; + char uniname2ctype_pool_str2582[sizeof("incurrencysymbols")]; + char uniname2ctype_pool_str2588[sizeof("avst")]; + char uniname2ctype_pool_str2602[sizeof("osge")]; char uniname2ctype_pool_str2606[sizeof("incombiningdiacriticalmarksextended")]; + char uniname2ctype_pool_str2608[sizeof("intaiviet")]; char uniname2ctype_pool_str2609[sizeof("spaceseparator")]; - char uniname2ctype_pool_str2614[sizeof("ingunjalagondi")]; - char uniname2ctype_pool_str2624[sizeof("wcho")]; - char uniname2ctype_pool_str2631[sizeof("hiragana")]; - char uniname2ctype_pool_str2634[sizeof("extendedpictographic")]; - char uniname2ctype_pool_str2643[sizeof("inrejang")]; - char uniname2ctype_pool_str2644[sizeof("inottomansiyaqnumbers")]; + char uniname2ctype_pool_str2625[sizeof("softdotted")]; char uniname2ctype_pool_str2648[sizeof("nchar")]; - char uniname2ctype_pool_str2650[sizeof("cyrillic")]; - char uniname2ctype_pool_str2653[sizeof("khoj")]; + char uniname2ctype_pool_str2652[sizeof("invedicextensions")]; char uniname2ctype_pool_str2656[sizeof("inlimbu")]; - char uniname2ctype_pool_str2663[sizeof("hmng")]; - char uniname2ctype_pool_str2665[sizeof("thaa")]; - char uniname2ctype_pool_str2668[sizeof("thai")]; + char uniname2ctype_pool_str2657[sizeof("olditalic")]; + char uniname2ctype_pool_str2665[sizeof("gujr")]; + char uniname2ctype_pool_str2666[sizeof("mathsymbol")]; char uniname2ctype_pool_str2670[sizeof("incjkunifiedideographsextensionb")]; - char uniname2ctype_pool_str2673[sizeof("deva")]; - char uniname2ctype_pool_str2676[sizeof("thaana")]; + char uniname2ctype_pool_str2674[sizeof("gujarati")]; char uniname2ctype_pool_str2688[sizeof("phagspa")]; - char uniname2ctype_pool_str2691[sizeof("devanagari")]; - char uniname2ctype_pool_str2692[sizeof("tang")]; + char uniname2ctype_pool_str2689[sizeof("invariationselectorssupplement")]; char uniname2ctype_pool_str2694[sizeof("currencysymbol")]; - char uniname2ctype_pool_str2698[sizeof("tagbanwa")]; - char uniname2ctype_pool_str2701[sizeof("inenclosedcjklettersandmonths")]; - char uniname2ctype_pool_str2702[sizeof("tamil")]; - char uniname2ctype_pool_str2721[sizeof("tirh")]; - char uniname2ctype_pool_str2723[sizeof("digit")]; - char uniname2ctype_pool_str2732[sizeof("talu")]; - char uniname2ctype_pool_str2747[sizeof("zp")]; + char uniname2ctype_pool_str2705[sizeof("inlinearbsyllabary")]; + char uniname2ctype_pool_str2726[sizeof("wancho")]; char uniname2ctype_pool_str2750[sizeof("inpaucinhau")]; - char uniname2ctype_pool_str2760[sizeof("taitham")]; - char uniname2ctype_pool_str2764[sizeof("otherlowercase")]; - char uniname2ctype_pool_str2768[sizeof("telu")]; + char uniname2ctype_pool_str2761[sizeof("other")]; + char uniname2ctype_pool_str2762[sizeof("otheridcontinue")]; + char uniname2ctype_pool_str2765[sizeof("sylo")]; + char uniname2ctype_pool_str2766[sizeof("zp")]; char uniname2ctype_pool_str2769[sizeof("inaegeannumbers")]; - char uniname2ctype_pool_str2777[sizeof("otherletter")]; - char uniname2ctype_pool_str2780[sizeof("whitespace")]; + char uniname2ctype_pool_str2772[sizeof("warangciti")]; + char uniname2ctype_pool_str2775[sizeof("othernumber")]; + char uniname2ctype_pool_str2786[sizeof("digit")]; char uniname2ctype_pool_str2793[sizeof("nonspacingmark")]; + char uniname2ctype_pool_str2801[sizeof("titlecaseletter")]; + char uniname2ctype_pool_str2808[sizeof("inmeroiticcursive")]; + char uniname2ctype_pool_str2810[sizeof("wcho")]; char uniname2ctype_pool_str2816[sizeof("graphemeclusterbreak=spacingmark")]; char uniname2ctype_pool_str2821[sizeof("inletterlikesymbols")]; + char uniname2ctype_pool_str2830[sizeof("inottomansiyaqnumbers")]; char uniname2ctype_pool_str2834[sizeof("intagbanwa")]; - char uniname2ctype_pool_str2841[sizeof("oldsogdian")]; - char uniname2ctype_pool_str2848[sizeof("otheridstart")]; + char uniname2ctype_pool_str2836[sizeof("cyrillic")]; + char uniname2ctype_pool_str2847[sizeof("oalpha")]; char uniname2ctype_pool_str2852[sizeof("graphemeclusterbreak=cr")]; char uniname2ctype_pool_str2855[sizeof("narb")]; char uniname2ctype_pool_str2856[sizeof("changeswhencasemapped")]; char uniname2ctype_pool_str2859[sizeof("inbopomofo")]; - char uniname2ctype_pool_str2862[sizeof("tangut")]; char uniname2ctype_pool_str2867[sizeof("graphemeclusterbreak=regionalindicator")]; + char uniname2ctype_pool_str2868[sizeof("otheralphabetic")]; char uniname2ctype_pool_str2871[sizeof("noncharactercodepoint")]; - char uniname2ctype_pool_str2883[sizeof("otheruppercase")]; - char uniname2ctype_pool_str2885[sizeof("rjng")]; - char uniname2ctype_pool_str2886[sizeof("sylotinagri")]; + char uniname2ctype_pool_str2879[sizeof("oldhungarian")]; + char uniname2ctype_pool_str2886[sizeof("insymbolsforlegacycomputing")]; + char uniname2ctype_pool_str2902[sizeof("insmallformvariants")]; char uniname2ctype_pool_str2904[sizeof("inhangulsyllables")]; char uniname2ctype_pool_str2905[sizeof("emojipresentation")]; - char uniname2ctype_pool_str2906[sizeof("inindicsiyaqnumbers")]; + char uniname2ctype_pool_str2907[sizeof("epres")]; char uniname2ctype_pool_str2909[sizeof("inbassavah")]; - char uniname2ctype_pool_str2912[sizeof("ogrext")]; - char uniname2ctype_pool_str2926[sizeof("othersymbol")]; - char uniname2ctype_pool_str2938[sizeof("oupper")]; + char uniname2ctype_pool_str2911[sizeof("indevanagariextended")]; char uniname2ctype_pool_str2941[sizeof("inbuhid")]; - char uniname2ctype_pool_str2963[sizeof("hmnp")]; + char uniname2ctype_pool_str2953[sizeof("tirhuta")]; char uniname2ctype_pool_str2964[sizeof("inpsalterpahlavi")]; + char uniname2ctype_pool_str2966[sizeof("whitespace")]; char uniname2ctype_pool_str2967[sizeof("finalpunctuation")]; + char uniname2ctype_pool_str2970[sizeof("orya")]; char uniname2ctype_pool_str2980[sizeof("phlp")]; char uniname2ctype_pool_str2984[sizeof("inbamumsupplement")]; char uniname2ctype_pool_str2986[sizeof("buhid")]; char uniname2ctype_pool_str2987[sizeof("paragraphseparator")]; char uniname2ctype_pool_str2988[sizeof("inalphabeticpresentationforms")]; - char uniname2ctype_pool_str2993[sizeof("omath")]; - char uniname2ctype_pool_str3000[sizeof("any")]; + char uniname2ctype_pool_str2997[sizeof("inlatinextendedg")]; char uniname2ctype_pool_str3001[sizeof("elba")]; char uniname2ctype_pool_str3002[sizeof("changeswhentitlecased")]; char uniname2ctype_pool_str3005[sizeof("incombininghalfmarks")]; char uniname2ctype_pool_str3006[sizeof("intangutcomponents")]; - char uniname2ctype_pool_str3012[sizeof("hebr")]; - char uniname2ctype_pool_str3028[sizeof("deprecated")]; + char uniname2ctype_pool_str3015[sizeof("thaa")]; + char uniname2ctype_pool_str3018[sizeof("thai")]; + char uniname2ctype_pool_str3019[sizeof("oldturkic")]; + char uniname2ctype_pool_str3026[sizeof("thaana")]; + char uniname2ctype_pool_str3027[sizeof("inlatinextendedf")]; + char uniname2ctype_pool_str3035[sizeof("ougr")]; + char uniname2ctype_pool_str3042[sizeof("tang")]; char uniname2ctype_pool_str3045[sizeof("inarabicmathematicalalphabeticsymbols")]; - char uniname2ctype_pool_str3055[sizeof("inprivateusearea")]; - char uniname2ctype_pool_str3089[sizeof("kayahli")]; - char uniname2ctype_pool_str3098[sizeof("inplayingcards")]; + char uniname2ctype_pool_str3048[sizeof("tagbanwa")]; + char uniname2ctype_pool_str3052[sizeof("tamil")]; + char uniname2ctype_pool_str3053[sizeof("khitansmallscript")]; + char uniname2ctype_pool_str3058[sizeof("mahj")]; + char uniname2ctype_pool_str3067[sizeof("mahajani")]; + char uniname2ctype_pool_str3068[sizeof("hang")]; + char uniname2ctype_pool_str3071[sizeof("tirh")]; + char uniname2ctype_pool_str3072[sizeof("sylotinagri")]; + char uniname2ctype_pool_str3082[sizeof("talu")]; + char uniname2ctype_pool_str3084[sizeof("nagmundari")]; + char uniname2ctype_pool_str3086[sizeof("deva")]; + char uniname2ctype_pool_str3087[sizeof("ingujarati")]; + char uniname2ctype_pool_str3091[sizeof("deprecated")]; char uniname2ctype_pool_str3099[sizeof("inarabicpresentationformsb")]; - char uniname2ctype_pool_str3100[sizeof("ogham")]; - char uniname2ctype_pool_str3101[sizeof("elym")]; + char uniname2ctype_pool_str3104[sizeof("devanagari")]; + char uniname2ctype_pool_str3106[sizeof("ingunjalagondi")]; char uniname2ctype_pool_str3107[sizeof("graphemeclusterbreak=t")]; char uniname2ctype_pool_str3109[sizeof("graphemeclusterbreak=lvt")]; + char uniname2ctype_pool_str3110[sizeof("taitham")]; char uniname2ctype_pool_str3111[sizeof("nbat")]; + char uniname2ctype_pool_str3118[sizeof("telu")]; + char uniname2ctype_pool_str3123[sizeof("hiragana")]; char uniname2ctype_pool_str3125[sizeof("nabataean")]; - char uniname2ctype_pool_str3126[sizeof("hangul")]; - char uniname2ctype_pool_str3134[sizeof("elymaic")]; + char uniname2ctype_pool_str3135[sizeof("inrejang")]; + char uniname2ctype_pool_str3142[sizeof("intangutsupplement")]; + char uniname2ctype_pool_str3145[sizeof("khoj")]; + char uniname2ctype_pool_str3155[sizeof("hmng")]; + char uniname2ctype_pool_str3157[sizeof("cyprominoan")]; char uniname2ctype_pool_str3158[sizeof("inhebrew")]; - char uniname2ctype_pool_str3165[sizeof("injavanese")]; - char uniname2ctype_pool_str3169[sizeof("symbol")]; char uniname2ctype_pool_str3176[sizeof("inmathematicaloperators")]; char uniname2ctype_pool_str3180[sizeof("inarabicsupplement")]; - char uniname2ctype_pool_str3185[sizeof("cypriot")]; - char uniname2ctype_pool_str3194[sizeof("hung")]; - char uniname2ctype_pool_str3205[sizeof("wspace")]; + char uniname2ctype_pool_str3193[sizeof("inenclosedcjklettersandmonths")]; char uniname2ctype_pool_str3209[sizeof("changeswhenlowercased")]; + char uniname2ctype_pool_str3212[sizeof("tangut")]; char uniname2ctype_pool_str3215[sizeof("elbasan")]; - char uniname2ctype_pool_str3218[sizeof("hluw")]; + char uniname2ctype_pool_str3218[sizeof("osmanya")]; char uniname2ctype_pool_str3237[sizeof("insuperscriptsandsubscripts")]; char uniname2ctype_pool_str3239[sizeof("graphemeclusterbreak=extend")]; char uniname2ctype_pool_str3240[sizeof("graphemeclusterbreak=prepend")]; char uniname2ctype_pool_str3248[sizeof("nshu")]; - char uniname2ctype_pool_str3254[sizeof("oldnortharabian")]; - char uniname2ctype_pool_str3266[sizeof("inyijinghexagramsymbols")]; - char uniname2ctype_pool_str3286[sizeof("hexdigit")]; + char uniname2ctype_pool_str3254[sizeof("otherlowercase")]; + char uniname2ctype_pool_str3265[sizeof("inethiopicextendedb")]; + char uniname2ctype_pool_str3267[sizeof("otherletter")]; + char uniname2ctype_pool_str3275[sizeof("kayahli")]; + char uniname2ctype_pool_str3284[sizeof("inplayingcards")]; + char uniname2ctype_pool_str3287[sizeof("elym")]; char uniname2ctype_pool_str3297[sizeof("graphemeclusterbreak=l")]; char uniname2ctype_pool_str3303[sizeof("graphemeclusterbreak=control")]; - char uniname2ctype_pool_str3309[sizeof("bassavah")]; - char uniname2ctype_pool_str3317[sizeof("otherdefaultignorablecodepoint")]; + char uniname2ctype_pool_str3313[sizeof("ogrext")]; + char uniname2ctype_pool_str3320[sizeof("elymaic")]; char uniname2ctype_pool_str3328[sizeof("changeswhenuppercased")]; char uniname2ctype_pool_str3329[sizeof("inalchemicalsymbols")]; + char uniname2ctype_pool_str3331[sizeof("oldsogdian")]; + char uniname2ctype_pool_str3338[sizeof("otheridstart")]; char uniname2ctype_pool_str3348[sizeof("insupplementalarrowsa")]; - char uniname2ctype_pool_str3349[sizeof("inyisyllables")]; - char uniname2ctype_pool_str3351[sizeof("tibt")]; - char uniname2ctype_pool_str3360[sizeof("othermath")]; - char uniname2ctype_pool_str3363[sizeof("tibetan")]; - char uniname2ctype_pool_str3365[sizeof("inmahjongtiles")]; + char uniname2ctype_pool_str3350[sizeof("invithkuqi")]; + char uniname2ctype_pool_str3355[sizeof("symbol")]; + char uniname2ctype_pool_str3360[sizeof("inarabicextendedb")]; + char uniname2ctype_pool_str3371[sizeof("cypriot")]; + char uniname2ctype_pool_str3372[sizeof("any")]; + char uniname2ctype_pool_str3373[sizeof("otheruppercase")]; + char uniname2ctype_pool_str3377[sizeof("rjng")]; + char uniname2ctype_pool_str3391[sizeof("wspace")]; + char uniname2ctype_pool_str3396[sizeof("inindicsiyaqnumbers")]; + char uniname2ctype_pool_str3405[sizeof("inprivateusearea")]; + char uniname2ctype_pool_str3416[sizeof("othersymbol")]; + char uniname2ctype_pool_str3428[sizeof("oupper")]; char uniname2ctype_pool_str3433[sizeof("signwriting")]; char uniname2ctype_pool_str3436[sizeof("nushu")]; - char uniname2ctype_pool_str3439[sizeof("modifiersymbol")]; - char uniname2ctype_pool_str3442[sizeof("inhalfwidthandfullwidthforms")]; + char uniname2ctype_pool_str3455[sizeof("hmnp")]; char uniname2ctype_pool_str3458[sizeof("upper")]; char uniname2ctype_pool_str3460[sizeof("insupplementalarrowsc")]; + char uniname2ctype_pool_str3483[sizeof("omath")]; + char uniname2ctype_pool_str3502[sizeof("modifiersymbol")]; + char uniname2ctype_pool_str3504[sizeof("hebr")]; + char uniname2ctype_pool_str3505[sizeof("inhalfwidthandfullwidthforms")]; char uniname2ctype_pool_str3511[sizeof("insupplementalmathematicaloperators")]; - char uniname2ctype_pool_str3512[sizeof("incypriotsyllabary")]; - char uniname2ctype_pool_str3517[sizeof("dupl")]; - char uniname2ctype_pool_str3531[sizeof("tavt")]; char uniname2ctype_pool_str3532[sizeof("inpahawhhmong")]; char uniname2ctype_pool_str3533[sizeof("alphabetic")]; - char uniname2ctype_pool_str3550[sizeof("dashpunctuation")]; char uniname2ctype_pool_str3558[sizeof("uppercase")]; - char uniname2ctype_pool_str3613[sizeof("soyombo")]; - char uniname2ctype_pool_str3614[sizeof("hanifirohingya")]; - char uniname2ctype_pool_str3616[sizeof("otherpunctuation")]; - char uniname2ctype_pool_str3628[sizeof("defaultignorablecodepoint")]; + char uniname2ctype_pool_str3580[sizeof("dupl")]; + char uniname2ctype_pool_str3590[sizeof("ogham")]; + char uniname2ctype_pool_str3613[sizeof("dashpunctuation")]; + char uniname2ctype_pool_str3618[sizeof("hangul")]; char uniname2ctype_pool_str3648[sizeof("inhanguljamoextendedb")]; + char uniname2ctype_pool_str3659[sizeof("bassavah")]; char uniname2ctype_pool_str3664[sizeof("aghb")]; - char uniname2ctype_pool_str3703[sizeof("tifinagh")]; + char uniname2ctype_pool_str3686[sizeof("hung")]; + char uniname2ctype_pool_str3689[sizeof("hexdigit")]; + char uniname2ctype_pool_str3698[sizeof("incypriotsyllabary")]; + char uniname2ctype_pool_str3699[sizeof("indivesakuru")]; + char uniname2ctype_pool_str3701[sizeof("tibt")]; char uniname2ctype_pool_str3705[sizeof("inlatinextendedb")]; - char uniname2ctype_pool_str3714[sizeof("tfng")]; + char uniname2ctype_pool_str3710[sizeof("hluw")]; + char uniname2ctype_pool_str3713[sizeof("tibetan")]; + char uniname2ctype_pool_str3721[sizeof("inyisyllables")]; + char uniname2ctype_pool_str3744[sizeof("oldnortharabian")]; + char uniname2ctype_pool_str3754[sizeof("defaultignorablecodepoint")]; char uniname2ctype_pool_str3766[sizeof("inhighprivateusesurrogates")]; - char uniname2ctype_pool_str3791[sizeof("changeswhencasefolded")]; - char uniname2ctype_pool_str3805[sizeof("dep")]; - char uniname2ctype_pool_str3819[sizeof("oldsoutharabian")]; - char uniname2ctype_pool_str3821[sizeof("graphemeclusterbreak=lf")]; + char uniname2ctype_pool_str3799[sizeof("soyombo")]; + char uniname2ctype_pool_str3807[sizeof("otherdefaultignorablecodepoint")]; char uniname2ctype_pool_str3842[sizeof("pahawhhmong")]; char uniname2ctype_pool_str3845[sizeof("unifiedideograph")]; + char uniname2ctype_pool_str3850[sizeof("othermath")]; + char uniname2ctype_pool_str3854[sizeof("changeswhencasefolded")]; + char uniname2ctype_pool_str3857[sizeof("inmahjongtiles")]; + char uniname2ctype_pool_str3868[sizeof("dep")]; + char uniname2ctype_pool_str3881[sizeof("divesakuru")]; + char uniname2ctype_pool_str3884[sizeof("graphemeclusterbreak=lf")]; char uniname2ctype_pool_str3891[sizeof("uppercaseletter")]; char uniname2ctype_pool_str3924[sizeof("insupplementalpunctuation")]; char uniname2ctype_pool_str3942[sizeof("ethiopic")]; + char uniname2ctype_pool_str3944[sizeof("inyijinghexagramsymbols")]; + char uniname2ctype_pool_str3949[sizeof("ecomp")]; char uniname2ctype_pool_str3976[sizeof("inglagoliticsupplement")]; - char uniname2ctype_pool_str3995[sizeof("rejang")]; - char uniname2ctype_pool_str4087[sizeof("inbopomofoextended")]; - char uniname2ctype_pool_str4109[sizeof("tagb")]; - char uniname2ctype_pool_str4137[sizeof("othergraphemeextend")]; - char uniname2ctype_pool_str4162[sizeof("inegyptianhieroglyphs")]; - char uniname2ctype_pool_str4175[sizeof("inegyptianhieroglyphformatcontrols")]; - char uniname2ctype_pool_str4203[sizeof("hebrew")]; - char uniname2ctype_pool_str4254[sizeof("tglg")]; - char uniname2ctype_pool_str4276[sizeof("tagalog")]; - char uniname2ctype_pool_str4291[sizeof("graphemeclusterbreak=zwj")]; - char uniname2ctype_pool_str4321[sizeof("zyyy")]; - char uniname2ctype_pool_str4360[sizeof("hyphen")]; - char uniname2ctype_pool_str4397[sizeof("inboxdrawing")]; - char uniname2ctype_pool_str4405[sizeof("graphemeclusterbreak=v")]; - char uniname2ctype_pool_str4406[sizeof("graphemeclusterbreak=lv")]; - char uniname2ctype_pool_str4460[sizeof("telugu")]; - char uniname2ctype_pool_str4485[sizeof("duployan")]; - char uniname2ctype_pool_str4528[sizeof("openpunctuation")]; + char uniname2ctype_pool_str3998[sizeof("inbopomofoextended")]; + char uniname2ctype_pool_str4007[sizeof("injavanese")]; + char uniname2ctype_pool_str4106[sizeof("otherpunctuation")]; + char uniname2ctype_pool_str4116[sizeof("tifinagh")]; + char uniname2ctype_pool_str4127[sizeof("tfng")]; + char uniname2ctype_pool_str4169[sizeof("hanifirohingya")]; + char uniname2ctype_pool_str4231[sizeof("tavt")]; + char uniname2ctype_pool_str4308[sizeof("inboxdrawing")]; + char uniname2ctype_pool_str4309[sizeof("oldsoutharabian")]; + char uniname2ctype_pool_str4348[sizeof("inegyptianhieroglyphs")]; + char uniname2ctype_pool_str4361[sizeof("inegyptianhieroglyphformatcontrols")]; + char uniname2ctype_pool_str4459[sizeof("tagb")]; + char uniname2ctype_pool_str4487[sizeof("rejang")]; + char uniname2ctype_pool_str4604[sizeof("tglg")]; + char uniname2ctype_pool_str4626[sizeof("tagalog")]; + char uniname2ctype_pool_str4627[sizeof("othergraphemeextend")]; char uniname2ctype_pool_str4674[sizeof("insupplementaryprivateuseareaa")]; char uniname2ctype_pool_str4683[sizeof("inhighsurrogates")]; + char uniname2ctype_pool_str4695[sizeof("hebrew")]; + char uniname2ctype_pool_str4734[sizeof("duployan")]; + char uniname2ctype_pool_str4755[sizeof("graphemeclusterbreak=v")]; + char uniname2ctype_pool_str4756[sizeof("graphemeclusterbreak=lv")]; char uniname2ctype_pool_str4772[sizeof("insupplementalarrowsb")]; - char uniname2ctype_pool_str4948[sizeof("insupplementalsymbolsandpictographs")]; - char uniname2ctype_pool_str4955[sizeof("egyp")]; + char uniname2ctype_pool_str4783[sizeof("graphemeclusterbreak=zwj")]; + char uniname2ctype_pool_str4810[sizeof("telugu")]; + char uniname2ctype_pool_str4898[sizeof("zyyy")]; + char uniname2ctype_pool_str4982[sizeof("olduyghur")]; char uniname2ctype_pool_str4986[sizeof("inhangulcompatibilityjamo")]; - char uniname2ctype_pool_str5114[sizeof("nyiakengpuachuehmong")]; - char uniname2ctype_pool_str5608[sizeof("egyptianhieroglyphs")]; + char uniname2ctype_pool_str5018[sizeof("openpunctuation")]; + char uniname2ctype_pool_str5038[sizeof("hyphen")]; + char uniname2ctype_pool_str5134[sizeof("insupplementalsymbolsandpictographs")]; + char uniname2ctype_pool_str5141[sizeof("egyp")]; + char uniname2ctype_pool_str5300[sizeof("nyiakengpuachuehmong")]; + char uniname2ctype_pool_str5980[sizeof("egyptianhieroglyphs")]; char uniname2ctype_pool_str6098[sizeof("insupplementaryprivateuseareab")]; #endif /* USE_UNICODE_PROPERTIES */ }; @@ -39029,7 +42766,6 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "yi", "yiii", "lana", - "z", "lina", "maka", "mani", @@ -39043,11 +42779,12 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "cn", "pi", "innko", - "zzzz", + "z", "gran", "co", "lineara", "mark", + "yezi", "po", "me", "cari", @@ -39074,6 +42811,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "c", "mandaic", "meeteimayek", + "zzzz", "inarmenian", "inmyanmar", "inmakasar", @@ -39087,6 +42825,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "qaai", "inahom", "merc", + "inchorasmian", "combiningmark", "lc", "perm", @@ -39105,6 +42844,8 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "pc", "armenian", "insharada", + "vai", + "vaii", "inmarchen", "makasar", "masaramgondi", @@ -39124,19 +42865,17 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "pcm", "inkatakana", "inkaithi", - "inzanabazarsquare", "inscriptionalparthian", "initialpunctuation", "mtei", - "vai", - "vaii", + "inzanabazarsquare", "inkhmersymbols", "insyriac", "intakri", "arabic", - "zs", "katakana", "prti", + "zs", "ascii", "cs", "ps", @@ -39155,19 +42894,19 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "l", "inmeeteimayek", "inideographicdescriptioncharacters", - "xidcontinue", + "yezidi", "knda", "innandinagari", "kannada", "inmodi", "inlao", + "xidcontinue", "inoldnortharabian", "intransportandmapsymbols", "letternumber", "gothic", "inlineara", "inmendekikakui", - "xidc", "mongolian", "inmiscellaneousmathematicalsymbolsa", "inspecials", @@ -39176,9 +42915,11 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "inemoticons", "kali", "inolditalic", + "xidc", "inmedefaidrin", "inchesssymbols", "incjkcompatibilityideographssupplement", + "kits", "inadlam", "psalterpahlavi", "incommonindicnumberforms", @@ -39186,18 +42927,22 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "innewa", "sk", "control", + "inkawi", "inancientsymbols", "palm", "inlycian", "so", "patternwhitespace", - "xids", "inmandaic", "idc", "meroiticcursive", + "intoto", + "vs", + "xids", "inwarangciti", "sora", "inopticalcharacterrecognition", + "kawi", "inoldsogdian", "inmalayalam", "bamum", @@ -39212,6 +42957,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = #else /* USE_UNICODE_PROPERTIES */ "intaitham", "lower", + "patternsyntax", "joinc", "inoldsoutharabian", "incjkstrokes", @@ -39219,7 +42965,6 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "samr", "inwancho", "batak", - "vs", "patws", "samaritan", "idsbinaryoperator", @@ -39230,6 +42975,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = #endif /* USE_UNICODE_PROPERTIES */ "alnum", #ifdef USE_UNICODE_PROPERTIES + "inznamennymusicalnotation", "insylotinagri", "inugaritic", "incontrolpictures", @@ -39239,7 +42985,6 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "ital", "inmodifiertoneletters", "inancientgreekmusicalnotation", - "patternsyntax", "lisu", "lowercase", "cwcm", @@ -39247,7 +42992,6 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "bass", "ids", "inlatinextendeda", - "oriya", "intaile", "inmiscellaneoussymbols", "inmiscellaneoussymbolsandarrows", @@ -39255,7 +42999,9 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "inmiscellaneoussymbolsandpictographs", "inoldturkic", "insaurashtra", + "incyrillicextendeda", "idcontinue", + "intaixuanjingsymbols", "intamil", "inmultani", "inlatinextendede", @@ -39267,27 +43013,31 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "innewtailue", "bengali", "runr", - "zl", - "incyrillicextendeda", "ll", "indeseret", - "intaixuanjingsymbols", "inancientgreeknumbers", "idstart", + "zl", "inmeeteimayekextensions", "balinese", - "dia", - "di", + "incyrillicextendedc", "inspacingmodifierletters", "inearlydynasticcuneiform", "plrd", "canadianaboriginal", - "zinh", "sind", - "osage", "inlatinextendedc", "uideo", "incountingrodnumerals", + "zinh", + "dia", + "di", + "inkhudawadi", + "inhanifirohingya", + "diak", + "gong", + "ingrantha", + "bidic", "xidstart", #endif /* USE_UNICODE_PROPERTIES */ "xdigit", @@ -39295,18 +43045,12 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "upper", "ascii", #else /* USE_UNICODE_PROPERTIES */ - "osma", - "inkhudawadi", - "inhanifirohingya", - "gong", - "ingrantha", - "bidic", "mong", "cased", - "incyrillicextendedc", "inhiragana", "sinhala", "adlm", + "xsux", "glagolitic", "sterm", "bamu", @@ -39314,6 +43058,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "inosage", "gunjalagondi", "phoenician", + "inolduyghur", "multani", "kaithi", "joincontrol", @@ -39330,17 +43075,20 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "inogham", "cher", "chakma", + "inkaktoviknumerals", "emoji", "insiddham", "cherokee", "khar", "inmongolian", + "innagmundari", "incherokeesupplement", - "diacritic", "manichaean", - "xsux", "inolchiki", + "inkhitansmallscript", "quotationmark", + "vithkuqi", + "variationselector", "adlam", "inethiopic", "graphemebase", @@ -39349,21 +43097,25 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "age=12.1", "age=10.0", "age=12.0", + "age=13.0", + "age=1.1", #endif /* USE_UNICODE_AGE_PROPERTIES */ "casedletter", "ingurmukhi", - "odi", +#ifdef USE_UNICODE_AGE_PROPERTIES + "age=2.1", +#endif /* USE_UNICODE_AGE_PROPERTIES */ "incjkunifiedideographsextensiona", #ifdef USE_UNICODE_AGE_PROPERTIES - "age=1.1", + "age=2.0", #endif /* USE_UNICODE_AGE_PROPERTIES */ "lu", #ifdef USE_UNICODE_AGE_PROPERTIES - "age=4.1", - "age=2.1", - "age=4.0", - "age=2.0", + "age=3.1", "age=9.0", + "age=3.0", + "age=3.2", + "age=8.0", #endif /* USE_UNICODE_AGE_PROPERTIES */ "intamilsupplement", #ifdef USE_UNICODE_AGE_PROPERTIES @@ -39373,23 +43125,28 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = #ifdef USE_UNICODE_AGE_PROPERTIES "age=6.0", "age=6.2", - "age=3.1", - "age=8.0", - "age=3.0", - "age=3.2", + "age=15.0", + "age=7.0", + "age=6.3", #endif /* USE_UNICODE_AGE_PROPERTIES */ "cwt", #ifdef USE_UNICODE_AGE_PROPERTIES - "age=7.0", + "age=14.0", #endif /* USE_UNICODE_AGE_PROPERTIES */ "unassigned", #ifdef USE_UNICODE_AGE_PROPERTIES - "age=6.3", "age=5.1", "age=5.0", "age=5.2", +#endif /* USE_UNICODE_AGE_PROPERTIES */ + "diacritic", +#ifdef USE_UNICODE_AGE_PROPERTIES + "age=4.1", #endif /* USE_UNICODE_AGE_PROPERTIES */ "ahom", +#ifdef USE_UNICODE_AGE_PROPERTIES + "age=4.0", +#endif /* USE_UNICODE_AGE_PROPERTIES */ "incjkunifiedideographsextensione", "khmr", "insinhala", @@ -39400,18 +43157,21 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "punct", "paucinhau", "gurmukhi", - "variationselector", + "chorasmian", "logicalorderexception", "khmer", "limbu", + "chrs", + "oriya", "inscriptionalpahlavi", - "oidc", + "incyrillicextendedd", "incjkunifiedideographsextensionc", #endif /* USE_UNICODE_PROPERTIES */ "cntrl", -#ifdef USE_UNICODE_PROPERTIES +#ifndef USE_UNICODE_PROPERTIES + "space", +#else /* USE_UNICODE_PROPERTIES */ "inlatinextendedadditional", - "decimalnumber", "insorasompeng", "radical", "emojimodifier", @@ -39419,103 +43179,90 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "n", "math", "goth", + "phnx", "anatolianhieroglyphs", "inenclosedalphanumerics", "nandinagari", "no", + "intangsa", "nko", "nkoo", "ingreekandcoptic", - "olck", "p", "grantha", - "olchiki", + "decimalnumber", "incjkunifiedideographs", - "zanb", "intirhuta", - "oids", "inhatran", "linb", - "xpeo", "mult", "saurashtra", "kthi", + "zanb", "inbhaiksuki", - "olower", "innabataean", "inphoenician", + "xpeo", "inkanbun", "inmeroitichieroglyphs", - "inkayahli", - "phnx", - "inoriya", + "ahex", "enclosingmark", "sd", "inelbasan", - "wara", "inenclosedideographicsupplement", "sidd", "linearb", - "hani", - "han", + "cpmn", "inenclosedalphanumericsupplement", - "medf", "bidicontrol", - "hano", "inphaistosdisc", "limb", "inkangxiradicals", "lepc", - "medefaidrin", "braille", "regionalindicator", "inlowsurrogates", - "inshorthandformatcontrols", "brah", - "inkhojki", "inoldhungarian", - "hanunoo", - "hira", "beng", "emojimodifierbase", "inarabic", - "lyci", - "ahex", + "osage", "inherited", + "incyprominoan", "glag", - "lycian", + "medf", + "osma", "indogra", - "dsrt", "arab", - "mymr", - "myanmar", + "medefaidrin", + "inshorthandformatcontrols", "phli", "inimperialaramaic", + "emod", "ingreekextended", "inanatolianhieroglyphs", "punctuation", - "takri", "graphemeextend", - "invai", "cwl", + "vith", "ingeometricshapes", "emojicomponent", + "dsrt", "coptic", - "deseret", + "inkayahli", + "inoriya", "inarabicpresentationformsa", - "takr", "inbasiclatin", "incjkunifiedideographsextensiond", + "wara", "sinh", "sund", "shavian", - "taile", "insundanesesupplement", - "inelymaic", - "insoyombo", + "inyezidi", "bhks", "bhaiksuki", - "incjkcompatibility", "inhanunoo", "intangut", "sogdian", @@ -39524,381 +43271,432 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents = "insinhalaarchaicnumbers", "ideographic", "ugar", + "deseret", + "odi", "copt", "imperialaramaic", "insogdian", "indingbats", "format", "ininscriptionalpahlavi", + "lyci", "ininscriptionalparthian", "grbase", + "lycian", "inbatak", "cprt", - "cwcf", - "cuneiform", - "term", + "inunifiedcanadianaboriginalsyllabicsextendeda", + "mymr", + "myanmar", "intibetan", "intags", "asciihexdigit", "sentenceterminal", - "inmayannumerals", "nand", - "patsyn", - "hatran", "inblockelements", "inornamentaldingbats", + "inethiopicextendeda", "innumberforms", - "oldpersian", - "inshavian", + "cwcf", + "oidc", "bopo", - "hatr", + "cuneiform", "caseignorable", "inoldpersian", - "modifierletter", "cwu", - "lydi", - "inbyzantinemusicalsymbols", + "inelymaic", + "insoyombo", "ingeometricshapesextended", + "incjkcompatibility", "inmyanmarextendedb", "innushu", - "lydian", - "inunifiedcanadianaboriginalsyllabics", - "orkh", - "inyiradicals", + "inkanaextendedb", + "olck", + "inbyzantinemusicalsymbols", + "olchiki", "inkatakanaphoneticextensions", - "inethiopicextendeda", "incoptic", + "oids", "inarabicextendeda", - "oldpermic", + "modifierletter", "incjksymbolsandpunctuation", - "word", + "olower", "bopomofo", - "ogam", "inlisu", "inoldpermic", "innoblock", - "taiviet", + "ext", + "inunifiedcanadianaboriginalsyllabics", + "takri", "inbraillepatterns", + "invai", "alpha", "inbalinese", "sorasompeng", "closepunctuation", + "hani", + "inmayannumerals", + "han", "inmiscellaneousmathematicalsymbolsb", "inlepcha", - "insyriacsupplement", - "newa", - "spacingmark", - "inpalmyrene", - "cyrl", - "assigned", - "mlym", - "malayalam", - "ext", - "newtailue", -#endif /* USE_UNICODE_PROPERTIES */ - "space", -#ifdef USE_UNICODE_PROPERTIES - "intelugu", - "idsb", - "indevanagari", - "avestan", - "cf", - "palmyrene", - "inethiopicsupplement", - "soyo", + "patsyn", + "inlisusupplement", + "insyriacsupplement", + "hano", + "newa", + "spacingmark", + "inpalmyrene", + "takr", #endif /* USE_UNICODE_PROPERTIES */ "xposixpunct", #ifndef USE_UNICODE_PROPERTIES "lower", #else /* USE_UNICODE_PROPERTIES */ - "pf", + "inkhojki", + "taile", + "assigned", + "hanunoo", + "hira", + "inarabicextendedc", + "newtailue", + "space", + "intelugu", + "lydi", + "idsb", + "extpict", + "lydian", + "inethiopicsupplement", "sarb", - "zanabazarsquare", "ugaritic", - "osge", - "java", + "inyiradicals", + "inphoneticextensions", "sharada", - "dogra", + "zanabazarsquare", "bugi", - "meroitichieroglyphs", + "word", + "term", "separator", "ingeorgiansupplement", "sogd", - "tale", - "inunifiedcanadianaboriginalsyllabicsextended", - "terminalpunctuation", + "extender", "shrd", #endif /* USE_UNICODE_PROPERTIES */ "graph", #ifdef USE_UNICODE_PROPERTIES - "olditalic", - "dogr", - "gujr", + "tnsa", + "tangsa", "phag", - "gujarati", + "dogra", "inhanguljamo", - "javanese", - "taml", - "inphoneticextensions", + "inshavian", "siddham", + "cf", + "inunifiedcanadianaboriginalsyllabicsextended", "buginese", "inmongoliansupplement", - "invariationselectors", + "cyrl", "inhanguljamoextendeda", - "inverticalforms", - "syrc", + "pf", "number", + "inphoneticextensionssupplement", + "dogr", + "mlym", "incopticepactnumbers", - "avst", + "malayalam", "inbamum", "nd", "insuttonsignwriting", - "extender", - "intaiviet", - "hex", - "incjkunifiedideographsextensionf", - "other", - "otheridcontinue", + "inethiopicextended", "shaw", - "dash", - "othernumber", - "orya", - "invedicextensions", + "palmyrene", + "soyo", + "incjkunifiedideographsextensionh", "sgnw", + "toto", "caucasianalbanian", "inmathematicalalphanumericsymbols", - "inphoneticextensionssupplement", - "invariationselectorssupplement", + "incjkunifiedideographsextensiong", + "hatran", + "taiviet", + "meroitichieroglyphs", + "ingeorgianextended", + "incjkunifiedideographsextensionf", + "oldpersian", "induployan", - "syriac", - "oalpha", + "incyrillicextendedb", + "dash", + "hatr", "innyiakengpuachuehmong", "incombiningdiacriticalmarks", - "inethiopicextended", "nl", "incombiningdiacriticalmarksforsymbols", "khudawadi", - "otheralphabetic", - "oldhungarian", - "incurrencysymbols", "incjkradicalssupplement", "inglagolitic", - "intifinagh", - "ingeorgianextended", + "orkh", + "syrc", "surrogate", - "incyrillicextendedb", + "indevanagari", + "avestan", + "oldpermic", "ethi", - "titlecaseletter", + "ogam", "rohg", - "inmeroiticcursive", "idstrinaryoperator", + "java", "inphagspa", "lepcha", + "indevanagariextendeda", + "intifinagh", "intagalog", - "mathsymbol", "incombiningdiacriticalmarkssupplement", + "tale", "inbrahmi", + "terminalpunctuation", "insymbolsandpictographsextendeda", - "inlinearbsyllabary", - "oldturkic", + "syriac", "inbengali", - "wancho", - "osmanya", + "nagm", + "extendedpictographic", "buhd", - "insmallformvariants", - "indevanagariextended", - "softdotted", + "javanese", + "taml", "inbuginese", - "mahj", "inlatin1supplement", "ingothic", - "mahajani", - "hang", - "sylo", - "warangciti", - "ingujarati", - "tirhuta", + "invariationselectors", + "hex", + "inverticalforms", + "ebase", + "incurrencysymbols", + "avst", + "osge", "incombiningdiacriticalmarksextended", + "intaiviet", "spaceseparator", - "ingunjalagondi", - "wcho", - "hiragana", - "extendedpictographic", - "inrejang", - "inottomansiyaqnumbers", + "softdotted", "nchar", - "cyrillic", - "khoj", + "invedicextensions", "inlimbu", - "hmng", - "thaa", - "thai", + "olditalic", + "gujr", + "mathsymbol", "incjkunifiedideographsextensionb", - "deva", - "thaana", + "gujarati", "phagspa", - "devanagari", - "tang", + "invariationselectorssupplement", "currencysymbol", - "tagbanwa", - "inenclosedcjklettersandmonths", - "tamil", - "tirh", + "inlinearbsyllabary", + "wancho", + "inpaucinhau", + "other", + "otheridcontinue", + "sylo", + "zp", + "inaegeannumbers", + "warangciti", + "othernumber", #endif /* USE_UNICODE_PROPERTIES */ "digit", #ifndef USE_UNICODE_PROPERTIES "blank" #else /* USE_UNICODE_PROPERTIES */ - "talu", - "zp", - "inpaucinhau", - "taitham", - "otherlowercase", - "telu", - "inaegeannumbers", - "otherletter", - "whitespace", "nonspacingmark", + "titlecaseletter", + "inmeroiticcursive", + "wcho", "graphemeclusterbreak=spacingmark", "inletterlikesymbols", + "inottomansiyaqnumbers", "intagbanwa", - "oldsogdian", - "otheridstart", + "cyrillic", + "oalpha", "graphemeclusterbreak=cr", "narb", "changeswhencasemapped", "inbopomofo", - "tangut", "graphemeclusterbreak=regionalindicator", + "otheralphabetic", "noncharactercodepoint", - "otheruppercase", - "rjng", - "sylotinagri", + "oldhungarian", + "insymbolsforlegacycomputing", + "insmallformvariants", "inhangulsyllables", "emojipresentation", - "inindicsiyaqnumbers", + "epres", "inbassavah", - "ogrext", - "othersymbol", - "oupper", + "indevanagariextended", "inbuhid", - "hmnp", + "tirhuta", "inpsalterpahlavi", + "whitespace", "finalpunctuation", + "orya", "phlp", "inbamumsupplement", "buhid", "paragraphseparator", "inalphabeticpresentationforms", - "omath", - "any", + "inlatinextendedg", "elba", "changeswhentitlecased", "incombininghalfmarks", "intangutcomponents", - "hebr", - "deprecated", + "thaa", + "thai", + "oldturkic", + "thaana", + "inlatinextendedf", + "ougr", + "tang", "inarabicmathematicalalphabeticsymbols", - "inprivateusearea", - "kayahli", - "inplayingcards", + "tagbanwa", + "tamil", + "khitansmallscript", + "mahj", + "mahajani", + "hang", + "tirh", + "sylotinagri", + "talu", + "nagmundari", + "deva", + "ingujarati", + "deprecated", "inarabicpresentationformsb", - "ogham", - "elym", + "devanagari", + "ingunjalagondi", "graphemeclusterbreak=t", "graphemeclusterbreak=lvt", + "taitham", "nbat", + "telu", + "hiragana", "nabataean", - "hangul", - "elymaic", + "inrejang", + "intangutsupplement", + "khoj", + "hmng", + "cyprominoan", "inhebrew", - "injavanese", - "symbol", "inmathematicaloperators", "inarabicsupplement", - "cypriot", - "hung", - "wspace", + "inenclosedcjklettersandmonths", "changeswhenlowercased", + "tangut", "elbasan", - "hluw", + "osmanya", "insuperscriptsandsubscripts", "graphemeclusterbreak=extend", "graphemeclusterbreak=prepend", "nshu", - "oldnortharabian", - "inyijinghexagramsymbols", - "hexdigit", + "otherlowercase", + "inethiopicextendedb", + "otherletter", + "kayahli", + "inplayingcards", + "elym", "graphemeclusterbreak=l", "graphemeclusterbreak=control", - "bassavah", - "otherdefaultignorablecodepoint", + "ogrext", + "elymaic", "changeswhenuppercased", "inalchemicalsymbols", + "oldsogdian", + "otheridstart", "insupplementalarrowsa", - "inyisyllables", - "tibt", - "othermath", - "tibetan", - "inmahjongtiles", + "invithkuqi", + "symbol", + "inarabicextendedb", + "cypriot", + "any", + "otheruppercase", + "rjng", + "wspace", + "inindicsiyaqnumbers", + "inprivateusearea", + "othersymbol", + "oupper", "signwriting", "nushu", - "modifiersymbol", - "inhalfwidthandfullwidthforms", + "hmnp", "upper", "insupplementalarrowsc", + "omath", + "modifiersymbol", + "hebr", + "inhalfwidthandfullwidthforms", "insupplementalmathematicaloperators", - "incypriotsyllabary", - "dupl", - "tavt", "inpahawhhmong", "alphabetic", - "dashpunctuation", "uppercase", - "soyombo", - "hanifirohingya", - "otherpunctuation", - "defaultignorablecodepoint", + "dupl", + "ogham", + "dashpunctuation", + "hangul", "inhanguljamoextendedb", + "bassavah", "aghb", - "tifinagh", + "hung", + "hexdigit", + "incypriotsyllabary", + "indivesakuru", + "tibt", "inlatinextendedb", - "tfng", + "hluw", + "tibetan", + "inyisyllables", + "oldnortharabian", + "defaultignorablecodepoint", "inhighprivateusesurrogates", + "soyombo", + "otherdefaultignorablecodepoint", + "pahawhhmong", + "unifiedideograph", + "othermath", "changeswhencasefolded", + "inmahjongtiles", "dep", - "oldsoutharabian", + "divesakuru", "graphemeclusterbreak=lf", - "pahawhhmong", - "unifiedideograph", "uppercaseletter", "insupplementalpunctuation", "ethiopic", + "inyijinghexagramsymbols", + "ecomp", "inglagoliticsupplement", - "rejang", "inbopomofoextended", - "tagb", - "othergraphemeextend", + "injavanese", + "otherpunctuation", + "tifinagh", + "tfng", + "hanifirohingya", + "tavt", + "inboxdrawing", + "oldsoutharabian", "inegyptianhieroglyphs", "inegyptianhieroglyphformatcontrols", - "hebrew", + "tagb", + "rejang", "tglg", "tagalog", - "graphemeclusterbreak=zwj", - "zyyy", - "hyphen", - "inboxdrawing", + "othergraphemeextend", + "insupplementaryprivateuseareaa", + "inhighsurrogates", + "hebrew", + "duployan", "graphemeclusterbreak=v", "graphemeclusterbreak=lv", + "insupplementalarrowsb", + "graphemeclusterbreak=zwj", "telugu", - "duployan", + "zyyy", + "olduyghur", + "inhangulcompatibilityjamo", "openpunctuation", - "insupplementaryprivateuseareaa", - "inhighsurrogates", - "insupplementalarrowsb", + "hyphen", "insupplementalsymbolsandpictographs", "egyp", - "inhangulcompatibilityjamo", "nyiakengpuachuehmong", "egyptianhieroglyphs", "insupplementaryprivateuseareab" @@ -39918,8 +43716,7 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str17), 111}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str22), 152}, - {-1}, - {uniname2ctype_offset(str24), 52}, + {-1}, {-1}, {uniname2ctype_offset(str25), 184}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str33), 218}, @@ -39933,14 +43730,14 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str48), 95}, {uniname2ctype_offset(str49), 95}, {-1}, {-1}, - {uniname2ctype_offset(str52), 331}, + {uniname2ctype_offset(str52), 346}, {-1}, {-1}, {uniname2ctype_offset(str55), 21}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str64), 44}, {-1}, - {uniname2ctype_offset(str66), 319}, - {uniname2ctype_offset(str67), 267}, + {uniname2ctype_offset(str66), 333}, + {uniname2ctype_offset(str67), 52}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str71), 181}, {-1}, {-1}, {-1}, @@ -39949,15 +43746,17 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str83), 184}, {-1}, {-1}, {uniname2ctype_offset(str86), 31}, - {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str90), 230}, + {-1}, {uniname2ctype_offset(str92), 45}, {-1}, {uniname2ctype_offset(str94), 33}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str100), 149}, - {uniname2ctype_offset(str101), 496}, + {uniname2ctype_offset(str101), 513}, {uniname2ctype_offset(str102), 108}, - {uniname2ctype_offset(str103), 252}, + {uniname2ctype_offset(str103), 263}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str107), 31}, {uniname2ctype_offset(str108), 77}, @@ -39976,25 +43775,27 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str130), 42}, {uniname2ctype_offset(str131), 172}, {-1}, {-1}, - {uniname2ctype_offset(str134), 482}, + {uniname2ctype_offset(str134), 497}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str139), 170}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str145), 499}, - {uniname2ctype_offset(str146), 548}, + {uniname2ctype_offset(str145), 516}, + {uniname2ctype_offset(str146), 575}, {-1}, - {uniname2ctype_offset(str148), 552}, - {uniname2ctype_offset(str149), 514}, + {uniname2ctype_offset(str148), 580}, + {uniname2ctype_offset(str149), 535}, {-1}, {uniname2ctype_offset(str151), 18}, {uniname2ctype_offset(str152), 169}, {uniname2ctype_offset(str153), 160}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str161), 313}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str158), 278}, + {-1}, {-1}, + {uniname2ctype_offset(str161), 327}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str177), 337}, - {uniname2ctype_offset(str178), 539}, + {uniname2ctype_offset(str177), 352}, + {uniname2ctype_offset(str178), 563}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str183), 75}, {-1}, {-1}, @@ -40003,18 +43804,19 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str190), 208}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str203), 345}, - {uniname2ctype_offset(str204), 473}, + {uniname2ctype_offset(str203), 360}, + {uniname2ctype_offset(str204), 488}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str210), 553}, + {uniname2ctype_offset(str210), 581}, {-1}, - {uniname2ctype_offset(str212), 350}, + {uniname2ctype_offset(str212), 365}, {uniname2ctype_offset(str213), 115}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str218), 528}, + {uniname2ctype_offset(str218), 549}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str226), 171}, - {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str230), 530}, {uniname2ctype_offset(str231), 31}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str236), 25}, @@ -40026,90 +43828,90 @@ uniname2ctype_p (register const char *str, register size_t len) {-1}, {-1}, {uniname2ctype_offset(str253), 102}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str260), 542}, + {uniname2ctype_offset(str260), 568}, {-1}, {-1}, {uniname2ctype_offset(str263), 161}, {-1}, {uniname2ctype_offset(str265), 19}, {-1}, {uniname2ctype_offset(str267), 79}, - {uniname2ctype_offset(str268), 342}, + {uniname2ctype_offset(str268), 357}, {-1}, - {uniname2ctype_offset(str270), 259}, + {uniname2ctype_offset(str270), 270}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str274), 541}, - {uniname2ctype_offset(str275), 500}, + {uniname2ctype_offset(str274), 567}, + {uniname2ctype_offset(str275), 517}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str281), 307}, + {uniname2ctype_offset(str281), 321}, {uniname2ctype_offset(str282), 40}, {uniname2ctype_offset(str283), 79}, {-1}, - {uniname2ctype_offset(str285), 516}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str289), 536}, + {uniname2ctype_offset(str285), 537}, + {-1}, + {uniname2ctype_offset(str287), 144}, + {uniname2ctype_offset(str288), 144}, + {uniname2ctype_offset(str289), 560}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str293), 218}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str297), 212}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str301), 380}, + {uniname2ctype_offset(str301), 395}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str311), 311}, + {uniname2ctype_offset(str311), 325}, {-1}, - {uniname2ctype_offset(str313), 441}, + {uniname2ctype_offset(str313), 456}, {-1}, - {uniname2ctype_offset(str315), 232}, + {uniname2ctype_offset(str315), 243}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str320), 260}, + {uniname2ctype_offset(str320), 271}, {-1}, {uniname2ctype_offset(str322), 129}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str328), 320}, + {uniname2ctype_offset(str328), 334}, {-1}, {-1}, {uniname2ctype_offset(str331), 76}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str335), 537}, + {uniname2ctype_offset(str335), 561}, {-1}, {-1}, - {uniname2ctype_offset(str338), 318}, + {uniname2ctype_offset(str338), 332}, {-1}, {uniname2ctype_offset(str340), 76}, {-1}, - {uniname2ctype_offset(str342), 334}, + {uniname2ctype_offset(str342), 349}, {-1}, {-1}, {uniname2ctype_offset(str345), 53}, - {uniname2ctype_offset(str346), 259}, + {uniname2ctype_offset(str346), 270}, {-1}, - {uniname2ctype_offset(str348), 411}, + {uniname2ctype_offset(str348), 426}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str352), 512}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str357), 532}, - {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str352), 533}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str362), 163}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str366), 44}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str373), 160}, - {-1}, {-1}, - {uniname2ctype_offset(str376), 144}, - {uniname2ctype_offset(str377), 144}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str386), 356}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str381), 554}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str386), 371}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str399), 316}, + {uniname2ctype_offset(str399), 330}, {-1}, - {uniname2ctype_offset(str401), 527}, + {uniname2ctype_offset(str401), 548}, {-1}, {-1}, {uniname2ctype_offset(str404), 81}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str411), 55}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str418), 108}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str426), 163}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str430), 55}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {uniname2ctype_offset(str442), 14}, {-1}, {-1}, {uniname2ctype_offset(str445), 23}, @@ -40121,172 +43923,180 @@ uniname2ctype_p (register const char *str, register size_t len) {-1}, {uniname2ctype_offset(str470), 22}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str475), 507}, + {uniname2ctype_offset(str475), 524}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str480), 442}, + {uniname2ctype_offset(str480), 457}, {uniname2ctype_offset(str481), 188}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str486), 461}, + {uniname2ctype_offset(str486), 476}, {-1}, - {uniname2ctype_offset(str488), 557}, + {uniname2ctype_offset(str488), 588}, {-1}, {-1}, - {uniname2ctype_offset(str491), 455}, + {uniname2ctype_offset(str491), 470}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str500), 127}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str504), 187}, - {uniname2ctype_offset(str505), 238}, + {uniname2ctype_offset(str505), 249}, {uniname2ctype_offset(str506), 24}, {-1}, {-1}, {uniname2ctype_offset(str509), 24}, {-1}, - {uniname2ctype_offset(str511), 448}, + {uniname2ctype_offset(str511), 463}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str520), 408}, + {uniname2ctype_offset(str520), 423}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str535), 70}, - {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str533), 230}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str538), 91}, {-1}, {-1}, - {uniname2ctype_offset(str541), 531}, + {uniname2ctype_offset(str541), 553}, {-1}, {uniname2ctype_offset(str543), 91}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str556), 525}, - {-1}, - {uniname2ctype_offset(str558), 335}, + {uniname2ctype_offset(str556), 546}, {-1}, - {uniname2ctype_offset(str560), 498}, + {uniname2ctype_offset(str558), 350}, + {uniname2ctype_offset(str559), 70}, + {uniname2ctype_offset(str560), 515}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str565), 586}, + {uniname2ctype_offset(str565), 624}, {uniname2ctype_offset(str566), 37}, {-1}, {uniname2ctype_offset(str568), 113}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str572), 486}, + {uniname2ctype_offset(str572), 502}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str577), 573}, - {uniname2ctype_offset(str578), 70}, + {uniname2ctype_offset(str577), 611}, + {-1}, {uniname2ctype_offset(str579), 106}, {-1}, {-1}, - {uniname2ctype_offset(str582), 391}, - {uniname2ctype_offset(str583), 465}, + {uniname2ctype_offset(str582), 406}, + {uniname2ctype_offset(str583), 480}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str590), 74}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str594), 168}, {-1}, - {uniname2ctype_offset(str596), 584}, + {uniname2ctype_offset(str596), 622}, {uniname2ctype_offset(str597), 146}, {-1}, {-1}, - {uniname2ctype_offset(str600), 475}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str604), 551}, - {uniname2ctype_offset(str605), 591}, + {uniname2ctype_offset(str600), 490}, + {-1}, + {uniname2ctype_offset(str602), 70}, + {-1}, + {uniname2ctype_offset(str604), 579}, + {uniname2ctype_offset(str605), 629}, {-1}, {-1}, - {uniname2ctype_offset(str608), 598}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str614), 574}, + {uniname2ctype_offset(str608), 637}, + {uniname2ctype_offset(str609), 229}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str614), 612}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str624), 195}, - {uniname2ctype_offset(str625), 432}, + {uniname2ctype_offset(str625), 447}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str630), 29}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str636), 522}, + {uniname2ctype_offset(str636), 543}, {-1}, {-1}, {uniname2ctype_offset(str639), 49}, {-1}, {-1}, {uniname2ctype_offset(str642), 19}, - {-1}, {-1}, - {uniname2ctype_offset(str645), 470}, + {uniname2ctype_offset(str643), 564}, + {-1}, + {uniname2ctype_offset(str645), 485}, {-1}, {uniname2ctype_offset(str647), 192}, {-1}, {-1}, - {uniname2ctype_offset(str650), 472}, + {uniname2ctype_offset(str650), 487}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str657), 51}, {-1}, {-1}, - {uniname2ctype_offset(str660), 257}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str668), 69}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str672), 321}, + {uniname2ctype_offset(str660), 268}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str672), 335}, {-1}, {-1}, {uniname2ctype_offset(str675), 68}, {-1}, {-1}, {uniname2ctype_offset(str678), 171}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str695), 530}, + {uniname2ctype_offset(str679), 607}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str683), 267}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str692), 69}, + {-1}, {-1}, + {uniname2ctype_offset(str695), 551}, {uniname2ctype_offset(str696), 175}, - {uniname2ctype_offset(str697), 384}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str703), 508}, + {uniname2ctype_offset(str697), 399}, + {-1}, {-1}, + {uniname2ctype_offset(str700), 236}, + {-1}, {-1}, + {uniname2ctype_offset(str703), 527}, {-1}, - {uniname2ctype_offset(str705), 332}, + {uniname2ctype_offset(str705), 347}, {-1}, {uniname2ctype_offset(str707), 158}, - {uniname2ctype_offset(str708), 556}, + {uniname2ctype_offset(str708), 587}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str713), 361}, + {uniname2ctype_offset(str713), 376}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str720), 72}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str737), 7}, - {uniname2ctype_offset(str738), 358}, + {uniname2ctype_offset(str738), 373}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str742), 6}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, - {uniname2ctype_offset(str753), 229}, + {-1}, {-1}, + {uniname2ctype_offset(str745), 269}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str753), 240}, {-1}, - {uniname2ctype_offset(str755), 497}, + {uniname2ctype_offset(str755), 514}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str760), 416}, + {uniname2ctype_offset(str760), 431}, {uniname2ctype_offset(str761), 167}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str766), 156}, - {uniname2ctype_offset(str767), 572}, + {uniname2ctype_offset(str767), 608}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str771), 167}, - {uniname2ctype_offset(str772), 256}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str776), 257}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str776), 268}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str783), 156}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str787), 245}, + {uniname2ctype_offset(str787), 256}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str791), 193}, {-1}, {-1}, - {uniname2ctype_offset(str794), 558}, + {uniname2ctype_offset(str794), 589}, {-1}, {-1}, {uniname2ctype_offset(str797), 50}, {-1}, - {uniname2ctype_offset(str799), 579}, + {uniname2ctype_offset(str799), 617}, {-1}, {-1}, {uniname2ctype_offset(str802), 13}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str809), 431}, + {uniname2ctype_offset(str803), 593}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str809), 446}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str814), 478}, + {uniname2ctype_offset(str814), 493}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str818), 383}, + {uniname2ctype_offset(str818), 398}, {-1}, {-1}, - {uniname2ctype_offset(str821), 467}, - {uniname2ctype_offset(str822), 563}, + {uniname2ctype_offset(str821), 482}, + {uniname2ctype_offset(str822), 595}, {uniname2ctype_offset(str823), 47}, {uniname2ctype_offset(str824), 112}, - {uniname2ctype_offset(str825), 429}, + {uniname2ctype_offset(str825), 444}, {-1}, {-1}, - {uniname2ctype_offset(str828), 564}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str834), 258}, - {-1}, {-1}, {-1}, + {uniname2ctype_offset(str828), 596}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str838), 157}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str842), 58}, @@ -40298,32 +44108,32 @@ uniname2ctype_p (register const char *str, register size_t len) {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str855), 67}, {-1}, - {uniname2ctype_offset(str857), 305}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str862), 88}, + {uniname2ctype_offset(str857), 319}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str875), 354}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str875), 369}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str886), 389}, + {uniname2ctype_offset(str886), 404}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str895), 397}, + {uniname2ctype_offset(str895), 412}, {-1}, {-1}, - {uniname2ctype_offset(str898), 485}, + {uniname2ctype_offset(str898), 500}, {-1}, - {uniname2ctype_offset(str900), 583}, + {uniname2ctype_offset(str900), 621}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str906), 504}, - {uniname2ctype_offset(str907), 434}, + {uniname2ctype_offset(str906), 521}, + {uniname2ctype_offset(str907), 449}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str920), 419}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str924), 68}, + {uniname2ctype_offset(str925), 599}, + {uniname2ctype_offset(str926), 344}, {-1}, - {uniname2ctype_offset(str926), 329}, - {-1}, - {uniname2ctype_offset(str928), 519}, - {uniname2ctype_offset(str929), 446}, + {uniname2ctype_offset(str928), 540}, + {uniname2ctype_offset(str929), 461}, {uniname2ctype_offset(str930), 41}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, @@ -40332,206 +44142,226 @@ uniname2ctype_p (register const char *str, register size_t len) {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str961), 2}, {-1}, - {uniname2ctype_offset(str963), 246}, + {uniname2ctype_offset(str963), 257}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str974), 493}, + {uniname2ctype_offset(str974), 510}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str986), 355}, + {uniname2ctype_offset(str986), 370}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str994), 85}, {uniname2ctype_offset(str995), 104}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1005), 53}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1009), 404}, + {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1010), 26}, {-1}, {-1}, - {uniname2ctype_offset(str1013), 480}, - {uniname2ctype_offset(str1014), 566}, - {uniname2ctype_offset(str1015), 469}, + {uniname2ctype_offset(str1013), 495}, + {-1}, + {uniname2ctype_offset(str1015), 484}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1021), 67}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1025), 444}, + {-1}, {-1}, + {uniname2ctype_offset(str1024), 53}, + {uniname2ctype_offset(str1025), 459}, {-1}, {-1}, {uniname2ctype_offset(str1028), 136}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1032), 239}, - {uniname2ctype_offset(str1033), 71}, - {-1}, - {uniname2ctype_offset(str1035), 308}, - {uniname2ctype_offset(str1036), 543}, + {uniname2ctype_offset(str1032), 380}, + {-1}, {-1}, + {uniname2ctype_offset(str1035), 322}, + {uniname2ctype_offset(str1036), 569}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1049), 173}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1067), 102}, - {-1}, {-1}, - {uniname2ctype_offset(str1070), 115}, - {-1}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1072), 197}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1080), 210}, - {uniname2ctype_offset(str1081), 399}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1081), 414}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1085), 248}, + {uniname2ctype_offset(str1085), 259}, {-1}, - {uniname2ctype_offset(str1087), 567}, - {-1}, {-1}, - {uniname2ctype_offset(str1090), 69}, - {uniname2ctype_offset(str1091), 11}, + {uniname2ctype_offset(str1087), 600}, {-1}, - {uniname2ctype_offset(str1093), 125}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1097), 520}, + {uniname2ctype_offset(str1089), 115}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1095), 250}, + {uniname2ctype_offset(str1096), 71}, + {uniname2ctype_offset(str1097), 541}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1102), 506}, - {-1}, {-1}, + {uniname2ctype_offset(str1102), 523}, + {-1}, + {uniname2ctype_offset(str1104), 228}, {uniname2ctype_offset(str1105), 217}, {-1}, - {uniname2ctype_offset(str1107), 521}, + {uniname2ctype_offset(str1107), 542}, {-1}, - {uniname2ctype_offset(str1109), 228}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1109), 239}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1114), 69}, + {uniname2ctype_offset(str1115), 11}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str1119), 106}, {uniname2ctype_offset(str1120), 60}, - {uniname2ctype_offset(str1121), 365}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1134), 410}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1134), 425}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1140), 93}, {-1}, {uniname2ctype_offset(str1142), 206}, - {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str1145), 137}, {uniname2ctype_offset(str1146), 131}, - {uniname2ctype_offset(str1147), 255}, + {uniname2ctype_offset(str1147), 266}, {-1}, {uniname2ctype_offset(str1149), 158}, {uniname2ctype_offset(str1150), 98}, - {uniname2ctype_offset(str1151), 483}, + {uniname2ctype_offset(str1151), 498}, {uniname2ctype_offset(str1152), 217}, {uniname2ctype_offset(str1153), 138}, - {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str1156), 529}, {uniname2ctype_offset(str1157), 203}, {uniname2ctype_offset(str1158), 166}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1164), 229}, + {uniname2ctype_offset(str1164), 240}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1168), 104}, {-1}, - {uniname2ctype_offset(str1170), 374}, - {uniname2ctype_offset(str1171), 515}, + {uniname2ctype_offset(str1170), 389}, + {uniname2ctype_offset(str1171), 536}, {-1}, {-1}, - {uniname2ctype_offset(str1174), 312}, + {uniname2ctype_offset(str1174), 326}, {uniname2ctype_offset(str1175), 26}, {uniname2ctype_offset(str1176), 208}, {uniname2ctype_offset(str1177), 74}, - {uniname2ctype_offset(str1178), 338}, + {uniname2ctype_offset(str1178), 353}, {-1}, {uniname2ctype_offset(str1180), 183}, {uniname2ctype_offset(str1181), 151}, - {uniname2ctype_offset(str1182), 344}, + {uniname2ctype_offset(str1182), 359}, {uniname2ctype_offset(str1183), 101}, {-1}, {uniname2ctype_offset(str1185), 170}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1190), 261}, - {uniname2ctype_offset(str1191), 524}, + {uniname2ctype_offset(str1186), 597}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1190), 272}, + {uniname2ctype_offset(str1191), 545}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1197), 101}, {uniname2ctype_offset(str1198), 135}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1203), 351}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1207), 447}, - {uniname2ctype_offset(str1208), 239}, - {uniname2ctype_offset(str1209), 186}, - {uniname2ctype_offset(str1210), 137}, + {uniname2ctype_offset(str1203), 366}, + {uniname2ctype_offset(str1204), 609}, + {-1}, {-1}, + {uniname2ctype_offset(str1207), 462}, {-1}, - {uniname2ctype_offset(str1212), 364}, + {uniname2ctype_offset(str1209), 186}, + {-1}, {-1}, + {uniname2ctype_offset(str1212), 379}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1227), 232}, + {-1}, + {uniname2ctype_offset(str1223), 584}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1227), 243}, + {-1}, + {uniname2ctype_offset(str1229), 235}, + {uniname2ctype_offset(str1230), 267}, {uniname2ctype_offset(str1231), 206}, - {uniname2ctype_offset(str1232), 340}, + {uniname2ctype_offset(str1232), 355}, {uniname2ctype_offset(str1233), 73}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1234), 287}, - {uniname2ctype_offset(str1235), 289}, - {uniname2ctype_offset(str1236), 286}, - {uniname2ctype_offset(str1237), 288}, - {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1234), 298}, + {uniname2ctype_offset(str1235), 300}, + {uniname2ctype_offset(str1236), 297}, + {uniname2ctype_offset(str1237), 299}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1241), 301}, + {uniname2ctype_offset(str1242), 279}, #endif /* USE_UNICODE_AGE_PROPERTIES */ {uniname2ctype_offset(str1243), 25}, - {uniname2ctype_offset(str1244), 326}, - {uniname2ctype_offset(str1245), 249}, - {uniname2ctype_offset(str1246), 420}, + {uniname2ctype_offset(str1244), 341}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1247), 268}, + {uniname2ctype_offset(str1245), 281}, +#endif /* USE_UNICODE_AGE_PROPERTIES */ + {uniname2ctype_offset(str1246), 435}, +#ifndef USE_UNICODE_AGE_PROPERTIES + {-1}, +#else /* USE_UNICODE_AGE_PROPERTIES */ + {uniname2ctype_offset(str1247), 280}, #endif /* USE_UNICODE_AGE_PROPERTIES */ {uniname2ctype_offset(str1248), 30}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, {-1}, {-1}, {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1249), 275}, - {uniname2ctype_offset(str1250), 270}, - {uniname2ctype_offset(str1251), 274}, - {uniname2ctype_offset(str1252), 269}, - {uniname2ctype_offset(str1253), 285}, + {uniname2ctype_offset(str1249), 283}, + {uniname2ctype_offset(str1250), 296}, + {uniname2ctype_offset(str1251), 282}, + {uniname2ctype_offset(str1252), 284}, + {uniname2ctype_offset(str1253), 295}, #endif /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1254), 540}, + {uniname2ctype_offset(str1254), 566}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1255), 280}, + {uniname2ctype_offset(str1255), 291}, #endif /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1256), 267}, + {uniname2ctype_offset(str1256), 278}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1257), 279}, - {uniname2ctype_offset(str1258), 281}, - {uniname2ctype_offset(str1259), 272}, - {uniname2ctype_offset(str1260), 284}, - {uniname2ctype_offset(str1261), 271}, - {uniname2ctype_offset(str1262), 273}, + {uniname2ctype_offset(str1257), 290}, + {uniname2ctype_offset(str1258), 292}, + {uniname2ctype_offset(str1259), 303}, + {uniname2ctype_offset(str1260), 294}, + {-1}, + {uniname2ctype_offset(str1262), 293}, #endif /* USE_UNICODE_AGE_PROPERTIES */ {uniname2ctype_offset(str1263), 64}, #ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1264), 283}, {-1}, + {uniname2ctype_offset(str1265), 302}, #endif /* USE_UNICODE_AGE_PROPERTIES */ {uniname2ctype_offset(str1266), 21}, #ifndef USE_UNICODE_AGE_PROPERTIES - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, #else /* USE_UNICODE_AGE_PROPERTIES */ - {uniname2ctype_offset(str1267), 282}, - {uniname2ctype_offset(str1268), 277}, + {uniname2ctype_offset(str1267), 288}, {-1}, - {uniname2ctype_offset(str1270), 276}, - {uniname2ctype_offset(str1271), 278}, + {uniname2ctype_offset(str1269), 287}, + {uniname2ctype_offset(str1270), 289}, +#endif /* USE_UNICODE_AGE_PROPERTIES */ + {uniname2ctype_offset(str1271), 250}, +#ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, +#else /* USE_UNICODE_AGE_PROPERTIES */ + {-1}, + {uniname2ctype_offset(str1273), 286}, #endif /* USE_UNICODE_AGE_PROPERTIES */ {uniname2ctype_offset(str1274), 200}, +#ifndef USE_UNICODE_AGE_PROPERTIES {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1282), 596}, +#else /* USE_UNICODE_AGE_PROPERTIES */ + {uniname2ctype_offset(str1275), 285}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, +#endif /* USE_UNICODE_AGE_PROPERTIES */ + {uniname2ctype_offset(str1282), 635}, {-1}, {-1}, {uniname2ctype_offset(str1285), 105}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1289), 333}, + {uniname2ctype_offset(str1289), 348}, {-1}, {-1}, - {uniname2ctype_offset(str1292), 382}, + {uniname2ctype_offset(str1292), 397}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1297), 145}, {-1}, {-1}, @@ -40543,31 +44373,35 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str1314), 193}, {-1}, {-1}, {uniname2ctype_offset(str1317), 86}, - {-1}, - {uniname2ctype_offset(str1319), 256}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str1328), 227}, {-1}, {-1}, - {uniname2ctype_offset(str1331), 252}, + {uniname2ctype_offset(str1331), 263}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1340), 105}, {-1}, {-1}, {uniname2ctype_offset(str1343), 120}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1349), 227}, + {-1}, {-1}, + {uniname2ctype_offset(str1352), 88}, {-1}, {uniname2ctype_offset(str1354), 164}, - {uniname2ctype_offset(str1355), 254}, - {-1}, {-1}, - {uniname2ctype_offset(str1358), 594}, + {-1}, + {uniname2ctype_offset(str1356), 605}, + {-1}, + {uniname2ctype_offset(str1358), 633}, {-1}, {uniname2ctype_offset(str1360), 3}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1365), 372}, - {uniname2ctype_offset(str1366), 36}, - {uniname2ctype_offset(str1367), 513}, + {uniname2ctype_offset(str1365), 387}, + {-1}, + {uniname2ctype_offset(str1367), 534}, {-1}, - {uniname2ctype_offset(str1369), 247}, + {uniname2ctype_offset(str1369), 258}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1373), 263}, + {uniname2ctype_offset(str1373), 274}, {-1}, {uniname2ctype_offset(str1375), 135}, {-1}, {-1}, {-1}, {-1}, @@ -40576,899 +44410,943 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str1384), 56}, {-1}, {-1}, {uniname2ctype_offset(str1387), 113}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1392), 138}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1400), 201}, - {uniname2ctype_offset(str1401), 385}, + {uniname2ctype_offset(str1401), 400}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1407), 224}, {-1}, {uniname2ctype_offset(str1409), 38}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1415), 576}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str1419), 140}, {uniname2ctype_offset(str1420), 140}, {-1}, - {uniname2ctype_offset(str1422), 310}, - {uniname2ctype_offset(str1423), 143}, - {-1}, {-1}, + {uniname2ctype_offset(str1422), 324}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str1426), 39}, {-1}, {uniname2ctype_offset(str1428), 181}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1434), 143}, + {uniname2ctype_offset(str1429), 36}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1438), 437}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1438), 422}, - {-1}, {-1}, - {uniname2ctype_offset(str1441), 215}, - {uniname2ctype_offset(str1442), 523}, - {-1}, {-1}, - {uniname2ctype_offset(str1445), 253}, - {-1}, {-1}, - {uniname2ctype_offset(str1448), 491}, + {uniname2ctype_offset(str1442), 544}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1448), 508}, {uniname2ctype_offset(str1449), 122}, - {uniname2ctype_offset(str1450), 134}, + {-1}, {uniname2ctype_offset(str1451), 203}, {-1}, {-1}, {uniname2ctype_offset(str1454), 145}, {-1}, {-1}, {uniname2ctype_offset(str1457), 166}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1462), 535}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1466), 241}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1470), 490}, - {uniname2ctype_offset(str1471), 492}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1475), 414}, - {uniname2ctype_offset(str1476), 494}, + {-1}, {-1}, + {uniname2ctype_offset(str1460), 215}, {-1}, - {uniname2ctype_offset(str1478), 436}, + {uniname2ctype_offset(str1462), 559}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1470), 507}, + {uniname2ctype_offset(str1471), 509}, {-1}, {-1}, - {uniname2ctype_offset(str1481), 138}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1485), 328}, + {uniname2ctype_offset(str1474), 134}, + {uniname2ctype_offset(str1475), 429}, + {uniname2ctype_offset(str1476), 511}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1480), 247}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1489), 33}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1495), 251}, + {uniname2ctype_offset(str1495), 262}, {-1}, - {uniname2ctype_offset(str1497), 484}, - {uniname2ctype_offset(str1498), 199}, - {uniname2ctype_offset(str1499), 582}, + {uniname2ctype_offset(str1497), 499}, + {-1}, + {uniname2ctype_offset(str1499), 620}, {-1}, {uniname2ctype_offset(str1501), 196}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1507), 122}, - {-1}, - {uniname2ctype_offset(str1509), 110}, - {-1}, {-1}, - {uniname2ctype_offset(str1512), 110}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1517), 581}, - {-1}, - {uniname2ctype_offset(str1519), 219}, - {uniname2ctype_offset(str1520), 228}, + {uniname2ctype_offset(str1508), 231}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1517), 619}, {-1}, {-1}, - {uniname2ctype_offset(str1523), 117}, - {uniname2ctype_offset(str1524), 471}, + {uniname2ctype_offset(str1520), 239}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1524), 486}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1529), 120}, {-1}, - {uniname2ctype_offset(str1531), 407}, + {uniname2ctype_offset(str1531), 422}, {-1}, {uniname2ctype_offset(str1533), 142}, - {-1}, - {uniname2ctype_offset(str1535), 219}, + {-1}, {-1}, {uniname2ctype_offset(str1536), 127}, - {uniname2ctype_offset(str1537), 260}, + {uniname2ctype_offset(str1537), 271}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1542), 468}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1542), 453}, - {-1}, - {uniname2ctype_offset(str1544), 561}, - {-1}, {-1}, {uniname2ctype_offset(str1547), 168}, - {uniname2ctype_offset(str1548), 518}, - {uniname2ctype_offset(str1549), 505}, - {-1}, {-1}, - {uniname2ctype_offset(str1552), 117}, - {-1}, {-1}, - {uniname2ctype_offset(str1555), 107}, {-1}, + {uniname2ctype_offset(str1549), 522}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1557), 85}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1563), 264}, - {-1}, - {uniname2ctype_offset(str1565), 315}, + {uniname2ctype_offset(str1563), 275}, {-1}, - {uniname2ctype_offset(str1567), 148}, + {uniname2ctype_offset(str1565), 329}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1570), 210}, {-1}, - {uniname2ctype_offset(str1569), 236}, - {-1}, {-1}, {uniname2ctype_offset(str1572), 115}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1580), 131}, - {-1}, - {uniname2ctype_offset(str1582), 148}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1587), 529}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1594), 114}, + {uniname2ctype_offset(str1577), 570}, {-1}, {-1}, + {uniname2ctype_offset(str1580), 131}, + {-1}, + {uniname2ctype_offset(str1582), 219}, + {uniname2ctype_offset(str1583), 125}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1587), 550}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1597), 81}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1602), 97}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1607), 97}, + {uniname2ctype_offset(str1598), 219}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1607), 592}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1613), 164}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1617), 488}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1622), 373}, - {uniname2ctype_offset(str1623), 546}, + {uniname2ctype_offset(str1617), 505}, + {uniname2ctype_offset(str1618), 274}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1622), 388}, + {uniname2ctype_offset(str1623), 573}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1629), 39}, - {-1}, - {uniname2ctype_offset(str1631), 176}, - {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1635), 72}, - {-1}, {-1}, - {uniname2ctype_offset(str1638), 426}, - {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1643), 62}, + {uniname2ctype_offset(str1644), 235}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1654), 403}, + {uniname2ctype_offset(str1655), 276}, {-1}, - {uniname2ctype_offset(str1654), 388}, - {uniname2ctype_offset(str1655), 265}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1657), 114}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1662), 129}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1671), 114}, + {-1}, + {uniname2ctype_offset(str1664), 451}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1671), 343}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1675), 457}, - {uniname2ctype_offset(str1676), 176}, - {uniname2ctype_offset(str1677), 303}, + {uniname2ctype_offset(str1675), 472}, + {-1}, + {uniname2ctype_offset(str1677), 317}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1682), 595}, - {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1682), 634}, + {-1}, + {uniname2ctype_offset(str1684), 199}, + {-1}, {uniname2ctype_offset(str1686), 93}, {uniname2ctype_offset(str1687), 141}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1691), 124}, - {uniname2ctype_offset(str1692), 121}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1699), 367}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1699), 382}, + {-1}, + {uniname2ctype_offset(str1701), 525}, {-1}, {-1}, - {uniname2ctype_offset(str1702), 510}, - {uniname2ctype_offset(str1703), 533}, {uniname2ctype_offset(str1704), 207}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1714), 207}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1722), 362}, {-1}, - {uniname2ctype_offset(str1716), 419}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1722), 347}, - {-1}, - {uniname2ctype_offset(str1724), 554}, + {uniname2ctype_offset(str1724), 582}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1728), 221}, - {uniname2ctype_offset(str1729), 430}, + {uniname2ctype_offset(str1729), 445}, {uniname2ctype_offset(str1730), 222}, - {uniname2ctype_offset(str1731), 517}, - {uniname2ctype_offset(str1732), 238}, + {uniname2ctype_offset(str1731), 538}, + {uniname2ctype_offset(str1732), 249}, {uniname2ctype_offset(str1733), 123}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1734), 114}, + {uniname2ctype_offset(str1735), 260}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1740), 129}, {-1}, {uniname2ctype_offset(str1742), 161}, {-1}, {-1}, - {uniname2ctype_offset(str1745), 509}, - {uniname2ctype_offset(str1746), 390}, + {uniname2ctype_offset(str1745), 528}, + {uniname2ctype_offset(str1746), 405}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1750), 20}, {-1}, - {uniname2ctype_offset(str1752), 502}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1757), 501}, + {uniname2ctype_offset(str1752), 519}, + {uniname2ctype_offset(str1753), 148}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1757), 518}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1766), 73}, - {-1}, {-1}, - {uniname2ctype_offset(str1769), 362}, + {-1}, + {uniname2ctype_offset(str1768), 148}, + {uniname2ctype_offset(str1769), 377}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1776), 126}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1780), 65}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1788), 137}, - {-1}, {-1}, - {uniname2ctype_offset(str1791), 233}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1781), 556}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1788), 97}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1793), 97}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1806), 336}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1810), 599}, - {uniname2ctype_offset(str1811), 236}, - {-1}, - {uniname2ctype_offset(str1813), 255}, - {-1}, {-1}, - {uniname2ctype_offset(str1816), 565}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1821), 224}, + {uniname2ctype_offset(str1806), 351}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1825), 258}, - {uniname2ctype_offset(str1826), 202}, + {uniname2ctype_offset(str1810), 640}, + {uniname2ctype_offset(str1811), 247}, {-1}, - {uniname2ctype_offset(str1828), 387}, + {uniname2ctype_offset(str1813), 266}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1821), 224}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1828), 402}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1838), 585}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1842), 379}, - {uniname2ctype_offset(str1843), 134}, + {uniname2ctype_offset(str1838), 623}, {-1}, {-1}, - {uniname2ctype_offset(str1846), 481}, + {uniname2ctype_offset(str1841), 460}, + {uniname2ctype_offset(str1842), 394}, + {uniname2ctype_offset(str1843), 65}, {-1}, + {uniname2ctype_offset(str1845), 265}, + {-1}, {-1}, {uniname2ctype_offset(str1848), 109}, + {-1}, {-1}, + {uniname2ctype_offset(str1851), 137}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1861), 202}, - {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1866), 61}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1871), 479}, + {uniname2ctype_offset(str1871), 494}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1881), 63}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1878), 27}, + {uniname2ctype_offset(str1888), 531}, + {uniname2ctype_offset(str1889), 555}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1896), 626}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1902), 434}, + {-1}, + {uniname2ctype_offset(str1904), 455}, + {uniname2ctype_offset(str1905), 590}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1912), 586}, + {uniname2ctype_offset(str1913), 143}, {-1}, {-1}, - {uniname2ctype_offset(str1881), 63}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1891), 150}, - {uniname2ctype_offset(str1892), 562}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1896), 588}, + {uniname2ctype_offset(str1916), 594}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1904), 440}, - {uniname2ctype_offset(str1905), 559}, - {uniname2ctype_offset(str1906), 150}, + {uniname2ctype_offset(str1924), 143}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1911), 343}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1915), 165}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1928), 424}, - {uniname2ctype_offset(str1929), 417}, - {uniname2ctype_offset(str1930), 445}, - {-1}, - {uniname2ctype_offset(str1932), 400}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1936), 323}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, - {uniname2ctype_offset(str1947), 194}, + {uniname2ctype_offset(str1929), 432}, {-1}, {-1}, - {uniname2ctype_offset(str1950), 409}, - {uniname2ctype_offset(str1951), 12}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1958), 109}, + {uniname2ctype_offset(str1932), 415}, {-1}, {-1}, - {uniname2ctype_offset(str1961), 103}, + {uniname2ctype_offset(str1935), 264}, + {uniname2ctype_offset(str1936), 338}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1941), 27}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1950), 424}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1956), 252}, + {-1}, + {uniname2ctype_offset(str1958), 109}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1964), 440}, {-1}, {-1}, - {uniname2ctype_offset(str1964), 425}, + {uniname2ctype_offset(str1967), 492}, + {uniname2ctype_offset(str1968), 644}, + {uniname2ctype_offset(str1969), 251}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1974), 358}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1981), 176}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str1985), 408}, {-1}, {-1}, - {uniname2ctype_offset(str1967), 477}, - {uniname2ctype_offset(str1968), 603}, + {uniname2ctype_offset(str1988), 441}, {-1}, {-1}, - {uniname2ctype_offset(str1971), 153}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str1985), 393}, - {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str1991), 1}, {-1}, - {uniname2ctype_offset(str1993), 360}, + {uniname2ctype_offset(str1993), 375}, {uniname2ctype_offset(str1994), 175}, {-1}, {uniname2ctype_offset(str1996), 42}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2006), 395}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2010), 363}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2001), 110}, + {uniname2ctype_offset(str2002), 598}, + {-1}, + {uniname2ctype_offset(str2004), 110}, + {-1}, + {uniname2ctype_offset(str2006), 410}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2014), 322}, + {uniname2ctype_offset(str2010), 378}, + {uniname2ctype_offset(str2011), 269}, + {uniname2ctype_offset(str2012), 565}, {-1}, + {uniname2ctype_offset(str2014), 336}, + {uniname2ctype_offset(str2015), 117}, {uniname2ctype_offset(str2016), 209}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2023), 32}, - {uniname2ctype_offset(str2024), 489}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2033), 78}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2043), 17}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2048), 92}, + {uniname2ctype_offset(str2024), 506}, + {-1}, + {uniname2ctype_offset(str2026), 176}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2055), 92}, + {uniname2ctype_offset(str2033), 8}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2040), 539}, + {-1}, + {uniname2ctype_offset(str2042), 121}, + {uniname2ctype_offset(str2043), 17}, + {uniname2ctype_offset(str2044), 117}, {-1}, {-1}, - {uniname2ctype_offset(str2058), 240}, - {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2047), 107}, + {uniname2ctype_offset(str2048), 526}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2062), 130}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2070), 9}, {-1}, {-1}, - {uniname2ctype_offset(str2073), 330}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2078), 245}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2083), 324}, - {uniname2ctype_offset(str2084), 154}, - {uniname2ctype_offset(str2085), 20}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2093), 192}, - {-1}, - {uniname2ctype_offset(str2095), 341}, - {-1}, - {uniname2ctype_offset(str2097), 214}, - {uniname2ctype_offset(str2098), 8}, + {uniname2ctype_offset(str2073), 345}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2102), 43}, + {uniname2ctype_offset(str2077), 150}, + {uniname2ctype_offset(str2078), 256}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str2090), 277}, + {-1}, + {uniname2ctype_offset(str2092), 150}, + {-1}, {-1}, + {uniname2ctype_offset(str2095), 356}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2103), 162}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2109), 215}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2110), 123}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2114), 439}, + {uniname2ctype_offset(str2115), 384}, {-1}, - {uniname2ctype_offset(str2112), 210}, - {-1}, - {uniname2ctype_offset(str2114), 159}, - {-1}, {-1}, {uniname2ctype_offset(str2117), 174}, - {-1}, - {uniname2ctype_offset(str2119), 216}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str2128), 215}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2135), 128}, {-1}, - {uniname2ctype_offset(str2137), 172}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2137), 12}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2141), 244}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str2145), 52}, - {uniname2ctype_offset(str2146), 401}, + {uniname2ctype_offset(str2146), 416}, {-1}, {-1}, {uniname2ctype_offset(str2149), 221}, - {uniname2ctype_offset(str2150), 121}, - {-1}, {-1}, - {uniname2ctype_offset(str2153), 352}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2161), 233}, - {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2163), 251}, + {-1}, {uniname2ctype_offset(str2165), 174}, {uniname2ctype_offset(str2166), 5}, - {uniname2ctype_offset(str2167), 112}, - {-1}, {-1}, - {uniname2ctype_offset(str2170), 216}, - {-1}, {-1}, - {uniname2ctype_offset(str2173), 87}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2174), 233}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2178), 233}, + {-1}, {-1}, {uniname2ctype_offset(str2181), 139}, - {uniname2ctype_offset(str2182), 87}, + {uniname2ctype_offset(str2182), 216}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2195), 339}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2199), 159}, + {uniname2ctype_offset(str2195), 354}, + {uniname2ctype_offset(str2196), 496}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2201), 89}, - {-1}, {-1}, - {uniname2ctype_offset(str2204), 369}, - {-1}, {-1}, {uniname2ctype_offset(str2207), 196}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2211), 20}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2216), 367}, {uniname2ctype_offset(str2217), 128}, - {uniname2ctype_offset(str2218), 526}, + {uniname2ctype_offset(str2218), 547}, + {uniname2ctype_offset(str2219), 78}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2224), 453}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2222), 458}, - {-1}, - {uniname2ctype_offset(str2224), 438}, - {uniname2ctype_offset(str2225), 459}, - {-1}, {-1}, - {uniname2ctype_offset(str2228), 82}, + {uniname2ctype_offset(str2228), 43}, {uniname2ctype_offset(str2229), 35}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2235), 474}, {-1}, {-1}, - {uniname2ctype_offset(str2238), 154}, + {uniname2ctype_offset(str2232), 385}, + {uniname2ctype_offset(str2233), 216}, + {uniname2ctype_offset(str2234), 92}, + {uniname2ctype_offset(str2235), 489}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2244), 428}, + {uniname2ctype_offset(str2241), 92}, + {-1}, {-1}, + {uniname2ctype_offset(str2244), 443}, {-1}, {-1}, {uniname2ctype_offset(str2247), 36}, - {uniname2ctype_offset(str2248), 569}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2252), 240}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2258), 443}, + {uniname2ctype_offset(str2248), 602}, + {-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}, + {uniname2ctype_offset(str2276), 418}, {-1}, - {uniname2ctype_offset(str2260), 235}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2268), 597}, - {-1}, {-1}, - {uniname2ctype_offset(str2271), 18}, - {uniname2ctype_offset(str2272), 254}, - {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2278), 124}, + {uniname2ctype_offset(str2279), 192}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2282), 230}, - {-1}, {-1}, - {uniname2ctype_offset(str2285), 38}, + {uniname2ctype_offset(str2283), 214}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2296), 639}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2294), 88}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2302), 368}, - {-1}, {-1}, {uniname2ctype_offset(str2305), 205}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2312), 177}, {-1}, {-1}, - {uniname2ctype_offset(str2315), 568}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2321), 370}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2339), 600}, + {uniname2ctype_offset(str2308), 234}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2343), 560}, - {uniname2ctype_offset(str2344), 82}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2312), 177}, + {-1}, {-1}, + {uniname2ctype_offset(str2315), 601}, + {uniname2ctype_offset(str2316), 638}, + {-1}, + {uniname2ctype_offset(str2318), 202}, + {-1}, {-1}, + {uniname2ctype_offset(str2321), 153}, + {-1}, + {uniname2ctype_offset(str2323), 172}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2357), 237}, + {uniname2ctype_offset(str2327), 381}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2361), 571}, - {-1}, {-1}, - {uniname2ctype_offset(str2364), 309}, - {uniname2ctype_offset(str2365), 403}, + {uniname2ctype_offset(str2331), 636}, + {-1}, + {uniname2ctype_offset(str2333), 134}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2343), 591}, + {uniname2ctype_offset(str2344), 442}, + {uniname2ctype_offset(str2345), 241}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2353), 202}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2361), 606}, + {-1}, {-1}, + {uniname2ctype_offset(str2364), 323}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2373), 37}, - {uniname2ctype_offset(str2374), 377}, + {uniname2ctype_offset(str2374), 392}, {uniname2ctype_offset(str2375), 197}, - {-1}, {-1}, - {uniname2ctype_offset(str2378), 237}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, - {uniname2ctype_offset(str2389), 204}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2396), 376}, - {uniname2ctype_offset(str2397), 406}, - {uniname2ctype_offset(str2398), 398}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2415), 402}, - {uniname2ctype_offset(str2416), 366}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2397), 421}, + {uniname2ctype_offset(str2398), 413}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2405), 165}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2414), 82}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str2427), 23}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2433), 427}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2433), 339}, + {uniname2ctype_offset(str2434), 154}, + {-1}, {-1}, + {uniname2ctype_offset(str2437), 194}, + {-1}, {-1}, {uniname2ctype_offset(str2440), 100}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2451), 29}, + {uniname2ctype_offset(str2451), 103}, {-1}, {-1}, {uniname2ctype_offset(str2454), 220}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2460), 257}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2458), 495}, - {-1}, - {uniname2ctype_offset(str2460), 246}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2470), 433}, + {uniname2ctype_offset(str2464), 159}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2470), 448}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str2475), 142}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2479), 346}, - {uniname2ctype_offset(str2480), 50}, - {uniname2ctype_offset(str2481), 371}, + {uniname2ctype_offset(str2476), 558}, + {-1}, + {uniname2ctype_offset(str2478), 417}, + {uniname2ctype_offset(str2479), 361}, + {-1}, + {uniname2ctype_offset(str2481), 386}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2506), 511}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2513), 592}, + {uniname2ctype_offset(str2500), 121}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2519), 466}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2529), 165}, + {uniname2ctype_offset(str2506), 532}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2534), 325}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2540), 226}, - {-1}, - {uniname2ctype_offset(str2542), 125}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2548), 118}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2552), 462}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2561), 435}, - {uniname2ctype_offset(str2562), 251}, + {uniname2ctype_offset(str2511), 244}, {-1}, - {uniname2ctype_offset(str2564), 357}, - {-1}, - {uniname2ctype_offset(str2566), 185}, - {uniname2ctype_offset(str2567), 304}, - {-1}, {-1}, - {uniname2ctype_offset(str2570), 476}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2575), 185}, - {uniname2ctype_offset(str2576), 99}, - {-1}, {-1}, - {uniname2ctype_offset(str2579), 133}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2586), 199}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2595), 327}, + {uniname2ctype_offset(str2513), 630}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2603), 198}, - {-1}, {-1}, - {uniname2ctype_offset(str2606), 359}, - {-1}, {-1}, - {uniname2ctype_offset(str2609), 55}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2614), 538}, + {uniname2ctype_offset(str2530), 82}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2534), 340}, + {uniname2ctype_offset(str2535), 237}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2624), 226}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2631), 107}, + {uniname2ctype_offset(str2545), 277}, {-1}, {-1}, - {uniname2ctype_offset(str2634), 266}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2643), 437}, - {uniname2ctype_offset(str2644), 576}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2648), 243}, + {uniname2ctype_offset(str2548), 118}, + {uniname2ctype_offset(str2549), 159}, {-1}, - {uniname2ctype_offset(str2650), 78}, + {uniname2ctype_offset(str2551), 89}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2564), 372}, {-1}, {-1}, - {uniname2ctype_offset(str2653), 183}, + {uniname2ctype_offset(str2567), 318}, {-1}, {-1}, - {uniname2ctype_offset(str2656), 353}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2663), 182}, + {uniname2ctype_offset(str2570), 491}, {-1}, - {uniname2ctype_offset(str2665), 83}, - {-1}, {-1}, - {uniname2ctype_offset(str2668), 94}, + {uniname2ctype_offset(str2572), 473}, {-1}, - {uniname2ctype_offset(str2670), 593}, - {-1}, {-1}, - {uniname2ctype_offset(str2673), 84}, - {-1}, {-1}, - {uniname2ctype_offset(str2676), 83}, + {uniname2ctype_offset(str2574), 246}, + {uniname2ctype_offset(str2575), 474}, + {uniname2ctype_offset(str2576), 275}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2582), 391}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2588), 154}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, - {uniname2ctype_offset(str2688), 139}, - {-1}, {-1}, - {uniname2ctype_offset(str2691), 84}, - {uniname2ctype_offset(str2692), 211}, - {-1}, - {uniname2ctype_offset(str2694), 48}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2602), 210}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2698), 119}, - {-1}, {-1}, - {uniname2ctype_offset(str2701), 418}, - {uniname2ctype_offset(str2702), 89}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2721), 198}, + {uniname2ctype_offset(str2606), 374}, {-1}, - {uniname2ctype_offset(str2723), 4}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2732), 130}, + {uniname2ctype_offset(str2608), 458}, + {uniname2ctype_offset(str2609), 55}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2747), 54}, - {-1}, {-1}, - {uniname2ctype_offset(str2750), 534}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2625), 262}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2760), 152}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2648), 254}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2764), 241}, + {uniname2ctype_offset(str2652), 383}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2768), 90}, - {uniname2ctype_offset(str2769), 468}, + {uniname2ctype_offset(str2656), 368}, + {uniname2ctype_offset(str2657), 112}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2777), 28}, - {-1}, {-1}, - {uniname2ctype_offset(str2780), 227}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2665), 87}, + {uniname2ctype_offset(str2666), 50}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2793), 34}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2670), 632}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2674), 87}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2816), 296}, + {uniname2ctype_offset(str2688), 139}, + {uniname2ctype_offset(str2689), 641}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2821), 378}, + {uniname2ctype_offset(str2694), 48}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2834), 349}, + {-1}, + {uniname2ctype_offset(str2705), 481}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str2726), 226}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2750), 557}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str2761), 18}, + {uniname2ctype_offset(str2762), 265}, + {-1}, {-1}, + {uniname2ctype_offset(str2765), 133}, + {uniname2ctype_offset(str2766), 54}, + {-1}, {-1}, + {uniname2ctype_offset(str2769), 483}, + {-1}, {-1}, + {uniname2ctype_offset(str2772), 199}, + {-1}, {-1}, + {uniname2ctype_offset(str2775), 38}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str2786), 4}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2841), 222}, + {uniname2ctype_offset(str2793), 34}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2801), 29}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2848), 253}, + {uniname2ctype_offset(str2808), 512}, + {-1}, + {uniname2ctype_offset(str2810), 226}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2816), 310}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2821), 393}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2830), 614}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2852), 291}, + {uniname2ctype_offset(str2834), 364}, + {-1}, + {uniname2ctype_offset(str2836), 78}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str2847), 248}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2852), 305}, {-1}, {-1}, {uniname2ctype_offset(str2855), 190}, {uniname2ctype_offset(str2856), 66}, {-1}, {-1}, - {uniname2ctype_offset(str2859), 412}, + {uniname2ctype_offset(str2859), 427}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2867), 309}, + {uniname2ctype_offset(str2868), 248}, {-1}, {-1}, - {uniname2ctype_offset(str2862), 211}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2867), 295}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2871), 243}, + {uniname2ctype_offset(str2871), 254}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2879), 204}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2886), 631}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, - {uniname2ctype_offset(str2883), 242}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2902), 477}, {-1}, - {uniname2ctype_offset(str2885), 147}, - {uniname2ctype_offset(str2886), 133}, + {uniname2ctype_offset(str2904), 464}, + {uniname2ctype_offset(str2905), 273}, + {-1}, + {uniname2ctype_offset(str2907), 273}, + {-1}, + {uniname2ctype_offset(str2909), 577}, + {-1}, + {uniname2ctype_offset(str2911), 450}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2904), 449}, - {uniname2ctype_offset(str2905), 262}, - {uniname2ctype_offset(str2906), 575}, - {-1}, {-1}, - {uniname2ctype_offset(str2909), 549}, - {-1}, {-1}, - {uniname2ctype_offset(str2912), 244}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2926), 51}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2938), 242}, - {-1}, {-1}, - {uniname2ctype_offset(str2941), 348}, + {uniname2ctype_offset(str2941), 363}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2963), 225}, - {uniname2ctype_offset(str2964), 503}, {-1}, {-1}, + {uniname2ctype_offset(str2953), 198}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str2964), 520}, + {-1}, + {uniname2ctype_offset(str2966), 238}, {uniname2ctype_offset(str2967), 43}, + {-1}, {-1}, + {uniname2ctype_offset(str2970), 88}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {uniname2ctype_offset(str2980), 195}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2984), 547}, + {uniname2ctype_offset(str2984), 574}, {-1}, {uniname2ctype_offset(str2986), 118}, {uniname2ctype_offset(str2987), 54}, - {uniname2ctype_offset(str2988), 456}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str2993), 234}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3000), 16}, + {uniname2ctype_offset(str2988), 471}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str2997), 603}, + {-1}, {-1}, {-1}, {uniname2ctype_offset(str3001), 180}, {uniname2ctype_offset(str3002), 64}, {-1}, {-1}, - {uniname2ctype_offset(str3005), 460}, - {uniname2ctype_offset(str3006), 555}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3012), 80}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3005), 475}, + {uniname2ctype_offset(str3006), 583}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3015), 83}, + {-1}, {-1}, + {uniname2ctype_offset(str3018), 94}, + {uniname2ctype_offset(str3019), 165}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3028), 250}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3026), 83}, + {uniname2ctype_offset(str3027), 503}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3045), 577}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3055), 454}, - {-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}, + {uniname2ctype_offset(str3035), 232}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3089), 146}, + {uniname2ctype_offset(str3042), 211}, + {-1}, {-1}, + {uniname2ctype_offset(str3045), 615}, + {-1}, {-1}, + {uniname2ctype_offset(str3048), 119}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3052), 89}, + {uniname2ctype_offset(str3053), 229}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3058), 185}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3098), 580}, - {uniname2ctype_offset(str3099), 463}, - {uniname2ctype_offset(str3100), 103}, - {uniname2ctype_offset(str3101), 223}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3107), 299}, + {uniname2ctype_offset(str3067), 185}, + {uniname2ctype_offset(str3068), 99}, + {-1}, {-1}, + {uniname2ctype_offset(str3071), 198}, + {uniname2ctype_offset(str3072), 133}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3082), 130}, + {-1}, + {uniname2ctype_offset(str3084), 237}, + {-1}, + {uniname2ctype_offset(str3086), 84}, + {uniname2ctype_offset(str3087), 342}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3091), 261}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3099), 478}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3104), 84}, {-1}, - {uniname2ctype_offset(str3109), 301}, + {uniname2ctype_offset(str3106), 562}, + {uniname2ctype_offset(str3107), 313}, {-1}, + {uniname2ctype_offset(str3109), 315}, + {uniname2ctype_offset(str3110), 152}, {uniname2ctype_offset(str3111), 191}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3118), 90}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3123), 107}, + {-1}, {uniname2ctype_offset(str3125), 191}, - {uniname2ctype_offset(str3126), 99}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3134), 223}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3158), 314}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3165), 439}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3169), 47}, + {uniname2ctype_offset(str3135), 452}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3176), 381}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3180), 317}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3185), 126}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3194), 204}, + {uniname2ctype_offset(str3142), 585}, + {-1}, {-1}, + {uniname2ctype_offset(str3145), 183}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3155), 182}, {-1}, - {uniname2ctype_offset(str3205), 227}, + {uniname2ctype_offset(str3157), 231}, + {uniname2ctype_offset(str3158), 328}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3176), 396}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3180), 331}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3193), 433}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3209), 62}, - {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str3212), 211}, + {-1}, {-1}, {uniname2ctype_offset(str3215), 180}, {-1}, {-1}, - {uniname2ctype_offset(str3218), 201}, + {uniname2ctype_offset(str3218), 125}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3237), 375}, + {uniname2ctype_offset(str3237), 390}, {-1}, - {uniname2ctype_offset(str3239), 294}, - {uniname2ctype_offset(str3240), 290}, + {uniname2ctype_offset(str3239), 308}, + {uniname2ctype_offset(str3240), 304}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3248), 213}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3254), 190}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, - {uniname2ctype_offset(str3266), 421}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3254), 252}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3286), 235}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3265), 610}, {-1}, - {uniname2ctype_offset(str3297), 297}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3303), 293}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3309), 178}, + {uniname2ctype_offset(str3267), 28}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3317), 249}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, - {uniname2ctype_offset(str3328), 63}, - {uniname2ctype_offset(str3329), 587}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3348), 392}, - {uniname2ctype_offset(str3349), 423}, - {-1}, - {uniname2ctype_offset(str3351), 96}, + {uniname2ctype_offset(str3275), 146}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3360), 234}, + {uniname2ctype_offset(str3284), 618}, {-1}, {-1}, - {uniname2ctype_offset(str3363), 96}, - {-1}, - {uniname2ctype_offset(str3365), 578}, + {uniname2ctype_offset(str3287), 223}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3297), 311}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3303), 307}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3313), 255}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3320), 223}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3328), 63}, + {uniname2ctype_offset(str3329), 625}, + {-1}, + {uniname2ctype_offset(str3331), 222}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3338), 264}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3348), 407}, + {-1}, + {uniname2ctype_offset(str3350), 501}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3355), 47}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3360), 337}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str3371), 126}, + {uniname2ctype_offset(str3372), 16}, + {uniname2ctype_offset(str3373), 253}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3377), 147}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3391), 238}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3396), 613}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3405), 469}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str3416), 51}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str3428), 253}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3433), 205}, {-1}, {-1}, {uniname2ctype_offset(str3436), 213}, - {-1}, {-1}, - {uniname2ctype_offset(str3439), 49}, - {-1}, {-1}, - {uniname2ctype_offset(str3442), 464}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3455), 225}, + {-1}, {-1}, {uniname2ctype_offset(str3458), 10}, {-1}, - {uniname2ctype_offset(str3460), 589}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3460), 627}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3483), 245}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3502), 49}, + {-1}, + {uniname2ctype_offset(str3504), 80}, + {uniname2ctype_offset(str3505), 479}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3511), 396}, - {uniname2ctype_offset(str3512), 487}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3517), 179}, + {uniname2ctype_offset(str3511), 411}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3531), 153}, - {uniname2ctype_offset(str3532), 550}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str3532), 578}, {uniname2ctype_offset(str3533), 57}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3550), 41}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3558), 59}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3580), 179}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3590), 103}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3613), 41}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3618), 99}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3613), 214}, - {uniname2ctype_offset(str3614), 220}, - {-1}, - {uniname2ctype_offset(str3616), 45}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3628), 71}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3648), 465}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3648), 450}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3659), 178}, + {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3664), 177}, {-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}, + {uniname2ctype_offset(str3686), 204}, {-1}, {-1}, - {uniname2ctype_offset(str3703), 132}, - {-1}, - {uniname2ctype_offset(str3705), 306}, + {uniname2ctype_offset(str3689), 246}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3714), 132}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3698), 504}, + {uniname2ctype_offset(str3699), 552}, + {-1}, + {uniname2ctype_offset(str3701), 96}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3705), 320}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3710), 201}, + {-1}, {-1}, + {uniname2ctype_offset(str3713), 96}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3721), 438}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3744), 190}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3754), 71}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3766), 452}, + {-1}, {-1}, + {uniname2ctype_offset(str3766), 467}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3791), 65}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3805), 250}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3799), 214}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3807), 260}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3819), 162}, - {-1}, - {uniname2ctype_offset(str3821), 292}, {-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}, {uniname2ctype_offset(str3842), 182}, {-1}, {-1}, - {uniname2ctype_offset(str3845), 248}, - {-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}, + {uniname2ctype_offset(str3845), 259}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3850), 245}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3854), 65}, + {-1}, {-1}, + {uniname2ctype_offset(str3857), 616}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str3868), 261}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3881), 228}, + {-1}, {-1}, + {uniname2ctype_offset(str3884), 306}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3891), 30}, {-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}, - {uniname2ctype_offset(str3924), 405}, + {uniname2ctype_offset(str3924), 420}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {uniname2ctype_offset(str3942), 100}, + {-1}, + {uniname2ctype_offset(str3944), 436}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3949), 276}, {-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}, + {uniname2ctype_offset(str3976), 604}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3976), 570}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str3998), 430}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4007), 454}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str3995), 147}, {-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}, @@ -41477,99 +45355,115 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, + {uniname2ctype_offset(str4106), 45}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4116), 132}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4087), 415}, + {uniname2ctype_offset(str4127), 132}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4109), 119}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4169), 220}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4137), 244}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4162), 544}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4175), 545}, {-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}, + {uniname2ctype_offset(str4231), 153}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4203), 80}, {-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}, {-1}, {-1}, - {uniname2ctype_offset(str4254), 116}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4276), 116}, + {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4308), 401}, + {uniname2ctype_offset(str4309), 162}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4291), 302}, {-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}, - {uniname2ctype_offset(str4321), 75}, + {uniname2ctype_offset(str4348), 571}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4361), 572}, + {-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}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, - {uniname2ctype_offset(str4360), 231}, {-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}, - {uniname2ctype_offset(str4397), 386}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4405), 298}, - {uniname2ctype_offset(str4406), 300}, + {uniname2ctype_offset(str4459), 119}, {-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}, + {uniname2ctype_offset(str4487), 147}, {-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}, - {uniname2ctype_offset(str4460), 90}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4485), 179}, {-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}, - {uniname2ctype_offset(str4528), 46}, {-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}, + {uniname2ctype_offset(str4604), 116}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4626), 116}, + {uniname2ctype_offset(str4627), 255}, + {-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}, + {uniname2ctype_offset(str4674), 642}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4683), 466}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str4695), 80}, {-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}, + {uniname2ctype_offset(str4734), 179}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, + {uniname2ctype_offset(str4755), 312}, + {uniname2ctype_offset(str4756), 314}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4772), 409}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {uniname2ctype_offset(str4674), 601}, + {uniname2ctype_offset(str4783), 316}, + {-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}, - {uniname2ctype_offset(str4683), 451}, + {uniname2ctype_offset(str4810), 90}, {-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}, @@ -41579,8 +45473,8 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, - {uniname2ctype_offset(str4772), 394}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4898), 75}, {-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}, @@ -41590,18 +45484,31 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, + {uniname2ctype_offset(str4982), 232}, + {-1}, {-1}, {-1}, + {uniname2ctype_offset(str4986), 428}, {-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}, + {uniname2ctype_offset(str5018), 46}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, + {uniname2ctype_offset(str5038), 242}, {-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}, {-1}, - {uniname2ctype_offset(str4948), 590}, + {-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}, {-1}, {-1}, + {uniname2ctype_offset(str5134), 628}, #endif /* USE_UNICODE_PROPERTIES */ {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, #ifndef USE_UNICODE_PROPERTIES @@ -41621,31 +45528,7 @@ uniname2ctype_p (register const char *str, register size_t len) {uniname2ctype_offset(str19), 4}, {uniname2ctype_offset(str20), 2} #else /* USE_UNICODE_PROPERTIES */ - {uniname2ctype_offset(str4955), 155}, - {-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}, - {uniname2ctype_offset(str4986), 413}, - {-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}, {-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}, {-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}, - {uniname2ctype_offset(str5114), 225}, - {-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}, + {uniname2ctype_offset(str5141), 155}, {-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}, @@ -41663,6 +45546,8 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, + {uniname2ctype_offset(str5300), 225}, {-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}, @@ -41697,8 +45582,6 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, - {uniname2ctype_offset(str5608), 155}, {-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}, @@ -41740,6 +45623,8 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, + {uniname2ctype_offset(str5980), 155}, {-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}, @@ -41753,8 +45638,7 @@ uniname2ctype_p (register const char *str, register size_t len) {-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}, - {uniname2ctype_offset(str6098), 602} + {uniname2ctype_offset(str6098), 643} #endif /* USE_UNICODE_PROPERTIES */ }; @@ -41785,13 +45669,13 @@ uniname2ctype(const UChar *name, unsigned int len) return -1; } #if defined ONIG_UNICODE_VERSION_STRING && !( \ - ONIG_UNICODE_VERSION_MAJOR == 12 && \ - ONIG_UNICODE_VERSION_MINOR == 1 && \ + ONIG_UNICODE_VERSION_MAJOR == 15 && \ + ONIG_UNICODE_VERSION_MINOR == 0 && \ ONIG_UNICODE_VERSION_TEENY == 0 && \ 1) # error ONIG_UNICODE_VERSION_STRING mismatch #endif -#define ONIG_UNICODE_VERSION_STRING "12.1.0" -#define ONIG_UNICODE_VERSION_MAJOR 12 -#define ONIG_UNICODE_VERSION_MINOR 1 +#define ONIG_UNICODE_VERSION_STRING "15.0.0" +#define ONIG_UNICODE_VERSION_MAJOR 15 +#define ONIG_UNICODE_VERSION_MINOR 0 #define ONIG_UNICODE_VERSION_TEENY 0 diff --git a/lib/onigmo/onigmo.h b/lib/onigmo/onigmo.h index d1d705ff34e..aa96a9fe092 100644 --- a/lib/onigmo/onigmo.h +++ b/lib/onigmo/onigmo.h @@ -357,8 +357,11 @@ int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, c ONIG_EXTERN int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); +ONIG_EXTERN +int onigenc_mbclen(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc); -#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc) +#define ONIGENC_MBC_ENC_LEN_APPROX(enc,p,e) onigenc_mbclen_approximate(p,e,enc) +#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen(p,e,enc) #define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len) #define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc) #define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len) diff --git a/lib/onigmo/regcomp.c b/lib/onigmo/regcomp.c index 177977ec5c2..c8b8943a56d 100644 --- a/lib/onigmo/regcomp.c +++ b/lib/onigmo/regcomp.c @@ -3747,10 +3747,8 @@ setup_comb_exp_check(Node* node, int state, ScanEnv* env) switch (type) { case NT_LIST: { - Node* prev = NULL_NODE; do { r = setup_comb_exp_check(NCAR(node), r, env); - prev = NCAR(node); } while (r >= 0 && IS_NOT_NULL(node = NCDR(node))); } break; diff --git a/lib/onigmo/regenc.c b/lib/onigmo/regenc.c index 8cbb3dca28c..91944f8ed62 100644 --- a/lib/onigmo/regenc.c +++ b/lib/onigmo/regenc.c @@ -51,6 +51,21 @@ onigenc_set_default_encoding(OnigEncoding enc) return 0; } +extern int +onigenc_mbclen(const OnigUChar* p,const OnigUChar* e, OnigEncoding enc) +{ + int ret = ONIGENC_PRECISE_MBC_ENC_LEN(enc, p, e); + if (ONIGENC_MBCLEN_CHARFOUND_P(ret)) { + ret = ONIGENC_MBCLEN_CHARFOUND_LEN(ret); + if (ret > (int)(e - p)) ret = (int)(e - p); // just for case + return ret; + } + else if (ONIGENC_MBCLEN_NEEDMORE_P(ret)) { + return (int)(e - p); + } + return p < e ? 1 : 0; +} + extern int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, OnigEncoding enc) { diff --git a/lib/onigmo/regenc.h b/lib/onigmo/regenc.h index 56eb968d0b2..ca25d837fa3 100644 --- a/lib/onigmo/regenc.h +++ b/lib/onigmo/regenc.h @@ -91,6 +91,7 @@ typedef struct { #define ONIG_CHECK_NULL_RETURN_VAL(p,val) if (ONIG_IS_NULL(p)) return (val) #define enclen(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN(enc,p,e)) +#define enclen_approximate(enc,p,e) ((enc->max_enc_len == enc->min_enc_len) ? enc->min_enc_len : ONIGENC_MBC_ENC_LEN_APPROX(enc,p,e)) /* character types bit flag */ #define BIT_CTYPE_NEWLINE (1<< ONIGENC_CTYPE_NEWLINE) diff --git a/lib/onigmo/regexec.c b/lib/onigmo/regexec.c index 9b3e7e62452..d408f61997c 100644 --- a/lib/onigmo/regexec.c +++ b/lib/onigmo/regexec.c @@ -421,6 +421,7 @@ onig_region_copy(OnigRegion* to, const OnigRegion* from) (msa).start = (arg_start);\ (msa).gpos = (arg_gpos);\ (msa).best_len = ONIG_MISMATCH;\ + (msa).counter = 0;\ } while(0) #else # define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start, arg_gpos) do {\ @@ -429,6 +430,7 @@ onig_region_copy(OnigRegion* to, const OnigRegion* from) (msa).region = (arg_region);\ (msa).start = (arg_start);\ (msa).gpos = (arg_gpos);\ + (msa).counter = 0;\ } while(0) #endif @@ -601,7 +603,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end, (((s) - str) * num_comb_exp_check + ((snum) - 1)) # define STATE_CHECK_VAL(v,snum) do {\ if (state_check_buff != NULL) {\ - int x = STATE_CHECK_POS(s,snum);\ + ptrdiff_t x = STATE_CHECK_POS(s,snum);\ (v) = state_check_buff[x/8] & (1<<(x%8));\ }\ else (v) = 0;\ @@ -610,7 +612,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end, # define ELSE_IF_STATE_CHECK_MARK(stk) \ else if ((stk)->type == STK_STATE_CHECK_MARK) { \ - int x = STATE_CHECK_POS(stk->u.state.pstr, stk->u.state.state_check);\ + ptrdiff_t x = STATE_CHECK_POS(stk->u.state.pstr, stk->u.state.state_check);\ state_check_buff[x/8] |= (1<<(x%8)); \ } @@ -1176,11 +1178,13 @@ static int string_cmp_ic(OnigEncoding enc, int case_fold_flag, # define DATA_ENSURE_CHECK1 (s < right_range) # define DATA_ENSURE_CHECK(n) (s + (n) <= right_range) # define DATA_ENSURE(n) if (s + (n) > right_range) goto fail +# define DATA_ENSURE_CONTINUE(n) if (s + (n) > right_range) continue # define ABSENT_END_POS right_range #else # define DATA_ENSURE_CHECK1 (s < end) # define DATA_ENSURE_CHECK(n) (s + (n) <= end) # define DATA_ENSURE(n) if (s + (n) > end) goto fail +# define DATA_ENSURE_CONTINUE(n) if (s + (n) > end) continue # define ABSENT_END_POS end #endif /* USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE */ @@ -2633,7 +2637,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, ? STACK_AT(mem_end_stk[mem])->u.mem.pstr : (UChar* )((void* )mem_end_stk[mem])); n = pend - pstart; - DATA_ENSURE(n); + DATA_ENSURE_CONTINUE(n); sprev = s; swork = s; STRING_CMP_VALUE(pstart, swork, n, is_fail); @@ -2672,7 +2676,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, ? STACK_AT(mem_end_stk[mem])->u.mem.pstr : (UChar* )((void* )mem_end_stk[mem])); n = pend - pstart; - DATA_ENSURE(n); + DATA_ENSURE_CONTINUE(n); sprev = s; swork = s; STRING_CMP_VALUE_IC(case_fold_flag, pstart, &swork, n, end, is_fail); @@ -3088,7 +3092,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, } else { STACK_PUSH_ALT(p + addr, s, sprev, pkeep); /* Push possible point. */ - n = enclen(encode, s, end); + /* For approximating enclen. Strict version of enclen does not work here. */ + n = enclen_approximate(encode, s, end); STACK_PUSH_ABSENT_POS(absent, ABSENT_END_POS); /* Save the original pos. */ STACK_PUSH_ALT(selfp, s + n, s, pkeep); /* Next iteration. */ STACK_PUSH_ABSENT; @@ -3159,6 +3164,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, #endif MOP_OUT; + CHECK_INTERRUPT_IN_MATCH_AT; JUMP; DEFAULT @@ -3525,7 +3531,7 @@ onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, On MATCH_ARG_INIT(msa, option, region, at, at); #ifdef USE_COMBINATION_EXPLOSION_CHECK { - int offset = at - str; + ptrdiff_t offset = at - str; STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); } #endif @@ -3990,7 +3996,7 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end, MATCH_ARG_INIT(msa, option, region, start, global_pos); #ifdef USE_COMBINATION_EXPLOSION_CHECK { - int offset = (MIN(start, range) - str); + ptrdiff_t offset = (MIN(start, range) - str); STATE_CHECK_BUFF_INIT(msa, end - str, offset, reg->num_comb_exp_check); } #endif diff --git a/lib/onigmo/regint.h b/lib/onigmo/regint.h index a58d3b8f000..9bd97fe36e2 100644 --- a/lib/onigmo/regint.h +++ b/lib/onigmo/regint.h @@ -147,7 +147,13 @@ #ifdef RUBY -# define CHECK_INTERRUPT_IN_MATCH_AT rb_thread_check_ints() +# define CHECK_INTERRUPT_IN_MATCH_AT do { \ + msa->counter++; \ + if (msa->counter >= 128) { \ + msa->counter = 0; \ + rb_thread_check_ints(); \ + } \ +} while(0) # define onig_st_init_table st_init_table # define onig_st_init_table_with_size st_init_table_with_size # define onig_st_init_numtable st_init_numtable @@ -877,6 +883,7 @@ typedef struct { void* state_check_buff; int state_check_buff_size; #endif + int counter; } OnigMatchArg; diff --git a/lib/onigmo/regparse.c b/lib/onigmo/regparse.c index 49b7e9c841d..d8a7752bfbc 100644 --- a/lib/onigmo/regparse.c +++ b/lib/onigmo/regparse.c @@ -4659,7 +4659,15 @@ parse_char_class(Node** np, Node** asc_np, OnigToken* tok, UChar** src, UChar* e goto err; } - len = enclen(env->enc, buf, buf + i); + if (env->enc == ONIG_ENCODING_EUC_JP || + env->enc == ONIG_ENCODING_SJIS) { + /* Strict version of enclen does not handle invalid single code + * point for SJIS and EUC-JP...*/ + len = enclen_approximate(env->enc, buf, buf + i); + } + else { + len = enclen(env->enc, buf, buf + i); + } if (i < len) { r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING; goto err; diff --git a/lib/onigmo/tool/Makefile b/lib/onigmo/tool/Makefile index 38390ceea52..cca6e732cee 100644 --- a/lib/onigmo/tool/Makefile +++ b/lib/onigmo/tool/Makefile @@ -1,5 +1,5 @@ -UNICODE_VERSION = 12.1.0 -EMOJI_VERSION = 12.0 +UNICODE_VERSION = 15.0.0 +EMOJI_VERSION = 15.0.0 PROP_FILES = \ $(UNICODE_VERSION)/Blocks.txt \ diff --git a/lib/onigmo/tool/case-folding.rb b/lib/onigmo/tool/case-folding.rb index e0e9e3d1aee..c299074f012 100755 --- a/lib/onigmo/tool/case-folding.rb +++ b/lib/onigmo/tool/case-folding.rb @@ -232,7 +232,7 @@ def initialize(mapping_directory) @version = nil IO.foreach(File.join(mapping_directory, 'UnicodeData.txt'), mode: "rb") do |line| next if line =~ /^ Date: Thu, 9 Mar 2023 15:25:05 -0800 Subject: [PATCH 41/74] aws_util: memory fixes aws_util: always use flb_calloc, never flb_malloc Signed-off-by: Wesley Pettit out_s3: always use flb_calloc, never flb_malloc Signed-off-by: Wesley Pettit aws_util: fix tmp leak and fix formatting Signed-off-by: David Korczynski config: fix possible null-dereference flb_env_create can fail which causes config->env to be NULL, and this can cause NULL-dereferences further in the process. Bail if environment creation failed. Consequently, we need to add a safeguard for cleaning up multiline parsers as these have not been initialized yet. Signed-off-by: David Korczynski --- plugins/out_s3/s3.c | 10 +++++----- src/aws/flb_aws_util.c | 11 +++++++---- src/flb_config.c | 5 +++++ src/multiline/flb_ml_parser.c | 5 +++++ 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index 8840f82821e..b4556158000 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -103,7 +103,7 @@ static char *mock_error_response(char *error_env_var) err_val = getenv(error_env_var); if (err_val != NULL && strlen(err_val) > 0) { - error = flb_malloc(strlen(err_val) + sizeof(char)); + error = flb_calloc(strlen(err_val) + 1, sizeof(char)); if (error == NULL) { flb_errno(); return NULL; @@ -156,7 +156,7 @@ int create_headers(struct flb_s3 *ctx, char *body_md5, return 0; } - s3_headers = flb_malloc(sizeof(struct flb_aws_header) * headers_len); + s3_headers = flb_calloc(headers_len, sizeof(struct flb_aws_header)); if (s3_headers == NULL) { flb_errno(); return -1; @@ -241,7 +241,7 @@ struct flb_http_client *mock_s3_call(char *error_env_var, char *api) "Server: AmazonS3"; /* since etag is in the headers, this code uses resp.data */ len = strlen(resp); - c->resp.data = flb_malloc(len + 1); + c->resp.data = flb_calloc(len + 1, sizeof(char)); if (!c->resp.data) { flb_errno(); return NULL; @@ -1558,7 +1558,7 @@ static int add_to_queue(struct flb_s3 *ctx, struct s3_file *upload_file, flb_sds_t tag_cpy; /* Create upload contents object and add to upload queue */ - upload_contents = flb_malloc(sizeof(struct upload_queue)); + upload_contents = flb_calloc(1, sizeof(struct upload_queue)); if (upload_contents == NULL) { flb_plg_error(ctx->ins, "Error allocating memory for upload_queue entry"); flb_errno(); @@ -1888,7 +1888,7 @@ static flb_sds_t flb_pack_msgpack_extract_log_key(void *out_context, const char } /* Allocate buffer to store log_key contents */ - val_buf = flb_malloc(msgpack_size); + val_buf = flb_calloc(1, msgpack_size); if (val_buf == NULL) { flb_plg_error(ctx->ins, "Could not allocate enough " "memory to read record"); diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index 61d09bf5a13..cc78c0cdeb4 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -94,7 +94,7 @@ char *flb_aws_endpoint(char* service, char* region) len += strlen(region); len++; /* null byte */ - endpoint = flb_malloc(len); + endpoint = flb_calloc(len, sizeof(char)); if (!endpoint) { flb_errno(); return NULL; @@ -136,7 +136,7 @@ int flb_read_file(const char *path, char **out_buf, size_t *out_size) return -1; } - buf = flb_malloc(st.st_size + sizeof(char)); + buf = flb_calloc(st.st_size + 1, sizeof(char)); if (!buf) { flb_errno(); close(fd); @@ -851,7 +851,7 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, /* Find all occurences of $INDEX and replace with the appropriate index. */ if (strstr((char *) format, INDEX_STRING)) { seq_index_len = snprintf(NULL, 0, "%"PRIu64, seq_index); - seq_index_str = flb_malloc(seq_index_len + 1); + seq_index_str = flb_calloc(seq_index_len + 1, sizeof(char)); if (seq_index_str == NULL) { goto error; } @@ -859,7 +859,10 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, sprintf(seq_index_str, "%"PRIu64, seq_index); seq_index_str[seq_index_len] = '\0'; tmp_key = replace_uri_tokens(s3_key, INDEX_STRING, seq_index_str); - + if (tmp_key == NULL) { + flb_free(seq_index_str); + goto error; + } if (strlen(tmp_key) > S3_KEY_SIZE) { flb_warn("[s3_key] Object key length is longer than the 1024 character limit."); } diff --git a/src/flb_config.c b/src/flb_config.c index c6782ad3654..6ecfce81816 100644 --- a/src/flb_config.c +++ b/src/flb_config.c @@ -287,6 +287,11 @@ struct flb_config *flb_config_init() /* Environment */ config->env = flb_env_create(); + if (!config->env) { + flb_error("[config] environment creation failed"); + flb_config_exit(config); + return NULL; + } /* Multiline core */ mk_list_init(&config->multiline_parsers); diff --git a/src/multiline/flb_ml_parser.c b/src/multiline/flb_ml_parser.c index 2a672605691..441f9caf578 100644 --- a/src/multiline/flb_ml_parser.c +++ b/src/multiline/flb_ml_parser.c @@ -333,6 +333,11 @@ void flb_ml_parser_destroy_all(struct mk_list *list) struct mk_list *head; struct flb_ml_parser *parser; + /* Ensure list is initialized */ + if (list->next == NULL) { + return; + } + mk_list_foreach_safe(head, tmp, list) { parser = mk_list_entry(head, struct flb_ml_parser, _head); flb_ml_parser_destroy(parser); From 6cdfe268e74851ab5ae7b6cb4ab37fbacb2c3ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20GARNIER?= Date: Fri, 3 Mar 2023 17:31:49 +0100 Subject: [PATCH 42/74] in_exec: fix printf-like format and arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Benoît GARNIER --- plugins/in_exec/in_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/in_exec/in_exec.c b/plugins/in_exec/in_exec.c index addeeb84d3d..5cb8f629af3 100644 --- a/plugins/in_exec/in_exec.c +++ b/plugins/in_exec/in_exec.c @@ -183,7 +183,7 @@ static int in_exec_config_read(struct flb_exec *ctx, ctx->interval_nsec = -1; } - flb_plg_debug(in, "interval_sec=%d interval_nsec=%d oneshot=%i buf_size=%d", + flb_plg_debug(in, "interval_sec=%d interval_nsec=%d oneshot=%i buf_size=%zu", ctx->interval_sec, ctx->interval_nsec, ctx->oneshot, ctx->buf_size); return 0; From 85edd27ec306ee6dd4b040ad3d3a4efc9f85d1d2 Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Thu, 14 Jul 2022 21:54:24 +0900 Subject: [PATCH 43/74] in_exec: use flb_calloc to fill NULL (#5715) Signed-off-by: Takahiro Yamashita --- plugins/in_exec/in_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/in_exec/in_exec.c b/plugins/in_exec/in_exec.c index 5cb8f629af3..e0cbac1f5a3 100644 --- a/plugins/in_exec/in_exec.c +++ b/plugins/in_exec/in_exec.c @@ -219,7 +219,7 @@ static int in_exec_init(struct flb_input_instance *in, int ret = -1; /* Allocate space for the configuration */ - ctx = flb_malloc(sizeof(struct flb_exec)); + ctx = flb_calloc(1, sizeof(struct flb_exec)); if (!ctx) { return -1; } From 3b9400ac2f3d816b17f4c049b2f94bb4ba1f0f07 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Wed, 31 May 2023 15:44:38 -0700 Subject: [PATCH 44/74] in_tail: reset stat struct after usage picked from here: https://github.com/fluent/fluent-bit/commit/ed758a5eb85967cc66ca8dff269e7454b2394c3a Signed-off-by: Wesley Pettit --- plugins/in_tail/tail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/in_tail/tail.c b/plugins/in_tail/tail.c index d4dc6f765d0..3cba648ede9 100644 --- a/plugins/in_tail/tail.c +++ b/plugins/in_tail/tail.c @@ -85,6 +85,8 @@ static int in_tail_collect_pending(struct flb_input_instance *ins, } file->size = st.st_size; file->pending_bytes = (file->size - file->offset); + } else { + memset(&st, 0, sizeof(struct stat)); } if (file->pending_bytes <= 0) { From 70be86c34da79552b3b47606dc5f153878b07d89 Mon Sep 17 00:00:00 2001 From: tszshingt <55681122+tszshingt@users.noreply.github.com> Date: Wed, 17 May 2023 02:55:26 -0500 Subject: [PATCH 45/74] in_http: fix parser memory reinitialization This PR fixes the reinitialization of the parser with the size of the parser struct instead of the size of a pointer. The original code appeared to be a typo and prevented the build for Windows with this plugin. Also enabled in_http plugin in Windows cmake file. Signed-off-by: Shing Tsoi --- cmake/windows-setup.cmake | 2 +- plugins/in_http/http_conn.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/windows-setup.cmake b/cmake/windows-setup.cmake index 4aac6e7e200..570b1ded0fc 100644 --- a/cmake/windows-setup.cmake +++ b/cmake/windows-setup.cmake @@ -23,7 +23,7 @@ if(FLB_WINDOWS_DEFAULTS) set(FLB_IN_EXEC No) set(FLB_IN_FORWARD Yes) set(FLB_IN_HEALTH No) - set(FLB_IN_HTTP No) + set(FLB_IN_HTTP Yes) set(FLB_IN_MEM No) set(FLB_IN_KMSG No) set(FLB_IN_LIB Yes) diff --git a/plugins/in_http/http_conn.c b/plugins/in_http/http_conn.c index fc83721ff16..0771727dcba 100644 --- a/plugins/in_http/http_conn.c +++ b/plugins/in_http/http_conn.c @@ -123,7 +123,7 @@ static int http_conn_event(void *data) * handled, the additional memset intends to wipe any left over data * from the headers parsed in the previous request. */ - memset(&conn->session.parser, 0, sizeof(mk_http_parser)); + memset(&conn->session.parser, 0, sizeof(struct mk_http_parser)); mk_http_parser_init(&conn->session.parser); http_conn_request_init(&conn->session, &conn->request); } @@ -135,7 +135,7 @@ static int http_conn_event(void *data) * handled, the additional memset intends to wipe any left over data * from the headers parsed in the previous request. */ - memset(&conn->session.parser, 0, sizeof(mk_http_parser)); + memset(&conn->session.parser, 0, sizeof(struct mk_http_parser)); mk_http_parser_init(&conn->session.parser); http_conn_request_init(&conn->session, &conn->request); } From adc2b272aa0302d47f5125d20afc7002fc1c4a0a Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Sat, 6 May 2023 23:07:08 +0900 Subject: [PATCH 46/74] record_accessor: allow single character input in flb_ra_translate Additionally, a test case to verify this behavior has been added. Signed-off-by: Takahiro Yamashita --- src/flb_record_accessor.c | 2 +- tests/internal/record_accessor.c | 142 +++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/src/flb_record_accessor.c b/src/flb_record_accessor.c index 04e46579004..e7ca76ef9e7 100644 --- a/src/flb_record_accessor.c +++ b/src/flb_record_accessor.c @@ -216,7 +216,7 @@ static int ra_parse_buffer(struct flb_record_accessor *ra, flb_sds_t buf) } /* Append remaining string */ - if (i - 1 > end && pre < i) { + if ((i - 1 > end && pre < i) || i == 1 /*allow single character*/) { end = flb_sds_len(buf); rp_str = ra_parse_string(ra, buf, pre, end); if (rp_str) { diff --git a/tests/internal/record_accessor.c b/tests/internal/record_accessor.c index 49e812ac7be..618ec9add32 100644 --- a/tests/internal/record_accessor.c +++ b/tests/internal/record_accessor.c @@ -1496,6 +1496,146 @@ void cb_ra_translate_check() msgpack_unpacked_destroy(&result); } +/* + * https://github.com/fluent/fluent-bit/issues/5936 + * If the last nested element is an array, record accessor can't get its value. + */ +void cb_issue_5936_last_array() +{ + int len; + int ret; + int type; + size_t off = 0; + char *out_buf; + size_t out_size; + char *json; + char *fmt; + char *fmt_out; + flb_sds_t str; + msgpack_unpacked result; + msgpack_object map; + struct flb_record_accessor *ra; + + /* Sample JSON message */ + json ="{ \"key\": {\"nested\":[\"val0\", \"val1\"]}}"; + + + /* Convert to msgpack */ + len = strlen(json); + ret = flb_pack_json(json, len, &out_buf, &out_size, &type); + TEST_CHECK(ret == 0); + if (ret == -1) { + exit(EXIT_FAILURE); + } + + /* Formatter */ + fmt = flb_sds_create("$key['nested'][1]"); + fmt_out = "val1"; + + ra = flb_ra_create(fmt, FLB_FALSE); + TEST_CHECK(ra != NULL); + if (!ra) { + exit(EXIT_FAILURE); + } + + /* Unpack msgpack object */ + msgpack_unpacked_init(&result); + msgpack_unpack_next(&result, out_buf, out_size, &off); + map = result.data; + + /* Do translation */ + str = flb_ra_translate(ra, NULL, -1, map, NULL); + TEST_CHECK(str != NULL); + if (!str) { + exit(EXIT_FAILURE); + } + + TEST_CHECK(flb_sds_len(str) == strlen(fmt_out)); + TEST_CHECK(memcmp(str, fmt_out, strlen(fmt_out)) == 0); + printf("== input ==\n%s\n== output ==\n%s\n", str, fmt_out); + + flb_sds_destroy(str); + flb_sds_destroy(fmt); + flb_ra_destroy(ra); + flb_free(out_buf); + msgpack_unpacked_destroy(&result); +} + +struct char_list_ra_str{ + char **strs; + char *expect; +}; + + +/* + * https://github.com/fluent/fluent-bit/issues/7330 + */ +void cb_issue_7330_single_char() +{ + int ret; + int type; + char *json; + char *out_buf = NULL; + size_t out_size; + size_t off = 0; + flb_sds_t input = NULL; + flb_sds_t out_tag = NULL; + struct flb_regex_search regex_result; + struct flb_record_accessor *ra_tag = NULL; + msgpack_unpacked result; + msgpack_object map; + + json = "{\"tool\":\"fluent\"}"; + ret = flb_pack_json(json, strlen(json), &out_buf, &out_size, &type); + if (!TEST_CHECK(ret == 0)) { + TEST_MSG("flb_pack_json failed"); + exit(EXIT_FAILURE); + } + + input = flb_sds_create("b"); + if (!TEST_CHECK(input != NULL)) { + goto issue_7330; + } + + /* create flb_record_accessor from single character */ + ra_tag = flb_ra_create(input, FLB_FALSE); + if (!TEST_CHECK(ra_tag != NULL)) { + TEST_MSG("flb_ra_create failed"); + goto issue_7330; + } + + /* Unpack msgpack object */ + msgpack_unpacked_init(&result); + msgpack_unpack_next(&result, out_buf, out_size, &off); + map = result.data; + + /* Do translation */ + out_tag = flb_ra_translate(ra_tag, "old", 3, map, ®ex_result); + msgpack_unpacked_destroy(&result); + if (!TEST_CHECK(out_tag != NULL)) { + TEST_MSG("flb_ra_translate failed"); + goto issue_7330; + } + else if (!TEST_CHECK(flb_sds_len(out_tag) > 0)) { + TEST_MSG("out_tag len error. len=%zd", flb_sds_len(out_tag)); + goto issue_7330; + } + + issue_7330: + if (input) { + flb_sds_destroy(input); + } + if (out_tag) { + flb_sds_destroy(out_tag); + } + if (out_buf) { + flb_free(out_buf); + } + if (ra_tag) { + flb_ra_destroy(ra_tag); + } +} + TEST_LIST = { { "keys" , cb_keys}, { "dash_key" , cb_dash_key}, @@ -1518,5 +1658,7 @@ TEST_LIST = { { "add_root_key_val", cb_add_root_key_val}, { "issue_4917" , cb_issue_4917}, { "flb_ra_translate_check" , cb_ra_translate_check}, + { "issue_5936_last_array" , cb_issue_5936_last_array}, + { "issue_7330_single_character" , cb_issue_7330_single_char}, { NULL } }; From e4512fe66bca03ce3e4ddf3271279f2362b176d0 Mon Sep 17 00:00:00 2001 From: leonardo-albertovich Date: Wed, 3 May 2023 08:51:32 +0200 Subject: [PATCH 47/74] output_thread: added event memory intialization (#7303) Signed-off-by: Leonardo Alminana --- src/flb_output_thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flb_output_thread.c b/src/flb_output_thread.c index 1198156321e..470aa514cf5 100644 --- a/src/flb_output_thread.c +++ b/src/flb_output_thread.c @@ -229,6 +229,8 @@ static void output_thread(void *data) snprintf(tmp, sizeof(tmp) - 1, "flb-out-%s-w%i", ins->name, thread_id); mk_utils_worker_rename(tmp); + memset(&event_local, 0, sizeof(struct mk_event)); + /* Channel used by flush callbacks to notify it return status */ ret = mk_event_channel_create(th_ins->evl, &th_ins->ch_thread_events[0], From 6adf10a8f5858d2933ae10025c36b4829c0aceaf Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Mon, 15 May 2023 05:56:32 +0900 Subject: [PATCH 48/74] filter_modify: fix clean up process This PR fixes the cleanup process in filter_modify which unconditionally tried to dispose of all members which caused NULL derefs when some members were not properly initialized (ie. malformed regular expressions) Signed-off-by: Takahiro Yamashita --- plugins/filter_modify/modify.c | 107 +++++++++++++++++++++-------- tests/runtime/filter_modify.c | 122 +++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 29 deletions(-) diff --git a/plugins/filter_modify/modify.c b/plugins/filter_modify/modify.c index 6d98a0c3e1b..b6978e2c7f7 100644 --- a/plugins/filter_modify/modify.c +++ b/plugins/filter_modify/modify.c @@ -39,24 +39,69 @@ static void condition_free(struct modify_condition *condition) { - flb_sds_destroy(condition->a); - flb_free(condition->b); - flb_free(condition->raw_k); - flb_free(condition->raw_v); + if (condition == NULL) { + return; + } + + if (condition->a) { + flb_sds_destroy(condition->a); + } + if (condition->b) { + flb_free(condition->b); + } + if (condition->raw_k) { + flb_free(condition->raw_k); + } + if (condition->raw_v) { + flb_free(condition->raw_v); + } - if (condition->a_is_regex) { + if (condition->a_regex) { flb_regex_destroy(condition->a_regex); } - if (condition->b_is_regex) { + if (condition->b_regex) { flb_regex_destroy(condition->b_regex); } if (condition->ra_a) { flb_ra_destroy(condition->ra_a); condition->ra_a = NULL; } + if (!mk_list_entry_is_orphan(&condition->_head)) { + mk_list_del(&condition->_head); + } flb_free(condition); } +static void rule_free(struct modify_rule *rule) +{ + if (rule == NULL) { + return; + } + + if (rule->key) { + flb_free(rule->key); + } + if (rule->val) { + flb_free(rule->val); + } + if (rule->raw_k) { + flb_free(rule->raw_k); + } + if (rule->raw_v) { + flb_free(rule->raw_v); + } + if (rule->key_regex) { + flb_regex_destroy(rule->key_regex); + } + if (rule->val_regex) { + flb_regex_destroy(rule->val_regex); + } + if (!mk_list_entry_is_orphan(&rule->_head)) { + mk_list_del(&rule->_head); + } + flb_free(rule); +} + static void teardown(struct filter_modify_ctx *ctx) { struct mk_list *tmp; @@ -67,20 +112,12 @@ static void teardown(struct filter_modify_ctx *ctx) mk_list_foreach_safe(head, tmp, &ctx->conditions) { condition = mk_list_entry(head, struct modify_condition, _head); - mk_list_del(&condition->_head); condition_free(condition); } mk_list_foreach_safe(head, tmp, &ctx->rules) { rule = mk_list_entry(head, struct modify_rule, _head); - flb_free(rule->key); - flb_free(rule->val); - flb_free(rule->raw_k); - flb_free(rule->raw_v); - flb_regex_destroy(rule->key_regex); - flb_regex_destroy(rule->val_regex); - mk_list_del(&rule->_head); - flb_free(rule); + rule_free(rule); } } @@ -269,6 +306,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_plg_error(ctx->ins, "Unable to create regex for " "condition %s %s", condition->raw_k, condition->raw_v); + teardown(ctx); condition_free(condition); flb_utils_split_free(split); return -1; @@ -288,6 +326,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_plg_error(ctx->ins, "Unable to create regex " "for condition %s %s", condition->raw_k, condition->raw_v); + teardown(ctx); condition_free(condition); flb_utils_split_free(split); return -1; @@ -312,7 +351,7 @@ static int setup(struct filter_modify_ctx *ctx, // Build a rule // - rule = flb_malloc(sizeof(struct modify_rule)); + rule = flb_calloc(1, sizeof(struct modify_rule)); if (!rule) { flb_plg_error(ctx->ins, "Unable to allocate memory for rule"); teardown(ctx); @@ -327,7 +366,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_errno(); flb_plg_error(ctx->ins, "Unable to allocate memory for rule->raw_k"); teardown(ctx); - flb_free(rule); + rule_free(rule); flb_utils_split_free(split); return -1; } @@ -336,8 +375,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_errno(); flb_plg_error(ctx->ins, "Unable to allocate memory for rule->raw_v"); teardown(ctx); - flb_free(rule->raw_k); - flb_free(rule); + rule_free(rule); flb_utils_split_free(split); return -1; } @@ -349,9 +387,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_errno(); flb_plg_error(ctx->ins, "Unable to allocate memory for rule->key"); teardown(ctx); - flb_free(rule->raw_v); - flb_free(rule->raw_k); - flb_free(rule); + rule_free(rule); flb_utils_split_free(split); return -1; } @@ -363,10 +399,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_errno(); flb_plg_error(ctx->ins, "Unable to allocate memory for rule->val"); teardown(ctx); - flb_free(rule->key); - flb_free(rule->raw_v); - flb_free(rule->raw_k); - flb_free(rule); + rule_free(rule); flb_utils_split_free(split); return -1; } @@ -389,7 +422,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_plg_error(ctx->ins, "Invalid operation %s : %s in " "configuration", kv->key, kv->val); teardown(ctx); - flb_free(rule); + rule_free(rule); return -1; } } @@ -422,7 +455,7 @@ static int setup(struct filter_modify_ctx *ctx, flb_plg_error(ctx->ins, "Invalid operation %s : %s in " "configuration", kv->key, kv->val); teardown(ctx); - flb_free(rule); + rule_free(rule); return -1; } } @@ -431,22 +464,38 @@ static int setup(struct filter_modify_ctx *ctx, flb_plg_error(ctx->ins, "Unable to create regex for rule %s %s", rule->raw_k, rule->raw_v); teardown(ctx); - flb_free(rule); + rule_free(rule); return -1; } else { rule->key_regex = flb_regex_create(rule->key); + if (rule->key_regex == NULL) { + flb_plg_error(ctx->ins, "Unable to create regex(key) from %s", + rule->key); + teardown(ctx); + rule_free(rule); + return -1; + } } if (rule->val_is_regex && rule->val_len == 0) { flb_plg_error(ctx->ins, "Unable to create regex for rule %s %s", rule->raw_k, rule->raw_v); + teardown(ctx); + rule_free(rule); return -1; } else { rule->val_regex = flb_regex_create(rule->val); + if (rule->val_regex == NULL) { + flb_plg_error(ctx->ins, "Unable to create regex(val) from %s", + rule->val); + teardown(ctx); + rule_free(rule); + return -1; + } } mk_list_add(&rule->_head, &ctx->rules); diff --git a/tests/runtime/filter_modify.c b/tests/runtime/filter_modify.c index 1741f0ade3a..cd45b32653a 100644 --- a/tests/runtime/filter_modify.c +++ b/tests/runtime/filter_modify.c @@ -1503,6 +1503,125 @@ static void flb_test_issue_4319_2() filter_test_destroy(ctx); } +/* https://github.com/fluent/fluent-bit/issues/1225 */ +static void flb_test_issue_1225() +{ + int len; + int ret; + int bytes; + char *p; + struct flb_lib_out_cb cb_data; + struct filter_test *ctx; + + /* Create test context */ + ctx = filter_test_create((void *) &cb_data); + if (!ctx) { + exit(EXIT_FAILURE); + } + + /* Configure filter */ + ret = flb_filter_set(ctx->flb, ctx->f_ffd, + "condition", "key_value_matches \"key 1\" \".*with spaces.*\"", + "add", "\"key 2\" \"second value with spaces\"", + NULL); + TEST_CHECK(ret == 0); + + /* Prepare output callback with expected result */ + cb_data.cb = cb_check_result; + cb_data.data = "\"key 1\":\"first value with spaces\","\ + "\"key 2\":\"second value with spaces\""; + + /* Start the engine */ + ret = flb_start(ctx->flb); + TEST_CHECK(ret == 0); + + /* Ingest data samples */ + p = "[0,{\"key 1\":\"first value with spaces\"}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + + filter_test_destroy(ctx); +} + + +/* + * to check issue https://github.com/fluent/fluent-bit/issues/7075 +*/ +static void flb_test_issue_7075() +{ + char *p; + int len; + int ret; + int bytes; + + struct filter_test *ctx; + struct flb_lib_out_cb cb_data; + + clear_output_num(); + + /* Prepare output callback with expected result */ + cb_data.cb = cb_check_result; + cb_data.data = "\"matched\":true"; + + /* Create test context */ + ctx = filter_test_create((void *) &cb_data); + if (!ctx) { + exit(EXIT_FAILURE); + } + + /* Configure filter */ + ret = flb_filter_set(ctx->flb, ctx->f_ffd, + /* set key which doesn't exist */ + "condition", "key_value_matches ok true", + "rename", "ok matched", + NULL); + TEST_CHECK(ret == 0); + + /* Start the engine */ + ret = flb_start(ctx->flb); + TEST_CHECK(ret == 0); + + /* Ingest event */ + p = "[0, {\"ok\":true}]"; + len = strlen(p); + bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len); + TEST_CHECK(bytes == len); + + sleep(1); /* waiting flush */ + + filter_test_destroy(ctx); +} + +static void flb_test_issue_7368() +{ + int ret; + struct flb_lib_out_cb cb_data; + struct filter_test *ctx; + + /* Create test context */ + ctx = filter_test_create((void *) &cb_data); + if (!ctx) { + exit(EXIT_FAILURE); + } + + /* Configure filter */ + ret = flb_filter_set(ctx->flb, ctx->f_ffd, + "remove_wildcard", "*s3", + NULL); + TEST_CHECK(ret == 0); + + /* Prepare output callback with expected result */ + cb_data.cb = cb_check_result; + cb_data.data = "\"r1\":\"someval\""; + + /* Start the engine */ + ret = flb_start(ctx->flb); + TEST_CHECK(ret != 0); + + filter_test_destroy(ctx); +} + TEST_LIST = { /* Operations / Commands */ {"op_set_append" , flb_test_op_set_append }, @@ -1546,6 +1665,9 @@ TEST_LIST = { {"multiple events are not dropped", flb_test_not_drop_multi_event }, {"cond_key_value_does_not_equal and key does not exist", flb_test_issue_4319 }, {"cond_key_value_does_not_matches and key does not exist", flb_test_issue_4319_2 }, + {"Key_value_matches and value is bool type", flb_test_issue_7075}, + {"operation_with_whitespace", flb_test_issue_1225 }, + {"invalid_wildcard", flb_test_issue_7368 }, {NULL, NULL} }; From db58092b7334d8a10a90f1075c0fb18fdb37535d Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 2 Jun 2023 17:00:31 -0700 Subject: [PATCH 49/74] aws: always use calloc for creds Signed-off-by: Wesley Pettit --- src/aws/flb_aws_credentials.c | 2 +- src/aws/flb_aws_credentials_ec2.c | 2 +- src/aws/flb_aws_credentials_http.c | 2 +- src/aws/flb_aws_credentials_profile.c | 2 +- src/aws/flb_aws_credentials_sts.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/aws/flb_aws_credentials.c b/src/aws/flb_aws_credentials.c index 6282456bf72..696c8b95696 100644 --- a/src/aws/flb_aws_credentials.c +++ b/src/aws/flb_aws_credentials.c @@ -609,7 +609,7 @@ struct flb_aws_credentials *get_credentials_fn_environment(struct return NULL; } - creds = flb_malloc(sizeof(struct flb_aws_credentials)); + creds = flb_calloc(1, sizeof(struct flb_aws_credentials)); if (!creds) { flb_errno(); return NULL; diff --git a/src/aws/flb_aws_credentials_ec2.c b/src/aws/flb_aws_credentials_ec2.c index 06ed9be460a..e60fee0f1dc 100644 --- a/src/aws/flb_aws_credentials_ec2.c +++ b/src/aws/flb_aws_credentials_ec2.c @@ -88,7 +88,7 @@ struct flb_aws_credentials *get_credentials_fn_ec2(struct flb_aws_provider return NULL; } - creds = flb_malloc(sizeof(struct flb_aws_credentials)); + creds = flb_calloc(1, sizeof(struct flb_aws_credentials)); if (!creds) { flb_errno(); return NULL; diff --git a/src/aws/flb_aws_credentials_http.c b/src/aws/flb_aws_credentials_http.c index 2e1b3797353..a957c28baac 100644 --- a/src/aws/flb_aws_credentials_http.c +++ b/src/aws/flb_aws_credentials_http.c @@ -98,7 +98,7 @@ struct flb_aws_credentials *get_credentials_fn_http(struct flb_aws_provider return NULL; } - creds = flb_malloc(sizeof(struct flb_aws_credentials)); + creds = flb_calloc(1, sizeof(struct flb_aws_credentials)); if (!creds) { flb_errno(); goto error; diff --git a/src/aws/flb_aws_credentials_profile.c b/src/aws/flb_aws_credentials_profile.c index d9598e2ae03..ea018f1f16b 100644 --- a/src/aws/flb_aws_credentials_profile.c +++ b/src/aws/flb_aws_credentials_profile.c @@ -111,7 +111,7 @@ struct flb_aws_credentials *get_credentials_fn_profile(struct flb_aws_provider } } - creds = flb_malloc(sizeof(struct flb_aws_credentials)); + creds = flb_calloc(1, sizeof(struct flb_aws_credentials)); if (!creds) { flb_errno(); goto error; diff --git a/src/aws/flb_aws_credentials_sts.c b/src/aws/flb_aws_credentials_sts.c index 5ff3d84347b..d111ffeb5f7 100644 --- a/src/aws/flb_aws_credentials_sts.c +++ b/src/aws/flb_aws_credentials_sts.c @@ -136,7 +136,7 @@ struct flb_aws_credentials *get_credentials_fn_sts(struct flb_aws_provider } /* return a copy of the existing cached credentials */ - creds = flb_malloc(sizeof(struct flb_aws_credentials)); + creds = flb_calloc(1, sizeof(struct flb_aws_credentials)); if (!creds) { goto error; } From 622a81b262c506ce31bdcdf41680629c3011afb6 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 2 Jun 2023 17:10:57 -0700 Subject: [PATCH 50/74] aws: check for full xml end node in flb_aws_xml_get_val Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_aws_util.h | 3 ++- plugins/out_s3/s3_multipart.c | 4 ++-- src/aws/flb_aws_util.c | 11 ++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/fluent-bit/flb_aws_util.h b/include/fluent-bit/flb_aws_util.h index 96b6d3aedf9..08507dccfbb 100644 --- a/include/fluent-bit/flb_aws_util.h +++ b/include/fluent-bit/flb_aws_util.h @@ -163,8 +163,9 @@ flb_sds_t flb_json_get_val(char *response, size_t response_len, char *key); /* * Parses an XML document and returns the value of the given tag * Param `tag` should include angle brackets; ex "" + * And param `end` should include end brackets: "" */ -flb_sds_t flb_xml_get_val(char *response, size_t response_len, char *tag); +flb_sds_t flb_aws_xml_get_val(char *response, size_t response_len, char *tag, char *tag_end); /* * Checks if a response contains an AWS Auth error diff --git a/plugins/out_s3/s3_multipart.c b/plugins/out_s3/s3_multipart.c index 4d5090cd736..1eb2a1061df 100644 --- a/plugins/out_s3/s3_multipart.c +++ b/plugins/out_s3/s3_multipart.c @@ -522,8 +522,8 @@ int create_multipart_upload(struct flb_s3 *ctx, flb_plg_debug(ctx->ins, "CreateMultipartUpload http status=%d", c->resp.status); if (c->resp.status == 200) { - tmp = flb_xml_get_val(c->resp.payload, c->resp.payload_size, - ""); + tmp = flb_aws_xml_get_val(c->resp.payload, c->resp.payload_size, + "", ""); if (!tmp) { flb_plg_error(ctx->ins, "Could not find upload ID in " "CreateMultipartUpload response"); diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index cc78c0cdeb4..ab607a70522 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -508,13 +508,13 @@ void flb_aws_print_xml_error(char *response, size_t response_len, flb_sds_t error; flb_sds_t message; - error = flb_xml_get_val(response, response_len, ""); + error = flb_aws_xml_get_val(response, response_len, "", ""); if (!error) { flb_plg_error(ins, "%s: Could not parse response", api); return; } - message = flb_xml_get_val(response, response_len, ""); + message = flb_aws_xml_get_val(response, response_len, "", ""); if (!message) { /* just print the error */ flb_plg_error(ins, "%s API responded with error='%s'", api, error); @@ -531,14 +531,15 @@ void flb_aws_print_xml_error(char *response, size_t response_len, /* Parses AWS XML API Error responses and returns the value of the tag */ flb_sds_t flb_aws_xml_error(char *response, size_t response_len) { - return flb_xml_get_val(response, response_len, ""); + return flb_aws_xml_get_val(response, response_len, "", ""); } /* * Parses an XML document and returns the value of the given tag * Param `tag` should include angle brackets; ex "" + * And param `end` should include end brackets: "" */ -flb_sds_t flb_xml_get_val(char *response, size_t response_len, char *tag) +flb_sds_t flb_aws_xml_get_val(char *response, size_t response_len, char *tag, char *tag_end) { flb_sds_t val = NULL; char *node = NULL; @@ -557,7 +558,7 @@ flb_sds_t flb_xml_get_val(char *response, size_t response_len, char *tag) /* advance to end of tag */ node += strlen(tag); - end = strchr(node, '<'); + end = strstr(node, tag_end); if (!end) { flb_error("[aws] Could not find end of '%s' node in xml", tag); return NULL; From fec565a7885c26f217c08fd1f68e7b0d6fb2c669 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 2 Jun 2023 17:36:36 -0700 Subject: [PATCH 51/74] aws: protect credential providers with pthread_mutex Signed-off-by: Wesley Pettit --- include/fluent-bit/flb_aws_credentials.h | 9 ++++--- src/aws/flb_aws_credentials.c | 24 ++++++++++-------- src/aws/flb_aws_credentials_ec2.c | 2 ++ src/aws/flb_aws_credentials_http.c | 2 ++ src/aws/flb_aws_credentials_profile.c | 32 +++++++++++++++++++----- src/aws/flb_aws_credentials_sts.c | 6 ++++- 6 files changed, 53 insertions(+), 22 deletions(-) diff --git a/include/fluent-bit/flb_aws_credentials.h b/include/fluent-bit/flb_aws_credentials.h index 60913955f62..575269cec8f 100644 --- a/include/fluent-bit/flb_aws_credentials.h +++ b/include/fluent-bit/flb_aws_credentials.h @@ -118,12 +118,13 @@ struct flb_aws_provider_vtable { */ struct flb_aws_provider { /* - * Fluent Bit is single-threaded but asynchonous. Co-routines are paused - * and resumed during blocking IO calls. - * + * Fluent Bit now has multi-threads/workers, need to a mutex to protect cred provider. * When a refresh is needed, only one co-routine should refresh. + * When one thread refreshes, the cached creds are freed and reset, there could be a double + * free without a lock. + * We use trylock to prevent deadlock. */ - int locked; + pthread_mutex_t lock; struct flb_aws_provider_vtable *provider_vtable; diff --git a/src/aws/flb_aws_credentials.c b/src/aws/flb_aws_credentials.c index 696c8b95696..da764a30034 100644 --- a/src/aws/flb_aws_credentials.c +++ b/src/aws/flb_aws_credentials.c @@ -526,6 +526,8 @@ static struct flb_aws_provider *standard_chain_create(struct flb_config return NULL; } + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof(struct flb_aws_provider_chain)); if (!implementation) { @@ -756,6 +758,8 @@ void flb_aws_provider_destroy(struct flb_aws_provider *provider) provider->provider_vtable->destroy(provider); } + pthread_mutex_destroy(&provider->lock); + /* free managed dependencies */ if (provider->base_aws_provider) { flb_aws_provider_destroy(provider->base_aws_provider); @@ -822,27 +826,25 @@ time_t flb_aws_cred_expiration(const char *timestamp) } /* - * Fluent Bit is single-threaded but asynchonous. Only one co-routine will - * be running at a time, and they only pause/resume for IO. - * - * Thus, while synchronization is needed (to prevent multiple co-routines - * from duplicating effort and performing the same work), it can be obtained - * using a simple integer flag on the provider. + * Fluent Bit is now multi-threaded and asynchonous with coros. + * The trylock prevents deadlock, and protects the provider + * when a cred refresh happens. The refresh frees and + * sets the shared cred cache, a double free could occur + * if two threads do it at the same exact time. */ /* Like a traditional try lock- it does not block if the lock is not obtained */ int try_lock_provider(struct flb_aws_provider *provider) { - if (provider->locked == FLB_TRUE) { + int ret = 0; + ret = pthread_mutex_trylock(&provider->lock); + if (ret != 0) { return FLB_FALSE; } - provider->locked = FLB_TRUE; return FLB_TRUE; } void unlock_provider(struct flb_aws_provider *provider) { - if (provider->locked == FLB_TRUE) { - provider->locked = FLB_FALSE; - } + pthread_mutex_unlock(&provider->lock); } diff --git a/src/aws/flb_aws_credentials_ec2.c b/src/aws/flb_aws_credentials_ec2.c index e60fee0f1dc..f7bd2957bfe 100644 --- a/src/aws/flb_aws_credentials_ec2.c +++ b/src/aws/flb_aws_credentials_ec2.c @@ -229,6 +229,8 @@ struct flb_aws_provider *flb_ec2_provider_create(struct flb_config *config, return NULL; } + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof(struct flb_aws_provider_ec2)); if (!implementation) { diff --git a/src/aws/flb_aws_credentials_http.c b/src/aws/flb_aws_credentials_http.c index a957c28baac..0cf0c0d97f1 100644 --- a/src/aws/flb_aws_credentials_http.c +++ b/src/aws/flb_aws_credentials_http.c @@ -250,6 +250,8 @@ struct flb_aws_provider *flb_http_provider_create(struct flb_config *config, return NULL; } + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof(struct flb_aws_provider_http)); if (!implementation) { diff --git a/src/aws/flb_aws_credentials_profile.c b/src/aws/flb_aws_credentials_profile.c index ea018f1f16b..4020a2dfa1f 100644 --- a/src/aws/flb_aws_credentials_profile.c +++ b/src/aws/flb_aws_credentials_profile.c @@ -103,10 +103,16 @@ struct flb_aws_credentials *get_credentials_fn_profile(struct flb_aws_provider time(NULL) >= implementation->next_refresh)) { AWS_CREDS_DEBUG("Retrieving credentials for AWS Profile %s", implementation->profile); - ret = refresh_credentials(implementation, FLB_FALSE); - if (ret < 0) { - AWS_CREDS_ERROR("Failed to retrieve credentials for AWS Profile %s", - implementation->profile); + if (try_lock_provider(provider) == FLB_TRUE) { + ret = refresh_credentials(implementation, FLB_FALSE); + unlock_provider(provider); + if (ret < 0) { + AWS_CREDS_ERROR("Failed to retrieve credentials for AWS Profile %s", + implementation->profile); + return NULL; + } + } else { + AWS_CREDS_WARN("Another thread is refreshing credentials, will retry"); return NULL; } } @@ -152,15 +158,27 @@ struct flb_aws_credentials *get_credentials_fn_profile(struct flb_aws_provider int refresh_fn_profile(struct flb_aws_provider *provider) { struct flb_aws_provider_profile *implementation = provider->implementation; + int ret = -1; AWS_CREDS_DEBUG("Refresh called on the profile provider"); - return refresh_credentials(implementation, FLB_FALSE); + if (try_lock_provider(provider) == FLB_TRUE) { + ret = refresh_credentials(implementation, FLB_FALSE); + unlock_provider(provider); + return ret; + } + return ret; } int init_fn_profile(struct flb_aws_provider *provider) { struct flb_aws_provider_profile *implementation = provider->implementation; + int ret = -1; AWS_CREDS_DEBUG("Init called on the profile provider"); - return refresh_credentials(implementation, FLB_TRUE); + if (try_lock_provider(provider) == FLB_TRUE) { + ret = refresh_credentials(implementation, FLB_TRUE); + unlock_provider(provider); + return ret; + } + return ret; } /* @@ -235,6 +253,8 @@ struct flb_aws_provider *flb_profile_provider_create() goto error; } + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof( struct flb_aws_provider_profile)); diff --git a/src/aws/flb_aws_credentials_sts.c b/src/aws/flb_aws_credentials_sts.c index d111ffeb5f7..d605693b053 100644 --- a/src/aws/flb_aws_credentials_sts.c +++ b/src/aws/flb_aws_credentials_sts.c @@ -309,6 +309,8 @@ struct flb_aws_provider *flb_sts_provider_create(struct flb_config *config, return NULL; } + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof(struct flb_aws_provider_sts)); if (!implementation) { goto error; @@ -579,7 +581,9 @@ struct flb_aws_provider *flb_eks_provider_create(struct flb_config *config, flb_errno(); return NULL; } - + + pthread_mutex_init(&provider->lock, NULL); + implementation = flb_calloc(1, sizeof(struct flb_aws_provider_eks)); if (!implementation) { From eda6dd40cfe9491f1a73496957e9d3159fe01a5c Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 2 Jun 2023 17:41:34 -0700 Subject: [PATCH 52/74] signv4: always use calloc Signed-off-by: Wesley Pettit --- src/flb_signv4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flb_signv4.c b/src/flb_signv4.c index 49c952f8b69..8d8215cb7d9 100644 --- a/src/flb_signv4.c +++ b/src/flb_signv4.c @@ -401,7 +401,7 @@ static flb_sds_t url_params_format(char *params) return flb_sds_create(""); } - arr = flb_malloc(sizeof(struct flb_kv *) * items); + arr = flb_calloc(1, sizeof(struct flb_kv *) * items); if (!arr) { flb_errno(); flb_kv_release(&list); @@ -815,7 +815,7 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, all_items = mk_list_size(&list_tmp); excluded_items = 0; size = (sizeof(struct flb_kv *) * (all_items)); - arr = flb_malloc(size); + arr = flb_calloc(1, size); if (!arr) { flb_errno(); flb_kv_release(&list_tmp); @@ -1149,7 +1149,7 @@ flb_sds_t flb_signv4_do(struct flb_http_client *c, int normalize_uri, return NULL; } - gmt = flb_malloc(sizeof(struct tm)); + gmt = flb_calloc(1, sizeof(struct tm)); if (!gmt) { flb_errno(); flb_aws_credentials_destroy(creds); From 68405c0655adf17cf8e3d4155530b375270ea9db Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Thu, 26 Jan 2023 02:31:35 +0000 Subject: [PATCH 53/74] cloudwatch_logs: remove sequence tokens from API calls Signed-off-by: Matthew Fala --- plugins/out_cloudwatch_logs/cloudwatch_api.c | 114 ++---------------- plugins/out_cloudwatch_logs/cloudwatch_logs.c | 68 +++++------ plugins/out_cloudwatch_logs/cloudwatch_logs.h | 8 +- src/aws/flb_aws_util.c | 2 + 4 files changed, 48 insertions(+), 144 deletions(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index a7dba7303ff..de0825e3f83 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -49,9 +49,7 @@ #include "cloudwatch_api.h" #define ERR_CODE_ALREADY_EXISTS "ResourceAlreadyExistsException" -#define ERR_CODE_INVALID_SEQUENCE_TOKEN "InvalidSequenceTokenException" #define ERR_CODE_NOT_FOUND "ResourceNotFoundException" -#define ERR_CODE_DATA_ALREADY_ACCEPTED "DataAlreadyAcceptedException" #define AMZN_REQUEST_ID_HEADER "x-amzn-RequestId" @@ -228,23 +226,6 @@ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, goto error; } - if (stream->sequence_token) { - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, - "\"sequenceToken\":\"", 17)) { - goto error; - } - - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, - stream->sequence_token, 0)) { - goto error; - } - - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, - "\",", 2)) { - goto error; - } - } - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"logEvents\":[", 13)) { goto error; @@ -492,9 +473,6 @@ void reset_flush_buf(struct flb_cloudwatch *ctx, struct cw_flush *buf) { if (buf->current_stream != NULL) { buf->data_size += strlen(buf->current_stream->name); buf->data_size += strlen(buf->current_stream->group); - if (buf->current_stream->sequence_token) { - buf->data_size += strlen(buf->current_stream->sequence_token); - } } } @@ -1151,7 +1129,6 @@ static int set_log_group_retention(struct flb_cloudwatch *ctx, struct log_stream struct flb_aws_client *cw_client; flb_sds_t body; flb_sds_t tmp; - flb_sds_t error; flb_plg_info(ctx->ins, "Setting retention policy on log group %s to %dd", stream->group, ctx->log_retention_days); @@ -1194,17 +1171,9 @@ static int set_log_group_retention(struct flb_cloudwatch *ctx, struct log_stream /* Check error */ if (c->resp.payload_size > 0) { - error = flb_aws_error(c->resp.payload, c->resp.payload_size); - if (error != NULL) { - /* some other error occurred; notify user */ - flb_aws_print_error(c->resp.payload, c->resp.payload_size, - "PutRetentionPolicy", ctx->ins); - flb_sds_destroy(error); - } - else { - /* error can not be parsed, print raw response to debug */ - flb_plg_debug(ctx->ins, "Raw response: %s", c->resp.payload); - } + /* some error occurred; notify user */ + flb_aws_print_error(c->resp.payload, c->resp.payload_size, + "PutRetentionPolicy", ctx->ins); } } @@ -1285,8 +1254,8 @@ int create_log_group(struct flb_cloudwatch *ctx, struct log_stream *stream) flb_sds_destroy(error); } else { - /* error can not be parsed, print raw response to debug */ - flb_plg_debug(ctx->ins, "Raw response: %s", c->resp.payload); + /* error can not be parsed, print raw response */ + flb_plg_warn(ctx->ins, "Raw response: %s", c->resp.payload); } } } @@ -1400,8 +1369,8 @@ int create_log_stream(struct flb_cloudwatch *ctx, struct log_stream *stream, flb_sds_destroy(error); } else { - /* error can not be parsed, print raw response to debug */ - flb_plg_debug(ctx->ins, "Raw response: %s", c->resp.payload); + /* error can not be parsed, print raw response */ + flb_plg_warn(ctx->ins, "Raw response: %s", c->resp.payload); } } } @@ -1415,8 +1384,7 @@ int create_log_stream(struct flb_cloudwatch *ctx, struct log_stream *stream, } /* - * Returns -1 on failure, 0 on success, and 1 for a sequence token error, - * which means the caller can retry. + * Returns -1 on failure, 0 on success */ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream, size_t payload_size) @@ -1425,7 +1393,6 @@ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct flb_http_client *c = NULL; struct flb_aws_client *cw_client; flb_sds_t tmp; - flb_sds_t error; int num_headers = 1; int retry = FLB_TRUE; @@ -1458,8 +1425,7 @@ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, if (c->resp.data == NULL || c->resp.data_len == 0 || strstr(c->resp.data, AMZN_REQUEST_ID_HEADER) == NULL) { /* code was 200, but response is invalid, treat as failure */ if (c->resp.data != NULL) { - flb_plg_debug(ctx->ins, "Could not find sequence token in " - "response: response body is empty: full data: `%.*s`", c->resp.data_len, c->resp.data); + flb_plg_debug(ctx->ins, "Invalid response: full data: `%.*s`", c->resp.data_len, c->resp.data); } flb_http_client_destroy(c); @@ -1472,27 +1438,6 @@ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, AMZN_REQUEST_ID_HEADER); return -1; } - - - /* success */ - if (c->resp.payload_size > 0) { - flb_plg_debug(ctx->ins, "Sent events to %s", stream->name); - tmp = flb_json_get_val(c->resp.payload, c->resp.payload_size, - "nextSequenceToken"); - if (tmp) { - if (stream->sequence_token != NULL) { - flb_sds_destroy(stream->sequence_token); - } - stream->sequence_token = tmp; - - flb_http_client_destroy(c); - return 0; - } - else { - flb_plg_error(ctx->ins, "Could not find sequence token in " - "response: %s", c->resp.payload); - } - } flb_http_client_destroy(c); return 0; @@ -1500,45 +1445,8 @@ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, /* Check error */ if (c->resp.payload_size > 0) { - error = flb_aws_error(c->resp.payload, c->resp.payload_size); - if (error != NULL) { - if (strcmp(error, ERR_CODE_INVALID_SEQUENCE_TOKEN) == 0) { - /* - * This case will happen when we do not know the correct - * sequence token; we can find it in the error response - * and retry. - */ - flb_plg_debug(ctx->ins, "Sequence token was invalid, " - "will retry"); - tmp = flb_json_get_val(c->resp.payload, c->resp.payload_size, - "expectedSequenceToken"); - if (tmp) { - if (stream->sequence_token != NULL) { - flb_sds_destroy(stream->sequence_token); - } - stream->sequence_token = tmp; - flb_sds_destroy(error); - flb_http_client_destroy(c); - /* tell the caller to retry */ - return 1; - } - } else if (strcmp(error, ERR_CODE_DATA_ALREADY_ACCEPTED) == 0) { - /* not sure what causes this but it counts as success */ - flb_plg_info(ctx->ins, "Got %s, a previous retry must have succeeded asychronously", ERR_CODE_DATA_ALREADY_ACCEPTED); - flb_sds_destroy(error); - flb_http_client_destroy(c); - /* success */ - return 0; - } - /* some other error occurred; notify user */ - flb_aws_print_error(c->resp.payload, c->resp.payload_size, - "PutLogEvents", ctx->ins); - flb_sds_destroy(error); - } - else { - /* error could not be parsed, print raw response to debug */ - flb_plg_debug(ctx->ins, "Raw response: %s", c->resp.payload); - } + flb_aws_print_error(c->resp.payload, c->resp.payload_size, + "PutLogEvents", ctx->ins); } } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 94c675edcb1..03723f521a1 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -56,7 +56,6 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, const char *tmp; char *session_name = NULL; struct flb_cloudwatch *ctx = NULL; - struct cw_flush *buf = NULL; int ret; flb_sds_t tmp_sds = NULL; (void) config; @@ -345,18 +344,33 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, flb_output_upstream_set(upstream, ctx->ins); ctx->cw_client->host = ctx->endpoint; - /* alloc the payload/processing buffer */ + /* Export context */ + flb_output_set_context(ins, ctx); + + return 0; + +error: + flb_free(session_name); + flb_plg_error(ctx->ins, "Initialization failed"); + flb_cloudwatch_ctx_destroy(ctx); + return -1; +} + +struct cw_flush *new_buffer() +{ + struct cw_flush *buf; + buf = flb_calloc(1, sizeof(struct cw_flush)); if (!buf) { flb_errno(); - goto error; + return NULL; } buf->out_buf = flb_malloc(PUT_LOG_EVENTS_PAYLOAD_SIZE); if (!buf->out_buf) { flb_errno(); cw_flush_destroy(buf); - goto error; + return NULL; } buf->out_buf_size = PUT_LOG_EVENTS_PAYLOAD_SIZE; @@ -364,7 +378,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, if (!buf->tmp_buf) { flb_errno(); cw_flush_destroy(buf); - goto error; + return NULL; } buf->tmp_buf_size = PUT_LOG_EVENTS_PAYLOAD_SIZE; @@ -372,23 +386,11 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, if (!buf->events) { flb_errno(); cw_flush_destroy(buf); - goto error; + return NULL; } buf->events_capacity = MAX_EVENTS_PER_PUT; - ctx->buf = buf; - - - /* Export context */ - flb_output_set_context(ins, ctx); - - return 0; - -error: - flb_free(session_name); - flb_plg_error(ctx->ins, "Initialization failed"); - flb_cloudwatch_ctx_destroy(ctx); - return -1; + return buf; } static void cb_cloudwatch_flush(struct flb_event_chunk *event_chunk, @@ -402,15 +404,21 @@ static void cb_cloudwatch_flush(struct flb_event_chunk *event_chunk, (void) i_ins; (void) config; - event_count = process_and_send(ctx, i_ins->p->name, ctx->buf, event_chunk->tag, - event_chunk->data, event_chunk->size); + struct cw_flush *buf; + + buf = new_buffer(); + if (!buf) { + FLB_OUTPUT_RETURN(FLB_RETRY); + } + + event_count = process_and_send(ctx, i_ins->p->name, buf, event_chunk->tag, event_chunk->data, event_chunk->size); if (event_count < 0) { flb_plg_error(ctx->ins, "Failed to send events"); + cw_flush_destroy(buf); FLB_OUTPUT_RETURN(FLB_RETRY); } - // TODO: this msg is innaccurate if events are skipped - flb_plg_debug(ctx->ins, "Sent %d events to CloudWatch", event_count); + cw_flush_destroy(buf); FLB_OUTPUT_RETURN(FLB_OK); } @@ -426,10 +434,6 @@ void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx) flb_aws_provider_destroy(ctx->base_aws_provider); } - if (ctx->buf) { - cw_flush_destroy(ctx->buf); - } - if (ctx->aws_provider) { flb_aws_provider_destroy(ctx->aws_provider); } @@ -493,9 +497,6 @@ void log_stream_destroy(struct log_stream *stream) if (stream->name) { flb_sds_destroy(stream->name); } - if (stream->sequence_token) { - flb_sds_destroy(stream->sequence_token); - } if (stream->group) { flb_sds_destroy(stream->group); } @@ -647,12 +648,7 @@ struct flb_output_plugin out_cloudwatch_logs_plugin = { .cb_init = cb_cloudwatch_init, .cb_flush = cb_cloudwatch_flush, .cb_exit = cb_cloudwatch_exit, - - /* - * Allow cloudwatch to use async network stack synchronously by opting into - * FLB_OUTPUT_SYNCHRONOUS synchronous task scheduler - */ - .flags = FLB_OUTPUT_SYNCHRONOUS, + .flags = 0, .workers = 1, /* Configuration */ diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.h b/plugins/out_cloudwatch_logs/cloudwatch_logs.h index 376d690db29..705f69b9139 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.h @@ -70,7 +70,7 @@ struct cw_event { struct log_stream { flb_sds_t name; flb_sds_t group; - flb_sds_t sequence_token; + /* * log streams in CloudWatch do not expire; but our internal representations * of them are periodically cleaned up if they have been unused for too long @@ -87,8 +87,6 @@ struct log_stream { struct mk_list _head; }; -void log_stream_destroy(struct log_stream *stream); - struct flb_cloudwatch { /* * TLS instances can not be re-used. So we have one for: @@ -137,8 +135,6 @@ struct flb_cloudwatch { /* stores log streams we're putting to */ struct mk_list streams; - /* buffers for data processing and request payload */ - struct cw_flush *buf; /* The namespace to use for the metric */ flb_sds_t metric_namespace; @@ -154,4 +150,6 @@ struct flb_cloudwatch { void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx); +void log_stream_destroy(struct log_stream *stream); + #endif diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index ab607a70522..26c67635c9b 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -581,6 +581,8 @@ void flb_aws_print_error(char *response, size_t response_len, error = flb_json_get_val(response, response_len, "__type"); if (!error) { + /* error can not be parsed, print raw response */ + flb_plg_warn(ins, "Raw response: %s", response); return; } From 2debef84a66a82f2e25b837d8e60e65407eadaa9 Mon Sep 17 00:00:00 2001 From: Clay Cheng Date: Thu, 9 Mar 2023 21:54:38 +0000 Subject: [PATCH 54/74] out_prometheus_remote_write: add authorization to prometheus remote write Signed-off-by: Clay Cheng --- .../remote_write.c | 48 +++++++++++++++++++ .../remote_write.h | 15 ++++++ .../remote_write_conf.c | 45 ++++++++++++++++- 3 files changed, 107 insertions(+), 1 deletion(-) diff --git a/plugins/out_prometheus_remote_write/remote_write.c b/plugins/out_prometheus_remote_write/remote_write.c index 06798b3883e..fc21b6ae1d9 100644 --- a/plugins/out_prometheus_remote_write/remote_write.c +++ b/plugins/out_prometheus_remote_write/remote_write.c @@ -22,6 +22,13 @@ #include #include +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS +#include +#include +#endif +#endif + #include "remote_write.h" #include "remote_write_conf.h" @@ -41,6 +48,7 @@ static int http_post(struct prometheus_remote_write_context *ctx, struct flb_config_map_val *mv; struct flb_slist_entry *key = NULL; struct flb_slist_entry *val = NULL; + flb_sds_t signature = NULL; /* Get upstream context and connection */ u = ctx->u; @@ -112,6 +120,30 @@ static int http_post(struct prometheus_remote_write_context *ctx, val->str, flb_sds_len(val->str)); } +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS + /* AWS SigV4 headers */ + if (ctx->has_aws_auth == FLB_TRUE) { + flb_plg_debug(ctx->ins, "signing request with AWS Sigv4"); + signature = flb_signv4_do(c, + FLB_TRUE, /* normalize URI ? */ + FLB_TRUE, /* add x-amz-date header ? */ + time(NULL), + (char *) ctx->aws_region, + (char *) ctx->aws_service, + 0, NULL, + ctx->aws_provider); + + if (!signature) { + flb_plg_error(ctx->ins, "could not sign request with sigv4"); + out_ret = FLB_RETRY; + goto cleanup; + } + flb_sds_destroy(signature); + } +#endif +#endif + ret = flb_http_do(c, &b_sent); if (ret == 0) { /* @@ -158,6 +190,7 @@ static int http_post(struct prometheus_remote_write_context *ctx, out_ret = FLB_RETRY; } +cleanup: /* * If the payload buffer is different than incoming records in body, means * we generated a different payload and must be freed. @@ -332,6 +365,21 @@ static struct flb_config_map config_map[] = { 0, FLB_TRUE, offsetof(struct prometheus_remote_write_context, http_passwd), "Set HTTP auth password" }, +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS + { + FLB_CONFIG_MAP_BOOL, "aws_auth", "false", + 0, FLB_TRUE, offsetof(struct prometheus_remote_write_context, has_aws_auth), + "Enable AWS SigV4 authentication" + }, + { + FLB_CONFIG_MAP_STR, "aws_service", "aps", + 0, FLB_TRUE, offsetof(struct prometheus_remote_write_context, aws_service), + "AWS destination service code, used by SigV4 authentication" + }, + FLB_AWS_CREDENTIAL_BASE_CONFIG_MAP(FLB_PROMETHEUS_REMOTE_WRITE_CREDENTIAL_PREFIX), +#endif +#endif { FLB_CONFIG_MAP_SLIST_1, "header", NULL, FLB_CONFIG_MAP_MULT, FLB_TRUE, offsetof(struct prometheus_remote_write_context, headers), diff --git a/plugins/out_prometheus_remote_write/remote_write.h b/plugins/out_prometheus_remote_write/remote_write.h index 2e370c65c6d..a4e2aa5f77c 100644 --- a/plugins/out_prometheus_remote_write/remote_write.h +++ b/plugins/out_prometheus_remote_write/remote_write.h @@ -26,6 +26,11 @@ #define FLB_PROMETHEUS_REMOTE_WRITE_MIME_PROTOBUF_LITERAL "application/x-protobuf" #define FLB_PROMETHEUS_REMOTE_WRITE_VERSION_HEADER_NAME "X-Prometheus-Remote-Write-Version" #define FLB_PROMETHEUS_REMOTE_WRITE_VERSION_LITERAL "0.1.0" +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS +#define FLB_PROMETHEUS_REMOTE_WRITE_CREDENTIAL_PREFIX "aws_" +#endif +#endif /* Plugin context */ struct prometheus_remote_write_context { @@ -33,6 +38,16 @@ struct prometheus_remote_write_context { char *http_user; char *http_passwd; + /* AWS Auth */ +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS + int has_aws_auth; + struct flb_aws_provider *aws_provider; + const char *aws_region; + const char *aws_service; +#endif +#endif + /* Proxy */ const char *proxy; char *proxy_host; diff --git a/plugins/out_prometheus_remote_write/remote_write_conf.c b/plugins/out_prometheus_remote_write/remote_write_conf.c index 63e90b0c1ab..09c7e0d5290 100644 --- a/plugins/out_prometheus_remote_write/remote_write_conf.c +++ b/plugins/out_prometheus_remote_write/remote_write_conf.c @@ -22,7 +22,11 @@ #include #include #include - +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS +#include +#endif +#endif #include "remote_write.h" #include "remote_write_conf.h" @@ -122,6 +126,37 @@ struct prometheus_remote_write_context *flb_prometheus_remote_write_context_crea flb_output_net_default("127.0.0.1", 80, ins); } + /* Check if AWS SigV4 authentication is enabled */ +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS + if (ctx->has_aws_auth) { + if (!ctx->aws_service) { + flb_plg_error(ins, "aws_auth option requires " FLB_PROMETHEUS_REMOTE_WRITE_CREDENTIAL_PREFIX + "service to be set"); + flb_free(ctx); + return NULL; + } + + ctx->aws_provider = flb_managed_chain_provider_create( + ins, + config, + FLB_PROMETHEUS_REMOTE_WRITE_CREDENTIAL_PREFIX, + NULL, + flb_aws_client_generator() + ); + if (!ctx->aws_provider) { + flb_plg_error(ins, "failed to create aws credential provider for sigv4 auth"); + flb_free(ctx); + return NULL; + } + + /* If managed provider creation succeeds, then region key is present */ + ctx->aws_region = flb_output_get_property(FLB_PROMETHEUS_REMOTE_WRITE_CREDENTIAL_PREFIX + "region", ctx->ins); + } +#endif /* !FLB_HAVE_AWS */ +#endif /* !FLB_HAVE_SIGNV4 */ + /* Check if SSL/TLS is enabled */ #ifdef FLB_HAVE_TLS if (ins->use_tls == FLB_TRUE) { @@ -205,6 +240,14 @@ void flb_prometheus_remote_write_context_destroy( flb_upstream_destroy(ctx->u); } +#ifdef FLB_HAVE_SIGNV4 +#ifdef FLB_HAVE_AWS + if (ctx->aws_provider) { + flb_aws_provider_destroy(ctx->aws_provider); + } +#endif +#endif + flb_free(ctx->proxy_host); flb_free(ctx->uri); flb_free(ctx); From 5bad538cfd2a03754322ceaf6b7f9183ea1c6388 Mon Sep 17 00:00:00 2001 From: Aditya Prajapati Date: Wed, 24 May 2023 17:46:28 +0530 Subject: [PATCH 55/74] multiline: remove incorrect flush we are flushing the stream buffer in case it is different in two consecutive runs, which leads to incorrect parsing of multiline logs where we have messages from different streams (stderr & stdout for ex) interleaved Signed-off-by: Aditya Prajapati --- src/multiline/flb_ml.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/multiline/flb_ml.c b/src/multiline/flb_ml.c index f3be4cdfe83..ae793b27759 100644 --- a/src/multiline/flb_ml.c +++ b/src/multiline/flb_ml.c @@ -232,7 +232,6 @@ static int package_content(struct flb_ml_stream *mst, } else { if (mst->last_stream_group != stream_group) { - flb_ml_flush_stream_group(parser, mst, mst->last_stream_group); mst->last_stream_group = stream_group; } } From 68f8c054d5aa1dc9f63e08c7014033f692ad0d3d Mon Sep 17 00:00:00 2001 From: Aditya Prajapati Date: Thu, 25 May 2023 16:43:22 +0530 Subject: [PATCH 56/74] tests: ml: update expectation based on updated flush logic Signed-off-by: Aditya Prajapati --- tests/internal/multiline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/internal/multiline.c b/tests/internal/multiline.c index c909c1bbda1..6434931000d 100644 --- a/tests/internal/multiline.c +++ b/tests/internal/multiline.c @@ -110,8 +110,8 @@ struct record_check container_mix_input[] = { struct record_check container_mix_output[] = { {"a1\n"}, {"a2\n"}, - {"bbcc"}, {"ddee\n"}, + {"bbcc"}, {"single full"}, {"1a. some multiline log"}, {"1b. some multiline log"}, @@ -1345,7 +1345,7 @@ static void test_issue_5504() } TEST_CHECK(cb != NULL); - /* Trigger the callback without delay */ + /* Trigger the callback without delay */ cb(config, ml); /* This should not update the last_flush since it is before the timeout */ TEST_CHECK(ml->last_flush == last_flush); From 99bc266b038690ede7cca842a529c96fd565d2eb Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Thu, 20 Jul 2023 14:04:51 +0200 Subject: [PATCH 57/74] upstream: decoupled socket shutdown from upstream connection release Additionally, a flag to ensure that a socket is only shut down once has been added and the timeout based event injection and connection destruction mechanism was refactored to ensure that connections aren't prematurely destroyed and coroutines are properly resumed even when the priority event loop hits its iteration limit before the injected event is processed. Signed-off-by: Leonardo Alminana --- src/flb_upstream.c | 80 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 13 deletions(-) diff --git a/src/flb_upstream.c b/src/flb_upstream.c index 72f93c4a671..14504807a5c 100644 --- a/src/flb_upstream.c +++ b/src/flb_upstream.c @@ -414,6 +414,19 @@ struct flb_upstream *flb_upstream_create_url(struct flb_config *config, return u; } +/* This function shuts the connection down in order to cause + * any client code trying to read or write from it to fail. + */ +static void shutdown_conn(struct flb_upstream_conn *u_conn) +{ + if (u_conn->fd > 0 && + !u_conn->shutdown_flag) { + shutdown(u_conn->fd, SHUT_RDWR); + + u_conn->shutdown_flag = FLB_TRUE; + } +} + /* * This function moves the 'upstream connection' into the queue to be * destroyed. Note that the caller is responsible to validate and check @@ -434,7 +447,17 @@ static int prepare_destroy_conn(struct flb_upstream_conn *u_conn) } if (u_conn->fd > 0) { +#ifdef FLB_HAVE_TLS + if (u_conn->tls_session != NULL) { + flb_tls_session_destroy(u_conn->tls, u_conn); + + u_conn->tls_session = NULL; + } +#endif + shutdown_conn(u_conn); + flb_socket_close(u_conn->fd); + u_conn->fd = -1; u_conn->event.fd = -1; } @@ -798,7 +821,6 @@ int flb_upstream_conn_timeouts(struct mk_list *list) { time_t now; int drop; - int inject; struct mk_list *head; struct mk_list *u_head; struct mk_list *tmp; @@ -846,22 +868,54 @@ int flb_upstream_conn_timeouts(struct mk_list *list) } } - if (drop == FLB_TRUE) { - inject = FLB_FALSE; - if (u_conn->event.status != MK_EVENT_NONE) { - inject = FLB_TRUE; - } + if (drop == FLB_TRUE) { u_conn->net_error = ETIMEDOUT; - prepare_destroy_conn(u_conn); - /* - * prepare_destroy_conn calls mk_list_del on the event in the - * priority bucket queue, so for safety, we inject it afterwards + + /* We need to shut the connection down + * in order to cause some functions that are not + * aware of the connection error signaling + * mechanism to fail and abort. + * + * These functions do not check the net_error field + * in the connection instance upon being awakened + * so we need to ensure that any read/write + * operations on the socket generate an error. + * + * net_io_write_async + * net_io_read_async + * flb_tls_net_write_async + * flb_tls_net_read_async + * + * This operation could be selectively performed for + * connections that have already been established + * with no side effects because the connection + * establishment code honors `net_error` but + * taking in account that the previous version of + * the code did it unconditionally with no noticeable + * side effects leaving it that way is the safest + * choice at the moment. */ - if (inject == FLB_TRUE) { - mk_event_inject(u_conn->evl, &u_conn->event, - MK_EVENT_READ | MK_EVENT_WRITE, + + if (MK_EVENT_IS_REGISTERED((&u_conn->event))) { + shutdown_conn(u_conn); + + mk_event_inject(u_conn->evl, + &u_conn->event, + u_conn->event.mask, FLB_TRUE); } + else { + /* I can't think of a valid reason for this code path + * to be taken but considering that it was previously + * possible for it to happen (maybe wesley can shed + * some light on it if he remembers) I'll leave this + * for the moment. + * In any case, it's proven not to interfere with the + * coroutine awakening issue this change addresses. + */ + + prepare_destroy_conn(u_conn); + } } } From a34614113c10c247ddd61ba065d517064b6d2a04 Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Thu, 20 Jul 2023 13:59:13 +0200 Subject: [PATCH 58/74] connection: a shutdown guard flag was added Signed-off-by: Leonardo Alminana --- include/fluent-bit/flb_upstream_conn.h | 8 ++++++++ src/flb_upstream.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/include/fluent-bit/flb_upstream_conn.h b/include/fluent-bit/flb_upstream_conn.h index 08e2741cef7..73663713743 100644 --- a/include/fluent-bit/flb_upstream_conn.h +++ b/include/fluent-bit/flb_upstream_conn.h @@ -66,6 +66,14 @@ struct flb_upstream_conn { */ int busy_flag; + /* This flag is used to determine if the connection was shut down to ensure we + * don't do it twice when a timeout is detected. + * + * This is required in order to overcome a limitation in the async read / write + * functions that will be addressed as soon as possible. + */ + int shutdown_flag; + /* Timestamps */ time_t ts_assigned; time_t ts_created; diff --git a/src/flb_upstream.c b/src/flb_upstream.c index 14504807a5c..dd16c3edb8a 100644 --- a/src/flb_upstream.c +++ b/src/flb_upstream.c @@ -560,6 +560,8 @@ static struct flb_upstream_conn *create_conn(struct flb_upstream *u) conn->ts_available = 0; conn->ka_count = 0; conn->coro = coro; + conn->busy_flag = FLB_FALSE; + conn->shutdown_flag = FLB_FALSE; if (u->net.keepalive == FLB_TRUE) { flb_upstream_conn_recycle(conn, FLB_TRUE); From 2dcffde07fc28679bed696368984ee614e5e8af1 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Mon, 2 Oct 2023 22:37:17 +0000 Subject: [PATCH 59/74] filter_throttle: fix print_status false log reduction option Signed-off-by: Matthew Fala --- plugins/filter_throttle/throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/filter_throttle/throttle.c b/plugins/filter_throttle/throttle.c index a7284dbf1fd..c831aa2ed7b 100644 --- a/plugins/filter_throttle/throttle.c +++ b/plugins/filter_throttle/throttle.c @@ -160,7 +160,7 @@ static int cb_throttle_init(struct flb_filter_instance *f_ins, pthread_mutex_init(&throttle_mut, NULL); /* Create context */ - ctx = flb_malloc(sizeof(struct flb_filter_throttle_ctx)); + ctx = flb_calloc(1, sizeof(struct flb_filter_throttle_ctx)); if (!ctx) { flb_errno(); return -1; From e2f3f186a110cf8e86e4687d02ba9ca461a9d8ac Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:16:47 -0400 Subject: [PATCH 60/74] out_cloudwatch_logs: add PutLogEvents entity scraping logic for namespace and node (#6) * Add PutLogEvents entity scraping logic for namespace and node * Fix entity formatting * Remove unnecessary non-NULL scenario checks for entity attributes --- plugins/out_cloudwatch_logs/cloudwatch_api.c | 126 ++++++++++++++++++ plugins/out_cloudwatch_logs/cloudwatch_logs.c | 31 +++++ plugins/out_cloudwatch_logs/cloudwatch_logs.h | 39 ++++++ 3 files changed, 196 insertions(+) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index de0825e3f83..7c1e340a800 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -195,12 +195,61 @@ static inline int try_to_write(char *buf, int *off, size_t left, return FLB_TRUE; } +static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, int *offset) { + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "\"keyAttributes\":{\"Type\":\"Service\",\"Name\":\"compass-service\",\"Environment\":\"compass-environment\"},", 0)) { + goto error; + } + return 0; +error: + return -1; +} + +static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream,int *offset) { + char ts[256]; + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "\"attributes\":{", + 0)) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "\"PlatformType\":\"AWS::EKS\"" + ,0)) { + goto error; + } + if(stream->entity->attributes->namespace != NULL && strlen(stream->entity->attributes->namespace) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"K8s.Namespace\":\"",stream->entity->attributes->namespace,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } + if(stream->entity->attributes->node != NULL && strlen(stream->entity->attributes->node) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"K8s.Node\":\"",buf->current_stream->entity->attributes->node,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } + + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "}", 1)) { + goto error; + } + return 0; +error: + return -1; +} + /* * Writes the "header" for a put log events payload */ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream, int *offset) { + int ret; if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "{\"logGroupName\":\"", 17)) { goto error; @@ -225,6 +274,32 @@ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, "\",", 2)) { goto error; } + if(stream->entity != NULL) { + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "\"entity\":{", 10)) { + goto error; + } + + if(stream->entity->key_attributes != NULL) { + ret = entity_add_key_attributes(ctx,buf,offset); + if (ret < 0) { + flb_plg_error(ctx->ins, "Failed to initialize Entity KeyAttributes"); + goto error; + } + } + if(stream->entity->attributes != NULL) { + ret = entity_add_attributes(ctx,buf,stream, offset); + if (ret < 0) { + flb_plg_error(ctx->ins, "Failed to initialize Entity Attributes"); + goto error; + } + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "},", 2)) { + goto error; + } + + } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"logEvents\":[", 13)) { @@ -782,6 +857,51 @@ int pack_emf_payload(struct flb_cloudwatch *ctx, return 0; } +void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map, int map_size) { + int i,j; + msgpack_object key, kube_key; + msgpack_object val, kube_val; + + int val_map_size; + for(i=0; i < map_size; i++) { + key = map.via.map.ptr[i].key; + val = map.via.map.ptr[i].val; + if(strncmp(key.via.str.ptr, "kubernetes",10 ) == 0 ) { + if (val.type == MSGPACK_OBJECT_MAP) { + val_map_size = val.via.map.size; + for (j=0; j < val_map_size; j++) { + kube_key = val.via.map.ptr[j].key; + kube_val = val.via.map.ptr[j].val; + if(strncmp(kube_key.via.str.ptr, "namespace_name", 14) == 0) { + if(entity->attributes->namespace == NULL) { + entity->attributes->namespace = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } + } else if(strncmp(kube_key.via.str.ptr, "host", 4) == 0) { + if(entity->attributes->node == NULL) { + entity->attributes->node = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } + } + } + } + } + } +} + +void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stream, const msgpack_object map) { + if(ctx->kubernete_metadata_enabled) { + if(stream->entity == NULL) { + stream->entity = flb_malloc(sizeof(entity)); + stream->entity->key_attributes = flb_malloc(sizeof(entity_key_attributes)); + stream->entity->attributes = flb_malloc(sizeof(entity_attributes)); + stream->entity->attributes->namespace = NULL; + stream->entity->attributes->node = NULL; + parse_entity(ctx,stream->entity,map, map.via.map.size); + } else { + parse_entity(ctx,stream->entity,map, map.via.map.size); + } + } +} + /* * Main routine- processes msgpack and sends in batches which ignore the empty ones * return value is the number of events processed and send. @@ -852,10 +972,14 @@ int process_and_send(struct flb_cloudwatch *ctx, const char *input_plugin, map_size = map.via.map.size; stream = get_log_stream(ctx, tag, map); + update_or_create_entity(ctx,stream,map); if (!stream) { flb_plg_debug(ctx->ins, "Couldn't determine log group & stream for record with tag %s", tag); goto error; } + if (!stream->entity) { + flb_plg_warn(ctx->ins, "Failed to generate entity"); + } if (ctx->log_key) { key_str = NULL; @@ -1420,6 +1544,8 @@ int put_log_events(struct flb_cloudwatch *ctx, struct cw_flush *buf, if (c) { flb_plg_debug(ctx->ins, "PutLogEvents http status=%d", c->resp.status); + flb_plg_debug(ctx->ins, "PutLogEvents http data=%s", c->resp.data); + flb_plg_debug(ctx->ins, "PutLogEvents http payload=%s", c->resp.payload); if (c->resp.status == 200) { if (c->resp.data == NULL || c->resp.data_len == 0 || strstr(c->resp.data, AMZN_REQUEST_ID_HEADER) == NULL) { diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 03723f521a1..8f69df13dbb 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -344,6 +344,15 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, flb_output_upstream_set(upstream, ctx->ins); ctx->cw_client->host = ctx->endpoint; + struct mk_list *head; + struct flb_filter_instance *f_ins; + mk_list_foreach(head, &config->filters) { + f_ins = mk_list_entry(head, struct flb_filter_instance, _head); + if (strstr(f_ins->p->name, "kubernetes")) { + ctx->kubernete_metadata_enabled = true; + } + } + /* Export context */ flb_output_set_context(ins, ctx); @@ -491,6 +500,25 @@ static int cb_cloudwatch_exit(void *data, struct flb_config *config) return 0; } +void entity_destroy(entity *entity) { + if(entity->attributes) { + flb_free(entity->attributes->cluster_name); + flb_free(entity->attributes->instance_id); + flb_free(entity->attributes->namespace); + flb_free(entity->attributes->node); + flb_free(entity->attributes->platform_type); + flb_free(entity->attributes->workload); + flb_free(entity->attributes); + } + if(entity->key_attributes) { + flb_free(entity->key_attributes->environment); + flb_free(entity->key_attributes->name); + flb_free(entity->key_attributes->type); + flb_free(entity->key_attributes); + } + flb_free(entity); +} + void log_stream_destroy(struct log_stream *stream) { if (stream) { @@ -500,6 +528,9 @@ void log_stream_destroy(struct log_stream *stream) if (stream->group) { flb_sds_destroy(stream->group); } + if (stream->entity) { + entity_destroy(stream->entity); + } flb_free(stream); } } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.h b/plugins/out_cloudwatch_logs/cloudwatch_logs.h index 705f69b9139..06e4cb155e6 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.h @@ -30,6 +30,32 @@ #include #include +/* Entity object used for associating the telemetry + * in the PutLogEvent call*/ +typedef struct entity { + struct entity_key_attributes *key_attributes; + struct entity_attributes *attributes; +}entity; + +/* KeyAttributes used for CloudWatch Entity object + * in the PutLogEvent call*/ +typedef struct entity_key_attributes { + char *type; + char *name; + char *environment; +}entity_key_attributes; + +/* Attributes used for CloudWatch Entity object + * in the PutLogEvent call*/ +typedef struct entity_attributes { + char *platform_type; + char *cluster_name; + char *namespace; + char *workload; + char *node; + char *instance_id; +}entity_attributes; + /* buffers used for each flush */ struct cw_flush { /* temporary buffer for storing the serialized event messages */ @@ -84,6 +110,13 @@ struct log_stream { unsigned long long oldest_event; unsigned long long newest_event; + /* + * PutLogEvents entity object + * variable that store service or infrastructure + * information + */ + struct entity *entity; + struct mk_list _head; }; @@ -146,6 +179,12 @@ struct flb_cloudwatch { /* Plugin output instance reference */ struct flb_output_instance *ins; + + /* Checks if kubernete filter is enabled + * So the plugin knows when to scrape for Entity + */ + + int kubernete_metadata_enabled; }; void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx); From 8b949f5a179d2f50ab1bb9b5bd7ae474ec24171f Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:10:48 -0400 Subject: [PATCH 61/74] out_cloudwatch_logs: add entity scraping logic for cluster and instance ID (#7) --- plugins/filter_kubernetes/kube_meta.c | 25 +++++++++++++++++- plugins/filter_kubernetes/kube_meta.h | 2 ++ plugins/out_cloudwatch_logs/cloudwatch_api.c | 27 ++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 35067ce0580..8157f8f31bd 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -499,6 +499,23 @@ static int get_api_server_info(struct flb_kube *ctx, return 0; } +/* Gather pods list information from Kubelet */ +static void get_cluster_from_environment(struct flb_kube *ctx,struct flb_kube_meta *meta) +{ + if(meta->cluster == NULL) { + char* cluster_name = getenv("CLUSTER_NAME"); + int cluster_name_len = strlen(cluster_name); + if(cluster_name) { + meta->cluster = strdup(cluster_name); + meta->cluster_len = cluster_name_len; + meta->fields++; + } else { + free(cluster_name); + } + flb_plg_debug(ctx->ins, "Cluster name is %s.", meta->cluster); + } +} + static void cb_results(const char *name, const char *value, size_t vlen, void *data) { @@ -1059,6 +1076,12 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, /* Append Regex fields */ msgpack_pack_map(&mp_pck, map_size); + if (meta->cluster != NULL) { + msgpack_pack_str(&mp_pck, 7); + msgpack_pack_str_body(&mp_pck, "cluster", 7); + msgpack_pack_str(&mp_pck, meta->cluster_len); + msgpack_pack_str_body(&mp_pck, meta->cluster, meta->cluster_len); + } if (meta->podname != NULL) { msgpack_pack_str(&mp_pck, 8); msgpack_pack_str_body(&mp_pck, "pod_name", 8); @@ -1334,7 +1357,7 @@ static int get_and_merge_meta(struct flb_kube *ctx, struct flb_kube_meta *meta, int ret; char *api_buf; size_t api_size; - + get_cluster_from_environment(ctx, meta); if (ctx->use_tag_for_meta) { ret = merge_meta_from_tag(ctx, meta, out_buf, out_size); return ret; diff --git a/plugins/filter_kubernetes/kube_meta.h b/plugins/filter_kubernetes/kube_meta.h index fb0278afcdc..a5d7ae9ec7a 100644 --- a/plugins/filter_kubernetes/kube_meta.h +++ b/plugins/filter_kubernetes/kube_meta.h @@ -27,6 +27,7 @@ struct flb_kube; struct flb_kube_meta { int fields; + int cluster_len; int namespace_len; int podname_len; int cache_key_len; @@ -35,6 +36,7 @@ struct flb_kube_meta { int container_hash_len; int container_image_len; + char *cluster; char *namespace; char *podname; char *container_name; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 7c1e340a800..4778abcc222 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -217,6 +217,14 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu ,0)) { goto error; } + if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } if(stream->entity->attributes->namespace != NULL && strlen(stream->entity->attributes->namespace) != 0) { if (!snprintf(ts,256, ",%s%s%s","\"K8s.Namespace\":\"",stream->entity->attributes->namespace,"\"")) { goto error; @@ -233,6 +241,14 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu goto error; } } + if(stream->entity->attributes->instance_id != NULL && strlen(stream->entity->attributes->instance_id) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"EC2.InstanceId\":\"",buf->current_stream->entity->attributes->instance_id,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "}", 1)) { @@ -880,10 +896,19 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map if(entity->attributes->node == NULL) { entity->attributes->node = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } + } else if(strncmp(kube_key.via.str.ptr, "cluster", 7) == 0) { + if(entity->attributes->cluster_name == NULL) { + entity->attributes->cluster_name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } } } } } + if(strncmp(key.via.str.ptr, "ec2_instance_id",15 ) == 0 ) { + if(entity->attributes->instance_id == NULL) { + entity->attributes->instance_id = flb_strndup(val.via.str.ptr, val.via.str.size); + } + } } } @@ -895,6 +920,8 @@ void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stre stream->entity->attributes = flb_malloc(sizeof(entity_attributes)); stream->entity->attributes->namespace = NULL; stream->entity->attributes->node = NULL; + stream->entity->attributes->cluster_name = NULL; + stream->entity->attributes->instance_id = NULL; parse_entity(ctx,stream->entity,map, map.via.map.size); } else { parse_entity(ctx,stream->entity,map, map.via.map.size); From 52b4cf77315782e022e741373f86087a774f17fa Mon Sep 17 00:00:00 2001 From: POOJA REDDY NATHALA Date: Fri, 6 Sep 2024 16:40:31 -0400 Subject: [PATCH 62/74] added logic to get pod to service map from endpoint and store it in struct (#9) --- plugins/filter_kubernetes/kube_meta.c | 154 ++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 8157f8f31bd..28207f94dd7 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -46,6 +46,158 @@ (sizeof(FLB_KUBE_META_INIT_CONTAINER_STATUSES_KEY) - 1) #define FLB_KUBE_TOKEN_BUF_SIZE 8192 /* 8KB */ +typedef struct pod_service_map{ + char *pod_name; + char *service_name; + struct mk_list _head; +} pod_service_map; + +struct mk_list pod_service_list; + +static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t api_size) +{ + flb_plg_debug(ctx->ins, "started parsing pod to service map"); + + size_t off = 0; + int ret; + msgpack_unpacked api_result; + msgpack_object api_map; + msgpack_object k; + msgpack_object v; + char *buffer; + size_t size; + int root_type; + pod_service_map *entry; + + + /* Iterate API server msgpack and lookup specific fields */ + if (api_buf != NULL) { + ret = flb_pack_json(api_buf, api_size, + &buffer, &size, &root_type); + + if (ret < 0) { + flb_plg_warn(ctx->ins, "Could not parse json response = %s", + api_buf); + flb_free(buffer); + return; + } + msgpack_unpacked_init(&api_result); + ret = msgpack_unpack_next(&api_result, buffer, size, &off); + if (ret == MSGPACK_UNPACK_SUCCESS) { + api_map = api_result.data; + for (int i = 0; i < api_map.via.map.size; i++) { + k = api_map.via.map.ptr[i].key; + v = api_map.via.map.ptr[i].val; + if (k.type == MSGPACK_OBJECT_STR && v.type == MSGPACK_OBJECT_STR) { + char *pod_name = flb_strndup(k.via.str.ptr, (size_t) k.via.str.size); + char *service_name = flb_strndup(v.via.str.ptr, (size_t) v.via.str.size); + entry = flb_malloc(sizeof( struct pod_service_map)); + if (!entry) { + flb_error("Failed to allocate memory for pod_service_map"); + flb_free(pod_name); + flb_free(service_name); + return; + } + + entry->pod_name = pod_name; + entry->service_name = service_name; + + mk_list_init(&pod_service_list); + + mk_list_add(&entry->_head, &pod_service_list); + + flb_free(pod_name); + flb_free(service_name); + }else { + flb_plg_error(ctx->ins, "key and values are not strings"); + } + } + } + } + + flb_plg_debug(ctx->ins, "ended parsing pod to service map" ); + + msgpack_unpacked_destroy(&api_result); + flb_free(buffer); +} + +static void log_pod_service_map(struct flb_filter_instance *ins) +{ + struct mk_list *tmp; + struct mk_list *head; + pod_service_map *entry; + + flb_plg_debug(ins, "Pod to Service mapping:"); + + mk_list_foreach_safe(head, tmp, &pod_service_list) { + entry = mk_list_entry(head, pod_service_map, _head); + flb_plg_debug(ins, "Pod: %s, Service: %s", entry->pod_name, entry->service_name); + } +} + +static int fetch_pod_service_map(struct flb_kube *ctx, struct flb_config *config, char *api_server_url) +{ + int ret; + struct flb_http_client *c; + size_t b_sent; + struct flb_upstream_conn *u_conn; + struct flb_upstream *u; + + flb_plg_debug(ctx->ins, "fetch pod to service map"); + + /* Get upstream context and connection */ + u = flb_upstream_create(config, + "cloudwatch-agent.amazon-cloudwatch", + 3333, + FLB_IO_TCP, NULL); + u_conn = flb_upstream_conn_get(u); + if (!u_conn) { + flb_plg_error(ctx->ins, "no upstream connections available to %s:%i", + u->tcp_host, u->tcp_port); + return FLB_RETRY; + } + + /* Create HTTP client */ + c = flb_http_client(u_conn, FLB_HTTP_GET, + api_server_url, + NULL, 0, "cloudwatch-agent.amazon-cloudwatch", + 3333, NULL, 0); + + if (!c) { + flb_error("[kube_meta] could not create HTTP client"); + return -1; + } + + /* Perform HTTP request */ + ret = flb_http_do(c, &b_sent); + flb_plg_debug(ctx->ins, "Request (uri = %s) http_do=%i, " + "HTTP Status: %i", + api_server_url, ret, c->resp.status); + + if (ret != 0 || c->resp.status != 200) { + if (c->resp.payload_size > 0) { + flb_plg_debug(ctx->ins, "HTTP response : %s", + c->resp.payload); + } + flb_http_client_destroy(c); + flb_upstream_conn_release(u_conn); + return -1; + } + + /* Parse response data */ + if (c->resp.payload != NULL) { + flb_plg_debug(ctx->ins, "HTTP response payload : %s", + c->resp.payload); + parse_pod_service_map(ctx, c->resp.payload, c->resp.payload_size); + log_pod_service_map(ctx->ins); + } + + /* Cleanup */ + flb_http_client_destroy(c); + flb_upstream_conn_release(u_conn); + return 0; +} + static int file_to_buffer(const char *path, char **out_buf, size_t *out_size) { @@ -1483,6 +1635,8 @@ int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config) return -1; } + fetch_pod_service_map(ctx, config, "/fluent-bit"); + if (ctx->use_kubelet) { /* Gather info from Kubelet */ flb_plg_info(ctx->ins, "testing connectivity with Kubelet..."); From c5df9649dbc6ce0af60335e16b689a2cd9b779b8 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:17:12 -0400 Subject: [PATCH 63/74] filter_kubernetes: Fix segmentation fault for kubernetes unit tests (#11) --- plugins/filter_kubernetes/kube_meta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 28207f94dd7..382a21acbbd 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -656,10 +656,9 @@ static void get_cluster_from_environment(struct flb_kube *ctx,struct flb_kube_me { if(meta->cluster == NULL) { char* cluster_name = getenv("CLUSTER_NAME"); - int cluster_name_len = strlen(cluster_name); if(cluster_name) { meta->cluster = strdup(cluster_name); - meta->cluster_len = cluster_name_len; + meta->cluster_len = strlen(cluster_name); meta->fields++; } else { free(cluster_name); From af4f7dac0cc8b724f82d820f2d7f8c5a060dee48 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:58:28 -0400 Subject: [PATCH 64/74] filter_kubernetes: add pod to service map parsing logics (#13) --- plugins/filter_kubernetes/kube_conf.c | 6 + plugins/filter_kubernetes/kube_conf.h | 31 ++ plugins/filter_kubernetes/kube_meta.c | 210 +++--------- plugins/filter_kubernetes/kubernetes.c | 312 ++++++++++++++++++ plugins/out_cloudwatch_logs/cloudwatch_api.c | 66 +++- .../options_use-pod-association-enabled.meta | 109 ++++++ ...use-pod-association-enabled_fluent-bit.out | 1 + .../use_pod_association_enabled.map | 1 + tests/runtime/filter_kubernetes.c | 74 ++++- 9 files changed, 639 insertions(+), 171 deletions(-) create mode 100644 tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled.meta create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map diff --git a/plugins/filter_kubernetes/kube_conf.c b/plugins/filter_kubernetes/kube_conf.c index eb409fcee54..20de8c3b215 100644 --- a/plugins/filter_kubernetes/kube_conf.c +++ b/plugins/filter_kubernetes/kube_conf.c @@ -190,6 +190,12 @@ struct flb_kube *flb_kube_conf_create(struct flb_filter_instance *ins, flb_plg_info(ctx->ins, "https=%i host=%s port=%i", ctx->api_https, ctx->api_host, ctx->api_port); } + + + ctx->pod_hash_table = flb_hash_create_with_ttl(ctx->pod_service_map_ttl, + FLB_HASH_EVICT_OLDER, + FLB_HASH_TABLE_SIZE, + FLB_HASH_TABLE_SIZE); return ctx; } diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index 31bc8015408..24f25e9a6ab 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -64,8 +64,24 @@ #define FLB_KUBE_TAG_PREFIX "kube.var.log.containers." #endif +/* + * Maximum attribute length for Entity's KeyAttributes + * values + * https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_Service.html#:~:text=Maximum%20length%20of%201024. + */ +#define KEY_ATTRIBUTES_MAX_LEN 1024 + struct kube_meta; +struct service_attributes { + char name[KEY_ATTRIBUTES_MAX_LEN]; + int name_len; + char environment[KEY_ATTRIBUTES_MAX_LEN]; + int environment_len; + int fields; + +}; + /* Filter context */ struct flb_kube { /* Configuration parameters */ @@ -158,6 +174,21 @@ struct flb_kube { int kube_meta_cache_ttl; + /* Configuration used for enabling pod to service name mapping*/ + char *use_pod_association; + char *pod_association_host; + char *pod_association_endpoint; + char *pod_association_port; + + /* + * TTL is used to check how long should the mapped entry + * remain in the hash table + */ + struct flb_hash *pod_hash_table; + int pod_service_map_ttl; + int pod_service_map_refresh_interval; + flb_sds_t pod_service_preload_cache_dir; + struct flb_tls *tls; struct flb_config *config; diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 382a21acbbd..d2077236b4c 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -46,158 +46,6 @@ (sizeof(FLB_KUBE_META_INIT_CONTAINER_STATUSES_KEY) - 1) #define FLB_KUBE_TOKEN_BUF_SIZE 8192 /* 8KB */ -typedef struct pod_service_map{ - char *pod_name; - char *service_name; - struct mk_list _head; -} pod_service_map; - -struct mk_list pod_service_list; - -static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t api_size) -{ - flb_plg_debug(ctx->ins, "started parsing pod to service map"); - - size_t off = 0; - int ret; - msgpack_unpacked api_result; - msgpack_object api_map; - msgpack_object k; - msgpack_object v; - char *buffer; - size_t size; - int root_type; - pod_service_map *entry; - - - /* Iterate API server msgpack and lookup specific fields */ - if (api_buf != NULL) { - ret = flb_pack_json(api_buf, api_size, - &buffer, &size, &root_type); - - if (ret < 0) { - flb_plg_warn(ctx->ins, "Could not parse json response = %s", - api_buf); - flb_free(buffer); - return; - } - msgpack_unpacked_init(&api_result); - ret = msgpack_unpack_next(&api_result, buffer, size, &off); - if (ret == MSGPACK_UNPACK_SUCCESS) { - api_map = api_result.data; - for (int i = 0; i < api_map.via.map.size; i++) { - k = api_map.via.map.ptr[i].key; - v = api_map.via.map.ptr[i].val; - if (k.type == MSGPACK_OBJECT_STR && v.type == MSGPACK_OBJECT_STR) { - char *pod_name = flb_strndup(k.via.str.ptr, (size_t) k.via.str.size); - char *service_name = flb_strndup(v.via.str.ptr, (size_t) v.via.str.size); - entry = flb_malloc(sizeof( struct pod_service_map)); - if (!entry) { - flb_error("Failed to allocate memory for pod_service_map"); - flb_free(pod_name); - flb_free(service_name); - return; - } - - entry->pod_name = pod_name; - entry->service_name = service_name; - - mk_list_init(&pod_service_list); - - mk_list_add(&entry->_head, &pod_service_list); - - flb_free(pod_name); - flb_free(service_name); - }else { - flb_plg_error(ctx->ins, "key and values are not strings"); - } - } - } - } - - flb_plg_debug(ctx->ins, "ended parsing pod to service map" ); - - msgpack_unpacked_destroy(&api_result); - flb_free(buffer); -} - -static void log_pod_service_map(struct flb_filter_instance *ins) -{ - struct mk_list *tmp; - struct mk_list *head; - pod_service_map *entry; - - flb_plg_debug(ins, "Pod to Service mapping:"); - - mk_list_foreach_safe(head, tmp, &pod_service_list) { - entry = mk_list_entry(head, pod_service_map, _head); - flb_plg_debug(ins, "Pod: %s, Service: %s", entry->pod_name, entry->service_name); - } -} - -static int fetch_pod_service_map(struct flb_kube *ctx, struct flb_config *config, char *api_server_url) -{ - int ret; - struct flb_http_client *c; - size_t b_sent; - struct flb_upstream_conn *u_conn; - struct flb_upstream *u; - - flb_plg_debug(ctx->ins, "fetch pod to service map"); - - /* Get upstream context and connection */ - u = flb_upstream_create(config, - "cloudwatch-agent.amazon-cloudwatch", - 3333, - FLB_IO_TCP, NULL); - u_conn = flb_upstream_conn_get(u); - if (!u_conn) { - flb_plg_error(ctx->ins, "no upstream connections available to %s:%i", - u->tcp_host, u->tcp_port); - return FLB_RETRY; - } - - /* Create HTTP client */ - c = flb_http_client(u_conn, FLB_HTTP_GET, - api_server_url, - NULL, 0, "cloudwatch-agent.amazon-cloudwatch", - 3333, NULL, 0); - - if (!c) { - flb_error("[kube_meta] could not create HTTP client"); - return -1; - } - - /* Perform HTTP request */ - ret = flb_http_do(c, &b_sent); - flb_plg_debug(ctx->ins, "Request (uri = %s) http_do=%i, " - "HTTP Status: %i", - api_server_url, ret, c->resp.status); - - if (ret != 0 || c->resp.status != 200) { - if (c->resp.payload_size > 0) { - flb_plg_debug(ctx->ins, "HTTP response : %s", - c->resp.payload); - } - flb_http_client_destroy(c); - flb_upstream_conn_release(u_conn); - return -1; - } - - /* Parse response data */ - if (c->resp.payload != NULL) { - flb_plg_debug(ctx->ins, "HTTP response payload : %s", - c->resp.payload); - parse_pod_service_map(ctx, c->resp.payload, c->resp.payload_size); - log_pod_service_map(ctx->ins); - } - - /* Cleanup */ - flb_http_client_destroy(c); - flb_upstream_conn_release(u_conn); - return 0; -} - static int file_to_buffer(const char *path, char **out_buf, size_t *out_size) { @@ -1085,7 +933,9 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, int have_labels = -1; int have_annotations = -1; int have_nodename = -1; + int pod_service_found = -1; size_t off = 0; + size_t tmp_service_attr_size = 0; msgpack_sbuffer mp_sbuf; msgpack_packer mp_pck; @@ -1100,7 +950,7 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_object api_map; msgpack_object ann_map; struct flb_kube_props props = {0}; - + struct service_attributes *tmp_service_attributes = {0}; /* * - reg_buf: is a msgpack Map containing meta captured using Regex * @@ -1222,6 +1072,13 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, } } + pod_service_found = flb_hash_get(ctx->pod_hash_table, + meta->podname, meta->podname_len, + &tmp_service_attributes, &tmp_service_attr_size); + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + map_size += tmp_service_attributes->fields; + } + /* Set map size: current + pod_id, labels and annotations */ map_size += meta->fields; @@ -1245,6 +1102,20 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_pack_str(&mp_pck, meta->namespace_len); msgpack_pack_str_body(&mp_pck, meta->namespace, meta->namespace_len); } + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + if (tmp_service_attributes->name[0] != '\0') { + msgpack_pack_str(&mp_pck, 12); + msgpack_pack_str_body(&mp_pck, "service_name", 12); + msgpack_pack_str(&mp_pck, tmp_service_attributes->name_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name, tmp_service_attributes->name_len); + } + if (tmp_service_attributes->environment[0] != '\0') { + msgpack_pack_str(&mp_pck, 11); + msgpack_pack_str_body(&mp_pck, "environment", 11); + msgpack_pack_str(&mp_pck, tmp_service_attributes->environment_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->environment, tmp_service_attributes->environment_len); + } + } /* Append API Server content */ if (have_uid >= 0) { @@ -1360,8 +1231,9 @@ static inline int extract_meta(struct flb_kube *ctx, const char *data, size_t data_size, struct flb_kube_meta *meta) { - int i; + int i, pod_service_found; size_t off = 0; + size_t tmp_service_attr_size = 0; ssize_t n; int kube_tag_len; const char *kube_tag_str; @@ -1369,6 +1241,7 @@ static inline int extract_meta(struct flb_kube *ctx, int container_found = FLB_FALSE; int container_length = 0; struct flb_regex_search result; + struct service_attributes *tmp_service_attributes = {0}; msgpack_unpacked mp_result; msgpack_object root; msgpack_object map; @@ -1456,6 +1329,20 @@ static inline int extract_meta(struct flb_kube *ctx, if (ctx->cache_use_docker_id && meta->docker_id) { n += meta->docker_id_len + 1; } + + pod_service_found = flb_hash_get(ctx->pod_hash_table, + meta->podname, meta->podname_len, + &tmp_service_attributes, &tmp_service_attr_size); + + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + if (tmp_service_attributes->name[0] != '\0') { + n += tmp_service_attributes->name_len + 1; + } + if (tmp_service_attributes->environment[0] != '\0') { + n += tmp_service_attributes->environment_len + 1; + } + } + meta->cache_key = flb_malloc(n); if (!meta->cache_key) { flb_errno(); @@ -1487,6 +1374,19 @@ static inline int extract_meta(struct flb_kube *ctx, off += meta->docker_id_len; } + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + if (tmp_service_attributes->name[0] != '\0') { + meta->cache_key[off++] = ':'; + memcpy(meta->cache_key + off, tmp_service_attributes->name, tmp_service_attributes->name_len); + off += tmp_service_attributes->name_len; + } + if (tmp_service_attributes->environment[0] != '\0') { + meta->cache_key[off++] = ':'; + memcpy(meta->cache_key + off, tmp_service_attributes->environment, tmp_service_attributes->environment_len); + off += tmp_service_attributes->environment_len; + } + } + meta->cache_key[off] = '\0'; meta->cache_key_len = off; } @@ -1634,8 +1534,6 @@ int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config) return -1; } - fetch_pod_service_map(ctx, config, "/fluent-bit"); - if (ctx->use_kubelet) { /* Gather info from Kubelet */ flb_plg_info(ctx->ins, "testing connectivity with Kubelet..."); diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index 259c5e6a869..30f69a0c498 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -32,12 +32,232 @@ #include #include +#include +#include /* Merge status used by merge_log_handler() */ #define MERGE_NONE 0 /* merge unescaped string in temporary buffer */ #define MERGE_PARSED 1 /* merge parsed string (log_buf) */ #define MERGE_MAP 2 /* merge direct binary object (v) */ +struct task_args { + struct flb_kube *ctx; + char *api_server_url; +}; + +pthread_mutex_t metadata_mutex; +pthread_t background_thread; +struct task_args *task_args = {0}; + +/* + * If a file exists called service.map, load it and use it. + * If not, fall back to API. This is primarily for unit tests purposes, + */ +static int get_pod_service_file_info(struct flb_kube *ctx, const char *map_name,char **buffer) { + + int fd = -1; + char *payload = NULL; + size_t payload_size = 0; + struct stat sb; + int packed = -1; + int ret; + char uri[1024]; + + if (ctx->pod_service_preload_cache_dir && map_name) { + + ret = snprintf(uri, sizeof(uri) - 1, "%s/%s.map", + ctx->pod_service_preload_cache_dir, map_name); + if (ret > 0) { + fd = open(uri, O_RDONLY, 0); + if (fd != -1) { + if (fstat(fd, &sb) == 0) { + payload = flb_malloc(sb.st_size); + if (!payload) { + flb_errno(); + } + else { + ret = read(fd, payload, sb.st_size); + if (ret == sb.st_size) { + payload_size = ret; + } + } + } + close(fd); + } + } + + if (payload_size) { + *buffer=payload; + packed = payload_size; + flb_plg_debug(ctx->ins, "pod to service map content is: %s", buffer); + } + } + + return packed; +} + +static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t api_size) +{ + if(ctx->hash_table == NULL || ctx->pod_hash_table == NULL) { + return; + } + flb_plg_debug(ctx->ins, "started parsing pod to service map"); + + size_t off = 0; + int ret; + msgpack_unpacked api_result; + msgpack_object api_map; + msgpack_object k,v, attributeKey, attributeValue; + char *buffer; + size_t size; + int root_type; + + /* Iterate API server msgpack and lookup specific fields */ + if (api_buf != NULL) { + ret = flb_pack_json(api_buf, api_size, + &buffer, &size, &root_type); + + if (ret < 0) { + flb_plg_warn(ctx->ins, "Could not parse json response = %s", + api_buf); + flb_free(buffer); + return; + } + msgpack_unpacked_init(&api_result); + ret = msgpack_unpack_next(&api_result, buffer, size, &off); + if (ret == MSGPACK_UNPACK_SUCCESS) { + api_map = api_result.data; + for (int i = 0; i < api_map.via.map.size; i++) { + k = api_map.via.map.ptr[i].key; + v = api_map.via.map.ptr[i].val; + if (k.type == MSGPACK_OBJECT_STR && v.type == MSGPACK_OBJECT_MAP) { + char *pod_name = flb_strndup(k.via.str.ptr, k.via.str.size); + struct service_attributes *service_attributes = malloc(sizeof(struct service_attributes)); + for (int j = 0; j < v.via.map.size; j++) { + attributeKey = v.via.map.ptr[j].key; + attributeValue = v.via.map.ptr[j].val; + if (attributeKey.type == MSGPACK_OBJECT_STR && attributeValue.type == MSGPACK_OBJECT_STR) { + char *attributeKeyString = flb_strndup(attributeKey.via.str.ptr, attributeKey.via.str.size); + if(strcmp(attributeKeyString, "ServiceName") == 0 && attributeValue.via.str.size < KEY_ATTRIBUTES_MAX_LEN) { + strncpy(service_attributes->name, attributeValue.via.str.ptr, attributeValue.via.str.size); + service_attributes->name[attributeValue.via.str.size] = '\0'; + service_attributes->name_len = attributeValue.via.str.size; + service_attributes->fields++; + } + if(strcmp(attributeKeyString, "Environment") == 0 && attributeValue.via.str.size < KEY_ATTRIBUTES_MAX_LEN) { + strncpy(service_attributes->environment, attributeValue.via.str.ptr,attributeValue.via.str.size); + service_attributes->environment[attributeValue.via.str.size] = '\0'; + service_attributes->environment_len = attributeValue.via.str.size; + service_attributes->fields++; + } + flb_free(attributeKeyString); + } + } + if (service_attributes->name[0] != '\0' || service_attributes->environment[0] != '\0') { + pthread_mutex_lock(&metadata_mutex); + flb_hash_add(ctx->pod_hash_table, + pod_name,k.via.str.size, + service_attributes, sizeof(struct service_attributes)); + pthread_mutex_unlock(&metadata_mutex); + } else { + flb_free(service_attributes); + } + flb_free(pod_name); + }else { + flb_plg_error(ctx->ins, "key and values are not string and map"); + } + } + } + } + + flb_plg_debug(ctx->ins, "ended parsing pod to service map" ); + + msgpack_unpacked_destroy(&api_result); + flb_free(buffer); +} + +static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { + if(!ctx->use_pod_association) { + return -1; + } + int ret; + struct flb_http_client *c; + size_t b_sent; + struct flb_upstream_conn *u_conn; + struct flb_upstream *u; + char *buffer = {0}; + + flb_plg_debug(ctx->ins, "fetch pod to service map"); + + ret = get_pod_service_file_info(ctx, "use_pod_association_enabled", &buffer); + if (ret > 0 && buffer != NULL) { + parse_pod_service_map(ctx, buffer, ret); + } + else { + /* Get upstream context and connection */ + u = flb_upstream_create(ctx->config, + ctx->pod_association_host, + ctx->pod_association_port, + FLB_IO_TCP, NULL); + u_conn = flb_upstream_conn_get(u); + if (!u_conn) { + flb_plg_error(ctx->ins, "no upstream connections available to %s:%i", + u->tcp_host, u->tcp_port); + return FLB_RETRY; + } + + /* Create HTTP client */ + c = flb_http_client(u_conn, FLB_HTTP_GET, + api_server_url, + NULL, 0, ctx->pod_association_host, + ctx->pod_association_port, NULL, 0); + + if (!c) { + flb_error("[kube_meta] could not create HTTP client"); + return -1; + } + + /* Perform HTTP request */ + ret = flb_http_do(c, &b_sent); + flb_plg_debug(ctx->ins, "Request (uri = %s) http_do=%i, " + "HTTP Status: %i", + api_server_url, ret, c->resp.status); + + if (ret != 0 || c->resp.status != 200) { + if (c->resp.payload_size > 0) { + flb_plg_debug(ctx->ins, "HTTP response : %s", + c->resp.payload); + } + flb_http_client_destroy(c); + flb_upstream_conn_release(u_conn); + return -1; + } + + /* Parse response data */ + if (c->resp.payload != NULL) { + flb_plg_debug(ctx->ins, "HTTP response payload : %s", + c->resp.payload); + parse_pod_service_map(ctx, c->resp.payload, c->resp.payload_size); + } + + /* Cleanup */ + flb_http_client_destroy(c); + flb_upstream_conn_release(u_conn); + } + return 0; +} + +void *update_pod_service_map(void *arg) { + while (1) { + flb_engine_evl_init(); + struct mk_event_loop *evl = mk_event_loop_create(256); + flb_engine_evl_set(evl); + fetch_pod_service_map(task_args->ctx,task_args->api_server_url); + flb_plg_debug(task_args->ctx->ins, "Updating pod to service map after %d seconds", task_args->ctx->pod_service_map_refresh_interval); + sleep(task_args->ctx->pod_service_map_refresh_interval); + } +} + static int get_stream(msgpack_object_map map) { int i; @@ -206,6 +426,23 @@ static int cb_kube_init(struct flb_filter_instance *f_ins, */ flb_kube_meta_init(ctx, config); +/* + * Init separate thread for calling pod to + * service map + */ + pthread_mutex_init(&metadata_mutex, NULL); + + if (ctx->use_pod_association) { + task_args = malloc(sizeof(struct task_args)); + task_args->ctx = ctx; + task_args->api_server_url = ctx->pod_association_endpoint; + // Start the background thread + if (pthread_create(&background_thread, NULL, update_pod_service_map, NULL) != 0) { + flb_error("Failed to create background thread"); + free(task_args); + } + } + return 0; } @@ -619,6 +856,13 @@ static int cb_kube_exit(void *data, struct flb_config *config) ctx = data; flb_kube_conf_destroy(ctx); + if (background_thread) { + pthread_cancel(background_thread); + pthread_join(background_thread, NULL); + } + pthread_mutex_destroy(&metadata_mutex); + + flb_free(task_args); return 0; } @@ -881,6 +1125,74 @@ static struct flb_config_map config_map[] = { "For example, set this value to 60 or 60s and cache entries " "which have been created more than 60s will be evicted" }, + + /* + * Enable pod to service name association logics + * This can be configured with endpoint that returns a response with the corresponding + * podname in relation to the service name. For example, if there is a pod named "petclinic-12345" + * then in order to associate a service name to pod "petclinic-12345", the JSON response to the endpoint + * must follow the below patterns + * { + * "petclinic-12345": { + * "ServiceName":"petclinic", + * "Environment":"default" + * } + * } + */ + { + FLB_CONFIG_MAP_BOOL, "use_pod_association", "false", + 0, FLB_TRUE, offsetof(struct flb_kube, use_pod_association), + "use custom endpoint to get pod to service name mapping" + }, + /* + * The host used for pod to service name association , default is 127.0.0.1 + * Will only check when "use_pod_association" config is set to true + */ + { + FLB_CONFIG_MAP_STR, "pod_association_host", "127.0.0.1", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host), + "host to connect with when performing pod to service name association" + }, + /* + * The endpoint used for pod to service name association, default is /kubernetes/pod-to-service-env-map + * Will only check when "use_pod_association" config is set to true + */ + { + FLB_CONFIG_MAP_STR, "pod_association_endpoint", "/kubernetes/pod-to-service-env-map", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_endpoint), + "endpoint to connect with when performing pod to service name association" + }, + /* + * The port for pod to service name association endpoint, default is 4311 + * Will only check when "use_pod_association" config is set to true + */ + { + FLB_CONFIG_MAP_INT, "pod_association_port", "4311", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_port), + "port to connect with when performing pod to service name association" + }, + { + FLB_CONFIG_MAP_INT, "pod_service_map_ttl", "0", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_map_ttl), + "configurable TTL for pod to service map storage. " + "By default, it is set to 0 which means TTL for cache entries is disabled and " + "cache entries are evicted at random when capacity is reached. " + "In order to enable this option, you should set the number to a time interval. " + "For example, set this value to 60 or 60s and cache entries " + "which have been created more than 60s will be evicted" + }, + { + FLB_CONFIG_MAP_INT, "pod_service_map_refresh_interval", "60", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_map_refresh_interval), + "Refresh interval for the pod to service map storage." + "By default, it is set to refresh every 60 seconds" + }, + { + FLB_CONFIG_MAP_STR, "pod_service_preload_cache_dir", NULL, + 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_preload_cache_dir), + "set directory with pod to service map files" + }, + /* EOF */ {0} }; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 4778abcc222..6fe0241791c 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -195,9 +195,34 @@ static inline int try_to_write(char *buf, int *off, size_t left, return FLB_TRUE; } -static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, int *offset) { +static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream, int *offset) { + char ts[256]; + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "\"keyAttributes\":{",0)) { + goto error; + } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, - "\"keyAttributes\":{\"Type\":\"Service\",\"Name\":\"compass-service\",\"Environment\":\"compass-environment\"},", 0)) { + "\"Type\":\"Service\"",0)) { + goto error; + } + if(stream->entity->key_attributes->name != NULL && strlen(stream->entity->key_attributes->name) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"Name\":\"",stream->entity->key_attributes->name,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } + if(stream->entity->key_attributes->environment != NULL && strlen(stream->entity->key_attributes->environment) != 0) { + if (!snprintf(ts,256, ",%s%s%s","\"Environment\":\"",stream->entity->key_attributes->environment,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, + "},", 2)) { goto error; } return 0; @@ -290,21 +315,23 @@ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, "\",", 2)) { goto error; } - if(stream->entity != NULL) { + // If we are missing the service name, the entity will get rejected by the frontend anyway + // so do not emit entity unless service name is filled + if(stream->entity != NULL && stream->entity->key_attributes->name != NULL) { if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"entity\":{", 10)) { goto error; } if(stream->entity->key_attributes != NULL) { - ret = entity_add_key_attributes(ctx,buf,offset); + ret = entity_add_key_attributes(ctx,buf,stream,offset); if (ret < 0) { flb_plg_error(ctx->ins, "Failed to initialize Entity KeyAttributes"); goto error; } } if(stream->entity->attributes != NULL) { - ret = entity_add_attributes(ctx,buf,stream, offset); + ret = entity_add_attributes(ctx,buf,stream,offset); if (ret < 0) { flb_plg_error(ctx->ins, "Failed to initialize Entity Attributes"); goto error; @@ -888,7 +915,15 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map for (j=0; j < val_map_size; j++) { kube_key = val.via.map.ptr[j].key; kube_val = val.via.map.ptr[j].val; - if(strncmp(kube_key.via.str.ptr, "namespace_name", 14) == 0) { + if(strncmp(kube_key.via.str.ptr, "service_name", 12) == 0) { + if(entity->key_attributes->name == NULL) { + entity->key_attributes->name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } + } else if(strncmp(kube_key.via.str.ptr, "environment", 11) == 0) { + if(entity->key_attributes->environment == NULL) { + entity->key_attributes->environment = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } + } else if(strncmp(kube_key.via.str.ptr, "namespace_name", 14) == 0) { if(entity->attributes->namespace == NULL) { entity->attributes->namespace = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } @@ -916,12 +951,23 @@ void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stre if(ctx->kubernete_metadata_enabled) { if(stream->entity == NULL) { stream->entity = flb_malloc(sizeof(entity)); + if (stream->entity == NULL) { + return; + } + memset(stream->entity, 0, sizeof(entity)); + stream->entity->key_attributes = flb_malloc(sizeof(entity_key_attributes)); + if (stream->entity->key_attributes == NULL) { + return; + } + memset(stream->entity->key_attributes, 0, sizeof(entity_key_attributes)); + stream->entity->attributes = flb_malloc(sizeof(entity_attributes)); - stream->entity->attributes->namespace = NULL; - stream->entity->attributes->node = NULL; - stream->entity->attributes->cluster_name = NULL; - stream->entity->attributes->instance_id = NULL; + if (stream->entity->attributes == NULL) { + return; + } + memset(stream->entity->attributes, 0, sizeof(entity_attributes)); + parse_entity(ctx,stream->entity,map, map.via.map.size); } else { parse_entity(ctx,stream->entity,map, map.via.map.size); diff --git a/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled.meta b/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled.meta new file mode 100644 index 00000000000..99b35b01f6b --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled.meta @@ -0,0 +1,109 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-pod-association-enabled", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a" + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out new file mode 100644 index 00000000000..30eeb543cb3 --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","service_name":"test-service","environment":"test-environment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] \ No newline at end of file diff --git a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map new file mode 100644 index 00000000000..08927cc4817 --- /dev/null +++ b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map @@ -0,0 +1 @@ +{"use-pod-association-enabled":{"ServiceName":"test-service","Environment":"test-environment"}} \ No newline at end of file diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index 9d003405dcb..1c9d8bd2337 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -23,6 +23,7 @@ struct kube_test_result { /* Test target mode */ #define KUBE_TAIL 0 #define KUBE_SYSTEMD 1 +#define KUBE_POD_ASSOCIATION 2 #ifdef FLB_HAVE_SYSTEMD int flb_test_systemd_send(void); @@ -35,6 +36,48 @@ char kube_test_id[64]; #define KUBE_URL "http://" KUBE_IP ":" KUBE_PORT #define DPATH FLB_TESTS_DATA_PATH "/data/kubernetes" +// Helper function to clear the file +static void clear_file(const char *filename) { + FILE *file; + + // Open the file in "w" mode to empty it + file = fopen(filename, "w"); + if (file == NULL) { + perror("Error opening file to clear content"); + return; + } + + // Close the file to complete truncation + fclose(file); +} + +// Helper function to write to the file with the specified content +static void write_log_to_file(const char *filename) { + FILE *file; + time_t rawtime; + struct tm *timeinfo; + char time_str[100]; + char log_entry[512]; + + // Log message to write + const char *log_template = "{\"log\":\"Fluent Bit is logging\\n\",\"stream\":\"stdout\",\"time\":\"2019-04-01T17:58:33.598656444Z\"}"; + + // Open the file for appending + file = fopen(filename, "a"); + if (file == NULL) { + perror("Error opening file"); + return; + } + // Format the final log entry with the current time + snprintf(log_entry, sizeof(log_entry), log_template); + + // Write the log entry to the file + fprintf(file, "%s\n", log_entry); + + // Close the file + fclose(file); +} + static int file_to_buf(const char *path, char **out_buf, size_t *out_size) { int ret; @@ -210,12 +253,12 @@ static void kube_test(const char *target, int type, const char *suffix, int nExp ret = flb_service_set(ctx.flb, "Flush", "1", "Grace", "1", - "Log_Level", "error", + "Log_Level", "debug", "Parsers_File", DPATH "/parsers.conf", NULL); TEST_CHECK_(ret == 0, "setting service options"); - if (type == KUBE_TAIL) { + if (type == KUBE_TAIL || type == KUBE_POD_ASSOCIATION) { /* Compose path based on target */ snprintf(path, sizeof(path) - 1, DPATH "/log/%s.log", target); TEST_CHECK_(access(path, R_OK) == 0, "accessing log file: %s", path); @@ -266,7 +309,7 @@ static void kube_test(const char *target, int type, const char *suffix, int nExp } va_end(va); - if (type == KUBE_TAIL) { + if (type == KUBE_TAIL || type == KUBE_POD_ASSOCIATION) { ret = flb_filter_set(ctx.flb, filter_ffd, "Regex_Parser", "kubernetes-tag", "Kube_Tag_Prefix", "kube.", @@ -310,6 +353,10 @@ static void kube_test(const char *target, int type, const char *suffix, int nExp } #endif + if(type == KUBE_POD_ASSOCIATION) { + clear_file(path); + } + /* Start the engine */ ret = flb_start(ctx.flb); TEST_CHECK_(ret == 0, "starting engine"); @@ -323,9 +370,12 @@ static void kube_test(const char *target, int type, const char *suffix, int nExp } #endif - /* Poll for up to 2 seconds or until we got a match */ - for (ret = 0; ret < 2000 && result.nMatched == 0; ret++) { + /* Poll for up to 3 seconds or until we got a match */ + for (ret = 0; ret < 3000 && result.nMatched != nExpected; ret++) { usleep(1000); + if (ret == 2000 && type == KUBE_POD_ASSOCIATION) { + write_log_to_file(path); + } } TEST_CHECK(result.nMatched == nExpected); TEST_MSG("result.nMatched: %i\nnExpected: %i", result.nMatched, nExpected); @@ -867,6 +917,19 @@ static void flb_test_annotations_exclude_multiple_4_container_4_stderr() flb_test_annotations_exclude("annotations-exclude_multiple-4_container-4", "stderr", 1); } +#define flb_test_pod_to_service_map(target, suffix, nExpected) \ + kube_test("options/" target, KUBE_POD_ASSOCIATION, suffix, nExpected, \ + "use_pod_association", "true", \ + "use_kubelet", "true", \ + "kubelet_port", "8002", \ + "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap", \ + NULL); \ + +static void kube_options_use_pod_association_enabled() +{ + flb_test_pod_to_service_map("options_use-pod-association-enabled_fluent-bit", NULL, 1); +} + #ifdef FLB_HAVE_SYSTEMD #define CONTAINER_NAME "CONTAINER_NAME=k8s_kairosdb_kairosdb-914055854-b63vq_default_d6c53deb-05a4-11e8-a8c4-080027435fb7_23" #include @@ -957,6 +1020,7 @@ TEST_LIST = { {"kube_core_no_meta", flb_test_core_no_meta}, {"kube_core_unescaping_text", flb_test_core_unescaping_text}, {"kube_core_unescaping_json", flb_test_core_unescaping_json}, + {"kube_options_use_pod_association_enabled", kube_options_use_pod_association_enabled}, {"kube_options_use-kubelet_enabled_json", flb_test_options_use_kubelet_enabled_json}, {"kube_options_use-kubelet_disabled_json", flb_test_options_use_kubelet_disabled_json}, {"kube_options_merge_log_enabled_text", flb_test_options_merge_log_enabled_text}, From 00904dec1038651a6ff95ba61b86070c10c9ce00 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:10:08 -0400 Subject: [PATCH 65/74] filter_kubernetes: fix memory leaks in pod association components (#15) --- include/fluent-bit/flb_hash.h | 3 +++ plugins/filter_kubernetes/kube_conf.c | 6 +++++- plugins/filter_kubernetes/kube_conf.h | 2 +- plugins/filter_kubernetes/kube_meta.c | 4 ++++ plugins/filter_kubernetes/kubernetes.c | 12 ++++++++---- src/flb_hash.c | 18 ++++++++++++++++++ .../servicemap/use_pod_association_enabled.map | 7 ++++++- tests/runtime/filter_kubernetes.c | 3 --- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/include/fluent-bit/flb_hash.h b/include/fluent-bit/flb_hash.h index 29b9f7b8ef5..42666c75433 100644 --- a/include/fluent-bit/flb_hash.h +++ b/include/fluent-bit/flb_hash.h @@ -55,6 +55,7 @@ struct flb_hash { int max_entries; int total_count; int cache_ttl; + int force_remove_pointer; size_t size; struct mk_list entries; struct flb_hash_table *table; @@ -63,6 +64,8 @@ struct flb_hash { struct flb_hash *flb_hash_create(int evict_mode, size_t size, int max_entries); struct flb_hash *flb_hash_create_with_ttl(int cache_ttl, int evict_mode, size_t size, int max_entries); +struct flb_hash *flb_hash_create_with_ttl_force_destroy(int cache_ttl, int evict_mode, + size_t size, int max_entries); void flb_hash_destroy(struct flb_hash *ht); int flb_hash_add(struct flb_hash *ht, diff --git a/plugins/filter_kubernetes/kube_conf.c b/plugins/filter_kubernetes/kube_conf.c index 20de8c3b215..c190085a84f 100644 --- a/plugins/filter_kubernetes/kube_conf.c +++ b/plugins/filter_kubernetes/kube_conf.c @@ -192,7 +192,7 @@ struct flb_kube *flb_kube_conf_create(struct flb_filter_instance *ins, } - ctx->pod_hash_table = flb_hash_create_with_ttl(ctx->pod_service_map_ttl, + ctx->pod_hash_table = flb_hash_create_with_ttl_force_destroy(ctx->pod_service_map_ttl, FLB_HASH_EVICT_OLDER, FLB_HASH_TABLE_SIZE, FLB_HASH_TABLE_SIZE); @@ -209,6 +209,10 @@ void flb_kube_conf_destroy(struct flb_kube *ctx) flb_hash_destroy(ctx->hash_table); } + if (ctx->pod_hash_table) { + flb_hash_destroy(ctx->pod_hash_table); + } + if (ctx->merge_log == FLB_TRUE) { flb_free(ctx->unesc_buf); } diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index 24f25e9a6ab..f338599049c 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -178,7 +178,7 @@ struct flb_kube { char *use_pod_association; char *pod_association_host; char *pod_association_endpoint; - char *pod_association_port; + int pod_association_port; /* * TTL is used to check how long should the mapped entry diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index d2077236b4c..85c69263ead 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -1717,5 +1717,9 @@ int flb_kube_meta_release(struct flb_kube_meta *meta) flb_free(meta->cache_key); } + if (meta->cluster) { + flb_free(meta->cluster); + } + return r; } diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index 30f69a0c498..29e783eab57 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -48,6 +48,7 @@ struct task_args { pthread_mutex_t metadata_mutex; pthread_t background_thread; struct task_args *task_args = {0}; +struct mk_event_loop *evl; /* * If a file exists called service.map, load it and use it. @@ -132,7 +133,7 @@ static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t ap v = api_map.via.map.ptr[i].val; if (k.type == MSGPACK_OBJECT_STR && v.type == MSGPACK_OBJECT_MAP) { char *pod_name = flb_strndup(k.via.str.ptr, k.via.str.size); - struct service_attributes *service_attributes = malloc(sizeof(struct service_attributes)); + struct service_attributes *service_attributes = flb_malloc(sizeof(struct service_attributes)); for (int j = 0; j < v.via.map.size; j++) { attributeKey = v.via.map.ptr[j].key; attributeValue = v.via.map.ptr[j].val; @@ -157,7 +158,7 @@ static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t ap pthread_mutex_lock(&metadata_mutex); flb_hash_add(ctx->pod_hash_table, pod_name,k.via.str.size, - service_attributes, sizeof(struct service_attributes)); + service_attributes, 0); pthread_mutex_unlock(&metadata_mutex); } else { flb_free(service_attributes); @@ -192,6 +193,7 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { ret = get_pod_service_file_info(ctx, "use_pod_association_enabled", &buffer); if (ret > 0 && buffer != NULL) { parse_pod_service_map(ctx, buffer, ret); + flb_free(buffer); } else { /* Get upstream context and connection */ @@ -250,7 +252,7 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { void *update_pod_service_map(void *arg) { while (1) { flb_engine_evl_init(); - struct mk_event_loop *evl = mk_event_loop_create(256); + evl = mk_event_loop_create(256); flb_engine_evl_set(evl); fetch_pod_service_map(task_args->ctx,task_args->api_server_url); flb_plg_debug(task_args->ctx->ins, "Updating pod to service map after %d seconds", task_args->ctx->pod_service_map_refresh_interval); @@ -863,7 +865,9 @@ static int cb_kube_exit(void *data, struct flb_config *config) pthread_mutex_destroy(&metadata_mutex); flb_free(task_args); - + if (evl) { + mk_event_loop_destroy(evl); + } return 0; } diff --git a/src/flb_hash.c b/src/flb_hash.c index fe3035f901d..8dbcc502bb7 100644 --- a/src/flb_hash.c +++ b/src/flb_hash.c @@ -34,6 +34,8 @@ static inline void flb_hash_entry_free(struct flb_hash *ht, flb_free(entry->key); if (entry->val && entry->val_size > 0) { flb_free(entry->val); + } else if (ht->force_remove_pointer) { + flb_free(entry->val); } flb_free(entry); } @@ -60,6 +62,7 @@ struct flb_hash *flb_hash_create(int evict_mode, size_t size, int max_entries) ht->size = size; ht->total_count = 0; ht->cache_ttl = 0; + ht->force_remove_pointer = 0; ht->table = flb_calloc(1, sizeof(struct flb_hash_table) * size); if (!ht->table) { flb_errno(); @@ -93,6 +96,21 @@ struct flb_hash *flb_hash_create_with_ttl(int cache_ttl, int evict_mode, return ht; } +struct flb_hash *flb_hash_create_with_ttl_force_destroy(int cache_ttl, int evict_mode, + size_t size, int max_entries) +{ + struct flb_hash *ht; + + ht = flb_hash_create_with_ttl(cache_ttl,evict_mode, size, max_entries); + if (!ht) { + flb_errno(); + return NULL; + } + + ht->force_remove_pointer = 1; + return ht; +} + int flb_hash_del_ptr(struct flb_hash *ht, const char *key, int key_len, void *ptr) { diff --git a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map index 08927cc4817..ee2207d0dc2 100644 --- a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map +++ b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map @@ -1 +1,6 @@ -{"use-pod-association-enabled":{"ServiceName":"test-service","Environment":"test-environment"}} \ No newline at end of file +{ + "use-pod-association-enabled": { + "ServiceName": "test-service", + "Environment": "test-environment" + } +} diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index 1c9d8bd2337..ef4f1e5f693 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -54,9 +54,6 @@ static void clear_file(const char *filename) { // Helper function to write to the file with the specified content static void write_log_to_file(const char *filename) { FILE *file; - time_t rawtime; - struct tm *timeinfo; - char time_str[100]; char log_entry[512]; // Log message to write From e0625cebca4e767723210383f602ec5159dbaedf Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:56:02 -0400 Subject: [PATCH 66/74] Create options_use-pod-association-enabled_fluent-bit.log --- .../options/options_use-pod-association-enabled_fluent-bit.log | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-pod-association-enabled_fluent-bit.log diff --git a/tests/runtime/data/kubernetes/log/options/options_use-pod-association-enabled_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-pod-association-enabled_fluent-bit.log new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-pod-association-enabled_fluent-bit.log @@ -0,0 +1 @@ + From 2b400a7b242f515344c56b64b096d4c39705be47 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:56:41 -0400 Subject: [PATCH 67/74] filter_kubernetes: add service name source parsing logic to kubernetes plugin (#17) --- plugins/filter_kubernetes/kube_conf.h | 3 ++ plugins/filter_kubernetes/kube_meta.c | 14 +++++++ plugins/filter_kubernetes/kubernetes.c | 6 +++ plugins/out_cloudwatch_logs/cloudwatch_api.c | 40 ++++++++++++------- plugins/out_cloudwatch_logs/cloudwatch_api.h | 6 +++ plugins/out_cloudwatch_logs/cloudwatch_logs.c | 1 + plugins/out_cloudwatch_logs/cloudwatch_logs.h | 1 + ...use-pod-association-enabled_fluent-bit.out | 2 +- .../use_pod_association_enabled.map | 3 +- 9 files changed, 60 insertions(+), 16 deletions(-) diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index f338599049c..362248e30a9 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -70,6 +70,7 @@ * https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_Service.html#:~:text=Maximum%20length%20of%201024. */ #define KEY_ATTRIBUTES_MAX_LEN 1024 +#define SERVICE_NAME_SOURCE_MAX_LEN 64 struct kube_meta; @@ -78,6 +79,8 @@ struct service_attributes { int name_len; char environment[KEY_ATTRIBUTES_MAX_LEN]; int environment_len; + char name_source[SERVICE_NAME_SOURCE_MAX_LEN]; + int name_source_len; int fields; }; diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 85c69263ead..b518804df11 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -1115,6 +1115,12 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_pack_str(&mp_pck, tmp_service_attributes->environment_len); msgpack_pack_str_body(&mp_pck, tmp_service_attributes->environment, tmp_service_attributes->environment_len); } + if (tmp_service_attributes->name_source[0] != '\0') { + msgpack_pack_str(&mp_pck, 11); + msgpack_pack_str_body(&mp_pck, "name_source", 11); + msgpack_pack_str(&mp_pck, tmp_service_attributes->name_source_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name_source, tmp_service_attributes->name_source_len); + } } /* Append API Server content */ @@ -1341,6 +1347,9 @@ static inline int extract_meta(struct flb_kube *ctx, if (tmp_service_attributes->environment[0] != '\0') { n += tmp_service_attributes->environment_len + 1; } + if (tmp_service_attributes->name_source[0] != '\0') { + n += tmp_service_attributes->name_source_len + 1; + } } meta->cache_key = flb_malloc(n); @@ -1385,6 +1394,11 @@ static inline int extract_meta(struct flb_kube *ctx, memcpy(meta->cache_key + off, tmp_service_attributes->environment, tmp_service_attributes->environment_len); off += tmp_service_attributes->environment_len; } + if (tmp_service_attributes->name_source[0] != '\0') { + meta->cache_key[off++] = ':'; + memcpy(meta->cache_key + off, tmp_service_attributes->name_source, tmp_service_attributes->name_source_len); + off += tmp_service_attributes->name_source_len; + } } meta->cache_key[off] = '\0'; diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index 29e783eab57..758af17aee3 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -151,6 +151,12 @@ static void parse_pod_service_map(struct flb_kube *ctx, char *api_buf, size_t ap service_attributes->environment_len = attributeValue.via.str.size; service_attributes->fields++; } + if(strcmp(attributeKeyString, "ServiceNameSource") == 0 && attributeValue.via.str.size < SERVICE_NAME_SOURCE_MAX_LEN) { + strncpy(service_attributes->name_source, attributeValue.via.str.ptr,attributeValue.via.str.size); + service_attributes->name_source[attributeValue.via.str.size] = '\0'; + service_attributes->name_source_len = attributeValue.via.str.size; + service_attributes->fields++; + } flb_free(attributeKeyString); } } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 6fe0241791c..7232e17c728 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -196,7 +196,7 @@ static inline int try_to_write(char *buf, int *off, size_t left, } static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream, int *offset) { - char ts[256]; + char ts[KEY_ATTRIBUTES_MAX_LEN]; if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"keyAttributes\":{",0)) { goto error; @@ -206,7 +206,7 @@ static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush goto error; } if(stream->entity->key_attributes->name != NULL && strlen(stream->entity->key_attributes->name) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"Name\":\"",stream->entity->key_attributes->name,"\"")) { + if (!snprintf(ts,KEY_ATTRIBUTES_MAX_LEN, ",%s%s%s","\"Name\":\"",stream->entity->key_attributes->name,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -214,7 +214,7 @@ static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush } } if(stream->entity->key_attributes->environment != NULL && strlen(stream->entity->key_attributes->environment) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"Environment\":\"",stream->entity->key_attributes->environment,"\"")) { + if (!snprintf(ts,KEY_ATTRIBUTES_MAX_LEN, ",%s%s%s","\"Environment\":\"",stream->entity->key_attributes->environment,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -231,7 +231,7 @@ static int entity_add_key_attributes(struct flb_cloudwatch *ctx, struct cw_flush } static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *buf, struct log_stream *stream,int *offset) { - char ts[256]; + char ts[ATTRIBUTES_MAX_LEN]; if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"attributes\":{", 0)) { @@ -243,7 +243,7 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu goto error; } if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -251,7 +251,7 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu } } if(stream->entity->attributes->namespace != NULL && strlen(stream->entity->attributes->namespace) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"K8s.Namespace\":\"",stream->entity->attributes->namespace,"\"")) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"K8s.Namespace\":\"",stream->entity->attributes->namespace,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -259,7 +259,7 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu } } if(stream->entity->attributes->node != NULL && strlen(stream->entity->attributes->node) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"K8s.Node\":\"",buf->current_stream->entity->attributes->node,"\"")) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"K8s.Node\":\"",buf->current_stream->entity->attributes->node,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -267,7 +267,15 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu } } if(stream->entity->attributes->instance_id != NULL && strlen(stream->entity->attributes->instance_id) != 0) { - if (!snprintf(ts,256, ",%s%s%s","\"EC2.InstanceId\":\"",buf->current_stream->entity->attributes->instance_id,"\"")) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EC2.InstanceId\":\"",buf->current_stream->entity->attributes->instance_id,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } + if(stream->entity->attributes->name_source != NULL && strlen(stream->entity->attributes->name_source) != 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"AWS.ServiceNameSource\":\"",buf->current_stream->entity->attributes->name_source,"\"")) { goto error; } if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { @@ -915,31 +923,35 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map for (j=0; j < val_map_size; j++) { kube_key = val.via.map.ptr[j].key; kube_val = val.via.map.ptr[j].val; - if(strncmp(kube_key.via.str.ptr, "service_name", 12) == 0) { + if(strncmp(kube_key.via.str.ptr, "service_name", kube_key.via.str.size) == 0) { if(entity->key_attributes->name == NULL) { entity->key_attributes->name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } - } else if(strncmp(kube_key.via.str.ptr, "environment", 11) == 0) { + } else if(strncmp(kube_key.via.str.ptr, "environment", kube_key.via.str.size) == 0) { if(entity->key_attributes->environment == NULL) { entity->key_attributes->environment = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } - } else if(strncmp(kube_key.via.str.ptr, "namespace_name", 14) == 0) { + } else if(strncmp(kube_key.via.str.ptr, "namespace_name", kube_key.via.str.size) == 0) { if(entity->attributes->namespace == NULL) { entity->attributes->namespace = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } - } else if(strncmp(kube_key.via.str.ptr, "host", 4) == 0) { + } else if(strncmp(kube_key.via.str.ptr, "host", kube_key.via.str.size) == 0) { if(entity->attributes->node == NULL) { entity->attributes->node = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } - } else if(strncmp(kube_key.via.str.ptr, "cluster", 7) == 0) { + } else if(strncmp(kube_key.via.str.ptr, "cluster", kube_key.via.str.size) == 0) { if(entity->attributes->cluster_name == NULL) { entity->attributes->cluster_name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } + } else if(strncmp(kube_key.via.str.ptr, "name_source", kube_key.via.str.size) == 0) { + if(entity->attributes->name_source == NULL) { + entity->attributes->name_source = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } } } } } - if(strncmp(key.via.str.ptr, "ec2_instance_id",15 ) == 0 ) { + if(strncmp(key.via.str.ptr, "ec2_instance_id",key.via.str.size ) == 0 ) { if(entity->attributes->instance_id == NULL) { entity->attributes->instance_id = flb_strndup(val.via.str.ptr, val.via.str.size); } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.h b/plugins/out_cloudwatch_logs/cloudwatch_api.h index 99919055bc0..064cbe94844 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.h @@ -35,6 +35,12 @@ /* number of characters needed to 'end' a PutLogEvents payload */ #define PUT_LOG_EVENTS_FOOTER_LEN 4 +// https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_Service.html +/* Maxinum number of character limits including both the KeyAttributes key and its value */ +#define KEY_ATTRIBUTES_MAX_LEN 1100 +/* Maxinum number of character limits including both the Attributes key and its value */ +#define ATTRIBUTES_MAX_LEN 300 + /* 256KiB minus 26 bytes for the event */ #define MAX_EVENT_LEN 262118 diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 8f69df13dbb..7c64e055af4 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -508,6 +508,7 @@ void entity_destroy(entity *entity) { flb_free(entity->attributes->node); flb_free(entity->attributes->platform_type); flb_free(entity->attributes->workload); + flb_free(entity->attributes->name_source); flb_free(entity->attributes); } if(entity->key_attributes) { diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.h b/plugins/out_cloudwatch_logs/cloudwatch_logs.h index 06e4cb155e6..7a9dbeaa3e7 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.h @@ -54,6 +54,7 @@ typedef struct entity_attributes { char *workload; char *node; char *instance_id; + char *name_source; }entity_attributes; /* buffers used for each flush */ diff --git a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out index 30eeb543cb3..c4882ca39d6 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","service_name":"test-service","environment":"test-environment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] \ No newline at end of file +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","service_name":"test-service","environment":"test-environment","name_source":"Instrumentation","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map index ee2207d0dc2..e4d67d8bf71 100644 --- a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map +++ b/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map @@ -1,6 +1,7 @@ { "use-pod-association-enabled": { "ServiceName": "test-service", - "Environment": "test-environment" + "Environment": "test-environment", + "ServiceNameSource": "Instrumentation" } } From c11c02495850678b15b491f045388977f919c5f3 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:20:34 -0400 Subject: [PATCH 68/74] filter_kubernetes: add workload scraping logics for kubernetes filter (#14) --- plugins/filter_kubernetes/kube_conf.c | 3 + plugins/filter_kubernetes/kube_conf.h | 1 + plugins/filter_kubernetes/kube_meta.c | 111 ++++++++++++++- plugins/filter_kubernetes/kube_meta.h | 2 + plugins/filter_kubernetes/kube_regex.c | 1 + plugins/filter_kubernetes/kube_regex.h | 2 + plugins/out_cloudwatch_logs/cloudwatch_api.c | 12 ++ ...-kubelet-disabled-daemonset_fluent-bit.log | 1 + ...kubelet-disabled-deployment_fluent-bit.log | 1 + ...kubelet-disabled-replicaset_fluent-bit.log | 1 + ...e-kubelet-enabled-daemonset_fluent-bit.log | 1 + ...-kubelet-enabled-deployment_fluent-bit.log | 1 + ...-kubelet-enabled-replicaset_fluent-bit.log | 1 + ...ptions_use-kubelet-disabled-daemonset.meta | 126 ++++++++++++++++++ ...tions_use-kubelet-disabled-deployment.meta | 126 ++++++++++++++++++ ...tions_use-kubelet-disabled-replicaset.meta | 126 ++++++++++++++++++ ...options_use-kubelet-enabled-daemonset.meta | 119 +++++++++++++++++ ...ptions_use-kubelet-enabled-deployment.meta | 119 +++++++++++++++++ ...ptions_use-kubelet-enabled-replicaset.meta | 119 +++++++++++++++++ .../meta/options_use-kubelet-enabled.meta | 12 +- ...-kubelet-disabled-daemonset_fluent-bit.out | 1 + ...kubelet-disabled-deployment_fluent-bit.out | 1 + ...kubelet-disabled-replicaset_fluent-bit.out | 1 + ...e-kubelet-enabled-daemonset_fluent-bit.out | 1 + ...-kubelet-enabled-deployment_fluent-bit.out | 1 + ...-kubelet-enabled-replicaset_fluent-bit.out | 1 + ...options_use-kubelet-enabled_fluent-bit.out | 2 +- tests/runtime/filter_kubernetes.c | 37 +++++ 28 files changed, 926 insertions(+), 4 deletions(-) create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-daemonset_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-deployment_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-replicaset_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-daemonset_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-deployment_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-replicaset_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-daemonset.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-deployment.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-replicaset.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-daemonset.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-deployment.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-replicaset.meta create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-daemonset_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-deployment_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-replicaset_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-daemonset_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-deployment_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-replicaset_fluent-bit.out diff --git a/plugins/filter_kubernetes/kube_conf.c b/plugins/filter_kubernetes/kube_conf.c index c190085a84f..7d7eace4525 100644 --- a/plugins/filter_kubernetes/kube_conf.c +++ b/plugins/filter_kubernetes/kube_conf.c @@ -221,6 +221,9 @@ void flb_kube_conf_destroy(struct flb_kube *ctx) if (ctx->parser == NULL && ctx->regex) { flb_regex_destroy(ctx->regex); } + if (ctx->deploymentRegex) { + flb_regex_destroy(ctx->deploymentRegex); + } flb_free(ctx->api_host); flb_free(ctx->token); diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index 362248e30a9..e3f9877d12b 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -138,6 +138,7 @@ struct flb_kube { /* Regex context to parse records */ struct flb_regex *regex; + struct flb_regex *deploymentRegex; struct flb_parser *parser; /* TLS CA certificate file */ diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index b518804df11..b9957409839 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -721,6 +721,102 @@ static void extract_container_hash(struct flb_kube_meta *meta, } } +static void cb_results_workload(const char *name, const char *value, + size_t vlen, void *data) +{ + if (name == NULL || value == NULL || vlen == 0 || data == NULL) { + return; + } + + struct flb_kube_meta *meta = data; + + if (meta->workload == NULL && strcmp(name, "deployment") == 0) { + meta->workload = flb_strndup(value, vlen); + meta->workload_len = vlen; + meta->fields++; + } +} + +static void search_workload(struct flb_kube_meta *meta,struct flb_kube *ctx,msgpack_object map) +{ + int i,j,ownerIndex; + int regex_found; + int replicaset_match; + int podname_match = FLB_FALSE; + msgpack_object k, v; + msgpack_object_map ownerMap; + struct flb_regex_search result; + /* Temporary variable to store the workload value */ + msgpack_object workload_val; + + for (i = 0; i < map.via.map.size; i++) { + + k = map.via.map.ptr[i].key; + v = map.via.map.ptr[i].val; + if (strncmp(k.via.str.ptr, "name", k.via.str.size) == 0) { + + if (!strncmp(v.via.str.ptr, meta->podname, v.via.str.size)) { + podname_match = FLB_TRUE; + } + + } + /* Example JSON for the below parsing: + * "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "my-replicaset", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ]*/ + if (podname_match && strncmp(k.via.str.ptr, "ownerReferences", k.via.str.size) == 0 && v.type == MSGPACK_OBJECT_ARRAY) { + for (j = 0; j < v.via.array.size; j++) { + if (v.via.array.ptr[j].type == MSGPACK_OBJECT_MAP) { + ownerMap = v.via.array.ptr[j].via.map; + for (ownerIndex = 0; ownerIndex < ownerMap.size; ownerIndex++) { + msgpack_object key = ownerMap.ptr[ownerIndex].key; + msgpack_object val = ownerMap.ptr[ownerIndex].val; + + /* Ensure both key and value are strings */ + if (key.type == MSGPACK_OBJECT_STR && val.type == MSGPACK_OBJECT_STR) { + if (strncmp(key.via.str.ptr, "kind", key.via.str.size) == 0 && strncmp(val.via.str.ptr, "ReplicaSet", val.via.str.size) == 0) { + replicaset_match = FLB_TRUE; + } + + if (strncmp(key.via.str.ptr, "name", key.via.str.size) == 0) { + /* Store the value of 'name' in workload_val so it can be reused by set_workload */ + workload_val = val; + if (replicaset_match) { + regex_found = flb_regex_do(ctx->deploymentRegex, val.via.str.ptr, val.via.str.size, &result); + if (regex_found > 0) { + /* Parse regex results */ + flb_regex_parse(ctx->deploymentRegex, &result, cb_results_workload, meta); + } else { + /* Set workload if regex does not match */ + goto set_workload; + } + } else { + /* Set workload if not a replicaset match */ + goto set_workload; + } + } + } + } + } + } + } + } + +return; + +set_workload: + meta->workload = flb_strndup(workload_val.via.str.ptr, workload_val.via.str.size); + meta->workload_len = workload_val.via.str.size; + meta->fields++; +} + static int search_podname_and_namespace(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_object map) @@ -1006,6 +1102,7 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, k = api_map.via.map.ptr[i].key; if (k.via.str.size == 8 && !strncmp(k.via.str.ptr, "metadata", 8)) { meta_val = api_map.via.map.ptr[i].val; + search_workload(meta,ctx,meta_val); if (meta_val.type == MSGPACK_OBJECT_MAP) { meta_found = FLB_TRUE; } @@ -1123,6 +1220,13 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, } } + if (meta->workload != NULL) { + msgpack_pack_str(&mp_pck, 8); + msgpack_pack_str_body(&mp_pck, "workload", 8); + msgpack_pack_str(&mp_pck, meta->workload_len); + msgpack_pack_str_body(&mp_pck, meta->workload, meta->workload_len); + } + /* Append API Server content */ if (have_uid >= 0) { v = meta_val.via.map.ptr[have_uid].val; @@ -1693,8 +1797,7 @@ int flb_kube_meta_get(struct flb_kube *ctx, return 0; } -int flb_kube_meta_release(struct flb_kube_meta *meta) -{ +int flb_kube_meta_release(struct flb_kube_meta *meta) { int r = 0; if (meta->namespace) { @@ -1731,6 +1834,10 @@ int flb_kube_meta_release(struct flb_kube_meta *meta) flb_free(meta->cache_key); } + if (meta->workload) { + flb_free(meta->workload); + } + if (meta->cluster) { flb_free(meta->cluster); } diff --git a/plugins/filter_kubernetes/kube_meta.h b/plugins/filter_kubernetes/kube_meta.h index a5d7ae9ec7a..36c35498c73 100644 --- a/plugins/filter_kubernetes/kube_meta.h +++ b/plugins/filter_kubernetes/kube_meta.h @@ -35,6 +35,7 @@ struct flb_kube_meta { int docker_id_len; int container_hash_len; int container_image_len; + int workload_len; char *cluster; char *namespace; @@ -42,6 +43,7 @@ struct flb_kube_meta { char *container_name; char *container_image; char *docker_id; + char *workload; char *container_hash; /* set only on Systemd mode */ diff --git a/plugins/filter_kubernetes/kube_regex.c b/plugins/filter_kubernetes/kube_regex.c index e530ecf02e6..c0a0e308179 100644 --- a/plugins/filter_kubernetes/kube_regex.c +++ b/plugins/filter_kubernetes/kube_regex.c @@ -34,6 +34,7 @@ int flb_kube_regex_init(struct flb_kube *ctx) ctx->regex = flb_regex_create(KUBE_TAG_TO_REGEX); } } + ctx->deploymentRegex = flb_regex_create(DEPLOYMENT_REGEX); if (!ctx->regex) { return -1; diff --git a/plugins/filter_kubernetes/kube_regex.h b/plugins/filter_kubernetes/kube_regex.h index ae648fd74d6..d3dd90f764f 100644 --- a/plugins/filter_kubernetes/kube_regex.h +++ b/plugins/filter_kubernetes/kube_regex.h @@ -26,6 +26,8 @@ #define KUBE_JOURNAL_TO_REGEX "^(?[^_]+)_(?[^\\._]+)(\\.(?[^_]+))?_(?[^_]+)_(?[^_]+)_[^_]+_[^_]+$" +#define DEPLOYMENT_REGEX "^(?.+)-(?[bcdfghjklmnpqrstvwxz2456789]{6,10})$" + int flb_kube_regex_init(struct flb_kube *ctx); #endif diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 7232e17c728..868b71e5385 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -266,6 +266,14 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu goto error; } } + if(stream->entity->attributes->workload != NULL && strlen(stream->entity->attributes->workload) != 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"K8s.Workload\":\"",buf->current_stream->entity->attributes->workload,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } if(stream->entity->attributes->instance_id != NULL && strlen(stream->entity->attributes->instance_id) != 0) { if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EC2.InstanceId\":\"",buf->current_stream->entity->attributes->instance_id,"\"")) { goto error; @@ -943,6 +951,10 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map if(entity->attributes->cluster_name == NULL) { entity->attributes->cluster_name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } + } else if(strncmp(kube_key.via.str.ptr, "workload", kube_key.via.str.size) == 0) { + if(entity->attributes->workload == NULL) { + entity->attributes->workload = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } } else if(strncmp(kube_key.via.str.ptr, "name_source", kube_key.via.str.size) == 0) { if(entity->attributes->name_source == NULL) { entity->attributes->name_source = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-daemonset_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-daemonset_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-daemonset_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-deployment_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-deployment_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-deployment_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-replicaset_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-replicaset_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-replicaset_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-daemonset_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-daemonset_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-daemonset_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-deployment_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-deployment_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-deployment_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-replicaset_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-replicaset_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-replicaset_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-daemonset.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-daemonset.meta new file mode 100644 index 00000000000..15e91677570 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-daemonset.meta @@ -0,0 +1,126 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-disabled-daemonset", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "DaemonSet", + "name": "my-daemonset", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [ + { + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [ + { + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + } + ], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-deployment.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-deployment.meta new file mode 100644 index 00000000000..e40da24a0bc --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-deployment.meta @@ -0,0 +1,126 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-disabled-deployment", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "my-deployment-bcg289", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [ + { + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [ + { + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + } + ], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-replicaset.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-replicaset.meta new file mode 100644 index 00000000000..4651a74ff34 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-replicaset.meta @@ -0,0 +1,126 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-disabled-replicaset", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "my-replicaset", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [ + { + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [ + { + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + } + ], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-daemonset.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-daemonset.meta new file mode 100644 index 00000000000..6cebe927c77 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-daemonset.meta @@ -0,0 +1,119 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-enabled-daemonset", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "DaemonSet", + "name": "my-daemonset", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-deployment.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-deployment.meta new file mode 100644 index 00000000000..8ce5e16068f --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-deployment.meta @@ -0,0 +1,119 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-enabled-deployment", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "my-deployment-bcg289", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-replicaset.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-replicaset.meta new file mode 100644 index 00000000000..966f782a306 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-replicaset.meta @@ -0,0 +1,119 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-enabled-replicaset", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "my-replicaset", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled.meta index af9fb1a3ba6..4c1305d7a1f 100644 --- a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled.meta +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled.meta @@ -17,7 +17,17 @@ "namespace": "options", "resourceVersion": "74466568", "selfLink": "/api/v1/namespaces/core/pods/base", - "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a" + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "name": "my-deployment", + "uid": "abcd1234-5678-efgh-ijkl-9876mnopqrst", + "controller": true, + "blockOwnerDeletion": true + } + ] }, "spec": { "containers": [{ diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-daemonset_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-daemonset_fluent-bit.out new file mode 100644 index 00000000000..dbfcdb92d3c --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-daemonset_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-daemonset","namespace_name":"options","workload":"my-daemonset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-deployment_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-deployment_fluent-bit.out new file mode 100644 index 00000000000..10ac27f0592 --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-deployment_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-deployment","namespace_name":"options","workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-replicaset_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-replicaset_fluent-bit.out new file mode 100644 index 00000000000..af2b3740f7f --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-replicaset_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-replicaset","namespace_name":"options","workload":"my-replicaset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-daemonset_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-daemonset_fluent-bit.out new file mode 100644 index 00000000000..d9ce4885dcc --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-daemonset_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-daemonset","namespace_name":"options","workload":"my-daemonset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-deployment_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-deployment_fluent-bit.out new file mode 100644 index 00000000000..0b7055a6e9e --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-deployment_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-deployment","namespace_name":"options","workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-replicaset_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-replicaset_fluent-bit.out new file mode 100644 index 00000000000..cd9cfdb86ca --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-replicaset_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-replicaset","namespace_name":"options","workload":"my-replicaset","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out index dbd97f1aeb0..073b50caef1 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index ef4f1e5f693..c6d2754d007 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -429,11 +429,42 @@ static void flb_test_options_use_kubelet_enabled_json() flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled_fluent-bit", NULL, 1); } +static void flb_test_options_use_kubelet_enabled_replicaset_json() +{ + flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-replicaset_fluent-bit", NULL, 1); +} + +static void flb_test_options_use_kubelet_enabled_deployment_json() +{ + flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-deployment_fluent-bit", NULL, 1); +} + +static void flb_test_options_use_kubelet_enabled_daemonset_json() +{ + flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-daemonset_fluent-bit", NULL, 1); +} + static void flb_test_options_use_kubelet_disabled_json() { flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled_fluent-bit", NULL, 1); } +static void flb_test_options_use_kubelet_disabled_replicaset_json() +{ + flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-replicaset_fluent-bit", NULL, 1); +} + +static void flb_test_options_use_kubelet_disabled_deployment_json() +{ + flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-deployment_fluent-bit", NULL, 1); +} + +static void flb_test_options_use_kubelet_disabled_daemonset_json() +{ + flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-daemonset_fluent-bit", NULL, 1); +} + + #define flb_test_options_merge_log_enabled(target, suffix, nExpected) \ kube_test("options/" target, KUBE_TAIL, suffix, nExpected, \ "Merge_Log", "On", \ @@ -1019,7 +1050,13 @@ TEST_LIST = { {"kube_core_unescaping_json", flb_test_core_unescaping_json}, {"kube_options_use_pod_association_enabled", kube_options_use_pod_association_enabled}, {"kube_options_use-kubelet_enabled_json", flb_test_options_use_kubelet_enabled_json}, + {"kube_options_use-kubelet_enabled_replicateset_json", flb_test_options_use_kubelet_enabled_replicaset_json}, + {"kube_options_use-kubelet_enabled_deployment_json", flb_test_options_use_kubelet_enabled_deployment_json}, + {"kube_options_use-kubelet_enabled_daemonset_json", flb_test_options_use_kubelet_enabled_daemonset_json}, {"kube_options_use-kubelet_disabled_json", flb_test_options_use_kubelet_disabled_json}, + {"kube_options_use-kubelet_disabled_replicaset_json", flb_test_options_use_kubelet_disabled_replicaset_json}, + {"kube_options_use-kubelet_disabled_deployment_json", flb_test_options_use_kubelet_disabled_deployment_json}, + {"kube_options_use-kubelet_disabled_daemonset_json", flb_test_options_use_kubelet_disabled_daemonset_json}, {"kube_options_merge_log_enabled_text", flb_test_options_merge_log_enabled_text}, {"kube_options_merge_log_enabled_json", flb_test_options_merge_log_enabled_json}, {"kube_options_merge_log_enabled_invalid_json", flb_test_options_merge_log_enabled_invalid_json}, From 85866b1cb765b624e41d8a7cf57f38ec313b10d4 Mon Sep 17 00:00:00 2001 From: POOJA REDDY NATHALA Date: Fri, 27 Sep 2024 14:13:42 -0400 Subject: [PATCH 69/74] Implement HTTPS pod to service association endpoint calls with mtls (#16) --- .gitignore | 3 ++ plugins/filter_kubernetes/kube_conf.c | 8 ++++ plugins/filter_kubernetes/kube_conf.h | 9 ++++ plugins/filter_kubernetes/kube_meta.c | 32 +++++++++++++ plugins/filter_kubernetes/kube_meta.h | 1 + plugins/filter_kubernetes/kubernetes.c | 63 +++++++++++++++++++++----- tests/runtime/filter_kubernetes.c | 22 +++++++++ 7 files changed, 126 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 2d1ed11ee39..d34b9e404af 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,11 @@ *~ _book/ lib/jemalloc +cmake-build-debug/ tests/internal/flb_tests_internal.h tests/runtime/flb_tests_runtime.h +tests/internal/cmake-build-debug/ +tests/runtime/cmake-build-debug/ build/* include/fluent-bit/flb_info.h include/fluent-bit/flb_plugins.h diff --git a/plugins/filter_kubernetes/kube_conf.c b/plugins/filter_kubernetes/kube_conf.c index 7d7eace4525..e577f906347 100644 --- a/plugins/filter_kubernetes/kube_conf.c +++ b/plugins/filter_kubernetes/kube_conf.c @@ -235,6 +235,14 @@ void flb_kube_conf_destroy(struct flb_kube *ctx) flb_upstream_destroy(ctx->upstream); } + if(ctx->pod_association_tls) { + flb_tls_destroy(ctx->pod_association_tls); + } + + if (ctx->pod_association_upstream) { + flb_upstream_destroy(ctx->pod_association_upstream); + } + #ifdef FLB_HAVE_TLS if (ctx->tls) { flb_tls_destroy(ctx->tls); diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index e3f9877d12b..798941b0976 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -192,6 +192,15 @@ struct flb_kube { int pod_service_map_ttl; int pod_service_map_refresh_interval; flb_sds_t pod_service_preload_cache_dir; + struct flb_upstream *pod_association_upstream; + + //Agent TLS certs + struct flb_tls *pod_association_tls; + char *pod_association_host_server_ca_file; + char *pod_association_host_client_cert_file; + char *pod_association_host_client_key_file; + int pod_association_host_tls_debug; + int pod_association_host_tls_verify; struct flb_tls *tls; diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index b9957409839..559ef9003a7 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -1580,11 +1580,38 @@ static int wait_for_dns(struct flb_kube *ctx) return -1; } +int flb_kube_pod_association_init(struct flb_kube *ctx, struct flb_config *config) { + ctx->pod_association_tls = flb_tls_create(ctx->pod_association_host_tls_verify, + ctx->pod_association_host_tls_debug, + NULL, NULL, + ctx->pod_association_host_server_ca_file, + ctx->pod_association_host_client_cert_file, ctx->pod_association_host_client_key_file, NULL); + if (!ctx->pod_association_tls) { + flb_plg_error(ctx->ins, "[kube_meta] could not create TLS config for pod association host"); + return -1; + } + ctx->pod_association_upstream = flb_upstream_create(config, + ctx->pod_association_host, + ctx->pod_association_port, + FLB_IO_TLS, ctx->pod_association_tls); + if (!ctx->pod_association_upstream) { + flb_plg_error(ctx->ins, "kube network init create pod association upstream failed"); + flb_tls_destroy(ctx->pod_association_tls); + ctx->pod_association_tls = NULL; + return -1; + } + flb_upstream_thread_safe(ctx->pod_association_upstream); + mk_list_init(&ctx->pod_association_upstream->_head); + return 0; +} + static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config) { int io_type = FLB_IO_TCP; ctx->upstream = NULL; + ctx->pod_association_upstream = NULL; + ctx->pod_association_tls = NULL; if (ctx->api_https == FLB_TRUE) { if (!ctx->tls_ca_path && !ctx->tls_ca_file) { @@ -1618,6 +1645,11 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config /* Remove async flag from upstream */ ctx->upstream->flags &= ~(FLB_IO_ASYNC); + /* Continue the filter kubernetes plugin functionality if the pod_association fails */ + if(ctx->use_pod_association) { + flb_kube_pod_association_init(ctx, config); + } + return 0; } diff --git a/plugins/filter_kubernetes/kube_meta.h b/plugins/filter_kubernetes/kube_meta.h index 36c35498c73..5c5fae92afe 100644 --- a/plugins/filter_kubernetes/kube_meta.h +++ b/plugins/filter_kubernetes/kube_meta.h @@ -69,5 +69,6 @@ int flb_kube_meta_get(struct flb_kube *ctx, struct flb_kube_meta *meta, struct flb_kube_props *props); int flb_kube_meta_release(struct flb_kube_meta *meta); +int flb_kube_pod_association_init(struct flb_kube *ctx, struct flb_config *config); #endif diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index 758af17aee3..e1313f6613f 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -191,7 +191,6 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { struct flb_http_client *c; size_t b_sent; struct flb_upstream_conn *u_conn; - struct flb_upstream *u; char *buffer = {0}; flb_plg_debug(ctx->ins, "fetch pod to service map"); @@ -203,15 +202,25 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { } else { /* Get upstream context and connection */ - u = flb_upstream_create(ctx->config, - ctx->pod_association_host, - ctx->pod_association_port, - FLB_IO_TCP, NULL); - u_conn = flb_upstream_conn_get(u); + /* if block handles the TLS certificates update, as the Fluent-bit connection gets net timeout error, it destroys the upstream + * On the next call to fetch_pod_service_map, it creates a new pod association upstream with latest TLS certs */ + if (!ctx->pod_association_upstream) { + flb_plg_debug(ctx->ins, "[kubernetes] upstream object for pod association is NULL. Making a new one now"); + ret = flb_kube_pod_association_init(ctx,ctx->config); + if( ret == -1) { + return -1; + } + } + + u_conn = flb_upstream_conn_get(ctx->pod_association_upstream); if (!u_conn) { - flb_plg_error(ctx->ins, "no upstream connections available to %s:%i", - u->tcp_host, u->tcp_port); - return FLB_RETRY; + flb_plg_error(ctx->ins, "[kubernetes] no upstream connections available to %s:%i", + ctx->pod_association_upstream->tcp_host, ctx->pod_association_upstream->tcp_port); + flb_upstream_destroy(ctx->pod_association_upstream); + flb_tls_destroy(ctx->pod_association_tls); + ctx->pod_association_upstream = NULL; + ctx->pod_association_tls = NULL; + return -1; } /* Create HTTP client */ @@ -221,7 +230,12 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { ctx->pod_association_port, NULL, 0); if (!c) { - flb_error("[kube_meta] could not create HTTP client"); + flb_error("[kubernetes] could not create HTTP client"); + flb_upstream_conn_release(u_conn); + flb_upstream_destroy(ctx->pod_association_upstream); + flb_tls_destroy(ctx->pod_association_tls); + ctx->pod_association_upstream = NULL; + ctx->pod_association_tls = NULL; return -1; } @@ -1159,7 +1173,7 @@ static struct flb_config_map config_map[] = { * Will only check when "use_pod_association" config is set to true */ { - FLB_CONFIG_MAP_STR, "pod_association_host", "127.0.0.1", + FLB_CONFIG_MAP_STR, "pod_association_host", "cloudwatch-agent.amazon-cloudwatch", 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host), "host to connect with when performing pod to service name association" }, @@ -1202,7 +1216,32 @@ static struct flb_config_map config_map[] = { 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_preload_cache_dir), "set directory with pod to service map files" }, - + { + FLB_CONFIG_MAP_STR, "pod_association_host_server_ca_file", "/etc/amazon-cloudwatch-observability-agent-server-cert/tls-ca.crt", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_server_ca_file), + "TLS CA certificate path for communication with agent server" + }, + { + FLB_CONFIG_MAP_STR, "pod_association_host_client_cert_file", "/etc/amazon-cloudwatch-observability-agent-client-cert/client.crt", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_client_cert_file), + "Client Certificate path for enabling mTLS on calls to agent server" + }, + { + FLB_CONFIG_MAP_STR, "pod_association_host_client_key_file", "/etc/amazon-cloudwatch-observability-agent-client-cert/client.key", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_client_key_file), + "Client Certificate Key path for enabling mTLS on calls to agent server" + }, + { + FLB_CONFIG_MAP_INT, "pod_association_host_tls_debug", "0", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_tls_debug), + "set TLS debug level: 0 (no debug), 1 (error), " + "2 (state change), 3 (info) and 4 (verbose)" + }, + { + FLB_CONFIG_MAP_BOOL, "pod_association_host_tls_verify", "true", + 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_tls_verify), + "enable or disable verification of TLS peer certificate" + }, /* EOF */ {0} }; diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index c6d2754d007..9ce4b6bc947 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -354,6 +354,25 @@ static void kube_test(const char *target, int type, const char *suffix, int nExp clear_file(path); } + //Testing the default values setup + struct mk_list *head; + struct flb_filter_instance *f_ins; + mk_list_foreach(head, &ctx.flb->config->filters) { + f_ins = mk_list_entry(head, struct flb_filter_instance, _head); + if (strstr(f_ins->p->name, "kubernetes")) { + TEST_CHECK(strcmp(f_ins->p->config_map[39].name, "pod_association_host_server_ca_file") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[39].def_value, "/etc/amazon-cloudwatch-observability-agent-server-cert/tls-ca.crt") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[40].name, "pod_association_host_client_cert_file") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[40].def_value, "/etc/amazon-cloudwatch-observability-agent-client-cert/client.crt") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[41].name, "pod_association_host_client_key_file") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[41].def_value, "/etc/amazon-cloudwatch-observability-agent-client-cert/client.key") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[42].name, "pod_association_host_tls_debug") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[42].def_value, "0") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[43].name, "pod_association_host_tls_verify") == 0); + TEST_CHECK(strcmp(f_ins->p->config_map[43].def_value, "true") == 0); + } + } + /* Start the engine */ ret = flb_start(ctx.flb); TEST_CHECK_(ret == 0, "starting engine"); @@ -951,6 +970,9 @@ static void flb_test_annotations_exclude_multiple_4_container_4_stderr() "use_kubelet", "true", \ "kubelet_port", "8002", \ "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap", \ + "pod_association_host_server_ca_file", "/tst/ca.crt", \ + "pod_association_host_client_cert_file", "/tst/client.crt", \ + "pod_association_host_client_key_file", "/tst/client.key", \ NULL); \ static void kube_options_use_pod_association_enabled() From 247a36f73dba6ba6dddb0b1bbb0496b00478c473 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:00:46 -0400 Subject: [PATCH 70/74] Add workload fallback logics for entity service name (#18) --- plugins/filter_kubernetes/kube_meta.c | 24 ++++ plugins/out_cloudwatch_logs/cloudwatch_api.c | 4 + ...ns_use-kubelet-disabled-pod_fluent-bit.log | 1 + ...ons_use-kubelet-enabled-pod_fluent-bit.log | 1 + .../options_use-kubelet-disabled-pod.meta | 116 ++++++++++++++++++ .../meta/options_use-kubelet-enabled-pod.meta | 109 ++++++++++++++++ ...ns_use-kubelet-disabled-pod_fluent-bit.out | 1 + ...ons_use-kubelet-enabled-pod_fluent-bit.out | 1 + tests/runtime/filter_kubernetes.c | 12 ++ 9 files changed, 269 insertions(+) create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-pod_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-pod_fluent-bit.log create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-pod.meta create mode 100644 tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-pod.meta create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-pod_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-pod_fluent-bit.out diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 559ef9003a7..afa897a0ba0 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -737,12 +737,24 @@ static void cb_results_workload(const char *name, const char *value, } } +/* + * Search workload based on the following priority + * where the top is highest priority + * 1. Deployment name + * 2. StatefulSet name + * 3. DaemonSet name + * 4. Job name + * 5. CronJob name + * 6. Pod name + * 7. Container name + */ static void search_workload(struct flb_kube_meta *meta,struct flb_kube *ctx,msgpack_object map) { int i,j,ownerIndex; int regex_found; int replicaset_match; int podname_match = FLB_FALSE; + int workload_found = FLB_FALSE; msgpack_object k, v; msgpack_object_map ownerMap; struct flb_regex_search result; @@ -788,6 +800,7 @@ static void search_workload(struct flb_kube_meta *meta,struct flb_kube *ctx,msgp if (strncmp(key.via.str.ptr, "name", key.via.str.size) == 0) { /* Store the value of 'name' in workload_val so it can be reused by set_workload */ workload_val = val; + workload_found = FLB_TRUE; if (replicaset_match) { regex_found = flb_regex_do(ctx->deploymentRegex, val.via.str.ptr, val.via.str.size, &result); if (regex_found > 0) { @@ -808,6 +821,17 @@ static void search_workload(struct flb_kube_meta *meta,struct flb_kube *ctx,msgp } } } + if(!workload_found) { + if(meta->podname != NULL) { + meta->workload = flb_strndup(meta->podname, meta->podname_len); + meta->workload_len = meta->podname_len; + meta->fields++; + } else if (meta->container_name != NULL) { + meta->workload = flb_strndup(meta->container_name, meta->container_name_len); + meta->workload_len = meta->container_name_len; + meta->fields++; + } + } return; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 868b71e5385..ff3f8243e70 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -969,6 +969,10 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map } } } + if(entity->key_attributes->name == NULL && entity->attributes->name_source == NULL &&entity->attributes->workload != NULL) { + entity->key_attributes->name = flb_strndup(entity->attributes->workload, strlen(entity->attributes->workload)); + entity->attributes->name_source = flb_strndup("K8sWorkload", 11); + } } void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stream, const msgpack_object map) { diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-pod_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-pod_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-disabled-pod_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-pod_fluent-bit.log b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-pod_fluent-bit.log new file mode 100644 index 00000000000..259723131be --- /dev/null +++ b/tests/runtime/data/kubernetes/log/options/options_use-kubelet-enabled-pod_fluent-bit.log @@ -0,0 +1 @@ +{"log":"Fluent Bit is logging\n","stream":"stdout","time":"2019-04-01T17:58:33.598656444Z"} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-pod.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-pod.meta new file mode 100644 index 00000000000..a8bcc69017f --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-disabled-pod.meta @@ -0,0 +1,116 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-disabled-pod", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a" + }, + "spec": { + "containers": [ + { + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [ + { + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + } + ], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } +} diff --git a/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-pod.meta b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-pod.meta new file mode 100644 index 00000000000..122479e9c07 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-kubelet-enabled-pod.meta @@ -0,0 +1,109 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-kubelet-enabled-pod", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a" + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-pod_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-pod_fluent-bit.out new file mode 100644 index 00000000000..8aea6e523eb --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-disabled-pod_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-disabled-pod","namespace_name":"options","workload":"use-kubelet-disabled-pod","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-pod_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-pod_fluent-bit.out new file mode 100644 index 00000000000..ccc0d77b4d0 --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled-pod_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled-pod","namespace_name":"options","workload":"use-kubelet-enabled-pod","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index 9ce4b6bc947..99476cf7dd5 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -463,6 +463,11 @@ static void flb_test_options_use_kubelet_enabled_daemonset_json() flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-daemonset_fluent-bit", NULL, 1); } +static void flb_test_options_use_kubelet_enabled_pod_json() +{ + flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-pod_fluent-bit", NULL, 1); +} + static void flb_test_options_use_kubelet_disabled_json() { flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled_fluent-bit", NULL, 1); @@ -483,6 +488,11 @@ static void flb_test_options_use_kubelet_disabled_daemonset_json() flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-daemonset_fluent-bit", NULL, 1); } +static void flb_test_options_use_kubelet_disabled_pod_json() +{ + flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-pod_fluent-bit", NULL, 1); +} + #define flb_test_options_merge_log_enabled(target, suffix, nExpected) \ kube_test("options/" target, KUBE_TAIL, suffix, nExpected, \ @@ -1075,10 +1085,12 @@ TEST_LIST = { {"kube_options_use-kubelet_enabled_replicateset_json", flb_test_options_use_kubelet_enabled_replicaset_json}, {"kube_options_use-kubelet_enabled_deployment_json", flb_test_options_use_kubelet_enabled_deployment_json}, {"kube_options_use-kubelet_enabled_daemonset_json", flb_test_options_use_kubelet_enabled_daemonset_json}, + {"kube_options_use-kubelet_enabled_pod_json", flb_test_options_use_kubelet_enabled_pod_json}, {"kube_options_use-kubelet_disabled_json", flb_test_options_use_kubelet_disabled_json}, {"kube_options_use-kubelet_disabled_replicaset_json", flb_test_options_use_kubelet_disabled_replicaset_json}, {"kube_options_use-kubelet_disabled_deployment_json", flb_test_options_use_kubelet_disabled_deployment_json}, {"kube_options_use-kubelet_disabled_daemonset_json", flb_test_options_use_kubelet_disabled_daemonset_json}, +{"kube_options_use-kubelet_disabled_pod_json", flb_test_options_use_kubelet_disabled_pod_json}, {"kube_options_merge_log_enabled_text", flb_test_options_merge_log_enabled_text}, {"kube_options_merge_log_enabled_json", flb_test_options_merge_log_enabled_json}, {"kube_options_merge_log_enabled_invalid_json", flb_test_options_merge_log_enabled_invalid_json}, From af03117bdeb42326377b99ee477825584d55b0f2 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:07:27 -0400 Subject: [PATCH 71/74] Fix fluentbit failure when running without permissions (#19) --- plugins/out_cloudwatch_logs/cloudwatch_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index ff3f8243e70..90bb3fef8ec 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -1000,6 +1000,9 @@ void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stre } else { parse_entity(ctx,stream->entity,map, map.via.map.size); } + if (!stream->entity) { + flb_plg_warn(ctx->ins, "Failed to generate entity"); + } } } @@ -1073,14 +1076,11 @@ int process_and_send(struct flb_cloudwatch *ctx, const char *input_plugin, map_size = map.via.map.size; stream = get_log_stream(ctx, tag, map); - update_or_create_entity(ctx,stream,map); if (!stream) { flb_plg_debug(ctx->ins, "Couldn't determine log group & stream for record with tag %s", tag); goto error; } - if (!stream->entity) { - flb_plg_warn(ctx->ins, "Failed to generate entity"); - } + update_or_create_entity(ctx,stream,map); if (ctx->log_key) { key_str = NULL; From 9875b8c06bd349897b190b97d69a298d06e82747 Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:05:13 -0400 Subject: [PATCH 72/74] Add environment fallback for different kubernetes platforms (#20) --- plugins/filter_kubernetes/kube_conf.c | 16 ++ plugins/filter_kubernetes/kube_conf.h | 32 ++- plugins/filter_kubernetes/kube_meta.c | 184 +++++++++++++++--- plugins/filter_kubernetes/kube_meta.h | 1 + plugins/filter_kubernetes/kubernetes.c | 18 +- plugins/out_cloudwatch_logs/cloudwatch_api.c | 28 ++- ...-pod-association-enabled-fallback-env.meta | 109 +++++++++++ ...iation-enabled-fallback-env_fluent-bit.out | 1 + ...use-pod-association-enabled_fluent-bit.out | 2 +- ...iation-enabled-fallback-env_fluent-bit.map | 6 + ...se-pod-association-enabled_fluent-bit.map} | 0 tests/runtime/filter_kubernetes.c | 14 +- 12 files changed, 367 insertions(+), 44 deletions(-) create mode 100644 tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled-fallback-env.meta create mode 100644 tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out create mode 100644 tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled-fallback-env_fluent-bit.map rename tests/runtime/data/kubernetes/servicemap/{use_pod_association_enabled.map => options_use-pod-association-enabled_fluent-bit.map} (100%) diff --git a/plugins/filter_kubernetes/kube_conf.c b/plugins/filter_kubernetes/kube_conf.c index e577f906347..7acfaacc23f 100644 --- a/plugins/filter_kubernetes/kube_conf.c +++ b/plugins/filter_kubernetes/kube_conf.c @@ -99,6 +99,12 @@ struct flb_kube *flb_kube_conf_create(struct flb_filter_instance *ins, ctx->api_https = FLB_FALSE; } + if (ctx->use_pod_association) { + ctx->kubernetes_api_host = flb_strdup(FLB_API_HOST); + ctx->kubernetes_api_port = FLB_API_PORT; + } + + } else if (!url) { ctx->api_host = flb_strdup(FLB_API_HOST); @@ -243,6 +249,16 @@ void flb_kube_conf_destroy(struct flb_kube *ctx) flb_upstream_destroy(ctx->pod_association_upstream); } + if (ctx->kubernetes_upstream) { + flb_upstream_destroy(ctx->kubernetes_upstream); + } + if (ctx->kubernetes_api_host) { + flb_free(ctx->kubernetes_api_host); + } + if (ctx->platform) { + flb_free(ctx->platform); + } + #ifdef FLB_HAVE_TLS if (ctx->tls) { flb_tls_destroy(ctx->tls); diff --git a/plugins/filter_kubernetes/kube_conf.h b/plugins/filter_kubernetes/kube_conf.h index 798941b0976..507fa39d0ee 100644 --- a/plugins/filter_kubernetes/kube_conf.h +++ b/plugins/filter_kubernetes/kube_conf.h @@ -72,6 +72,19 @@ #define KEY_ATTRIBUTES_MAX_LEN 1024 #define SERVICE_NAME_SOURCE_MAX_LEN 64 +/* + * Configmap used for verifying whether if FluentBit is + * on EKS or native Kubernetes + */ +#define KUBE_SYSTEM_NAMESPACE "kube-system" +#define AWS_AUTH_CONFIG_MAP "aws-auth" + +/* + * Possible platform values for Kubernetes plugin + */ +#define NATIVE_KUBERNETES_PLATFORM "k8s" +#define EKS_PLATFORM "eks" + struct kube_meta; struct service_attributes { @@ -179,7 +192,7 @@ struct flb_kube { int kube_meta_cache_ttl; /* Configuration used for enabling pod to service name mapping*/ - char *use_pod_association; + int use_pod_association; char *pod_association_host; char *pod_association_endpoint; int pod_association_port; @@ -191,8 +204,23 @@ struct flb_kube { struct flb_hash *pod_hash_table; int pod_service_map_ttl; int pod_service_map_refresh_interval; - flb_sds_t pod_service_preload_cache_dir; + flb_sds_t pod_service_preload_cache_path; struct flb_upstream *pod_association_upstream; + /* + * This connection is used for calling Kubernetes configmaps + * endpoint so pod association can determine the environment. + * Example: EKS or Native Kubernetes. + */ + char *kubernetes_api_host; + int kubernetes_api_port; + struct flb_upstream *kubernetes_upstream; + char *platform; + /* + * This value is used for holding the platform config + * value. Platform will be overriden with this variable + * if it's set + */ + char *set_platform; //Agent TLS certs struct flb_tls *pod_association_tls; diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index afa897a0ba0..351d2bf8ed2 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -346,8 +346,9 @@ static int get_meta_file_info(struct flb_kube *ctx, const char *namespace, * this could send out HTTP Request either to KUBE Server API or Kubelet */ static int get_meta_info_from_request(struct flb_kube *ctx, + struct flb_upstream *upstream, const char *namespace, - const char *podname, + const char *resource, char **buffer, size_t *size, int *root_type, char* uri) @@ -358,11 +359,11 @@ static int get_meta_info_from_request(struct flb_kube *ctx, size_t b_sent; int packed; - if (!ctx->upstream) { + if (!upstream) { return -1; } - u_conn = flb_upstream_conn_get(ctx->upstream); + u_conn = flb_upstream_conn_get(upstream); if (!u_conn) { flb_plg_error(ctx->ins, "kubelet upstream connection error"); @@ -388,9 +389,9 @@ static int get_meta_info_from_request(struct flb_kube *ctx, } ret = flb_http_do(c, &b_sent); - flb_plg_debug(ctx->ins, "Request (ns=%s, pod=%s) http_do=%i, " + flb_plg_debug(ctx->ins, "Request (ns=%s, resource=%s) http_do=%i, " "HTTP Status: %i", - namespace, podname, ret, c->resp.status); + namespace, resource, ret, c->resp.status); if (ret != 0 || c->resp.status != 200) { if (c->resp.payload_size > 0) { @@ -440,7 +441,7 @@ static int get_pods_from_kubelet(struct flb_kube *ctx, } flb_plg_debug(ctx->ins, "Send out request to Kubelet for pods information."); - packed = get_meta_info_from_request(ctx, namespace, podname, + packed = get_meta_info_from_request(ctx, ctx->upstream, namespace, podname, &buf, &size, &root_type, uri); } @@ -455,6 +456,51 @@ static int get_pods_from_kubelet(struct flb_kube *ctx, return 0; } +/* Gather metadata from API Server */ +static int get_api_server_configmap(struct flb_kube *ctx, + const char *namespace, const char *configmap, + char **out_buf, size_t *out_size) +{ + int ret; + int packed = -1; + int root_type; + char uri[1024]; + char *buf; + size_t size; + + *out_buf = NULL; + *out_size = 0; + + if (packed == -1) { + + ret = snprintf(uri, sizeof(uri) - 1, FLB_KUBE_API_CONFIGMAP_FMT, namespace, + configmap); + + if (ret == -1) { + return -1; + } + flb_plg_debug(ctx->ins, + "Send out request to API Server for configmap information"); + if(ctx->use_kubelet) { + packed = get_meta_info_from_request(ctx,ctx->kubernetes_upstream, namespace, configmap, + &buf, &size, &root_type, uri); + } else { + packed = get_meta_info_from_request(ctx,ctx->upstream, namespace, configmap, + &buf, &size, &root_type, uri); + } + } + + /* validate pack */ + if (packed == -1) { + return -1; + } + + *out_buf = buf; + *out_size = size; + + return 0; +} + /* Gather metadata from API Server */ static int get_api_server_info(struct flb_kube *ctx, const char *namespace, const char *podname, @@ -484,7 +530,7 @@ static int get_api_server_info(struct flb_kube *ctx, } flb_plg_debug(ctx->ins, "Send out request to API Server for pods information"); - packed = get_meta_info_from_request(ctx, namespace, podname, + packed = get_meta_info_from_request(ctx, ctx->upstream, namespace, podname, &buf, &size, &root_type, uri); } @@ -982,6 +1028,26 @@ static int search_item_in_items(struct flb_kube_meta *meta, return ret; } +static char* find_fallback_environment(struct flb_kube *ctx, struct flb_kube_meta *meta) { + char *fallback_env = NULL; + + /* + * Possible fallback environments: + * 1. eks:cluster-name/namespace + * 2. k8s:cluster-name/namespace + */ + if(ctx->platform == NULL && ctx->set_platform != NULL) { + ctx->platform = flb_strdup(ctx->set_platform); + } + if (ctx->platform != NULL && meta->cluster != NULL && meta->namespace != NULL) { + int ret = asprintf(&fallback_env, "%s:%s/%s", ctx->platform, meta->cluster, meta->namespace); + if (ret == -1) { + return NULL; + } + return fallback_env; + } + return NULL; +} static int merge_meta_from_tag(struct flb_kube *ctx, struct flb_kube_meta *meta, char **out_buf, size_t *out_size) @@ -1192,12 +1258,27 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, } } } - - pod_service_found = flb_hash_get(ctx->pod_hash_table, + int fallback_environment_len = 0; + char *fallback_environment = find_fallback_environment(ctx,meta); + if(fallback_environment) { + fallback_environment_len = strlen(fallback_environment); + } + if(ctx->use_pod_association) { + pod_service_found = flb_hash_get(ctx->pod_hash_table, meta->podname, meta->podname_len, &tmp_service_attributes, &tmp_service_attr_size); - if (pod_service_found != -1 && tmp_service_attributes != NULL) { - map_size += tmp_service_attributes->fields; + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + map_size += tmp_service_attributes->fields; + } + if(pod_service_found != -1 && tmp_service_attributes != NULL && tmp_service_attributes->environment[0] == '\0' && fallback_environment) { + map_size++; + } + if(pod_service_found == -1 && meta->workload != NULL && fallback_environment) { + map_size++; + } + if(ctx->platform) { + map_size++; + } } /* Set map size: current + pod_id, labels and annotations */ @@ -1223,24 +1304,44 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_pack_str(&mp_pck, meta->namespace_len); msgpack_pack_str_body(&mp_pck, meta->namespace, meta->namespace_len); } - if (pod_service_found != -1 && tmp_service_attributes != NULL) { - if (tmp_service_attributes->name[0] != '\0') { - msgpack_pack_str(&mp_pck, 12); - msgpack_pack_str_body(&mp_pck, "service_name", 12); - msgpack_pack_str(&mp_pck, tmp_service_attributes->name_len); - msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name, tmp_service_attributes->name_len); - } - if (tmp_service_attributes->environment[0] != '\0') { + if(ctx->use_pod_association) { + if (pod_service_found != -1 && tmp_service_attributes != NULL) { + if (tmp_service_attributes->name[0] != '\0') { + msgpack_pack_str(&mp_pck, 12); + msgpack_pack_str_body(&mp_pck, "service_name", 12); + msgpack_pack_str(&mp_pck, tmp_service_attributes->name_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name, tmp_service_attributes->name_len); + } + if (tmp_service_attributes->environment[0] != '\0') { + msgpack_pack_str(&mp_pck, 11); + msgpack_pack_str_body(&mp_pck, "environment", 11); + msgpack_pack_str(&mp_pck, tmp_service_attributes->environment_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->environment, tmp_service_attributes->environment_len); + } else if(tmp_service_attributes->environment[0] == '\0' && fallback_environment) { + msgpack_pack_str(&mp_pck, 11); + msgpack_pack_str_body(&mp_pck, "environment", 11); + msgpack_pack_str(&mp_pck, fallback_environment_len); + msgpack_pack_str_body(&mp_pck, fallback_environment, fallback_environment_len); + } + if (tmp_service_attributes->name_source[0] != '\0') { + msgpack_pack_str(&mp_pck, 11); + msgpack_pack_str_body(&mp_pck, "name_source", 11); + msgpack_pack_str(&mp_pck, tmp_service_attributes->name_source_len); + msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name_source, tmp_service_attributes->name_source_len); + } + } else if ( pod_service_found == -1 && meta->workload != NULL && fallback_environment) { msgpack_pack_str(&mp_pck, 11); msgpack_pack_str_body(&mp_pck, "environment", 11); - msgpack_pack_str(&mp_pck, tmp_service_attributes->environment_len); - msgpack_pack_str_body(&mp_pck, tmp_service_attributes->environment, tmp_service_attributes->environment_len); + msgpack_pack_str(&mp_pck, fallback_environment_len); + msgpack_pack_str_body(&mp_pck, fallback_environment, fallback_environment_len); } - if (tmp_service_attributes->name_source[0] != '\0') { - msgpack_pack_str(&mp_pck, 11); - msgpack_pack_str_body(&mp_pck, "name_source", 11); - msgpack_pack_str(&mp_pck, tmp_service_attributes->name_source_len); - msgpack_pack_str_body(&mp_pck, tmp_service_attributes->name_source, tmp_service_attributes->name_source_len); + + if(ctx->platform != NULL) { + int platform_len = strlen(ctx->platform); + msgpack_pack_str(&mp_pck, 8); + msgpack_pack_str_body(&mp_pck, "platform", 8); + msgpack_pack_str(&mp_pck, platform_len); + msgpack_pack_str_body(&mp_pck, ctx->platform, platform_len); } } @@ -1357,6 +1458,10 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, *out_buf = mp_sbuf.data; *out_size = mp_sbuf.size; + if(fallback_environment) { + flb_free(fallback_environment); + } + return 0; } @@ -1626,6 +1731,14 @@ int flb_kube_pod_association_init(struct flb_kube *ctx, struct flb_config *confi } flb_upstream_thread_safe(ctx->pod_association_upstream); mk_list_init(&ctx->pod_association_upstream->_head); + + if(ctx->use_kubelet) { + ctx->kubernetes_upstream = flb_upstream_create(config, + ctx->kubernetes_api_host, + ctx->kubernetes_api_port, + FLB_IO_TLS, + ctx->tls); + } return 0; } @@ -1636,6 +1749,7 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config ctx->upstream = NULL; ctx->pod_association_upstream = NULL; ctx->pod_association_tls = NULL; + ctx->kubernetes_upstream = NULL; if (ctx->api_https == FLB_TRUE) { if (!ctx->tls_ca_path && !ctx->tls_ca_file) { @@ -1681,8 +1795,8 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config) { int ret; - char *meta_buf; - size_t meta_size; + char *meta_buf, *config_buf = NULL; + size_t meta_size, config_size; if (ctx->dummy_meta == FLB_TRUE) { flb_plg_warn(ctx->ins, "using Dummy Metadata"); @@ -1730,8 +1844,22 @@ int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config) } return -1; } + + ctx->platform = NULL; + if (ctx->use_pod_association) { + ret = get_api_server_configmap(ctx, KUBE_SYSTEM_NAMESPACE,AWS_AUTH_CONFIG_MAP, + &config_buf, &config_size); + if (ret == -1) { + ctx->platform = flb_strdup(NATIVE_KUBERNETES_PLATFORM); + } else { + ctx->platform = flb_strdup(EKS_PLATFORM); + } + } flb_plg_info(ctx->ins, "connectivity OK"); flb_free(meta_buf); + if(config_buf) { + flb_free(config_buf); + } } else { flb_plg_info(ctx->ins, "Fluent Bit not running in a POD"); diff --git a/plugins/filter_kubernetes/kube_meta.h b/plugins/filter_kubernetes/kube_meta.h index 5c5fae92afe..f5cfc143877 100644 --- a/plugins/filter_kubernetes/kube_meta.h +++ b/plugins/filter_kubernetes/kube_meta.h @@ -57,6 +57,7 @@ struct flb_kube_meta { #define FLB_KUBE_API_HOST "kubernetes.default.svc" #define FLB_KUBE_API_PORT 443 #define FLB_KUBE_API_FMT "/api/v1/namespaces/%s/pods/%s" +#define FLB_KUBE_API_CONFIGMAP_FMT "/api/v1/namespaces/%s/configmaps/%s" #define FLB_KUBELET_PODS "/pods" int flb_kube_meta_init(struct flb_kube *ctx, struct flb_config *config); diff --git a/plugins/filter_kubernetes/kubernetes.c b/plugins/filter_kubernetes/kubernetes.c index e1313f6613f..54d2f6d85b4 100644 --- a/plugins/filter_kubernetes/kubernetes.c +++ b/plugins/filter_kubernetes/kubernetes.c @@ -54,7 +54,7 @@ struct mk_event_loop *evl; * If a file exists called service.map, load it and use it. * If not, fall back to API. This is primarily for unit tests purposes, */ -static int get_pod_service_file_info(struct flb_kube *ctx, const char *map_name,char **buffer) { +static int get_pod_service_file_info(struct flb_kube *ctx, char **buffer) { int fd = -1; char *payload = NULL; @@ -64,10 +64,10 @@ static int get_pod_service_file_info(struct flb_kube *ctx, const char *map_name, int ret; char uri[1024]; - if (ctx->pod_service_preload_cache_dir && map_name) { + if (ctx->pod_service_preload_cache_path) { - ret = snprintf(uri, sizeof(uri) - 1, "%s/%s.map", - ctx->pod_service_preload_cache_dir, map_name); + ret = snprintf(uri, sizeof(uri) - 1, "%s.map", + ctx->pod_service_preload_cache_path); if (ret > 0) { fd = open(uri, O_RDONLY, 0); if (fd != -1) { @@ -195,7 +195,7 @@ static int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url) { flb_plg_debug(ctx->ins, "fetch pod to service map"); - ret = get_pod_service_file_info(ctx, "use_pod_association_enabled", &buffer); + ret = get_pod_service_file_info(ctx, &buffer); if (ret > 0 && buffer != NULL) { parse_pod_service_map(ctx, buffer, ret); flb_free(buffer); @@ -1213,7 +1213,7 @@ static struct flb_config_map config_map[] = { }, { FLB_CONFIG_MAP_STR, "pod_service_preload_cache_dir", NULL, - 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_preload_cache_dir), + 0, FLB_TRUE, offsetof(struct flb_kube, pod_service_preload_cache_path), "set directory with pod to service map files" }, { @@ -1241,6 +1241,12 @@ static struct flb_config_map config_map[] = { FLB_CONFIG_MAP_BOOL, "pod_association_host_tls_verify", "true", 0, FLB_TRUE, offsetof(struct flb_kube, pod_association_host_tls_verify), "enable or disable verification of TLS peer certificate" + }, + { + FLB_CONFIG_MAP_STR, "set_platform", NULL, + 0, FLB_TRUE, offsetof(struct flb_kube, set_platform), + "Set the platform that kubernetes is in. Possible values are k8s and eks" + "This should only be used for testing purpose" }, /* EOF */ {0} diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 90bb3fef8ec..1300801901c 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -237,10 +237,26 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu 0)) { goto error; } - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, - "\"PlatformType\":\"AWS::EKS\"" - ,0)) { - goto error; + if (stream->entity->attributes->platform_type != NULL && strlen(stream->entity->attributes->platform_type) != 0) { + if (strcmp(stream->entity->attributes->platform_type, "eks") == 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","AWS::EKS","\"")) { + goto error; + } + } else if (strcmp(stream->entity->attributes->platform_type, "k8s") == 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","K8s","\"")) { + goto error; + } + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } else { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","Generic","\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } } if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { @@ -959,6 +975,10 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map if(entity->attributes->name_source == NULL) { entity->attributes->name_source = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } + } else if(strncmp(kube_key.via.str.ptr, "platform", kube_key.via.str.size) == 0) { + if(entity->attributes->platform_type == NULL) { + entity->attributes->platform_type = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + } } } } diff --git a/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled-fallback-env.meta b/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled-fallback-env.meta new file mode 100644 index 00000000000..755931d52a2 --- /dev/null +++ b/tests/runtime/data/kubernetes/meta/options_use-pod-association-enabled-fallback-env.meta @@ -0,0 +1,109 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": {}, + "items": [{ + "metadata": { + "annotations": { + "prometheus.io/path": "/api/v1/metrics/prometheus", + "prometheus.io/port": "2020", + "prometheus.io/scrape": "true" + }, + "creationTimestamp": "2019-04-03T09:29:00Z", + "labels": { + "app.kubernetes.io/name": "fluent-bit" + }, + "name": "use-pod-association-enabled-fallback-env", + "namespace": "options", + "resourceVersion": "74466568", + "selfLink": "/api/v1/namespaces/core/pods/base", + "uid": "e9f2963f-55f2-11e9-84c5-02e422b8a84a" + }, + "spec": { + "containers": [{ + "image": "fluent/fluent-bit", + "imagePullPolicy": "Always", + "name": "fluent-bit", + "resources": {}, + "stdin": true, + "stdinOnce": true, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "tty": true, + "volumeMounts": [{ + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "default-token-9ffht", + "readOnly": true + }] + }], + "dnsPolicy": "ClusterFirst", + "nodeName": "ip-10-49-18-80.eu-west-1.compute.internal", + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [{ + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [{ + "name": "default-token-9ffht", + "secret": { + "defaultMode": 420, + "secretName": "default-token-9ffht" + } + }] + }, + "status": { + "conditions": [{ + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:06Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2019-04-03T09:29:00Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [{ + "containerID": "docker://c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16", + "image": "fluent/fluent-bit:latest", + "imageID": "docker-pullable://fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f", + "lastState": {}, + "name": "fluent-bit", + "ready": true, + "restartCount": 0, + "state": { + "running": { + "startedAt": "2019-04-03T09:29:05Z" + } + } + }], + "hostIP": "10.49.18.80", + "phase": "Running", + "podIP": "100.116.192.42", + "qosClass": "BestEffort", + "startTime": "2019-04-03T09:29:00Z" + } + }] +} diff --git a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out new file mode 100644 index 00000000000..4d223d61434 --- /dev/null +++ b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out @@ -0,0 +1 @@ +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"cluster":"test-cluster","pod_name":"use-pod-association-enabled-fallback-env","namespace_name":"options","service_name":"test-service","environment":"eks:test-cluster/options","name_source":"Instrumentation","platform":"eks","workload":"use-pod-association-enabled-fallback-env","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out index c4882ca39d6..4b1ec144601 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","service_name":"test-service","environment":"test-environment","name_source":"Instrumentation","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled","namespace_name":"options","service_name":"test-service","environment":"test-environment","name_source":"Instrumentation","workload":"use-pod-association-enabled","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled-fallback-env_fluent-bit.map b/tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled-fallback-env_fluent-bit.map new file mode 100644 index 00000000000..5809d2740fb --- /dev/null +++ b/tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled-fallback-env_fluent-bit.map @@ -0,0 +1,6 @@ +{ + "use-pod-association-enabled-fallback-env": { + "ServiceName": "test-service", + "ServiceNameSource": "Instrumentation" + } +} diff --git a/tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map b/tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled_fluent-bit.map similarity index 100% rename from tests/runtime/data/kubernetes/servicemap/use_pod_association_enabled.map rename to tests/runtime/data/kubernetes/servicemap/options_use-pod-association-enabled_fluent-bit.map diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index 99476cf7dd5..74c589282aa 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -974,20 +974,27 @@ static void flb_test_annotations_exclude_multiple_4_container_4_stderr() flb_test_annotations_exclude("annotations-exclude_multiple-4_container-4", "stderr", 1); } -#define flb_test_pod_to_service_map(target, suffix, nExpected) \ +#define flb_test_pod_to_service_map(target, suffix, nExpected, platform) \ kube_test("options/" target, KUBE_POD_ASSOCIATION, suffix, nExpected, \ "use_pod_association", "true", \ "use_kubelet", "true", \ "kubelet_port", "8002", \ - "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap", \ + "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap/" target, \ "pod_association_host_server_ca_file", "/tst/ca.crt", \ "pod_association_host_client_cert_file", "/tst/client.crt", \ "pod_association_host_client_key_file", "/tst/client.key", \ + "set_platform", platform, \ NULL); \ static void kube_options_use_pod_association_enabled() { - flb_test_pod_to_service_map("options_use-pod-association-enabled_fluent-bit", NULL, 1); + flb_test_pod_to_service_map("options_use-pod-association-enabled_fluent-bit", NULL, 1, NULL); +} + +static void kube_options_use_pod_association_enabled_fallback_env() +{ + setenv("CLUSTER_NAME","test-cluster", 1); + flb_test_pod_to_service_map("options_use-pod-association-enabled-fallback-env_fluent-bit", NULL, 1, "eks"); } #ifdef FLB_HAVE_SYSTEMD @@ -1081,6 +1088,7 @@ TEST_LIST = { {"kube_core_unescaping_text", flb_test_core_unescaping_text}, {"kube_core_unescaping_json", flb_test_core_unescaping_json}, {"kube_options_use_pod_association_enabled", kube_options_use_pod_association_enabled}, + {"kube_options_use_pod_association_enabled_fallback_env", kube_options_use_pod_association_enabled_fallback_env}, {"kube_options_use-kubelet_enabled_json", flb_test_options_use_kubelet_enabled_json}, {"kube_options_use-kubelet_enabled_replicateset_json", flb_test_options_use_kubelet_enabled_replicaset_json}, {"kube_options_use-kubelet_enabled_deployment_json", flb_test_options_use_kubelet_enabled_deployment_json}, From 8e6d48c6ededd4fe3bfb8a8f68c508fd86f4171c Mon Sep 17 00:00:00 2001 From: zhihonl <61301537+zhihonl@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:39:17 -0400 Subject: [PATCH 73/74] Fix incorrect kubernetes platform and missing entity in native Kubernetes (#21) --- plugins/filter_kubernetes/kube_meta.c | 15 +++++---- plugins/out_cloudwatch_logs/cloudwatch_api.c | 33 +++++++++++++------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 351d2bf8ed2..63807c6975e 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -1731,14 +1731,6 @@ int flb_kube_pod_association_init(struct flb_kube *ctx, struct flb_config *confi } flb_upstream_thread_safe(ctx->pod_association_upstream); mk_list_init(&ctx->pod_association_upstream->_head); - - if(ctx->use_kubelet) { - ctx->kubernetes_upstream = flb_upstream_create(config, - ctx->kubernetes_api_host, - ctx->kubernetes_api_port, - FLB_IO_TLS, - ctx->tls); - } return 0; } @@ -1785,6 +1777,13 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config /* Continue the filter kubernetes plugin functionality if the pod_association fails */ if(ctx->use_pod_association) { + if(ctx->use_kubelet) { + ctx->kubernetes_upstream = flb_upstream_create(config, + ctx->kubernetes_api_host, + ctx->kubernetes_api_port, + FLB_IO_TLS, + ctx->tls); + } flb_kube_pod_association_init(ctx, config); } diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 1300801901c..3deecf22fc7 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -242,13 +242,32 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","AWS::EKS","\"")) { goto error; } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } } else if (strcmp(stream->entity->attributes->platform_type, "k8s") == 0) { if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","K8s","\"")) { goto error; } - } - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { - goto error; + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { + if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"K8s.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { + goto error; + } + if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { + goto error; + } + } } } else { if (!snprintf(ts,ATTRIBUTES_MAX_LEN, "%s%s%s","\"PlatformType\":\"","Generic","\"")) { @@ -258,14 +277,6 @@ static int entity_add_attributes(struct flb_cloudwatch *ctx, struct cw_flush *bu goto error; } } - if(stream->entity->attributes->cluster_name != NULL && strlen(stream->entity->attributes->cluster_name) != 0) { - if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"EKS.Cluster\":\"",stream->entity->attributes->cluster_name,"\"")) { - goto error; - } - if (!try_to_write(buf->out_buf, offset, buf->out_buf_size,ts,0)) { - goto error; - } - } if(stream->entity->attributes->namespace != NULL && strlen(stream->entity->attributes->namespace) != 0) { if (!snprintf(ts,ATTRIBUTES_MAX_LEN, ",%s%s%s","\"K8s.Namespace\":\"",stream->entity->attributes->namespace,"\"")) { goto error; From ca0749bef682c00a68303ac42c9213f10a4aac6a Mon Sep 17 00:00:00 2001 From: POOJA REDDY NATHALA Date: Wed, 16 Oct 2024 14:20:19 -0400 Subject: [PATCH 74/74] Fix to not send entity when flag is disabled (#23) --- plugins/filter_kubernetes/kube_meta.c | 42 +++++++------- plugins/out_cloudwatch_logs/cloudwatch_api.c | 53 ++++++++++-------- plugins/out_cloudwatch_logs/cloudwatch_logs.c | 6 ++ plugins/out_cloudwatch_logs/cloudwatch_logs.h | 2 + ...options_use-kubelet-enabled_fluent-bit.out | 2 +- ...iation-enabled-fallback-env_fluent-bit.out | 2 +- tests/runtime/filter_kubernetes.c | 56 +++++++++++-------- 7 files changed, 98 insertions(+), 65 deletions(-) diff --git a/plugins/filter_kubernetes/kube_meta.c b/plugins/filter_kubernetes/kube_meta.c index 63807c6975e..077324835cc 100644 --- a/plugins/filter_kubernetes/kube_meta.c +++ b/plugins/filter_kubernetes/kube_meta.c @@ -1192,7 +1192,9 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, k = api_map.via.map.ptr[i].key; if (k.via.str.size == 8 && !strncmp(k.via.str.ptr, "metadata", 8)) { meta_val = api_map.via.map.ptr[i].val; - search_workload(meta,ctx,meta_val); + if(ctx ->use_pod_association) { + search_workload(meta,ctx,meta_val); + } if (meta_val.type == MSGPACK_OBJECT_MAP) { meta_found = FLB_TRUE; } @@ -1259,11 +1261,12 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, } } int fallback_environment_len = 0; - char *fallback_environment = find_fallback_environment(ctx,meta); - if(fallback_environment) { - fallback_environment_len = strlen(fallback_environment); - } + char *fallback_environment = NULL; if(ctx->use_pod_association) { + fallback_environment = find_fallback_environment(ctx,meta); + if(fallback_environment) { + fallback_environment_len = strlen(fallback_environment); + } pod_service_found = flb_hash_get(ctx->pod_hash_table, meta->podname, meta->podname_len, &tmp_service_attributes, &tmp_service_attr_size); @@ -1286,12 +1289,6 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, /* Append Regex fields */ msgpack_pack_map(&mp_pck, map_size); - if (meta->cluster != NULL) { - msgpack_pack_str(&mp_pck, 7); - msgpack_pack_str_body(&mp_pck, "cluster", 7); - msgpack_pack_str(&mp_pck, meta->cluster_len); - msgpack_pack_str_body(&mp_pck, meta->cluster, meta->cluster_len); - } if (meta->podname != NULL) { msgpack_pack_str(&mp_pck, 8); msgpack_pack_str_body(&mp_pck, "pod_name", 8); @@ -1343,13 +1340,18 @@ static int merge_meta(struct flb_kube_meta *meta, struct flb_kube *ctx, msgpack_pack_str(&mp_pck, platform_len); msgpack_pack_str_body(&mp_pck, ctx->platform, platform_len); } - } - - if (meta->workload != NULL) { - msgpack_pack_str(&mp_pck, 8); - msgpack_pack_str_body(&mp_pck, "workload", 8); - msgpack_pack_str(&mp_pck, meta->workload_len); - msgpack_pack_str_body(&mp_pck, meta->workload, meta->workload_len); + if (meta->cluster != NULL) { + msgpack_pack_str(&mp_pck, 7); + msgpack_pack_str_body(&mp_pck, "cluster", 7); + msgpack_pack_str(&mp_pck, meta->cluster_len); + msgpack_pack_str_body(&mp_pck, meta->cluster, meta->cluster_len); + } + if (meta->workload != NULL) { + msgpack_pack_str(&mp_pck, 8); + msgpack_pack_str_body(&mp_pck, "workload", 8); + msgpack_pack_str(&mp_pck, meta->workload_len); + msgpack_pack_str_body(&mp_pck, meta->workload, meta->workload_len); + } } /* Append API Server content */ @@ -1655,7 +1657,9 @@ static int get_and_merge_meta(struct flb_kube *ctx, struct flb_kube_meta *meta, int ret; char *api_buf; size_t api_size; - get_cluster_from_environment(ctx, meta); + if(ctx->use_pod_association) { + get_cluster_from_environment(ctx, meta); + } if (ctx->use_tag_for_meta) { ret = merge_meta_from_tag(ctx, meta, out_buf, out_size); return ret; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_api.c b/plugins/out_cloudwatch_logs/cloudwatch_api.c index 3deecf22fc7..8408f7bb348 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_api.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_api.c @@ -360,7 +360,7 @@ static int init_put_payload(struct flb_cloudwatch *ctx, struct cw_flush *buf, } // If we are missing the service name, the entity will get rejected by the frontend anyway // so do not emit entity unless service name is filled - if(stream->entity != NULL && stream->entity->key_attributes->name != NULL) { + if(ctx->add_entity && stream->entity != NULL && stream->entity->key_attributes->name != NULL) { if (!try_to_write(buf->out_buf, offset, buf->out_buf_size, "\"entity\":{", 10)) { goto error; @@ -959,45 +959,54 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map kube_key = val.via.map.ptr[j].key; kube_val = val.via.map.ptr[j].val; if(strncmp(kube_key.via.str.ptr, "service_name", kube_key.via.str.size) == 0) { - if(entity->key_attributes->name == NULL) { - entity->key_attributes->name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->key_attributes->name != NULL) { + flb_free(entity->key_attributes->name); } + entity->key_attributes->name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "environment", kube_key.via.str.size) == 0) { - if(entity->key_attributes->environment == NULL) { - entity->key_attributes->environment = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->key_attributes->environment != NULL) { + flb_free(entity->key_attributes->environment); } + entity->key_attributes->environment = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "namespace_name", kube_key.via.str.size) == 0) { - if(entity->attributes->namespace == NULL) { - entity->attributes->namespace = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->namespace != NULL) { + flb_free(entity->attributes->namespace); } + entity->attributes->namespace = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "host", kube_key.via.str.size) == 0) { - if(entity->attributes->node == NULL) { - entity->attributes->node = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->node != NULL) { + flb_free(entity->attributes->node); } + entity->attributes->node = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "cluster", kube_key.via.str.size) == 0) { - if(entity->attributes->cluster_name == NULL) { - entity->attributes->cluster_name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->cluster_name != NULL) { + flb_free(entity->attributes->cluster_name); } + entity->attributes->cluster_name = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "workload", kube_key.via.str.size) == 0) { - if(entity->attributes->workload == NULL) { - entity->attributes->workload = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->workload != NULL) { + flb_free(entity->attributes->workload); } + entity->attributes->workload = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "name_source", kube_key.via.str.size) == 0) { - if(entity->attributes->name_source == NULL) { - entity->attributes->name_source = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->name_source != NULL) { + flb_free(entity->attributes->name_source); } + entity->attributes->name_source = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } else if(strncmp(kube_key.via.str.ptr, "platform", kube_key.via.str.size) == 0) { - if(entity->attributes->platform_type == NULL) { - entity->attributes->platform_type = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); + if(entity->attributes->platform_type != NULL) { + flb_free(entity->attributes->platform_type); } + entity->attributes->platform_type = flb_strndup(kube_val.via.str.ptr, kube_val.via.str.size); } } } } if(strncmp(key.via.str.ptr, "ec2_instance_id",key.via.str.size ) == 0 ) { - if(entity->attributes->instance_id == NULL) { - entity->attributes->instance_id = flb_strndup(val.via.str.ptr, val.via.str.size); + if(entity->attributes->instance_id != NULL) { + flb_free(entity->attributes->instance_id); } + entity->attributes->instance_id = flb_strndup(val.via.str.ptr, val.via.str.size); } } if(entity->key_attributes->name == NULL && entity->attributes->name_source == NULL &&entity->attributes->workload != NULL) { @@ -1007,7 +1016,6 @@ void parse_entity(struct flb_cloudwatch *ctx, entity *entity, msgpack_object map } void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stream, const msgpack_object map) { - if(ctx->kubernete_metadata_enabled) { if(stream->entity == NULL) { stream->entity = flb_malloc(sizeof(entity)); if (stream->entity == NULL) { @@ -1034,7 +1042,6 @@ void update_or_create_entity(struct flb_cloudwatch *ctx, struct log_stream *stre if (!stream->entity) { flb_plg_warn(ctx->ins, "Failed to generate entity"); } - } } /* @@ -1111,7 +1118,9 @@ int process_and_send(struct flb_cloudwatch *ctx, const char *input_plugin, flb_plg_debug(ctx->ins, "Couldn't determine log group & stream for record with tag %s", tag); goto error; } - update_or_create_entity(ctx,stream,map); + if(ctx->kubernete_metadata_enabled && ctx->add_entity) { + update_or_create_entity(ctx,stream,map); + } if (ctx->log_key) { key_str = NULL; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.c b/plugins/out_cloudwatch_logs/cloudwatch_logs.c index 7c64e055af4..c2ca0720f7e 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.c +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.c @@ -669,6 +669,12 @@ static struct flb_config_map config_map[] = { "is 'd1,d2;d3', we will consider it as [[d1, d2],[d3]]." }, + { + FLB_CONFIG_MAP_BOOL, "add_entity", "false", + 0, FLB_TRUE, offsetof(struct flb_cloudwatch, add_entity), + "add entity to PutLogEvent calls" + }, + /* EOF */ {0} }; diff --git a/plugins/out_cloudwatch_logs/cloudwatch_logs.h b/plugins/out_cloudwatch_logs/cloudwatch_logs.h index 7a9dbeaa3e7..afd0b888b9c 100644 --- a/plugins/out_cloudwatch_logs/cloudwatch_logs.h +++ b/plugins/out_cloudwatch_logs/cloudwatch_logs.h @@ -186,6 +186,8 @@ struct flb_cloudwatch { */ int kubernete_metadata_enabled; + + int add_entity; }; void flb_cloudwatch_ctx_destroy(struct flb_cloudwatch *ctx); diff --git a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out index 073b50caef1..dbd97f1aeb0 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-kubelet-enabled_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","workload":"my-deployment","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-kubelet-enabled","namespace_name":"options","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out index 4d223d61434..3a2a66d746a 100644 --- a/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out +++ b/tests/runtime/data/kubernetes/out/options/options_use-pod-association-enabled-fallback-env_fluent-bit.out @@ -1 +1 @@ -[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"cluster":"test-cluster","pod_name":"use-pod-association-enabled-fallback-env","namespace_name":"options","service_name":"test-service","environment":"eks:test-cluster/options","name_source":"Instrumentation","platform":"eks","workload":"use-pod-association-enabled-fallback-env","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] +[1554141513.598656,{"log":"Fluent Bit is logging\n","stream":"stdout","kubernetes":{"pod_name":"use-pod-association-enabled-fallback-env","namespace_name":"options","service_name":"test-service","environment":"eks:test-cluster/options","name_source":"Instrumentation","platform":"eks","cluster":"test-cluster","workload":"use-pod-association-enabled-fallback-env","pod_id":"e9f2963f-55f2-11e9-84c5-02e422b8a84a","labels":{"app.kubernetes.io/name":"fluent-bit"},"annotations":{"prometheus.io/path":"/api/v1/metrics/prometheus","prometheus.io/port":"2020","prometheus.io/scrape":"true"},"host":"ip-10-49-18-80.eu-west-1.compute.internal","container_name":"fluent-bit","docker_id":"c9898099f6d235126d564ed38a020007ea7a6fac6e25e718de683c9dd0076c16","container_hash":"fluent/fluent-bit@sha256:7ac0fd3569af866e9a6a22eb592744200d2dbe098cf066162453f8d0b06c531f","container_image":"fluent/fluent-bit:latest"}}] diff --git a/tests/runtime/filter_kubernetes.c b/tests/runtime/filter_kubernetes.c index 74c589282aa..02979f0e808 100644 --- a/tests/runtime/filter_kubernetes.c +++ b/tests/runtime/filter_kubernetes.c @@ -448,24 +448,48 @@ static void flb_test_options_use_kubelet_enabled_json() flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled_fluent-bit", NULL, 1); } +#define flb_test_pod_to_service_map_use_kubelet_true(target, suffix, nExpected, platform) \ + kube_test("options/" target, KUBE_POD_ASSOCIATION, suffix, nExpected, \ + "use_pod_association", "true", \ + "use_kubelet", "true", \ + "kubelet_port", "8002", \ + "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap/" target, \ + "pod_association_host_server_ca_file", "/tst/ca.crt", \ + "pod_association_host_client_cert_file", "/tst/client.crt", \ + "pod_association_host_client_key_file", "/tst/client.key", \ + "set_platform", platform, \ + NULL); \ + +#define flb_test_pod_to_service_map_use_kubelet_false(target, suffix, nExpected, platform) \ + kube_test("options/" target, KUBE_POD_ASSOCIATION, suffix, nExpected, \ + "use_pod_association", "true", \ + "use_kubelet", "false", \ + "kubelet_port", "8002", \ + "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap/" target, \ + "pod_association_host_server_ca_file", "/tst/ca.crt", \ + "pod_association_host_client_cert_file", "/tst/client.crt", \ + "pod_association_host_client_key_file", "/tst/client.key", \ + "set_platform", platform, \ + NULL); \ + static void flb_test_options_use_kubelet_enabled_replicaset_json() { - flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-replicaset_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_true("options_use-kubelet-enabled-replicaset_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_enabled_deployment_json() { - flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-deployment_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_true("options_use-kubelet-enabled-deployment_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_enabled_daemonset_json() { - flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-daemonset_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_true("options_use-kubelet-enabled-daemonset_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_enabled_pod_json() { - flb_test_options_use_kubelet_enabled("options_use-kubelet-enabled-pod_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_true("options_use-kubelet-enabled-pod_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_disabled_json() @@ -475,22 +499,22 @@ static void flb_test_options_use_kubelet_disabled_json() static void flb_test_options_use_kubelet_disabled_replicaset_json() { - flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-replicaset_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_false("options_use-kubelet-disabled-replicaset_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_disabled_deployment_json() { - flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-deployment_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_false("options_use-kubelet-disabled-deployment_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_disabled_daemonset_json() { - flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-daemonset_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_false("options_use-kubelet-disabled-daemonset_fluent-bit", NULL, 1, NULL); } static void flb_test_options_use_kubelet_disabled_pod_json() { - flb_test_options_use_kubelet_disabled("options_use-kubelet-disabled-pod_fluent-bit", NULL, 1); + flb_test_pod_to_service_map_use_kubelet_false("options_use-kubelet-disabled-pod_fluent-bit", NULL, 1, NULL); } @@ -974,27 +998,15 @@ static void flb_test_annotations_exclude_multiple_4_container_4_stderr() flb_test_annotations_exclude("annotations-exclude_multiple-4_container-4", "stderr", 1); } -#define flb_test_pod_to_service_map(target, suffix, nExpected, platform) \ - kube_test("options/" target, KUBE_POD_ASSOCIATION, suffix, nExpected, \ - "use_pod_association", "true", \ - "use_kubelet", "true", \ - "kubelet_port", "8002", \ - "Pod_Service_Preload_Cache_Dir", DPATH "/servicemap/" target, \ - "pod_association_host_server_ca_file", "/tst/ca.crt", \ - "pod_association_host_client_cert_file", "/tst/client.crt", \ - "pod_association_host_client_key_file", "/tst/client.key", \ - "set_platform", platform, \ - NULL); \ - static void kube_options_use_pod_association_enabled() { - flb_test_pod_to_service_map("options_use-pod-association-enabled_fluent-bit", NULL, 1, NULL); + flb_test_pod_to_service_map_use_kubelet_true("options_use-pod-association-enabled_fluent-bit", NULL, 1, NULL); } static void kube_options_use_pod_association_enabled_fallback_env() { setenv("CLUSTER_NAME","test-cluster", 1); - flb_test_pod_to_service_map("options_use-pod-association-enabled-fallback-env_fluent-bit", NULL, 1, "eks"); + flb_test_pod_to_service_map_use_kubelet_true("options_use-pod-association-enabled-fallback-env_fluent-bit", NULL, 1, "eks"); } #ifdef FLB_HAVE_SYSTEMD