/[pcre]/code/trunk/pcretest.c
ViewVC logotype

Diff of /code/trunk/pcretest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 676 by ph10, Sat Aug 27 15:53:04 2011 UTC revision 689 by ph10, Fri Sep 9 10:34:57 2011 UTC
# Line 1051  if ((rc = pcre_fullinfo(re, study, optio Line 1051  if ((rc = pcre_fullinfo(re, study, optio
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    
# Line 1380  while (argc > 1 && argv[op][0] == '-') Line 1360  while (argc > 1 && argv[op][0] == '-')
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);

Legend:
Removed from v.676  
changed lines
  Added in v.689

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12