-#ifndef HAVE_REGEX_H
- int i;
- check_pool_memory_size(lcase, flen);
- for(i=0; fname[i] ; i++) {
- lcase[i] = tolower(fname[i]);
- }
- lcase[i] = '\0';
- int rc = re_search(&preg, (BREGEX_CAST char*) lcase, flen, 0, flen, ®s);
-#else
- int rc = re_search(&preg, (BREGEX_CAST char*) fname, flen, 0, flen, ®s);
-#endif
+ int rc = regexec(&preg, fname, BREG_NREGS, regs, 0);