| 1051 |
|
|
| 1052 |
|
|
| 1053 |
/************************************************* |
/************************************************* |
|
* Check for supported JIT architecture * |
|
|
*************************************************/ |
|
|
|
|
|
/* If it won't JIT-compile a very simple regex, return FALSE. */ |
|
|
|
|
|
static int check_jit_arch(void) |
|
|
{ |
|
|
const char *error; |
|
|
int erroffset, rc; |
|
|
pcre *re = pcre_compile("abc", 0, &error, &erroffset, NULL); |
|
|
pcre_extra *extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error); |
|
|
rc = extra != NULL && (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 && |
|
|
extra->executable_jit != NULL; |
|
|
pcre_free_study(extra); |
|
|
free(re); |
|
|
return rc; |
|
|
} |
|
|
|
|
|
|
|
|
/************************************************* |
|
| 1054 |
* Byte flipping function * |
* Byte flipping function * |
| 1055 |
*************************************************/ |
*************************************************/ |
| 1056 |
|
|
| 1360 |
printf(" %sUnicode properties support\n", rc? "" : "No "); |
printf(" %sUnicode properties support\n", rc? "" : "No "); |
| 1361 |
(void)pcre_config(PCRE_CONFIG_JIT, &rc); |
(void)pcre_config(PCRE_CONFIG_JIT, &rc); |
| 1362 |
if (rc) |
if (rc) |
| 1363 |
printf(" Just-in-time compiler support%s\n", check_jit_arch()? |
printf(" Just-in-time compiler support\n"); |
|
"" : " (but this architecture is unsupported)"); |
|
| 1364 |
else |
else |
| 1365 |
printf(" No just-in-time compiler support\n"); |
printf(" No just-in-time compiler support\n"); |
| 1366 |
(void)pcre_config(PCRE_CONFIG_NEWLINE, &rc); |
(void)pcre_config(PCRE_CONFIG_NEWLINE, &rc); |