-#ifdef sunos5
- if ( (p = compile( pat, NULL, NULL )) == NULL ) {
- Debug( LDAP_DEBUG_ANY, "compile failed (%s)\n", p, 0, 0 );
- return( -1 );
- }
-#else /* sunos5 */
- pthread_mutex_lock( ®ex_mutex );
- if ( (p = re_comp( pat )) != 0 ) {
- Debug( LDAP_DEBUG_ANY, "re_comp failed (%s)\n", p, 0, 0 );
- pthread_mutex_unlock( ®ex_mutex );
+ Debug( LDAP_DEBUG_FILTER, "test_substring_filter: regcomp pat: %s\n",
+ pat, 0, 0 );
+ if ((rc = regcomp(&re, pat, 0))) {
+ char error[512];
+
+ regerror(rc, &re, error, sizeof(error));
+ Debug( LDAP_DEBUG_ANY, "regcomp failed (%s) %s\n",
+ p, error, 0 );