-#ifndef SLAP_NVALUES
-static int
-objectIdentifierFirstComponentMatch(
- int *matchp,
- slap_mask_t flags,
- Syntax *syntax,
- MatchingRule *mr,
- struct berval *value,
- void *assertedValue )
-{
- int rc = LDAP_SUCCESS;
- int match;
- struct berval *asserted = (struct berval *) assertedValue;
- ber_len_t i, j;
- struct berval oid;
-
- if( value->bv_len == 0 || value->bv_val[0] != '(' /*')'*/ ) {
- return LDAP_INVALID_SYNTAX;
- }
-
- /* trim leading white space */
- for( i=1; ASCII_SPACE(value->bv_val[i]) && i < value->bv_len; i++ ) {
- /* empty */
- }
-
- /* grab next word */
- oid.bv_val = &value->bv_val[i];
- j = value->bv_len - i;
- for( i=0; !ASCII_SPACE(oid.bv_val[i]) && i < j; i++ ) {
- /* empty */
- }
- oid.bv_len = i;
-
- /* insert attributeTypes, objectclass check here */
- if( OID_LEADCHAR(asserted->bv_val[0]) ) {
- rc = objectIdentifierMatch( &match, flags, syntax, mr, &oid, asserted );
-
- } else {
- if ( !strcmp( syntax->ssyn_oid, SLAP_SYNTAX_MATCHINGRULES_OID ) ) {
- MatchingRule *asserted_mr = mr_bvfind( asserted );
- MatchingRule *stored_mr = mr_bvfind( &oid );
-
- if( asserted_mr == NULL ) {
- rc = SLAPD_COMPARE_UNDEFINED;
- } else {
- match = asserted_mr != stored_mr;
- }
-
- } else if ( !strcmp( syntax->ssyn_oid,
- SLAP_SYNTAX_ATTRIBUTETYPES_OID ) )
- {
- AttributeType *asserted_at = at_bvfind( asserted );
- AttributeType *stored_at = at_bvfind( &oid );
-
- if( asserted_at == NULL ) {
- rc = SLAPD_COMPARE_UNDEFINED;
- } else {
- match = asserted_at != stored_at;
- }
-
- } else if ( !strcmp( syntax->ssyn_oid,
- SLAP_SYNTAX_OBJECTCLASSES_OID ) )
- {
- ObjectClass *asserted_oc = oc_bvfind( asserted );
- ObjectClass *stored_oc = oc_bvfind( &oid );
-
- if( asserted_oc == NULL ) {
- rc = SLAPD_COMPARE_UNDEFINED;
- } else {
- match = asserted_oc != stored_oc;
- }
- }
- }
-
-#ifdef NEW_LOGGING
- LDAP_LOG( CONFIG, ENTRY,
- "objectIdentifierFirstComponentMatch: %d\n %s\n %s\n",
- match, value->bv_val, asserted->bv_val );
+/*
+ * Integer conversion macros that will use the largest available
+ * type.
+ */
+#if defined(HAVE_STRTOLL) && defined(LLONG_MAX) && defined(LLONG_MIN) && defined(HAVE_LONG_LONG)
+# define SLAP_STRTOL(n,e,b) strtoll(n,e,b)
+# define SLAP_LONG_MAX LLONG_MAX
+# define SLAP_LONG_MIN LLONG_MIN
+# define SLAP_LONG long long