From nkinder at fedoraproject.org Fri Oct 3 04:28:24 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 3 Oct 2008 04:28:24 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd entry.c, 1.17, 1.18 slapi-plugin.h, 1.30, 1.31 slapi-private.h, 1.26, 1.27 Message-ID: <20081003042824.779FC70140@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25263/ldap/servers/slapd Modified Files: entry.c slapi-plugin.h slapi-private.h Log Message: Resolves: 464188 Summary: Perform better config validation in the DNA plug-in. Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- entry.c 24 Sep 2008 21:21:52 -0000 1.17 +++ entry.c 3 Oct 2008 04:28:22 -0000 1.18 @@ -2578,6 +2578,12 @@ * Apply a set of modifications to an entry */ int +slapi_entry_apply_mods( Slapi_Entry *e, LDAPMod **mods ) +{ + return entry_apply_mods(e, mods); +} + +int entry_apply_mods( Slapi_Entry *e, LDAPMod **mods ) { int err, j; Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- slapi-plugin.h 24 Sep 2008 21:21:52 -0000 1.30 +++ slapi-plugin.h 3 Oct 2008 04:28:22 -0000 1.31 @@ -278,6 +278,7 @@ int slapi_entry_add_string(Slapi_Entry *e, const char *type, const char *value); int slapi_entry_delete_string(Slapi_Entry *e, const char *type, const char *value); void slapi_entry_diff(Slapi_Mods *smods, Slapi_Entry *e1, Slapi_Entry *e2, int diff_ctrl); +int slapi_entry_apply_mods(Slapi_Entry *e, LDAPMod **mods); /* Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- slapi-private.h 27 Aug 2008 21:47:00 -0000 1.26 +++ slapi-private.h 3 Oct 2008 04:28:22 -0000 1.27 @@ -315,7 +315,7 @@ int entry_add_deleted_attribute_wsi(Slapi_Entry *e, Slapi_Attr *a); /* - * slapi_entry_apply_mods_wsi is similar to slapi_entry_apply_mods. It also + * entry_apply_mods_wsi is similar to entry_apply_mods. It also * handles the state storage information. "csn" is the CSN associated with * this modify operation. */ From nkinder at fedoraproject.org Fri Oct 3 04:28:24 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 3 Oct 2008 04:28:24 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.9, 1.10 Message-ID: <20081003042824.80F9F70122@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25263/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Resolves: 464188 Summary: Perform better config validation in the DNA plug-in. Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dna.c 24 Sep 2008 21:21:51 -0000 1.9 +++ dna.c 3 Oct 2008 04:28:21 -0000 1.10 @@ -210,7 +210,7 @@ * */ static int dna_load_plugin_config(); -static int dna_parse_config_entry(Slapi_Entry * e); +static int dna_parse_config_entry(Slapi_Entry * e, int apply); static void dna_delete_config(); static void dna_free_config_entry(struct configEntry ** entry); static int dna_load_host_port(); @@ -617,9 +617,10 @@ } for (i = 0; (entries[i] != NULL); i++) { - status = dna_parse_config_entry(entries[i]); - if (DNA_SUCCESS != status) - break; + /* We don't care about the status here because we may have + * some invalid config entries, but we just want to continue + * looking for valid ones. */ + dna_parse_config_entry(entries[i], 1); } cleanup: @@ -632,22 +633,43 @@ return status; } +/* + * dna_parse_config_entry() + * + * Parses a single config entry. If apply is non-zero, then + * we will load and start using the new config. You can simply + * validate config without making any changes by setting apply + * to 0. + * + * Returns DNA_SUCCESS if the entry is valid and DNA_FAILURE + * if it is invalid. + */ static int -dna_parse_config_entry(Slapi_Entry * e) +dna_parse_config_entry(Slapi_Entry * e, int apply) { char *value; - struct configEntry *entry; + struct configEntry *entry = NULL; struct configEntry *config_entry; PRCList *list; int entry_added = 0; + int ret = DNA_SUCCESS; slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "--> dna_parse_config_entry\n"); + /* If this is the main DNA plug-in + * config entry, just bail. */ + if (strcasecmp(getPluginDN(), slapi_entry_get_ndn(e)) == 0) { + ret = DNA_FAILURE; + goto bail; + } + entry = (struct configEntry *) slapi_ch_calloc(1, sizeof(struct configEntry)); - if (NULL == entry) + if (NULL == entry) { + ret = DNA_FAILURE; goto bail; + } value = slapi_entry_get_ndn(e); if (value) { @@ -660,8 +682,14 @@ value = slapi_entry_attr_get_charptr(e, DNA_TYPE); if (value) { entry->type = value; - } else + } else { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: The %s config " + "setting is required for range %s.\n", + DNA_TYPE, entry->dn); + ret = DNA_FAILURE; goto bail; + } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, "----------> %s [%s]\n", DNA_TYPE, entry->type, 0, 0); @@ -670,8 +698,14 @@ if (value) { entry->nextval = strtoull(value, 0, 0); slapi_ch_free_string(&value); - } else + } else { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: The %s config " + "setting is required for range %s.\n", + DNA_NEXTVAL, entry->dn); + ret = DNA_FAILURE; goto bail; + } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, "----------> %s [%llu]\n", DNA_NEXTVAL, entry->nextval, 0, @@ -699,8 +733,7 @@ if (value) { entry->interval = strtoull(value, 0, 0); slapi_ch_free_string(&value); - } else - goto bail; + } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, "----------> %s [%llu]\n", DNA_INTERVAL, entry->interval, 0, 0); @@ -722,9 +755,15 @@ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM , "Error: Invalid search filter in entry [%s]: [%s]\n", entry->dn, value); + ret = DNA_FAILURE; goto bail; } } else { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: The %s config " + "setting is required for range %s.\n", + DNA_FILTER, entry->dn); + ret = DNA_FAILURE; goto bail; } @@ -733,7 +772,16 @@ value = slapi_entry_attr_get_charptr(e, DNA_SCOPE); if (value) { + /* TODO - Allow multiple scope settings for a single range. This may + * make ordering the scopes tough when we put them in the clist. */ entry->scope = slapi_dn_normalize(value); + } else { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: The %s config " + "config setting is required for range %s.\n", + DNA_SCOPE, entry->dn); + ret = DNA_FAILURE; + goto bail; } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, @@ -744,15 +792,14 @@ value = slapi_entry_attr_get_charptr(e, DNA_MAXVAL); if (value) { entry->maxval = strtoull(value, 0, 0); - - slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "----------> %s [%llu]\n", DNA_MAXVAL, value, 0, 0); - slapi_ch_free_string(&value); } else { entry->maxval = -1; } + slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, + "----------> %s [%llu]\n", DNA_MAXVAL, entry->maxval, 0, 0); + value = slapi_entry_attr_get_charptr(e, DNA_SHARED_CFG_DN); if (value) { Slapi_Entry *shared_e = NULL; @@ -772,6 +819,7 @@ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, "dna_parse_config_entry: Unable to locate " "shared configuration entry (%s)\n", value); + ret = DNA_FAILURE; goto bail; } else { slapi_entry_free(shared_e); @@ -803,19 +851,21 @@ entry->threshold = 1; } + slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, + "----------> %s [%llu]\n", DNA_THRESHOLD, entry->threshold, 0, 0); + value = slapi_entry_attr_get_charptr(e, DNA_RANGE_REQUEST_TIMEOUT); if (value) { entry->timeout = strtoull(value, 0, 0); - - slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "----------> %s [%llu]\n", DNA_RANGE_REQUEST_TIMEOUT, - value, 0, 0); - slapi_ch_free_string(&value); } else { entry->timeout = DNA_DEFAULT_TIMEOUT; } + slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, + "----------> %s [%llu]\n", DNA_RANGE_REQUEST_TIMEOUT, + entry->timeout, 0, 0); + value = slapi_entry_attr_get_charptr(e, DNA_NEXT_RANGE); if (value) { char *p = NULL; @@ -831,16 +881,47 @@ if (entry->next_range_upper <= entry->next_range_lower) { slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, "dna_parse_config_entry: Illegal %s " - "setting specified for range %s.\n", + "setting specified for range %s. Legal " + "format is -.\n", DNA_NEXT_RANGE, entry->dn); + ret = DNA_FAILURE; entry->next_range_lower = 0; entry->next_range_upper = 0; } + + /* make sure next range doesn't overlap with + * the active range */ + if (((entry->next_range_upper <= entry->maxval) && + (entry->next_range_upper >= entry->nextval)) || + ((entry->next_range_lower <= entry->maxval) && + (entry->next_range_lower >= entry->nextval))) { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: Illegal %s " + "setting specified for range %s. %s " + "overlaps with the active range.\n", + DNA_NEXT_RANGE, entry->dn, DNA_NEXT_RANGE); + ret = DNA_FAILURE; + entry->next_range_lower = 0; + entry->next_range_upper = 0; + } + } else { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: Illegal %s " + "setting specified for range %s. Legal " + "format is -.\n", + DNA_NEXT_RANGE, entry->dn); + ret = DNA_FAILURE; } slapi_ch_free_string(&value); } + /* If we were only called to validate config, we can + * just bail out before applying the config changes */ + if (apply == 0) { + goto bail; + } + /* Calculate number of remaining values. */ if (entry->next_range_lower != 0) { entry->remaining = ((entry->next_range_upper - entry->next_range_lower + 1) / @@ -856,6 +937,10 @@ /* create the new value lock for this range */ entry->lock = slapi_new_mutex(); if (!entry->lock) { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: Unable to create lock " + "for range %s.\n", entry->dn); + ret = DNA_FAILURE; goto bail; } @@ -912,8 +997,12 @@ bail: if (0 == entry_added) { - slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "config entry [%s] skipped\n", entry->dn, 0, 0); + /* Don't log error if we weren't asked to apply config */ + if ((apply != 0) && (entry != NULL)) { + slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, + "dna_parse_config_entry: Invalid config entry " + "[%s] skipped\n", entry->dn, 0, 0); + } dna_free_config_entry(&entry); } else { time_t now; @@ -925,12 +1014,14 @@ * performing the operation now would cause the * change to not get changelogged. */ slapi_eq_once(dna_update_config_event, entry, now + 30); + + ret = DNA_SUCCESS; } slapi_log_error(SLAPI_LOG_TRACE, DNA_PLUGIN_SUBSYSTEM, "<-- dna_parse_config_entry\n"); - return DNA_SUCCESS; + return ret; } static void @@ -938,6 +1029,9 @@ { struct configEntry *e = *entry; + if (e == NULL) + return; + if (e->dn) { slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, "freeing config entry [%s]\n", e->dn, 0, 0); @@ -2396,9 +2490,6 @@ if (0 == (dn = dna_get_dn(pb))) goto bail; - if (dna_dn_is_config(dn)) - goto bail; - if (LDAP_CHANGETYPE_ADD == modtype) { slapi_pblock_get(pb, SLAPI_ADD_ENTRY, &e); } else { @@ -2431,6 +2522,34 @@ if (0 == e) goto bailmod; + if (dna_dn_is_config(dn)) { + /* Validate config changes, but don't apply them. + * This allows us to reject invalid config changes + * here at the pre-op stage. Applying the config + * needs to be done at the post-op stage. */ + if (smods) { + if (slapi_entry_apply_mods(e, mods) != LDAP_SUCCESS) { + /* The mods don't apply cleanly, so we just let this op go + * to let the main server handle it. */ + goto bailmod; + } + } + + if (dna_parse_config_entry(e, 0) != DNA_SUCCESS) { + /* Refuse the operation if config parsing failed. */ + ret = LDAP_UNWILLING_TO_PERFORM; + if (LDAP_CHANGETYPE_ADD == modtype) { + errstr = slapi_ch_smprintf("Not a valid DNA configuration entry."); + } else { + errstr = slapi_ch_smprintf("Changes result in an invalid " + "DNA configuration."); + } + } + + /* We're done, so just bail. */ + goto bailmod; + } + dna_read_lock(); if (!PR_CLIST_IS_EMPTY(dna_global_config)) { From rmeggins at fedoraproject.org Wed Oct 8 17:29:06 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:06 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools ldif.c, 1.6, 1.7 mmldif.c, 1.8, 1.9 pwenc.c, 1.9, 1.10 Message-ID: <20081008172906.A705C70144@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/slapd/tools Modified Files: ldif.c mmldif.c pwenc.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: ldif.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldif.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldif.c 10 Nov 2006 23:45:51 -0000 1.6 +++ ldif.c 8 Oct 2008 17:29:04 -0000 1.7 @@ -145,7 +145,7 @@ perror( "realloc" ); return( 1 ); } - fgets(buf+curlen, maxlen/2 + 1, stdin); + (void)fgets(buf+curlen, maxlen/2 + 1, stdin); } /* we have a full line, chop potential newline and turn into ldif */ if( buf[curlen-1] == '\n' ) Index: mmldif.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/mmldif.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mmldif.c 18 Oct 2007 00:08:34 -0000 1.8 +++ mmldif.c 8 Oct 2008 17:29:04 -0000 1.9 @@ -816,7 +816,7 @@ lookahead = fgetc(edf1->fp); if (lookahead != ' ') break; - fgets(line, sizeof(line), edf1->fp); + (void)fgets(line, sizeof(line), edf1->fp); len = strlen(line); for (lptr = line+len-1; len; len--, lptr--) { if ((*lptr != '\n') && (*lptr != '\r')) @@ -854,7 +854,7 @@ lookahead = fgetc(edf1->fp); if (lookahead != ' ') break; - fgets(line, sizeof(line), edf1->fp); + (void)fgets(line, sizeof(line), edf1->fp); len = strlen(line); for (lptr = line+len-1; len; len--, lptr--) { if ((*lptr != '\n') && (*lptr != '\r')) Index: pwenc.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/pwenc.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- pwenc.c 19 Jun 2007 18:24:58 -0000 1.9 +++ pwenc.c 8 Oct 2008 17:29:04 -0000 1.10 @@ -145,7 +145,7 @@ fprintf( stderr, "%s\n", errorbuf ); return( NULL ); } - slapi_ch_free((void **)&abs_configdir); + slapi_ch_free_string(&abs_configdir); slapdFrontendConfig = getFrontendConfig(); if (0 == slapd_config(slapdFrontendConfig->configdir, configfile)) { @@ -169,11 +169,9 @@ struct pw_scheme *pwsp, *cmppwsp; extern int optind; char *cpwd = NULL; /* candidate password for comparison */ - char errorbuf[SLAPI_DSE_RETURNTEXT_SIZE]; slapdFrontendConfig_t *slapdFrontendConfig = NULL; char *opts = "Hs:c:D:"; - char *configdir = NULL; name = argv[ 0 ]; pwsp = cmppwsp = NULL; @@ -409,7 +407,7 @@ rc= 1; /* OK */ } - slapi_ch_free((void **)&buf); + slapi_ch_free_string(&buf); } return rc; From rmeggins at fedoraproject.org Wed Oct 8 17:29:06 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:06 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.15, 1.16 dblayer.c, 1.27, 1.28 dbverify.c, 1.2, 1.3 import-merge.c, 1.8, 1.9 import-threads.c, 1.15, 1.16 import.c, 1.11, 1.12 import.h, 1.8, 1.9 ldbm_attr.c, 1.10, 1.11 ldbm_config.c, 1.14, 1.15 ldbm_instance_config.c, 1.10, 1.11 ldbm_modify.c, 1.6, 1.7 ldif2ldbm.c, 1.16, 1.17 monitor.c, 1.7, 1.8 parents.c, 1.5, 1.6 perfctrs.c, 1.9, 1.10 Message-ID: <20081008172906.A3E5E70145@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h dblayer.c dbverify.c import-merge.c import-threads.c import.c import.h ldbm_attr.c ldbm_config.c ldbm_instance_config.c ldbm_modify.c ldif2ldbm.c monitor.c parents.c perfctrs.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- back-ldbm.h 5 Aug 2008 21:03:42 -0000 1.15 +++ back-ldbm.h 8 Oct 2008 17:29:03 -0000 1.16 @@ -114,6 +114,15 @@ #define MEGABYTE (1024 * 1024) #define GIGABYTE (1024 * MEGABYTE) +#define DB_USES_LOCKING(env) \ + (DB_INIT_LOCK & ((env)->get_open_flags((env), NULL))) +#define DB_USES_TRANSACTIONS(env) \ + (DB_INIT_TXN & ((env)->get_open_flags((env), NULL))) +#define DB_USES_MPOOL(env) \ + (DB_INIT_MPOOL & ((env)->get_open_flags((env), NULL))) +#define DB_USES_LOGGING(env) \ + (DB_INIT_LOG & ((env)->get_open_flags((env), NULL))) + /* include NSPR header files */ #include "nspr.h" Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- dblayer.c 3 Apr 2008 16:52:47 -0000 1.27 +++ dblayer.c 8 Oct 2008 17:29:03 -0000 1.28 @@ -97,6 +97,13 @@ #include "dblayer.h" #include +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4100 #define DB_OPEN(oflags, db, txnid, file, database, type, flags, mode, rval) \ { \ @@ -284,7 +291,7 @@ int dblayer_set_batch_transactions(void *arg, void *value, char *errorbuf, int phase, int apply) { - int val = (int) value; + int val = (int)((uintptr_t)value); int retval = LDAP_SUCCESS; if (apply) { @@ -304,7 +311,7 @@ void * dblayer_get_batch_transactions(void *arg) { - return (void *)trans_batch_limit; + return (void *)((uintptr_t)trans_batch_limit); } @@ -465,25 +472,25 @@ } -/* Helper function for large seeks, db2.4 */ -static int dblayer_seek24_large(int fd, size_t pgsize, db_pgno_t pageno, - u_long relative, int isrewind, int whence) +#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300 +/* Helper function for large seeks, db4.3 */ +static int dblayer_seek43_large(int fd, off64_t offset, int whence) { - off64_t offset = 0, ret; + int ret = 0; - offset = (off64_t)pgsize * pageno + relative; - if (isrewind) offset = -offset; ret = lseek64(fd, offset, whence); return (ret < 0) ? errno : 0; } - -#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300 -/* Helper function for large seeks, db4.3 */ -static int dblayer_seek43_large(int fd, off64_t offset, int whence) +#else +/* Helper function for large seeks, db2.4 */ +static int dblayer_seek24_large(int fd, size_t pgsize, db_pgno_t pageno, + u_long relative, int isrewind, int whence) { - int ret = 0; + off64_t offset = 0, ret; + offset = (off64_t)pgsize * pageno + relative; + if (isrewind) offset = -offset; ret = lseek64(fd, offset, whence); return (ret < 0) ? errno : 0; @@ -892,7 +899,7 @@ if (feof(f)) break; if (strncmp(s, "VmSize:", 7) == 0) { - sscanf(s+7, "%d", procpages); + sscanf(s+7, "%" PRIuPTR, procpages); break; } } @@ -3449,7 +3456,7 @@ { if (priv->dblayer_enable_transactions) { - if (NULL != priv->dblayer_env->dblayer_DB_ENV->lk_handle) { + if (DB_USES_LOCKING(priv->dblayer_env->dblayer_DB_ENV)) { int aborted; if ((rval = LOCK_DETECT(priv->dblayer_env->dblayer_DB_ENV, 0, @@ -3619,7 +3626,7 @@ checkpoint_interval) continue; - if (NULL == priv->dblayer_env->dblayer_DB_ENV->tx_handle) + if (!DB_USES_TRANSACTIONS(priv->dblayer_env->dblayer_DB_ENV)) continue; /* now checkpoint */ @@ -3777,7 +3784,7 @@ DS_Sleep(interval); /* 622855: wait for other threads fully started */ if (priv->dblayer_enable_transactions) { - if ( (NULL != priv->dblayer_env->dblayer_DB_ENV->mp_handle) && + if ( DB_USES_MPOOL(priv->dblayer_env->dblayer_DB_ENV) && (0 != priv->dblayer_trickle_percentage) ) { int pages_written = 0; Index: dbverify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbverify.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dbverify.c 18 Oct 2007 00:08:34 -0000 1.2 +++ dbverify.c 8 Oct 2008 17:29:03 -0000 1.3 @@ -50,7 +50,6 @@ char *filep = NULL; PRDir *dirhandle = NULL; PRDirEntry *direntry = NULL; - backend *be = inst->inst_be; DB *dbp = NULL; int tmplen = 0; int filelen = 0; @@ -87,7 +86,6 @@ (direntry = PR_ReadDir(dirhandle, PR_SKIP_DOT | PR_SKIP_DOT_DOT))) { /* struct attrinfo *ai = NULL; */ - char *p = NULL; dbp = NULL; if (!direntry->name) Index: import-merge.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-merge.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- import-merge.c 2 Oct 2007 18:39:51 -0000 1.8 +++ import-merge.c 8 Oct 2008 17:29:03 -0000 1.9 @@ -49,6 +49,13 @@ #include "back-ldbm.h" #include "import.h" +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + struct _import_merge_thang { int type; @@ -667,7 +674,7 @@ if (1 == job->number_indexers) { import_log_notice(job, "Beginning %d-way merge of one file...", passes); } else { - import_log_notice(job, "Beginning %d-way merge of up to %lu files...", + import_log_notice(job, "Beginning %d-way merge of up to %" PRIuPTR " files...", passes, job->number_indexers); } Index: import-threads.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-threads.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- import-threads.c 25 Jan 2008 00:59:00 -0000 1.15 +++ import-threads.c 8 Oct 2008 17:29:03 -0000 1.16 @@ -49,6 +49,13 @@ * a wire import (aka "fast replica" import) won't have a producer thread. */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include "back-ldbm.h" #include "vlv_srch.h" #include "import.h" @@ -56,6 +63,7 @@ #define STDIN_FILENO 0 #endif +static void import_wait_for_space_in_fifo(ImportJob *job, size_t new_esize); static struct backentry *import_make_backentry(Slapi_Entry *e, ID id) { @@ -570,8 +578,8 @@ "ending line %d of file \"%s\"", escape_string(slapi_entry_get_dn(e), ebuf), curr_lineno, curr_filename); - import_log_notice(job, "REASON: entry too large (%d bytes) for " - "the buffer size (%d bytes)", newesize, job->fifo.bsize); + import_log_notice(job, "REASON: entry too large (%ld bytes) for " + "the buffer size (%" PRIuPTR " bytes)", newesize, job->fifo.bsize); backentry_free(&ep); job->skipped++; continue; @@ -804,8 +812,8 @@ char ebuf[BUFSIZ]; import_log_notice(job, "WARNING: skipping entry \"%s\"", escape_string(slapi_entry_get_dn(e), ebuf)); - import_log_notice(job, "REASON: entry too large (%d bytes) for " - "the buffer size (%d bytes)", newesize, job->fifo.bsize); + import_log_notice(job, "REASON: entry too large (%" PRIuPTR " bytes) for " + "the buffer size (%" PRIuPTR " bytes)", newesize, job->fifo.bsize); backentry_free(&ep); job->skipped++; continue; @@ -1185,7 +1193,7 @@ int idl_disposition = 0; struct vlvIndex* vlv_index = NULL; void *substring_key_buffer = NULL; - FifoItem *fi; + FifoItem *fi = NULL; int is_objectclass_attribute; int is_nsuniqueid_attribute; void *attrlist_cursor; @@ -1598,8 +1606,8 @@ char ebuf[BUFSIZ]; import_log_notice(job, "WARNING: skipping entry \"%s\"", escape_string(slapi_entry_get_dn(ep->ep_entry), ebuf)); - import_log_notice(job, "REASON: entry too large (%d bytes) for " - "the import buffer size (%d bytes). Try increasing nsslapd-cachememsize.", newesize, job->fifo.bsize); + import_log_notice(job, "REASON: entry too large (%" PRIuPTR " bytes) for " + "the import buffer size (%" PRIuPTR " bytes). Try increasing nsslapd-cachememsize.", newesize, job->fifo.bsize); backentry_clear_entry(ep); /* entry is released in the frontend on failure*/ backentry_free( &ep ); /* release the backend wrapper, here */ PR_Unlock(job->wire_lock); @@ -1670,7 +1678,7 @@ { struct ldbminfo *li; backend *be = NULL; - ImportJob *job; + ImportJob *job = NULL; PRThread *thread; int state; @@ -1954,7 +1962,7 @@ if (entry_filter != NULL) /* Single instance restoration */ { - if (!(int)strstr(estr, entry_filter)) + if (NULL == strstr(estr, entry_filter)) continue; } Index: import.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- import.c 3 Apr 2008 16:52:47 -0000 1.11 +++ import.c 8 Oct 2008 17:29:03 -0000 1.12 @@ -46,6 +46,12 @@ * please make sure you use 4-space indentation on this file. */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ #include "back-ldbm.h" #include "vlv_srch.h" @@ -1149,7 +1155,7 @@ import_log_notice(job, "Index buffering is disabled."); else import_log_notice(job, - "Index buffering enabled with bucket size %lu", + "Index buffering enabled with bucket size %" PRIuPTR, job->job_index_buffer_suggestion); job->worker_list = producer; @@ -1312,7 +1318,7 @@ if (job->not_here_skipped) { if (job->skipped) - import_log_notice(job, "Import complete. Processed %lu entries " + import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " "(%d bad entries were skipped, " "%d entries were skipped because they don't " "belong to this database) in %d seconds. " @@ -1320,7 +1326,7 @@ job->skipped, job->not_here_skipped, seconds_to_import, entries_per_second); else - import_log_notice(job, "Import complete. Processed %lu entries " + import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " "(%d entries were skipped because they don't " "belong to this database) " "in %d seconds. (%.2f entries/sec)", @@ -1330,13 +1336,13 @@ else { if (job->skipped) - import_log_notice(job, "Import complete. Processed %lu entries " + import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " "(%d were skipped) in %d seconds. " "(%.2f entries/sec)", entries_processed, job->skipped, seconds_to_import, entries_per_second); else - import_log_notice(job, "Import complete. Processed %lu entries " + import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " "in %d seconds. (%.2f entries/sec)", entries_processed, seconds_to_import, entries_per_second); Index: import.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- import.h 10 Nov 2006 23:45:39 -0000 1.8 +++ import.h 8 Oct 2008 17:29:03 -0000 1.9 @@ -235,4 +235,3 @@ void index_producer(void *param); void import_foreman(void *param); void import_worker(void *param); -static void import_wait_for_space_in_fifo(ImportJob *job, size_t new_esize); Index: ldbm_attr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attr.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ldbm_attr.c 15 Jul 2008 16:49:43 -0000 1.10 +++ ldbm_attr.c 8 Oct 2008 17:29:03 -0000 1.11 @@ -258,16 +258,16 @@ preamble, officialOID, index_rules[j] ); slapi_ch_free((void**)&preamble); } - } else if (p = - strstr(index_rules[j], INDEX_ATTR_SUBSTRBEGIN)) { + } else if ((p = + strstr(index_rules[j], INDEX_ATTR_SUBSTRBEGIN))) { _set_attr_substrlen(INDEX_SUBSTRBEGIN, index_rules[j], &substrlens); - } else if (p = - strstr(index_rules[j], INDEX_ATTR_SUBSTRMIDDLE)) { + } else if ((p = + strstr(index_rules[j], INDEX_ATTR_SUBSTRMIDDLE))) { _set_attr_substrlen(INDEX_SUBSTRMIDDLE, index_rules[j], &substrlens); - } else if (p = - strstr(index_rules[j], INDEX_ATTR_SUBSTREND)) { + } else if ((p = + strstr(index_rules[j], INDEX_ATTR_SUBSTREND))) { _set_attr_substrlen(INDEX_SUBSTREND, index_rules[j], &substrlens); } else if (!slapi_matchingrule_is_ordering(index_rules[j], attrsyntax_oid)) { Index: ldbm_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ldbm_config.c 4 Dec 2007 00:50:19 -0000 1.14 +++ ldbm_config.c 8 Oct 2008 17:29:03 -0000 1.15 @@ -42,6 +42,13 @@ /* ldbm_config.c - Handles configuration information that is global to all ldbm instances. */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include "back-ldbm.h" #include "dblayer.h" @@ -147,14 +154,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) (li->li_lookthroughlimit); + return (void *) ((uintptr_t)(li->li_lookthroughlimit)); } static int ldbm_config_lookthroughlimit_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); /* Do whatever we can to make sure the data is ok. */ @@ -169,14 +176,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) (li->li_mode); + return (void *) ((uintptr_t)(li->li_mode)); } static int ldbm_config_mode_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); /* Do whatever we can to make sure the data is ok. */ @@ -191,14 +198,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) (li->li_allidsthreshold); + return (void *) ((uintptr_t)(li->li_allidsthreshold)); } static int ldbm_config_allidsthreshold_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); /* Do whatever we can to make sure the data is ok. */ @@ -365,14 +372,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) (li->li_maxpassbeforemerge); + return (void *) ((uintptr_t)(li->li_maxpassbeforemerge)); } static int ldbm_config_maxpassbeforemerge_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { if (val < 0) { @@ -391,14 +398,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) (li->li_new_dbncache); + return (void *) ((uintptr_t)(li->li_new_dbncache)); } static int ldbm_config_dbncache_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { if (val < 0) { @@ -454,14 +461,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_durable_transactions; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_durable_transactions); } static int ldbm_config_db_durable_transactions_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_durable_transactions = val; @@ -474,7 +481,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_lockdown; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_lockdown); } static int ldbm_config_db_lockdown_set( @@ -487,7 +494,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_lockdown = val; @@ -500,14 +507,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_circular_logging; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_circular_logging); } static int ldbm_config_db_circular_logging_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_circular_logging = val; @@ -520,14 +527,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_enable_transactions; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_enable_transactions); } static int ldbm_config_db_transaction_logging_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_enable_transactions = val; @@ -560,14 +567,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_checkpoint_interval; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_checkpoint_interval); } static int ldbm_config_db_checkpoint_interval_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_checkpoint_interval = val; @@ -620,14 +627,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_idl_divisor; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_idl_divisor); } static int ldbm_config_db_idl_divisor_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_idl_divisor = val; @@ -660,14 +667,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_spin_count; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_spin_count); } static int ldbm_config_db_spin_count_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_spin_count = val; @@ -680,14 +687,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_trickle_percentage; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_trickle_percentage); } static int ldbm_config_db_trickle_percentage_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (val < 0 || val > 100) { PR_snprintf(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, @@ -707,14 +714,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_verbose; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_verbose); } static int ldbm_config_db_verbose_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_verbose = val; @@ -727,14 +734,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_debug; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_debug); } static int ldbm_config_db_debug_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_debug = val; @@ -747,14 +754,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_named_regions; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_named_regions); } static int ldbm_config_db_named_regions_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_named_regions = val; @@ -767,14 +774,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_private_mem; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_private_mem); } static int ldbm_config_db_private_mem_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_private_mem = val; @@ -787,14 +794,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_private_import_mem; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_private_import_mem); } static int ldbm_config_db_private_import_mem_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_private_import_mem = val; @@ -820,7 +827,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_shm_key = val; @@ -833,7 +840,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_lock_config; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_lock_config); } @@ -859,14 +866,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_cache_config; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_cache_config); } static int ldbm_config_db_cache_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_cache_config = val; @@ -879,14 +886,14 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->db_debug_checkpointing; + return (void *) ((uintptr_t)li->li_dblayer_private->db_debug_checkpointing); } static int ldbm_config_db_debug_checkpointing_set(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->db_debug_checkpointing = val; @@ -922,7 +929,7 @@ { struct ldbminfo *li = (struct ldbminfo *)arg; - return (void *)(li->li_import_cache_autosize); + return (void *)((uintptr_t)(li->li_import_cache_autosize)); } static int ldbm_config_import_cache_autosize_set(void *arg, void *value, char *errorbuf, @@ -931,7 +938,7 @@ struct ldbminfo *li = (struct ldbminfo *)arg; if (apply) - li->li_import_cache_autosize = (int)value; + li->li_import_cache_autosize = (int)((uintptr_t)value); return LDAP_SUCCESS; } @@ -939,7 +946,7 @@ { struct ldbminfo *li = (struct ldbminfo *)arg; - return (void *)(li->li_cache_autosize); + return (void *)((uintptr_t)(li->li_cache_autosize)); } static int ldbm_config_cache_autosize_set(void *arg, void *value, char *errorbuf, @@ -948,7 +955,7 @@ struct ldbminfo *li = (struct ldbminfo *)arg; if (apply) - li->li_cache_autosize = (int)value; + li->li_cache_autosize = (int)((uintptr_t)value); return LDAP_SUCCESS; } @@ -956,7 +963,7 @@ { struct ldbminfo *li = (struct ldbminfo *)arg; - return (void *)(li->li_cache_autosize_split); + return (void *)((uintptr_t)(li->li_cache_autosize_split)); } static int ldbm_config_cache_autosize_split_set(void *arg, void *value, char *errorbuf, @@ -965,7 +972,7 @@ struct ldbminfo *li = (struct ldbminfo *)arg; if (apply) - li->li_cache_autosize_split = (int)value; + li->li_cache_autosize_split = (int)((uintptr_t)value); return LDAP_SUCCESS; } @@ -1021,7 +1028,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_fat_lock; + return (void *) ((uintptr_t)li->li_fat_lock); } static int ldbm_config_serial_lock_set(void *arg, void *value, char *errorbuf, @@ -1030,7 +1037,7 @@ struct ldbminfo *li = (struct ldbminfo *) arg; if (apply) { - li->li_fat_lock = (int) value; + li->li_fat_lock = (int) ((uintptr_t)value); } return LDAP_SUCCESS; @@ -1040,7 +1047,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_legacy_errcode; + return (void *) ((uintptr_t)li->li_legacy_errcode); } static int ldbm_config_legacy_errcode_set(void *arg, void *value, char *errorbuf, @@ -1049,7 +1056,7 @@ struct ldbminfo *li = (struct ldbminfo *) arg; if (apply) { - li->li_legacy_errcode = (int) value; + li->li_legacy_errcode = (int) ((uintptr_t)value); } return LDAP_SUCCESS; @@ -1099,7 +1106,7 @@ static int ldbm_config_set_use_vlv_index(void *arg, void *value, char *errorbuf, int phase, int apply) { struct ldbminfo *li = (struct ldbminfo *) arg; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { if (val) { @@ -1115,7 +1122,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_use_vlv; + return (void *) ((uintptr_t)li->li_use_vlv); } static int @@ -1174,7 +1181,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; - return (void *) li->li_dblayer_private->dblayer_tx_max; + return (void *) ((uintptr_t)li->li_dblayer_private->dblayer_tx_max); } static int ldbm_config_db_tx_max_set( @@ -1187,7 +1194,7 @@ { struct ldbminfo *li = (struct ldbminfo *) arg; int retval = LDAP_SUCCESS; - int val = (int) value; + int val = (int) ((uintptr_t)value); if (apply) { li->li_dblayer_private->dblayer_tx_max = val; @@ -1409,17 +1416,17 @@ switch(config->config_type) { case CONFIG_TYPE_INT: - sprintf(buf, "%d", (int) config->config_get_fn(arg)); + sprintf(buf, "%d", (int) ((uintptr_t)config->config_get_fn(arg))); break; case CONFIG_TYPE_INT_OCTAL: - sprintf(buf, "%o", (int) config->config_get_fn(arg)); + sprintf(buf, "%o", (int) ((uintptr_t)config->config_get_fn(arg))); break; case CONFIG_TYPE_LONG: sprintf(buf, "%ld", (long) config->config_get_fn(arg)); break; case CONFIG_TYPE_SIZE_T: val = (size_t) config->config_get_fn(arg); - sprintf(buf, "%lu", val); + sprintf(buf, "%" PRIuPTR, val); break; case CONFIG_TYPE_STRING: /* Remember the get function for strings returns memory @@ -1429,7 +1436,7 @@ slapi_ch_free((void **)&tmp_string); break; case CONFIG_TYPE_ONOFF: - if ((int) config->config_get_fn(arg)) { + if ((int) ((uintptr_t)config->config_get_fn(arg))) { sprintf(buf, "on"); } else { sprintf(buf, "off"); @@ -1578,7 +1585,7 @@ } /* convert 64 bit value to 32 bit value */ LL_L2I(int_val, llval); - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; case CONFIG_TYPE_INT_OCTAL: if (use_default) { @@ -1586,7 +1593,7 @@ } else { int_val = (int) strtol((char *)bval->bv_val, NULL, 8); } - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; case CONFIG_TYPE_LONG: if (use_default) { @@ -1657,7 +1664,7 @@ } else { int_val = !strcasecmp((char *) bval->bv_val, "on"); } - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; } Index: ldbm_instance_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ldbm_instance_config.c 4 Dec 2007 00:50:19 -0000 1.10 +++ ldbm_instance_config.c 8 Oct 2008 17:29:04 -0000 1.11 @@ -136,7 +136,7 @@ { ldbm_instance *inst = (ldbm_instance *)arg; - return (void *)inst->inst_be->be_readonly; + return (void *)((uintptr_t)inst->inst_be->be_readonly); } static void * @@ -165,7 +165,7 @@ { ldbm_instance *inst = (ldbm_instance *)arg; - return (void *)inst->require_index; + return (void *)((uintptr_t)inst->require_index); } static int @@ -219,6 +219,7 @@ ldbm_instance_config_readonly_set(void *arg, void *value, char *errorbuf, int phase, int apply) { ldbm_instance *inst = (ldbm_instance *)arg; + uintptr_t pval = (uintptr_t)value; if (!apply) { return LDAP_SUCCESS; @@ -229,15 +230,15 @@ * but won't change them until the instance is un-busy again. */ if (! (inst->inst_flags & INST_FLAG_BUSY)) { - slapi_mtn_be_set_readonly(inst->inst_be, (int)value); + slapi_mtn_be_set_readonly(inst->inst_be, (int)pval); } - if ((int)value) { + if ((int)pval) { inst->inst_flags |= INST_FLAG_READONLY; } else { inst->inst_flags &= ~INST_FLAG_READONLY; } } else { - slapi_be_set_readonly(inst->inst_be, (int)value); + slapi_be_set_readonly(inst->inst_be, (int)pval); } return LDAP_SUCCESS; @@ -252,7 +253,7 @@ return LDAP_SUCCESS; } - inst->require_index = (int)value; + inst->require_index = (int)((uintptr_t)value); return LDAP_SUCCESS; } Index: ldbm_modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modify.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldbm_modify.c 18 Oct 2007 22:40:18 -0000 1.6 +++ ldbm_modify.c 8 Oct 2008 17:29:04 -0000 1.7 @@ -578,10 +578,10 @@ */ for ( j = 0; j < smods->num_mods - 1; j++ ) { if ( (mod = smods->mods[j]) != NULL ) { - if ( (mod->mod_op & LDAP_MOD_REPLACE) == 0 || - mod->mod_vals.modv_bvals && - strcasecmp (mod->mod_type, "modifiersname") && - strcasecmp (mod->mod_type, "modifytime") ) { + if ( ((mod->mod_op & LDAP_MOD_REPLACE) == 0) || + (mod->mod_vals.modv_bvals && + strcasecmp (mod->mod_type, "modifiersname") && + strcasecmp (mod->mod_type, "modifytime") ) ) { goto done; } } @@ -589,9 +589,9 @@ if ( entry && entry->e_sdn.dn ) { for ( j = 0; j < smods->num_mods - 1; j++ ) { - if ( (mod = smods->mods[j]) != NULL && - strcasecmp (mod->mod_type, "modifiersname") && - strcasecmp (mod->mod_type, "modifytime") ) { + if ( ((mod = smods->mods[j]) != NULL) && + strcasecmp (mod->mod_type, "modifiersname") && + strcasecmp (mod->mod_type, "modifytime") ) { for ( attr = entry->e_attrs; attr; attr = attr->a_next ) { /* Mods have effect if at least a null-value-mod is * to actually remove an existing attribute Index: ldif2ldbm.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ldif2ldbm.c 3 Apr 2008 16:52:47 -0000 1.16 +++ ldif2ldbm.c 8 Oct 2008 17:29:04 -0000 1.17 @@ -47,6 +47,13 @@ * code for db2index (is this still in use?) */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include "back-ldbm.h" #include "vlv_srch.h" #include "dblayer.h" @@ -76,7 +83,7 @@ static PRIntn import_subcount_hash_compare_keys(const void *v1, const void *v2) { - return( ((ID)v1 == (ID)v2 ) ? 1 : 0); + return( ((ID)((uintptr_t)v1) == (ID)((uintptr_t)v2) ) ? 1 : 0); } static PRIntn import_subcount_hash_compare_values(const void *v1, const void *v2) @@ -86,7 +93,7 @@ static PLHashNumber import_subcount_hash_fn(const void *id) { - return (PLHashNumber) id; + return (PLHashNumber) ((uintptr_t)id); } void import_subcount_stuff_init(import_subcount_stuff *stuff) @@ -263,7 +270,7 @@ size_t count) { PR_ASSERT(NULL == PL_HashTableLookup(mothers->hashtable,(void*)parent_id)); - PL_HashTableAdd(mothers->hashtable,(void*)parent_id,(void*)count); + PL_HashTableAdd(mothers->hashtable,(void*)((uintptr_t)parent_id),(void*)count); return 0; } @@ -276,7 +283,7 @@ *count = 0; /* Lookup hash table for ID */ stored_count = (size_t)PL_HashTableLookup(mothers->hashtable, - (void*)parent_id); + (void*)((uintptr_t)parent_id)); /* If present, return the count found */ if (0 != stored_count) { *count = stored_count; @@ -292,11 +299,11 @@ /* Lookup the hash table for the target ID */ stored_count = (size_t)PL_HashTableLookup(mothers->hashtable, - (void*)parent_id); + (void*)((uintptr_t)parent_id)); PR_ASSERT(0 != stored_count); /* Increment the count */ stored_count++; - PL_HashTableAdd(mothers->hashtable, (void*)parent_id, (void*)stored_count); + PL_HashTableAdd(mothers->hashtable, (void*)((uintptr_t)parent_id), (void*)stored_count); return 0; } @@ -320,7 +327,7 @@ * let's do it so we can reuse the modify routines) */ cache_lock_entry( &inst->inst_cache, e ); modify_init(&mc,e); - sprintf(value_buffer,"%lu",sub_count); + sprintf(value_buffer,"%" PRIuPTR,sub_count); /* attr numsubordinates could already exist in the entry, let's check whether it's already there or not */ isreplace = (attrlist_find(e->ep_entry->e_attrs, numsubordinates) != NULL); @@ -761,12 +768,12 @@ int appendmode = 0; int appendmode_1 = 0; int noversion = 0; - ID lastid; + ID lastid = 0; int task_flags; Slapi_Task *task; int run_from_cmdline = 0; char *instance_name; - ldbm_instance *inst; + ldbm_instance *inst = NULL; int str2entry_options= 0; int retry; int we_start_the_backends = 0; @@ -1812,7 +1819,6 @@ dbc->c_close(dbc); } if (return_value < 0) {/* error case: undo vlv indexing */ - struct vlvIndex *vlvip = NULL; /* if jumped to out due to an error, vlv lock has not been released */ for ( vlvidx = 0; vlvidx < numvlv; vlvidx++ ) { vlvIndex_go_offline(pvlv[vlvidx], be); Index: monitor.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/monitor.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- monitor.c 10 Nov 2006 23:45:39 -0000 1.7 +++ monitor.c 8 Oct 2008 17:29:04 -0000 1.8 @@ -42,6 +42,13 @@ /* monitor.c - ldbm backend monitor function */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include "back-ldbm.h" #include "dblayer.h" /* XXXmcs: not sure this is good to do... */ #include @@ -117,9 +124,9 @@ MSET("entryCacheTries"); sprintf(buf, "%lu", (unsigned long)(100.0*(double)hits / (double)(tries > 0 ? tries : 1))); MSET("entryCacheHitRatio"); - sprintf(buf, "%lu", size); + sprintf(buf, "%" PRIuPTR, size); MSET("currentEntryCacheSize"); - sprintf(buf, "%lu", maxsize); + sprintf(buf, "%" PRIuPTR, maxsize); MSET("maxEntryCacheSize"); sprintf(buf, "%ld", nentries); MSET("currentEntryCacheCount"); Index: parents.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/parents.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- parents.c 10 Nov 2006 23:45:39 -0000 1.5 +++ parents.c 8 Oct 2008 17:29:04 -0000 1.6 @@ -44,6 +44,13 @@ #include "back-ldbm.h" +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + char *numsubordinates = "numsubordinates"; char *hassubordinates = "hassubordinates"; @@ -130,7 +137,7 @@ else { char value_buffer[20]; /* enough digits for 2^64 children */ - sprintf(value_buffer,"%lu", current_sub_count); + sprintf(value_buffer,"%" PRIuPTR, current_sub_count); slapi_mods_add(smods, mod_op | LDAP_MOD_BVALUES, numsubordinates, strlen(value_buffer), value_buffer); } ret = modify_apply_mods(mc,smods); /* smods passed in */ Index: perfctrs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/perfctrs.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- perfctrs.c 26 Sep 2007 17:32:41 -0000 1.9 +++ perfctrs.c 8 Oct 2008 17:29:04 -0000 1.10 @@ -296,7 +296,7 @@ return; } /* Call libdb to get the various stats */ - if (NULL != db_env->lg_handle) + if (DB_USES_LOGGING(db_env)) { DB_LOG_STAT *logstat = NULL; ret = LOG_STAT(db_env,&logstat,0,malloc); @@ -307,7 +307,7 @@ } free(logstat); } - if (NULL != db_env->tx_handle) + if (DB_USES_TRANSACTIONS(db_env)) { DB_TXN_STAT *txnstat = NULL; ret = TXN_STAT(db_env, &txnstat, 0, malloc); @@ -320,7 +320,7 @@ if (txnstat) free(txnstat); } - if (NULL != db_env->lk_handle) + if (DB_USES_LOCKING(db_env)) { DB_LOCK_STAT *lockstat = NULL; ret = LOCK_STAT(db_env,&lockstat,0,malloc); @@ -338,7 +338,7 @@ } free(lockstat); } - if (NULL != db_env->mp_handle) + if (DB_USES_MPOOL(db_env)) { DB_MPOOL_STAT *mpstat = NULL; ret = MEMP_STAT(db_env,&mpstat,NULL,0,malloc); From rmeggins at fedoraproject.org Wed Oct 8 17:29:06 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:06 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.7, 1.8 scalab01.c, 1.5, 1.6 Message-ID: <20081008172906.D4E0370144@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/slapd/tools/ldclt Modified Files: ldapfct.c scalab01.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: ldapfct.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldapfct.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ldapfct.c 18 Oct 2007 00:08:35 -0000 1.7 +++ ldapfct.c 8 Oct 2008 17:29:04 -0000 1.8 @@ -671,9 +671,9 @@ */ tttctx->ldapCtx = ldapssl_init(mctx.hostname, mctx.port, 1); if (mctx.mode & VERY_VERBOSE) - printf ("ldclt[%d]: T%03d: After ldapssl_init (%s, %d), ldapCtx=0x%08x\n", + printf ("ldclt[%d]: T%03d: After ldapssl_init (%s, %d), ldapCtx=0x%p\n", mctx.pid, tttctx->thrdNum, mctx.hostname, mctx.port, - (unsigned int)tttctx->ldapCtx); + tttctx->ldapCtx); if (tttctx->ldapCtx == NULL) { printf ("ldclt[%d]: T%03d: Cannot ldapssl_init (%s, %d), errno=%d\n", @@ -689,14 +689,14 @@ ret = ldapssl_enable_clientauth(tttctx->ldapCtx, "", mctx.keydbpin, mctx.cltcertname); if (mctx.mode & VERY_VERBOSE) printf - ("ldclt[%d]: T%03d: After ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, tttctx->thrdNum, (unsigned int)tttctx->ldapCtx, mctx.keydbpin, + ("ldclt[%d]: T%03d: After ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, tttctx->thrdNum, tttctx->ldapCtx, mctx.keydbpin, mctx.cltcertname); if (ret < 0) { printf - ("ldclt[%d]: T%03d: Cannot ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, tttctx->thrdNum, (unsigned int)tttctx->ldapCtx, mctx.keydbpin, + ("ldclt[%d]: T%03d: Cannot ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, tttctx->thrdNum, tttctx->ldapCtx, mctx.keydbpin, mctx.cltcertname); ldap_perror(tttctx->ldapCtx, "ldapssl_enable_clientauth"); fflush (stdout); @@ -709,9 +709,9 @@ */ tttctx->ldapCtx = ldap_init (mctx.hostname, mctx.port); if (mctx.mode & VERY_VERBOSE) - printf ("ldclt[%d]: T%03d: After ldap_init (%s, %d), ldapCtx=0x%08x\n", + printf ("ldclt[%d]: T%03d: After ldap_init (%s, %d), ldapCtx=0x%p\n", mctx.pid, tttctx->thrdNum, mctx.hostname, mctx.port, - (unsigned int)tttctx->ldapCtx); + tttctx->ldapCtx); if (tttctx->ldapCtx == NULL) { printf ("ldclt[%d]: T%03d: Cannot ldap_init (%s, %d), errno=%d\n", @@ -805,7 +805,6 @@ } else if ((mctx.mod2 & M2_SASLAUTH) && ((!(tttctx->binded)) || (mctx.mode & BIND_EACH_OPER))) { void *defaults; - LDAPControl **rctrls = NULL; char *my_saslauthid = NULL; if ( mctx.sasl_mech == NULL) { @@ -1836,9 +1835,9 @@ */ tttctx->ldapCtx = ldapssl_init(mctx.hostname, mctx.port, 1); if (mctx.mode & VERY_VERBOSE) - printf ("ldclt[%d]: T%03d: After ldapssl_init (%s, %d), ldapCtx=0x%08x\n", + printf ("ldclt[%d]: T%03d: After ldapssl_init (%s, %d), ldapCtx=0x%p\n", mctx.pid, tttctx->thrdNum, mctx.hostname, mctx.port, - (unsigned int)tttctx->ldapCtx); + tttctx->ldapCtx); if (tttctx->ldapCtx == NULL) { printf ("ldclt[%d]: T%03d: Cannot ldapssl_init (%s, %d), errno=%d\n", @@ -1854,14 +1853,14 @@ ret = ldapssl_enable_clientauth(tttctx->ldapCtx, "", mctx.keydbpin, mctx.cltcertname); if (mctx.mode & VERY_VERBOSE) printf - ("ldclt[%d]: T%03d: After ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, tttctx->thrdNum, (unsigned int)tttctx->ldapCtx, mctx.keydbpin, + ("ldclt[%d]: T%03d: After ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, tttctx->thrdNum, tttctx->ldapCtx, mctx.keydbpin, mctx.cltcertname); if (ret < 0) { printf - ("ldclt[%d]: T%03d: Cannot ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, tttctx->thrdNum, (unsigned int)tttctx->ldapCtx, mctx.keydbpin, + ("ldclt[%d]: T%03d: Cannot ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, tttctx->thrdNum, tttctx->ldapCtx, mctx.keydbpin, mctx.cltcertname); fflush (stdout); return (-1); Index: scalab01.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/scalab01.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- scalab01.c 18 Oct 2007 00:08:35 -0000 1.5 +++ scalab01.c 8 Oct 2008 17:29:04 -0000 1.6 @@ -524,8 +524,8 @@ */ s1ctx.ldapCtx = ldapssl_init(mctx.hostname, mctx.port, 1); if (mctx.mode & VERY_VERBOSE) - printf ("ldclt[%d]: ctrl: ldapssl_init (%s, %d), ldapCtx=0x%08x\n", - mctx.pid, mctx.hostname, mctx.port, (unsigned int)s1ctx.ldapCtx); + printf ("ldclt[%d]: ctrl: ldapssl_init (%s, %d), ldapCtx=0x%p\n", + mctx.pid, mctx.hostname, mctx.port, s1ctx.ldapCtx); if (s1ctx.ldapCtx == NULL) { printf ("ldclt[%d]: ctrl: Cannot ldapssl_init (%s, %d), errno=%d\n", @@ -541,13 +541,13 @@ ret = ldapssl_enable_clientauth(s1ctx.ldapCtx, "", mctx.keydbpin, mctx.cltcertname); if (mctx.mode & VERY_VERBOSE) printf - ("ldclt[%d]: ctrl: After ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, (unsigned int)s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); + ("ldclt[%d]: ctrl: After ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); if (ret < 0) { printf - ("ldclt[%d]: ctrl: Cannot ldapssl_enable_clientauth (ldapCtx=0x%08x, %s, %s)", - mctx.pid, (unsigned int)s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); + ("ldclt[%d]: ctrl: Cannot ldapssl_enable_clientauth (ldapCtx=0x%p, %s, %s)", + mctx.pid, s1ctx.ldapCtx, mctx.keydbpin, mctx.cltcertname); ldap_perror(s1ctx.ldapCtx, "ldapssl_enable_clientauth"); fflush (stdout); return (-1); @@ -561,8 +561,8 @@ */ s1ctx.ldapCtx = ldap_init (mctx.hostname, mctx.port); if (mctx.mode & VERY_VERBOSE) - printf ("ldclt[%d]: ctrl: After ldap_init (%s, %d), ldapCtx=0x%08x\n", - mctx.pid, mctx.hostname, mctx.port, (unsigned int)s1ctx.ldapCtx); + printf ("ldclt[%d]: ctrl: After ldap_init (%s, %d), ldapCtx=0x%p\n", + mctx.pid, mctx.hostname, mctx.port, s1ctx.ldapCtx); if (s1ctx.ldapCtx == NULL) { printf ("ldclt[%d]: ctrl: Cannot ldap_init (%s, %d), errno=%d\n", From rmeggins at fedoraproject.org Wed Oct 8 17:29:05 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:05 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd agtmmap.c, 1.10, 1.11 auth.c, 1.10, 1.11 bind.c, 1.13, 1.14 config.c, 1.11, 1.12 configdse.c, 1.8, 1.9 conntable.c, 1.9, 1.10 detach.c, 1.7, 1.8 dse.c, 1.9, 1.10 filter.c, 1.9, 1.10 libglobs.c, 1.24, 1.25 log.c, 1.22, 1.23 log.h, 1.7, 1.8 main.c, 1.24, 1.25 mapping_tree.c, 1.14, 1.15 pblock.c, 1.16, 1.17 saslbind.c, 1.26, 1.27 snmp_collator.c, 1.13, 1.14 statechange.h, 1.5, 1.6 task.c, 1.15, 1.16 uuid.c, 1.11, 1.12 Message-ID: <20081008172906.5DC9370145@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/slapd Modified Files: agtmmap.c auth.c bind.c config.c configdse.c conntable.c detach.c dse.c filter.c libglobs.c log.c log.h main.c mapping_tree.c pblock.c saslbind.c snmp_collator.c statechange.h task.c uuid.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: agtmmap.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- agtmmap.c 10 Nov 2006 23:45:40 -0000 1.10 +++ agtmmap.c 8 Oct 2008 17:29:03 -0000 1.11 @@ -195,7 +195,7 @@ { /* Without this we will get segv when we try to read/write later */ buf = calloc (1, sz); - write (fd, buf, sz); + (void)write (fd, buf, sz); free (buf); } Index: auth.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/auth.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- auth.c 27 Aug 2008 21:56:07 -0000 1.10 +++ auth.c 8 Oct 2008 17:29:03 -0000 1.11 @@ -449,7 +449,7 @@ if ( conn->c_flags & CONN_FLAG_START_TLS ) { if ( cipherInfo.symKeyBits == 0 ) { start_tls_graceful_closure( conn, NULL, 1 ); - slapi_ch_free((void **)&cipher); + slapi_ch_free_string(&cipher); return ; } } @@ -457,7 +457,7 @@ if (config_get_SSLclientAuth() == SLAPD_SSLCLIENTAUTH_OFF ) { slapi_log_access (LDAP_DEBUG_STATS, "conn=%d SSL %i-bit %s\n", conn->c_connid, keySize, cipher ? cipher : "NULL" ); - slapi_ch_free((void **)&cipher); + slapi_ch_free_string(&cipher); return; } if (clientCert == NULL) { @@ -499,7 +499,7 @@ LDAPDebug (LDAP_DEBUG_TRACE, "<= ldapu_cert_to_ldap_entry() %i (%s)%s\n", err, extraErrorMsg, chain ? "" : " NULL"); } - slapi_ch_free((void**)&basedn); + slapi_ch_free_string(&basedn); slapu_msgfree (internal_ld, chain); } if (subject) free (subject); @@ -522,6 +522,6 @@ bind_credentials_set( conn, SLAPD_AUTH_SSL, clientDN, SLAPD_AUTH_SSL, clientDN, clientCert , NULL); - slapi_ch_free((void **)&cipher); + slapi_ch_free_string(&cipher); /* clientDN and clientCert will be freed later */ } Index: bind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bind.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- bind.c 27 Aug 2008 21:05:17 -0000 1.13 +++ bind.c 8 Oct 2008 17:29:03 -0000 1.14 @@ -103,7 +103,7 @@ rv = slapi_pw_find_sv( rdnpwvals, cred ) == 0; value_done(&rdnpwbv); } - slapi_ch_free( (void **) &rootpw ); + slapi_ch_free_string( &rootpw ); return rv; } @@ -787,6 +787,6 @@ } if ( NULL != dnbuf_dynamic ) { - slapi_ch_free( (void **)&dnbuf_dynamic ); + slapi_ch_free_string( &dnbuf_dynamic ); } } Index: config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/config.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- config.c 14 May 2008 18:39:31 -0000 1.11 +++ config.c 8 Oct 2008 17:29:03 -0000 1.12 @@ -566,11 +566,11 @@ } } - slapi_ch_free((void **)&buf); + slapi_ch_free_string(&buf); } bail: - slapi_ch_free((void **)&buf); + slapi_ch_free_string(&buf); return rc; } Index: configdse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/configdse.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configdse.c 17 Sep 2007 22:48:10 -0000 1.8 +++ configdse.c 8 Oct 2008 17:29:03 -0000 1.9 @@ -102,7 +102,7 @@ retval = (ptype && !strcasecmp(ptype, "pwdstoragescheme")); if (!retval) retval = (ptype && !strcasecmp(ptype, "reverpwdstoragescheme")); - slapi_ch_free((void**)&ptype); + slapi_ch_free_string(&ptype); return retval; } @@ -178,7 +178,7 @@ be = slapi_get_next_backend (cookie); } - slapi_ch_free ((void **)&cookie); + slapi_ch_free_string (&cookie); /* show be_type */ attrlist_delete( &e->e_attrs, "nsslapd-betype"); @@ -195,7 +195,7 @@ be = slapi_get_next_backend(cookie); } - slapi_ch_free ( (void **) &cookie); + slapi_ch_free_string (&cookie); /* show private suffixes */ attrlist_delete ( &e->e_attrs, "nsslapd-privatenamespaces"); @@ -222,7 +222,7 @@ be = slapi_get_next_backend(cookie); } - slapi_ch_free ((void **) &cookie); + slapi_ch_free_string (&cookie); /* show syntax plugins */ attrlist_delete ( &e->e_attrs, CONFIG_PLUGIN_ATTRIBUTE ); @@ -432,7 +432,7 @@ /* if the password has been set, it will be hashed */ if ((pwd = config_get_rootpw()) != NULL) { slapi_entry_attr_set_charptr(e, CONFIG_ROOTPW_ATTRIBUTE, pwd); - slapi_ch_free((void**)&pwd); + slapi_ch_free_string(&pwd); } *returncode= rc; Index: conntable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/conntable.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- conntable.c 18 Oct 2007 00:08:34 -0000 1.9 +++ conntable.c 8 Oct 2008 17:29:03 -0000 1.10 @@ -438,7 +438,7 @@ val.bv_len = strlen( bufptr ); attrlist_merge( &e->e_attrs, "connection", vals ); if (newbuf) { - slapi_ch_free((void **) &newbuf); + slapi_ch_free_string(&newbuf); } } PR_Unlock( ct->c[i].c_mutex ); Index: detach.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/detach.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- detach.c 3 Apr 2008 21:07:55 -0000 1.7 +++ detach.c 8 Oct 2008 17:29:03 -0000 1.8 @@ -127,7 +127,7 @@ } (void) chdir( errorlog ); config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, errorlog, errorbuf, 1); - slapi_ch_free((void**)&errorlog); + slapi_ch_free_string(&errorlog); } } else { /* calling config_set_workingdir to check for validity of directory, don't apply */ @@ -135,7 +135,7 @@ exit(1); } (void) chdir( workingdir ); - slapi_ch_free((void**)&workingdir); + slapi_ch_free_string(&workingdir); } if ( (sd = open( "/dev/null", O_RDWR )) == -1 ) { Index: dse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dse.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dse.c 4 Jun 2008 22:22:55 -0000 1.9 +++ dse.c 8 Oct 2008 17:29:03 -0000 1.10 @@ -72,6 +72,13 @@ #include #endif /* _WIN32 */ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + /* #define SLAPI_DSE_DEBUG */ /* define this to force trace log */ /* messages to always be logged */ @@ -463,6 +470,8 @@ slapi_ch_free((void **)&pdse); LDAPDebug( SLAPI_DSE_TRACELEVEL, "Removed [%d] entries from the dse tree.\n", nentries,0,0 ); + + return 0; /* no one checks this return value */ } /* @@ -603,7 +612,7 @@ struct berval val; vals[0] = &val; vals[1] = NULL; - sprintf(value_buffer,"%lu",current_sub_count); + sprintf(value_buffer,"%" PRIuPTR,current_sub_count); val.bv_val = value_buffer; val.bv_len = strlen (val.bv_val); switch(mod_op) Index: filter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filter.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- filter.c 10 Nov 2006 23:45:40 -0000 1.9 +++ filter.c 8 Oct 2008 17:29:03 -0000 1.10 @@ -1280,7 +1280,7 @@ if(1 < *bufsize) { sprintf( buf, ")" ); - *bufsize--; + (*bufsize)--; } } break; @@ -1313,7 +1313,7 @@ if(1 < *bufsize) { sprintf( buf, ")" ); - *bufsize--; + (*bufsize)--; } } break; Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- libglobs.c 27 Aug 2008 21:05:25 -0000 1.24 +++ libglobs.c 8 Oct 2008 17:29:03 -0000 1.25 @@ -5066,6 +5066,8 @@ { struct berval **values = 0; char *sval = 0; + int ival = 0; + uintptr_t pval; /* for null values, just set the attr value to the empty string */ @@ -5125,7 +5127,9 @@ case CONFIG_CONSTANT_INT: PR_ASSERT(value); /* should be a constant value */ - slapi_entry_attr_set_int(e, cgas->attr_name, (int)value); + pval = (uintptr_t)value; + ival = (int)pval; + slapi_entry_attr_set_int(e, cgas->attr_name, ival); break; case CONFIG_SPECIAL_SSLCLIENTAUTH: Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- log.c 3 Apr 2008 17:18:11 -0000 1.22 +++ log.c 8 Oct 2008 17:29:03 -0000 1.23 @@ -2216,12 +2216,12 @@ { time_t curr_time; time_t log_createtime= 0; - time_t syncclock; + time_t syncclock = 0; int type = LOG_CONTINUE; int f_size = 0; int maxlogsize, nlogs; int rotationtime_secs = -1; - int sync_enabled, timeunit; + int sync_enabled = 0, timeunit = 0; if (fp == NULL) { return LOG_ROTATE; Index: log.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- log.h 10 Nov 2006 23:45:40 -0000 1.7 +++ log.h 8 Oct 2008 17:29:03 -0000 1.8 @@ -49,9 +49,13 @@ *************************************************************************/ #include #ifdef LINUX +#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE /* glibc2 needs this */ +#endif +#ifndef __USE_XOPEN #define __USE_XOPEN #endif +#endif #include #include #include Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- main.c 3 Apr 2008 21:07:55 -0000 1.24 +++ main.c 8 Oct 2008 17:29:03 -0000 1.25 @@ -261,7 +261,6 @@ fix_ownership() { struct passwd* pw=NULL; - char dirname[MAXPATHLEN + 1]; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); @@ -630,7 +629,6 @@ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); daemon_ports_t ports_info = {0}; Slapi_Backend *be = NULL; - int init_ssl; #ifndef __LP64__ #if defined(__hpux) && !defined(__ia64) /* for static constructors */ @@ -2598,7 +2596,6 @@ int return_value = 0; Slapi_PBlock pb; struct slapdplugin *backend_plugin; - slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); /* this should be the first time to be called! if the init order * is ever changed, these lines should be changed (or erased)! Index: mapping_tree.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mapping_tree.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- mapping_tree.c 12 Jun 2008 15:23:44 -0000 1.14 +++ mapping_tree.c 8 Oct 2008 17:29:03 -0000 1.15 @@ -1998,7 +1998,7 @@ * will be transferred to the internal DSE backend */ if( sdn_is_nulldn(target_sdn) && - ((op_type == SLAPI_OPERATION_SEARCH) && (scope == LDAP_SCOPE_BASE) || + (((op_type == SLAPI_OPERATION_SEARCH) && (scope == LDAP_SCOPE_BASE)) || (op_type != SLAPI_OPERATION_SEARCH)) ) { mtn_unlock(); Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- pblock.c 5 Aug 2008 22:18:37 -0000 1.16 +++ pblock.c 8 Oct 2008 17:29:03 -0000 1.17 @@ -2873,7 +2873,7 @@ case SLAPI_LDIF2DB_ENCRYPT: case SLAPI_DB2LDIF_DECRYPT: - pblock->pb_ldif_encrypt = (int)value; + pblock->pb_ldif_encrypt = *((int *)value); break; default: Index: saslbind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/saslbind.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- saslbind.c 27 Aug 2008 21:05:35 -0000 1.26 +++ saslbind.c 8 Oct 2008 17:29:03 -0000 1.27 @@ -297,7 +297,6 @@ int attrsonly = 0, scope = LDAP_SCOPE_SUBTREE; LDAPControl **ctrls = NULL; Slapi_Entry *entry = NULL; - Slapi_DN *sdn; char **attrs = NULL; int regexmatch = 0; char *base = NULL; Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- snmp_collator.c 18 Oct 2007 14:05:24 -0000 1.13 +++ snmp_collator.c 8 Oct 2008 17:29:03 -0000 1.14 @@ -399,7 +399,6 @@ int err; char *statspath = config_get_rundir(); - char *lp = NULL; char *instdir = config_get_configdir(); char *instname = NULL; Index: statechange.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/statechange.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- statechange.h 10 Nov 2006 23:45:40 -0000 1.5 +++ statechange.h 8 Oct 2008 17:29:03 -0000 1.6 @@ -78,7 +78,9 @@ #define STATECHANGE_VATTR_ENTRY_INVALIDATE 2 /* Vattr api caller data to be passed to statechange_register() */ +#ifdef DEFINE_STATECHANGE_STATICS static int vattr_global_invalidate = STATECHANGE_VATTR_GLOBAL_INVALIDATE; -static int vattr_entry_invalidate = STATECHANGE_VATTR_ENTRY_INVALIDATE; +/* static int vattr_entry_invalidate = STATECHANGE_VATTR_ENTRY_INVALIDATE; */ +#endif /* DEFINE_STATECHANGE_STATICS */ #endif /*_STATE_NOTIFY_H_*/ Index: task.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/task.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- task.c 3 Apr 2008 16:52:46 -0000 1.15 +++ task.c 8 Oct 2008 17:29:03 -0000 1.16 @@ -193,6 +193,8 @@ if (task) { return task->task_state; } + + return 0; /* return value not currently used */ } /* this changes the 'nsTaskStatus' value, which is transient (anything logged @@ -341,6 +343,8 @@ if (task) { return task->task_private; } + + return NULL; /* return value not currently used */ } /* @@ -371,6 +375,8 @@ if (task) { return task->task_refcount; } + + return 0; /* return value not currently used */ } /* name is, for example, "import" */ Index: uuid.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/uuid.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- uuid.c 18 Oct 2007 00:08:34 -0000 1.11 +++ uuid.c 8 Oct 2008 17:29:03 -0000 1.12 @@ -361,8 +361,8 @@ /* uuid_create -- multithreaded generation */ static int uuid_create_mt(guid_t *uuid) { - uuid_time_t timestamp; - unsigned16 clock_seq; + uuid_time_t timestamp = 0; + unsigned16 clock_seq = 0; /* just bumps time sequence number. the actual time calls are made by a uuid_update_state */ From rmeggins at fedoraproject.org Wed Oct 8 17:29:06 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:06 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.6, 1.7 rsearch.c, 1.4, 1.5 searchthread.c, 1.5, 1.6 Message-ID: <20081008172907.1A8D770145@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/slapd/tools/rsearch Modified Files: infadd.c rsearch.c searchthread.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: infadd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- infadd.c 18 Oct 2007 23:49:32 -0000 1.6 +++ infadd.c 8 Oct 2008 17:29:04 -0000 1.7 @@ -344,11 +344,12 @@ } if (lmtCount && ntotal >= lmtCount) { if (!quiet) { + tmpv = (double)ntotal*1000.0/(counter*sampleInterval); fprintf(stdout, "Total added records: %d, Average rate: %7.2f/thrd, " "%6.2f/sec = %6.4fmsec/op\n", ntotal, (double)ntotal/(double)numThreads, - (tmpv = (double)ntotal*1000.0/(counter*sampleInterval)), + tmpv, (double)1000.0/tmpv); } exit(1); Index: rsearch.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/rsearch.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- rsearch.c 1 Aug 2007 17:51:10 -0000 1.4 +++ rsearch.c 8 Oct 2008 17:29:04 -0000 1.5 @@ -501,12 +501,12 @@ exit(0); } if (timeLimit && (lifeTime >= timeLimit)) { - double tmpv; + double tmpv = (val + sumVal)/counter; if (verbose) printf("%d sec >= %d\n", lifeTime, timeLimit); printf("Final Average rate: " "%6.2f/sec = %6.4fmsec/op, total:%6u\n", - (tmpv = (val + sumVal)/counter), + tmpv, (double)1000.0/tmpv, total); exit(0); Index: searchthread.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/searchthread.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- searchthread.c 1 Aug 2007 17:51:10 -0000 1.5 +++ searchthread.c 8 Oct 2008 17:29:04 -0000 1.6 @@ -501,7 +501,7 @@ { SearchThread *st = (SearchThread *)v; PRIntervalTime timer; - int notBound = 1, res, searches = 0; + int notBound = 1, res = LDAP_SUCCESS, searches = 0; PRUint32 span; st->alive = 1; From rmeggins at fedoraproject.org Wed Oct 8 17:29:07 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:07 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/lib/ldaputil certmap.c, 1.8, 1.9 ldapauth.c, 1.7, 1.8 ldapdb.c, 1.6, 1.7 Message-ID: <20081008172907.9382E70144@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/lib/ldaputil In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/lib/ldaputil Modified Files: certmap.c ldapauth.c ldapdb.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: certmap.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/certmap.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- certmap.c 18 Oct 2007 00:08:36 -0000 1.8 +++ certmap.c 8 Oct 2008 17:29:05 -0000 1.9 @@ -55,6 +55,7 @@ #include #include +#define DEFINE_LDAPU_STRINGS 1 #include #include #include @@ -300,7 +301,8 @@ int rv; while(node) { - rv = (int)(*print_fn)(node->info, pinfo); + uintptr_t retval = (uintptr_t)(*print_fn)(node->info, pinfo); + rv = (int)retval; if (rv != LDAPU_SUCCESS) return rv; node = node->next; } @@ -1691,6 +1693,7 @@ char *ptr; int eof; int rv; + uintptr_t retval; LDAPUPrintInfo_t pinfo; #ifdef XP_WIN32 @@ -1730,7 +1733,8 @@ pinfo.fp = tfp; pinfo.arg = default_certmap_info->issuerName; - rv = (int)ldapu_certinfo_print (default_certmap_info, &pinfo); + retval = (uintptr_t)ldapu_certinfo_print (default_certmap_info, &pinfo); + rv = (int)retval; if (rv != LDAPU_SUCCESS) { fclose(tfp); Index: ldapauth.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/ldapauth.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ldapauth.c 10 Nov 2006 23:46:00 -0000 1.7 +++ ldapauth.c 8 Oct 2008 17:29:05 -0000 1.8 @@ -53,6 +53,7 @@ #include #include +#define DEFINE_LDAPU_STRINGS 1 #include #include #include Index: ldapdb.c =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/ldaputil/ldapdb.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldapdb.c 10 Nov 2006 23:46:00 -0000 1.6 +++ ldapdb.c 8 Oct 2008 17:29:05 -0000 1.7 @@ -171,7 +171,10 @@ LDAPHostEnt *result, char *buffer, int buflen, int *statusp, void *extradata ) { + /* old code did this which was clearly wrong: return( (LDAPHostEnt *)PR_GetError() ); + which leads me to believe this is not used */ + return( NULL ); } #endif /* LDAP_OPT_DNS_FN_PTRS */ From rmeggins at fedoraproject.org Wed Oct 8 17:29:07 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:07 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/lib/libaccess aclerror.cpp, 1.8, 1.9 acltools.cpp, 1.8, 1.9 lasdns.cpp, 1.8, 1.9 lasip.cpp, 1.7, 1.8 ldapacl.cpp, 1.6, 1.7 oneeval.cpp, 1.8, 1.9 Message-ID: <20081008172907.CE13570144@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/lib/libaccess In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/lib/libaccess Modified Files: aclerror.cpp acltools.cpp lasdns.cpp lasip.cpp ldapacl.cpp oneeval.cpp Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: aclerror.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/aclerror.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- aclerror.cpp 10 Nov 2006 23:46:02 -0000 1.8 +++ aclerror.cpp 8 Oct 2008 17:29:05 -0000 1.9 @@ -100,7 +100,7 @@ void aclErrorFmt(NSErr_t * errp, char * msgbuf, int maxlen, int maxdepth) { NSEFrame_t * efp; /* error frame pointer */ - int len; /* length of error message text */ + int len = 0; /* length of error message text */ int depth = 0; /* current depth */ msgbuf[0] = 0; Index: acltools.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/acltools.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- acltools.cpp 18 Oct 2007 00:08:36 -0000 1.8 +++ acltools.cpp 8 Oct 2008 17:29:05 -0000 1.9 @@ -3060,7 +3060,7 @@ const int block_size = 50; int rv, list_size, list_index; - char ** local_list; + char ** local_list = NULL; char * block ; char * name; char * next; Index: lasdns.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/lasdns.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- lasdns.cpp 10 Nov 2006 23:46:02 -0000 1.8 +++ lasdns.cpp 8 Oct 2008 17:29:05 -0000 1.9 @@ -140,7 +140,7 @@ size_t delimiter; /* length of valid token */ char token[256]; /* max length dns name */ int i; - int ipcnt; + int ipcnt = 0; char **p; unsigned long *ipaddrs=0; pool_handle_t *pool; @@ -347,7 +347,7 @@ int result; int aliasflg; char *my_dns; - LASDnsContext_t *context; + LASDnsContext_t *context = NULL; int rv; *cachable = ACL_INDEF_CACHABLE; Index: lasip.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/lasip.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- lasip.cpp 10 Nov 2006 23:46:02 -0000 1.7 +++ lasip.cpp 8 Oct 2008 17:29:05 -0000 1.8 @@ -340,7 +340,7 @@ int stopbit; /* Don't care after this point */ int curbit; /* current bit we're working on */ int curval; /* value of pattern[curbit] */ - LASIpTree_t *curptr; /* pointer to the current node */ + LASIpTree_t *curptr = NULL; /* pointer to the current node */ LASIpTree_t *newptr; /* stop at the first 1 in the netmask from low to high */ @@ -448,7 +448,7 @@ IPAddr_t ip; int retcode; LASIpTree_t *node; - LASIpContext_t *context; + LASIpContext_t *context = NULL; int rv; char ip_str[124]; Index: ldapacl.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/ldapacl.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldapacl.cpp 10 Nov 2006 23:46:02 -0000 1.6 +++ ldapacl.cpp 8 Oct 2008 17:29:05 -0000 1.7 @@ -762,7 +762,7 @@ PList_t resource = 0; PList_t auth_info = 0; PList_t global_auth = NULL; - int rv; + int rv = 0; /* Check if the userdn is available in the usr_cache */ if (acl_usr_cache_enabled() && userdn) { Index: oneeval.cpp =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libaccess/oneeval.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- oneeval.cpp 18 Oct 2007 00:08:36 -0000 1.8 +++ oneeval.cpp 8 Oct 2008 17:29:05 -0000 1.9 @@ -344,7 +344,7 @@ ACLHandle_t *acl; ACLExprHandle_t *ace; int ace_cnt = -1; - ACLAceEntry_t *acelast, *new_ace; + ACLAceEntry_t *acelast = NULL, *new_ace; ACLAceNumEntry_t *entry, *temp_entry; char **argp; ACLListCache_t *cache; @@ -635,7 +635,7 @@ int i, j, right_num, delta; ACLCachable_t ace_cachable; int result; - int absolute; + int absolute = 0; int skipflag; int g_num; /* index into the generic rights array. */ char **g_rights; From rmeggins at fedoraproject.org Wed Oct 8 17:29:07 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:07 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/lib/libsi18n getstrmem.h, 1.7, 1.8 gsslapd.h, 1.7, 1.8 Message-ID: <20081008172907.DBACA70145@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/lib/libsi18n In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/lib/libsi18n Modified Files: getstrmem.h gsslapd.h Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: getstrmem.h =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libsi18n/getstrmem.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- getstrmem.h 10 Nov 2006 23:46:05 -0000 1.7 +++ getstrmem.h 8 Oct 2008 17:29:05 -0000 1.8 @@ -53,7 +53,6 @@ #define NUM_BUCKETS 32 /* must be a power of 2 */ /* strings in library libadmin */ -static char* libadminid[] = {"$DBT: libadmin in memory v1 $"}; static char* libadmin[] = { "", " Help ", @@ -89,7 +88,6 @@ {emptyString,NULL,0} }; /* strings in library userforms */ -static char* userformsid[] = {"$DBT: userforms in memory v1 $"}; static char* userforms[] = { "", "Error: could not open servers list file.

\n", @@ -113,7 +111,6 @@ {emptyString,NULL,0} }; /* strings in library libaccess */ -static char* libaccessid[] = {"$DBT: libaccess in memory v1 $"}; static char* libaccess[] = { "", "basic-ncsa", @@ -274,7 +271,6 @@ {emptyString,NULL,0} }; /* strings in library frame */ -static char* frameid[] = {"$DBT: frame in memory v1 $"}; static char* frame[] = { "", "Not Found

Not Found

The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it. ", @@ -465,7 +461,6 @@ {emptyString,NULL,0} }; /* strings in library admserv */ -static char* admservid[] = {"$DBT: admserv in memory v1 $"}; static char* admserv[] = { "", "Unauthorized host", @@ -477,7 +472,6 @@ emptyString }; /* strings in library libir */ -static char* libirid[] = {"$DBT: libadmin in memory v1 $"}; static char* libir[] = { "", "An I/O error occurred before all form data could be read.", @@ -494,7 +488,6 @@ {emptyString,NULL,0} }; /* strings in library httpdaemon */ -static char* httpdaemonid[] = {"$DBT: httpdaemon in memory v1 $"}; static char* httpdaemon[] = { "", "Error in ConvertThreadToFiber", @@ -540,7 +533,6 @@ {emptyString,NULL,0} }; /* strings in library dsgw */ -static char* dsgwid[] = {"$DBT: dsgw in memory v1 $"}; static char* dsgw[] = { "", "Unknown HTTP request method", @@ -856,7 +848,6 @@ {emptyString,NULL,0} }; /* strings in library base */ -static char* baseid[] = {"$DBT: base in memory v1 $"}; static char* base[] = { "", "insufficient memory to create hash table", @@ -1072,7 +1063,6 @@ {emptyString,NULL,0} }; /* strings in library cgiadmin */ -static char* cgiadminid[] = {"$DBT: cgiadmin in memory v1 $"}; static char* cgiadmin[] = { "", "Missing REQUEST_METHOD", Index: gsslapd.h =================================================================== RCS file: /cvs/dirsec/ldapserver/lib/libsi18n/gsslapd.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- gsslapd.h 27 Apr 2007 22:59:32 -0000 1.7 +++ gsslapd.h 8 Oct 2008 17:29:05 -0000 1.8 @@ -54,10 +54,10 @@ #undef LIBRARY_NAME static RESOURCE_GLOBAL allxpstr[] = { - base, - libaccess, - libadmin, - 0 + {base}, + {libaccess}, + {libadmin}, + {0} }; #endif /* ifdef RESOURCE_STR */ From rmeggins at fedoraproject.org Wed Oct 8 17:29:07 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:07 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp ldap-agent.h, 1.9, 1.10 Message-ID: <20081008172907.1D50970143@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/snmp Modified Files: ldap-agent.h Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: ldap-agent.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ldap-agent.h 10 Nov 2006 23:45:53 -0000 1.9 +++ ldap-agent.h 8 Oct 2008 17:29:04 -0000 1.10 @@ -47,7 +47,27 @@ extern "C" { #endif +/* net-snmp-config.h defines + all of these unconditionally - so we undefine + them here to make the compiler warnings shut up + hopefully we don't need the real versions + of these, but then with no warnings the compiler + will just silently redefine them to the wrong + ones anyway + Then undefine them after the include so that + our own local defines will take effect +*/ +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include #include #include From rmeggins at fedoraproject.org Wed Oct 8 17:29:03 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:03 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/include i18n.h,1.6,1.7 Message-ID: <20081008172933.A20A670143@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/include In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/include Modified Files: i18n.h Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: i18n.h =================================================================== RCS file: /cvs/dirsec/ldapserver/include/i18n.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- i18n.h 10 Nov 2006 23:44:24 -0000 1.6 +++ i18n.h 8 Oct 2008 17:29:01 -0000 1.7 @@ -111,11 +111,11 @@ #ifdef RESOURCE_STR #define BEGIN_STR(argLibraryName) \ - RESOURCE_TABLE argLibraryName[] = { 0, #argLibraryName, + RESOURCE_TABLE argLibraryName[] = { {0, #argLibraryName}, #define ResDef(argToken,argID,argString) \ - argID, argString, + {argID, argString}, #define END_STR(argLibraryName) \ - 0, 0 }; + {0, 0} }; #else #define BEGIN_STR(argLibraryName) \ enum { From rmeggins at fedoraproject.org Wed Oct 8 17:29:03 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:03 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/include/ldaputil certmap.h, 1.5, 1.6 Message-ID: <20081008172933.B81F1700E1@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/include/ldaputil In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/include/ldaputil Modified Files: certmap.h Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: certmap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/include/ldaputil/certmap.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- certmap.h 10 Nov 2006 23:44:25 -0000 1.5 +++ certmap.h 8 Oct 2008 17:29:01 -0000 1.6 @@ -61,6 +61,8 @@ LDAPU_STR_MAX_INDEX }; +#ifdef DEFINE_LDAPU_STRINGS +/* used only in certmap.c and ldaputil.c */ static char *ldapu_strings[] = { "objectclass=*", /* LDAPU_STR_DEFAULT */ "uid=%s", /* LDAPU_STR_FILTER_USER */ @@ -71,7 +73,8 @@ "userCertificate;binary", /* LDAPU_STR_ATTR_CERT */ "userCertificate" /* LDAPU_STR_ATTR_CERT_NOSUBTYPE */ }; - +#endif /* DEFINE_LDAPU_STRINGS */ + typedef struct { char *str; int size; From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.10, 1.11 Message-ID: <20081008172934.537FB70126@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- dna.c 3 Oct 2008 04:28:21 -0000 1.10 +++ dna.c 8 Oct 2008 17:29:02 -0000 1.11 @@ -55,6 +55,13 @@ #include "prclist.h" #include "ldif.h" +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + /* get file mode flags for unix */ #ifndef _WIN32 #include @@ -708,7 +715,7 @@ } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "----------> %s [%llu]\n", DNA_NEXTVAL, entry->nextval, 0, + "----------> %s [%" PRIu64 "]\n", DNA_NEXTVAL, entry->nextval, 0, 0); value = slapi_entry_attr_get_charptr(e, DNA_PREFIX); @@ -736,7 +743,7 @@ } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "----------> %s [%llu]\n", DNA_INTERVAL, entry->interval, 0, 0); + "----------> %s [%" PRIu64 "]\n", DNA_INTERVAL, entry->interval, 0, 0); #endif value = slapi_entry_attr_get_charptr(e, DNA_GENERATE); @@ -844,7 +851,7 @@ entry->threshold = strtoull(value, 0, 0); slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, - "----------> %s [%llu]\n", DNA_THRESHOLD, value, 0, 0); + "----------> %s [%" PRIu64 "]\n", DNA_THRESHOLD, value, 0, 0); slapi_ch_free_string(&value); } else { @@ -1319,8 +1326,8 @@ * don't need to do this if we already have a next range on deck. */ if ((config_entry->next_range_lower == 0) && (config_entry->remaining <= config_entry->threshold)) { slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM, - "dna_notice_allocation: Passed threshold of %llu remaining values " - "for range %s. (%llu values remain)\n", + "dna_notice_allocation: Passed threshold of %" PRIu64 " remaining values " + "for range %s. (%" PRIu64 " values remain)\n", config_entry->threshold, config_entry->dn, config_entry->remaining); /* Only attempt to fix maxval if the fix flag is set. */ if (fix != 0) { @@ -1461,13 +1468,11 @@ struct dnaServer *server, PRUint64 *lower, PRUint64 *upper) { - Slapi_DN *agmt_sdn = NULL; char *bind_dn = NULL; char *bind_passwd = NULL; char *bind_method = NULL; int is_ssl = 0; int is_client_auth = 0; - int replport = 0; struct berval *request = NULL; char *retoid = NULL; struct berval *responsedata = NULL; @@ -1767,12 +1772,12 @@ if (prefix) { /* The 7 below is for all of the filter characters "(&(=))" * plus the trailing \0. The 20 is for the maximum string - * representation of a %llu. */ + * representation of a " PRIu64 ". */ filterlen = strlen(config_entry->filter) + strlen(prefix) + strlen(type) + 7 + 20; filter = slapi_ch_malloc(filterlen); - snprintf(filter, filterlen, "(&%s(%s=%s%llu))", + snprintf(filter, filterlen, "(&%s(%s=%s%" PRIu64 "))", config_entry->filter, type, prefix, tmpval); } else { ctrls = (LDAPControl **)slapi_ch_calloc(2, sizeof(LDAPControl)); @@ -1785,7 +1790,7 @@ return LDAP_OPERATIONS_ERROR; } - filter = slapi_ch_smprintf("(&%s(&(%s>=%llu)(%s<=%llu)))", + filter = slapi_ch_smprintf("(&%s(&(%s>=%" PRIu64 ")(%s<=%" PRIu64 ")))", config_entry->filter, type, tmpval, type, config_entry->maxval); @@ -1836,7 +1841,7 @@ /* filter is guaranteed to be big enough since we allocated * enough space to fit a string representation of any unsigned * 64-bit integer */ - snprintf(filter, filterlen, "(&%s(%s=%s%llu))", + snprintf(filter, filterlen, "(&%s(%s=%s%" PRIu64 "))", config_entry->filter, type, prefix, tmpval); /* clear out the pblock so we can re-use it */ @@ -1968,7 +1973,7 @@ * of our current range */ if (nextval <= (config_entry->maxval + config_entry->interval)) { /* try to set the new next value in the config entry */ - snprintf(next_value, sizeof(next_value),"%llu", nextval); + snprintf(next_value, sizeof(next_value),"%" PRIu64, nextval); /* set up our replace modify operation */ replace_val[0] = next_value; @@ -1998,7 +2003,7 @@ if (LDAP_SUCCESS == ret) { slapi_ch_free_string(next_value_ret); - *next_value_ret = slapi_ch_smprintf("%llu", setval); + *next_value_ret = slapi_ch_smprintf("%" PRIu64, setval); if (NULL == *next_value_ret) { ret = LDAP_OPERATIONS_ERROR; goto done; @@ -2045,7 +2050,7 @@ /* We store the number of remaining assigned values * in the shared config entry. */ - snprintf(remaining_vals, sizeof(remaining_vals),"%llu", config_entry->remaining); + snprintf(remaining_vals, sizeof(remaining_vals),"%" PRIu64, config_entry->remaining); /* set up our replace modify operation */ replace_val[0] = remaining_vals; @@ -2130,7 +2135,7 @@ int ret = 0; /* Try to set the new next range in the config entry. */ - snprintf(nextrange_value, sizeof(nextrange_value), "%llu-%llu", + snprintf(nextrange_value, sizeof(nextrange_value), "%" PRIu64 "-%" PRIu64, lower, upper); /* set up our replace modify operation */ @@ -2199,8 +2204,8 @@ int ret = 0; /* Setup the modify operation for the config entry */ - snprintf(maxval_val, sizeof(maxval_val),"%llu", config_entry->next_range_upper); - snprintf(nextval_val, sizeof(nextval_val),"%llu", config_entry->next_range_lower); + snprintf(maxval_val, sizeof(maxval_val),"%" PRIu64, config_entry->next_range_upper); + snprintf(nextval_val, sizeof(nextval_val),"%" PRIu64, config_entry->next_range_lower); maxval_vals[0] = maxval_val; maxval_vals[1] = 0; @@ -2817,8 +2822,8 @@ char highstr[16]; /* Create the exop response */ - snprintf(lowstr, sizeof(lowstr), "%llu", lower); - snprintf(highstr, sizeof(highstr), "%llu", upper); + snprintf(lowstr, sizeof(lowstr), "%" PRIu64, lower); + snprintf(highstr, sizeof(highstr), "%" PRIu64, upper); range_low.bv_val = lowstr; range_low.bv_len = strlen(range_low.bv_val); range_high.bv_val = highstr; @@ -2846,12 +2851,12 @@ slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, respdata); /* send the response ourselves */ - send_ldap_result( pb, ret, NULL, NULL, 0, NULL ); + slapi_send_ldap_result( pb, ret, NULL, NULL, 0, NULL ); ret = SLAPI_PLUGIN_EXTENDED_SENT_RESULT; ber_bvfree(respdata); slapi_log_error(SLAPI_LOG_PLUGIN, DNA_PLUGIN_SUBSYSTEM, - "dna_extend_exop: Released range %llu-%llu.\n", + "dna_extend_exop: Released range %" PRIu64 "-%" PRIu64 ".\n", lower, upper); } @@ -2993,7 +2998,7 @@ *lower = *upper - release + 1; /* try to set the new maxval in the config entry */ - snprintf(max_value, sizeof(max_value),"%llu", (*lower - 1)); + snprintf(max_value, sizeof(max_value),"%" PRIu64, (*lower - 1)); /* set up our replace modify operation */ replace_val[0] = max_value; @@ -3092,11 +3097,11 @@ printf("<---- filter ---------> %s\n", entry->filter); printf("<---- prefix ---------> %s\n", entry->prefix); printf("<---- scope ----------> %s\n", entry->scope); - printf("<---- next value -----> %llu\n", entry->nextval); - printf("<---- max value ------> %llu\n", entry->maxval); - printf("<---- interval -------> %llu\n", entry->interval); + printf("<---- next value -----> %" PRIu64 "\n", entry->nextval); + printf("<---- max value ------> %" PRIu64 "\n", entry->maxval); + printf("<---- interval -------> %" PRIu64 "\n", entry->interval); printf("<---- generate flag --> %s\n", entry->generate); printf("<---- shared cfg base > %s\n", entry->shared_cfg_base); printf("<---- shared cfg DN --> %s\n", entry->shared_cfg_dn); - printf("<---- threshold -----> %llu", entry->threshold); + printf("<---- threshold ------> %" PRIu64 "", entry->threshold); } From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/presence presence.c, 1.6, 1.7 Message-ID: <20081008172934.D0A547012E@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/presence In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/presence Modified Files: presence.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: presence.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/presence/presence.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- presence.c 10 Nov 2006 23:45:09 -0000 1.6 +++ presence.c 8 Oct 2008 17:29:02 -0000 1.7 @@ -66,13 +66,7 @@ /*** from proto-slap.h ***/ -int slapd_log_error_proc( char *subsystem, char *fmt, ... ) -#ifdef __GNUC__ - __attribute__ ((format (printf, 2, 3))); -#else - ; -#endif - +int slapd_log_error_proc( char *subsystem, char *fmt, ... ); /*** from ldaplog.h ***/ @@ -346,7 +340,6 @@ int presence_start( Slapi_PBlock *pb ) { char * plugindn = NULL; - char * httpRootDir = NULL; LDAPDebug( LDAP_DEBUG_PLUGIN, "--> presence_start -- begin\n",0,0,0); @@ -1105,7 +1098,6 @@ { int status; int props = SLAPI_ATTR_FLAG_OPATTR; - Slapi_Attr *attr = NULL; Slapi_ValueSet *results = NULL; int type_name_disposition = 0; char *actual_type_name = 0; @@ -1150,7 +1142,6 @@ v = slapi_value_get_berval(val); if (v) { char *ldifvalue; - size_t attrnamelen = strlen( attrname ); LDAPDebug( LDAP_DEBUG_PLUGIN, "----------> %s size [%d] \n", attrname,v->bv_len,0); From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_instance.c, 1.9, 1.10 Message-ID: <20081008172934.2E238700E1@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/chainingdb Modified Files: cb_instance.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: cb_instance.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- cb_instance.c 27 Jun 2008 19:28:22 -0000 1.9 +++ cb_instance.c 8 Oct 2008 17:29:01 -0000 1.10 @@ -903,7 +903,7 @@ static void *cb_instance_sizelimit_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->sizelimit; @@ -916,10 +916,10 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->sizelimit=(int) value; + inst->sizelimit=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); if (inst->inst_be) - be_set_sizelimit(inst->inst_be, (int) value); + be_set_sizelimit(inst->inst_be, (int) ((uintptr_t)value)); } return LDAP_SUCCESS; } @@ -927,7 +927,7 @@ static void *cb_instance_timelimit_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->timelimit; @@ -940,10 +940,10 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->timelimit=(int) value; + inst->timelimit=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); if (inst->inst_be) - be_set_timelimit(inst->inst_be, (int) value); + be_set_timelimit(inst->inst_be, (int) ((uintptr_t)value)); } return LDAP_SUCCESS; } @@ -951,7 +951,7 @@ static void *cb_instance_max_test_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->max_test_time; @@ -964,7 +964,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->max_test_time=(int) value; + inst->max_test_time=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -973,7 +973,7 @@ static void *cb_instance_max_idle_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->max_idle_time; @@ -986,7 +986,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->max_idle_time=(int) value; + inst->max_idle_time=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -996,7 +996,7 @@ static void *cb_instance_hoplimit_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->hoplimit; @@ -1009,7 +1009,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->hoplimit=(int) value; + inst->hoplimit=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1018,7 +1018,7 @@ static void *cb_instance_maxbconn_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->bind_pool->conn.maxconnections; @@ -1031,7 +1031,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->bind_pool->conn.maxconnections=(int) value; + inst->bind_pool->conn.maxconnections=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1040,7 +1040,7 @@ static void *cb_instance_maxconn_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->pool->conn.maxconnections; @@ -1053,7 +1053,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->pool->conn.maxconnections=(int) value; + inst->pool->conn.maxconnections=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1062,7 +1062,7 @@ static void *cb_instance_abandonto_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->abandon_timeout.tv_sec; @@ -1084,7 +1084,7 @@ } PR_RWLock_Wlock(inst->rwl_config_lock); - inst->abandon_timeout.tv_sec=(int) value; + inst->abandon_timeout.tv_sec=(int) ((uintptr_t)value); inst->abandon_timeout.tv_usec=0; PR_RWLock_Unlock(inst->rwl_config_lock); } @@ -1094,7 +1094,7 @@ static void *cb_instance_maxbconc_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->bind_pool->conn.maxconcurrency; @@ -1107,7 +1107,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->bind_pool->conn.maxconcurrency=(int) value; + inst->bind_pool->conn.maxconcurrency=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1116,7 +1116,7 @@ static void *cb_instance_maxconc_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->pool->conn.maxconcurrency; @@ -1129,7 +1129,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->pool->conn.maxconcurrency=(int) value; + inst->pool->conn.maxconcurrency=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1138,7 +1138,7 @@ static void *cb_instance_imperson_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data = inst->impersonate; @@ -1153,7 +1153,7 @@ if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->impersonate=(int) value; + inst->impersonate=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } else { /* Security check: Make sure the proxing user is */ @@ -1162,7 +1162,7 @@ char * rootdn=cb_get_rootdn(); PR_RWLock_Rlock(inst->rwl_config_lock); - if (((int) value) && inst->pool && inst->pool->binddn && + if (((int) ((uintptr_t)value)) && inst->pool && inst->pool->binddn && !strcmp(inst->pool->binddn,rootdn)) { /* UTF-8 aware */ rc=LDAP_UNWILLING_TO_PERFORM; if (errorbuf) @@ -1179,7 +1179,7 @@ static void *cb_instance_connlife_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->pool->conn.connlifetime; @@ -1192,7 +1192,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->pool->conn.connlifetime=(int) value; + inst->pool->conn.connlifetime=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1201,7 +1201,7 @@ static void *cb_instance_bindto_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->bind_pool->conn.op_timeout.tv_sec; @@ -1214,12 +1214,12 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->bind_pool->conn.op_timeout.tv_sec=(int) value; + inst->bind_pool->conn.op_timeout.tv_sec=(int) ((uintptr_t)value); inst->bind_pool->conn.op_timeout.tv_usec=0; - inst->bind_pool->conn.bind_timeout.tv_sec=(int) value; + inst->bind_pool->conn.bind_timeout.tv_sec=(int) ((uintptr_t)value); inst->bind_pool->conn.bind_timeout.tv_usec=0; /* Used to bind to the farm server */ - inst->pool->conn.bind_timeout.tv_sec=(int) value; + inst->pool->conn.bind_timeout.tv_sec=(int) ((uintptr_t)value); inst->pool->conn.bind_timeout.tv_usec=0; PR_RWLock_Unlock(inst->rwl_config_lock); } @@ -1229,7 +1229,7 @@ static void *cb_instance_opto_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->pool->conn.op_timeout.tv_sec; @@ -1242,7 +1242,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->pool->conn.op_timeout.tv_sec=(int) value; + inst->pool->conn.op_timeout.tv_sec=(int) ((uintptr_t)value); inst->pool->conn.op_timeout.tv_usec=0; PR_RWLock_Unlock(inst->rwl_config_lock); } @@ -1252,7 +1252,7 @@ static void *cb_instance_ref_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->searchreferral; @@ -1265,7 +1265,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->searchreferral=(int) value; + inst->searchreferral=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1274,7 +1274,7 @@ static void *cb_instance_acl_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->local_acl; @@ -1295,7 +1295,7 @@ return LDAP_SUCCESS; } PR_RWLock_Wlock(inst->rwl_config_lock); - inst->local_acl=(int) value; + inst->local_acl=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1304,7 +1304,7 @@ static void *cb_instance_bindretry_get(void *arg) { cb_backend_instance * inst=(cb_backend_instance *) arg; - int data; + uintptr_t data; PR_RWLock_Rlock(inst->rwl_config_lock); data=inst->bind_retry; @@ -1317,7 +1317,7 @@ cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { PR_RWLock_Wlock(inst->rwl_config_lock); - inst->bind_retry=(int) value; + inst->bind_retry=(int) ((uintptr_t)value); PR_RWLock_Unlock(inst->rwl_config_lock); } return LDAP_SUCCESS; @@ -1383,7 +1383,7 @@ } else { int_val = cb_atoi((char *)bval->bv_val); } - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; case CB_CONFIG_TYPE_INT_OCTAL: if (use_default) { @@ -1391,7 +1391,7 @@ } else { int_val = (int) strtol((char *)bval->bv_val, NULL, 8); } - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; case CB_CONFIG_TYPE_LONG: if (use_default) { @@ -1414,7 +1414,7 @@ } else { int_val = !strcasecmp((char *) bval->bv_val, "on"); } - retval = config->config_set_fn(arg, (void *) int_val, err_buf, phase, apply_mod); + retval = config->config_set_fn(arg, (void *) ((uintptr_t)int_val), err_buf, phase, apply_mod); break; } return retval; @@ -1435,10 +1435,10 @@ switch(config->config_type) { case CB_CONFIG_TYPE_INT: - sprintf(buf, "%d", (int) config->config_get_fn(arg)); + sprintf(buf, "%d", (int) ((uintptr_t)config->config_get_fn(arg))); break; case CB_CONFIG_TYPE_INT_OCTAL: - sprintf(buf, "%o", (int) config->config_get_fn(arg)); + sprintf(buf, "%o", (int) ((uintptr_t)config->config_get_fn(arg))); break; case CB_CONFIG_TYPE_LONG: sprintf(buf, "%ld", (long) config->config_get_fn(arg)); @@ -1451,7 +1451,7 @@ slapi_ch_free((void **)&tmp_string); break; case CB_CONFIG_TYPE_ONOFF: - if ((int) config->config_get_fn(arg)) { + if ((int) ((uintptr_t)config->config_get_fn(arg))) { sprintf(buf,"%s","on"); } else { sprintf(buf,"%s","off"); From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/pam_passthru pam_ptimpl.c, 1.11, 1.12 Message-ID: <20081008172934.75A0070127@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/pam_passthru Modified Files: pam_ptimpl.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: pam_ptimpl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptimpl.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- pam_ptimpl.c 18 Oct 2007 00:08:30 -0000 1.11 +++ pam_ptimpl.c 8 Oct 2008 17:29:02 -0000 1.12 @@ -177,7 +177,7 @@ * tell if this is actually the case. */ static int -pam_conv_func(int num_msg, struct pam_message **msg, struct pam_response **resp, void *mydata) +pam_conv_func(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *mydata) { int ii; struct berval *creds; From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/passthru ptconfig.c, 1.8, 1.9 Message-ID: <20081008172934.AA4F170129@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/passthru In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/passthru Modified Files: ptconfig.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: ptconfig.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/passthru/ptconfig.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ptconfig.c 14 Nov 2007 17:53:44 -0000 1.8 +++ ptconfig.c 8 Oct 2008 17:29:02 -0000 1.9 @@ -102,7 +102,7 @@ passthru_config( int argc, char **argv ) { int i, j, rc, tosecs, using_def_connlifetime; - char *p, **suffixarray; + char **suffixarray; PassThruServer *prevsrvr, *srvr; PassThruSuffix *suffix, *prevsuffix; LDAPURLDesc *ludp; @@ -144,7 +144,7 @@ and that the url does not look like this: ldap://host also assumes suffixes do not have any / in them */ - if (p = strrchr(srvr->ptsrvr_url, '/')) { /* look for last / */ + if ((p = strrchr(srvr->ptsrvr_url, '/'))) { /* look for last / */ p = strchr(p, ' '); /* look for first space after last / */ if (p) { if (!strchr(p, ',')) { /* no comma */ From rmeggins at fedoraproject.org Wed Oct 8 17:29:03 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:03 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl aclparse.c, 1.11, 1.12 aclutil.c, 1.8, 1.9 Message-ID: <20081008172934.0AB1F70123@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/acl Modified Files: aclparse.c aclutil.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: aclparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- aclparse.c 24 Oct 2007 18:41:15 -0000 1.11 +++ aclparse.c 8 Oct 2008 17:29:01 -0000 1.12 @@ -936,8 +936,8 @@ * eg. "'ldap:///all"' or 'ldap:///all")' then exit in_dn_expr mode. */ if ( in_dn_expr && (word[len-1] == '"' || - len>1 && word[len-2] == '"' || - len>2 && word[len-3] == '"')) { + (len>1 && word[len-2] == '"') || + (len>2 && word[len-3] == '"')) ) { in_dn_expr = 0; } @@ -1692,7 +1692,7 @@ if ((str = strstr(s , "del=")) || ((str = strstr(s , "del ="))) ) { str--; *str = '\0'; - *str++; + str++; } @@ -1704,7 +1704,7 @@ if ((str = strstr(s , "add=")) || ((str = strstr(s , "add ="))) ) { str--; *str = '\0'; - *str++; + str++; } } else { return(ACL_SYNTAX_ERR); Index: aclutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclutil.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- aclutil.c 18 Oct 2007 00:08:27 -0000 1.8 +++ aclutil.c 8 Oct 2008 17:29:01 -0000 1.9 @@ -1328,13 +1328,14 @@ PLHashNumber key, char *value){ char *old_value = NULL; + uintptr_t pkey = (uintptr_t)key; if ( (old_value = (char *)acl_ht_lookup( acl_ht, key)) != NULL ) { acl_ht_remove( acl_ht, key); slapi_ch_free((void **)&old_value); } - PL_HashTableAdd( acl_ht, (const void *)key, value); + PL_HashTableAdd( acl_ht, (const void *)pkey, value); } /* @@ -1349,7 +1350,7 @@ static PLHashNumber acl_ht_hash( const void *key) { - return( (PLHashNumber)key ); + return( (PLHashNumber)((uintptr_t)key) ); } /* Free all the values in the ht */ @@ -1397,14 +1398,14 @@ /* remove this entry from the ht--doesn't free the value.*/ void acl_ht_remove( acl_ht_t *acl_ht, PLHashNumber key) { - PL_HashTableRemove( acl_ht, (const void *)key); + PL_HashTableRemove( acl_ht, (const void *)((uintptr_t)key) ); } /* Retrieve a pointer to the value of the entry with key */ void *acl_ht_lookup( acl_ht_t *acl_ht, PLHashNumber key) { - return( PL_HashTableLookup( acl_ht, (const void *)key) ); + return( PL_HashTableLookup( acl_ht, (const void *)((uintptr_t)key)) ); } From rmeggins at fedoraproject.org Wed Oct 8 17:29:03 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:03 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver configure.ac, 1.50, 1.51 aclocal.m4, 1.71, 1.72 configure, 1.88, 1.89 config.h.in, 1.18, 1.19 missing, 1.53, 1.54 install-sh, 1.53, 1.54 depcomp, 1.53, 1.54 compile, 1.48, 1.49 config.sub, 1.52, 1.53 config.guess, 1.52, 1.53 Makefile.in, 1.93, 1.94 Message-ID: <20081008172933.E1082700E1@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver Modified Files: configure.ac aclocal.m4 configure config.h.in missing install-sh depcomp compile config.sub config.guess Makefile.in Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- configure.ac 23 Sep 2008 21:50:25 -0000 1.50 +++ configure.ac 8 Oct 2008 17:29:00 -0000 1.51 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) # This version is the version returned by ns-slapd -v -AC_INIT([dirsrv], [1.1.3], [http://bugzilla.redhat.com/]) +AC_INIT([dirsrv], [1.1.4], [http://bugzilla.redhat.com/]) # AC_CONFIG_HEADER must be called right after AC_INIT. AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) @@ -21,7 +21,7 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- configure 23 Sep 2008 21:50:25 -0000 1.88 +++ configure 8 Oct 2008 17:29:00 -0000 1.89 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv 1.1.3. +# Generated by GNU Autoconf 2.59 for dirsrv 1.1.4. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv' PACKAGE_TARNAME='dirsrv' -PACKAGE_VERSION='1.1.3' -PACKAGE_STRING='dirsrv 1.1.3' +PACKAGE_VERSION='1.1.4' +PACKAGE_STRING='dirsrv 1.1.4' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' # Factoring default headers for most tests. @@ -954,7 +954,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dirsrv 1.1.3 to adapt to many kinds of systems. +\`configure' configures dirsrv 1.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1020,7 +1020,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dirsrv 1.1.3:";; + short | recursive ) echo "Configuration of dirsrv 1.1.4:";; esac cat <<\_ACEOF @@ -1203,7 +1203,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dirsrv configure 1.1.3 +dirsrv configure 1.1.4 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1217,7 +1217,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dirsrv $as_me 1.1.3, which was +It was created by dirsrv $as_me 1.1.4, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1863,7 +1863,7 @@ # Define the identity of the package. PACKAGE='dirsrv' - VERSION='1.1.3' + VERSION='1.1.4' cat >>confdefs.h <<_ACEOF @@ -19369,7 +19369,8 @@ -for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h + +for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -25795,7 +25796,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv $as_me 1.1.3, which was +This file was extended by dirsrv $as_me 1.1.4, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25858,7 +25859,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dirsrv config.status 1.1.3 +dirsrv config.status 1.1.4 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" From rmeggins at fedoraproject.org Wed Oct 8 17:29:04 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/pwdstorage crypt_pwd.c, 1.6, 1.7 Message-ID: <20081008172934.E4DA27013D@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/pwdstorage Modified Files: crypt_pwd.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: crypt_pwd.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pwdstorage/crypt_pwd.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- crypt_pwd.c 10 Nov 2006 23:45:10 -0000 1.6 +++ crypt_pwd.c 8 Oct 2008 17:29:02 -0000 1.7 @@ -53,7 +53,9 @@ #else #include #if defined( hpux ) || defined ( AIX ) || defined (LINUX) || defined (OSF1) +#ifndef __USE_XOPEN #define __USE_XOPEN /* linux */ +#endif /* __USE_XOPEN */ #include #else /* hpux */ #include From rmeggins at fedoraproject.org Wed Oct 8 17:29:05 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:05 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.21, 1.22 repl5_agmt.c, 1.12, 1.13 repl5_connection.c, 1.8, 1.9 repl5_protocol_util.c, 1.12, 1.13 repl5_replica.c, 1.17, 1.18 repl5_updatedn_list.c, 1.5, 1.6 Message-ID: <20081008172935.6BD8A70123@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/replication Modified Files: cl5_api.c repl5_agmt.c repl5_connection.c repl5_protocol_util.c repl5_replica.c repl5_updatedn_list.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- cl5_api.c 19 Nov 2007 17:23:50 -0000 1.21 +++ cl5_api.c 8 Oct 2008 17:29:02 -0000 1.22 @@ -3376,8 +3376,6 @@ */ static int _cl5Upgrade4_4(char *fromVersion, char *toVersion) { - PRDirEntry *entry = NULL; - DB *thisdb = NULL; CL5OpenMode backup; int rc = 0; Index: repl5_agmt.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_agmt.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- repl5_agmt.c 28 Sep 2007 22:41:09 -0000 1.12 +++ repl5_agmt.c 8 Oct 2008 17:29:02 -0000 1.13 @@ -1183,7 +1183,7 @@ { char *this_attr = NULL; int i = 0; - for (i = 0; this_attr = frac_attrs[i]; i++) + for (i = 0; (this_attr = frac_attrs[i]); i++) { if (charray_inlist(verbotten_attrs,this_attr)) { int k = 0; Index: repl5_connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_connection.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- repl5_connection.c 18 Oct 2007 00:08:31 -0000 1.8 +++ repl5_connection.c 8 Oct 2008 17:29:03 -0000 1.9 @@ -1728,7 +1728,7 @@ char msg[SLAPI_DSE_RETURNTEXT_SIZE]; if (eqctx && !*setlevel) { - int found = slapi_eq_cancel(eqctx); + (void)slapi_eq_cancel(eqctx); } if (s_debug_timeout && s_debug_level && *setlevel) { Index: repl5_protocol_util.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_protocol_util.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- repl5_protocol_util.c 3 Mar 2008 18:35:11 -0000 1.12 +++ repl5_protocol_util.c 8 Oct 2008 17:29:03 -0000 1.13 @@ -417,7 +417,8 @@ } } } -error: + +/* error: */ if (NULL != ruv_bervals) ber_bvecfree(ruv_bervals); if (NULL != replarea_sdn) Index: repl5_replica.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- repl5_replica.c 24 Jun 2008 22:22:09 -0000 1.17 +++ repl5_replica.c 8 Oct 2008 17:29:03 -0000 1.18 @@ -1076,7 +1076,7 @@ rc = csngen_adjust_time (gen, csn); /* rc will be either CSN_SUCCESS (0) or clock skew */ -done: +/* done: */ PR_Unlock(r->repl_lock); if (csn != extracsn) /* do not free the given csn */ Index: repl5_updatedn_list.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_updatedn_list.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- repl5_updatedn_list.c 10 Nov 2006 23:45:17 -0000 1.5 +++ repl5_updatedn_list.c 8 Oct 2008 17:29:03 -0000 1.6 @@ -193,7 +193,7 @@ /* Bug 605169 - null ndn would cause core dump */ if ( ndn ) { - ret = (PRBool)PL_HashTableLookupConst(hash, ndn); + ret = (PRBool)((uintptr_t)PL_HashTableLookupConst(hash, ndn)); } return ret; From rmeggins at fedoraproject.org Wed Oct 8 17:29:05 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Wed, 8 Oct 2008 17:29:05 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/roles roles_plugin.c, 1.8, 1.9 Message-ID: <20081008172935.68807700E1@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/roles In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26931/ldapserver/ldap/servers/plugins/roles Modified Files: roles_plugin.c Log Message: Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: The intptr_t and uintptr_t are types which are defined as integer types that are the same size as the pointer (void *) type. On the platforms we currently support, this is the same as long and unsigned long, respectively (ILP32 and LP64). However, intptr_t and uintptr_t are more portable. These can be used to assign a value passed as a void * to get an integer value, then "cast down" to an int or PRBool, and vice versa. This seems to be a common idiom in other applications where values must be passed as void *. For the printf/scanf formats, there is a standard header called inttypes.h which defines formats to use for various 64 bit quantities, so that you don't need to figure out if you have to use %lld or %ld for a 64-bit value - you just use PRId64 which is set to the correct value. I also assumed that size_t is defined as the same size as a pointer so I used the PRIuPTR format macro for size_t. I removed many unused variables and some unused functions. I put parentheses around assignments in conditional expressions to tell the compiler not to complain about them. I cleaned up some #defines that were defined more than once. I commented out some unused goto labels. Some of our header files shared among several source files define static variables. I made it so that those variables are not defined unless a macro is set in the source file. This avoids a lot of unused variable warnings. I added some return values to functions that were declared as returning a value but did not return a value. In all of these cases no one was checking the return value anyway. I put explicit parentheses around cases like this: expr || expr && expr - the && has greater precedence than the ||. The compiler complains because it wants you to make sure you mean expr || (expr && expr), not (expr || expr) && expr. I cleaned up several places where the compiler was complaining about possible use of uninitialized variables. There are still a lot of these cases remaining. There are a lot of warnings like this: lib/ldaputil/certmap.c:1279: warning: dereferencing type-punned pointer will break strict-aliasing rules These are due to our use of void ** to pass in addresses of addresses of structures. Many of these are calls to slapi_ch_free, but many are not - they are cases where we do not know what the type is going to be and may have to cast and modify the structure or pointer. I started replacing the calls to slapi_ch_free with slapi_ch_free_string, but there are many many more that need to be fixed. The dblayer code also contains a fix for https://bugzilla.redhat.com/show_bug.cgi?id=463991 - instead of checking for dbenv->foo_handle to see if a db "feature" is enabled, instead check the flags passed to open the dbenv. This works for bdb 4.2 through bdb 4.7 and probably other releases as well. Platforms tested: RHEL5 x86_64, Fedora 8 i386 Flag Day: no Doc impact: no Index: roles_plugin.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_plugin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- roles_plugin.c 12 Oct 2007 18:03:43 -0000 1.8 +++ roles_plugin.c 8 Oct 2008 17:29:03 -0000 1.9 @@ -50,15 +50,9 @@ #include "vattr_spi.h" #include "roles_cache.h" +#define DEFINE_STATECHANGE_STATICS 1 #include "statechange.h" - -#ifdef SOURCEFILE -#undef SOURCEFILE -#endif -#define SOURCEFILE "roles_plugin.c" -static char *sourcefile = SOURCEFILE; - #define STATECHANGE_ROLES_ID "Roles" #define STATECHANGE_ROLES_CONFG_FILTER "objectclass=nsRoleDefinition" #define STATECHANGE_ROLES_ENTRY_FILTER "objectclass=*" From rmeggins at fedoraproject.org Thu Oct 9 14:57:35 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Thu, 9 Oct 2008 14:57:35 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldif2ldbm.c, 1.17, 1.18 Message-ID: <20081009145735.36B5E70122@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26015 Modified Files: ldif2ldbm.c Log Message: Resolves: bug 454030 Description: Need to address 64-bit compiler warnings - part 1 Fix Description: missed one line from my previous commit Index: ldif2ldbm.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ldif2ldbm.c 8 Oct 2008 17:29:04 -0000 1.17 +++ ldif2ldbm.c 9 Oct 2008 14:57:32 -0000 1.18 @@ -269,7 +269,7 @@ int import_subcount_mother_init(import_subcount_stuff *mothers, ID parent_id, size_t count) { - PR_ASSERT(NULL == PL_HashTableLookup(mothers->hashtable,(void*)parent_id)); + PR_ASSERT(NULL == PL_HashTableLookup(mothers->hashtable,(void*)((uintptr_t)parent_id))); PL_HashTableAdd(mothers->hashtable,(void*)((uintptr_t)parent_id),(void*)count); return 0; } From rmeggins at fedoraproject.org Thu Oct 9 17:40:16 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Thu, 9 Oct 2008 17:40:16 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.16, 1.17 dblayer.c, 1.28, 1.29 perfctrs.c, 1.10, 1.11 proto-back-ldbm.h, 1.14, 1.15 Message-ID: <20081009174016.D892970126@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11117/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h dblayer.c perfctrs.c proto-back-ldbm.h Log Message: Resolves: bug 454030, bug 463991 Bug Description: Need to address 64-bit compiler warnings - part 1 Reviewed by: nhosoi (Thanks!) Fix Description: I inadvertantly committed fixes for 463991 along with fixes for 454030, and the fixes for 463991 broke the server. This commit makes the server work again. Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- back-ldbm.h 8 Oct 2008 17:29:03 -0000 1.16 +++ back-ldbm.h 9 Oct 2008 17:40:14 -0000 1.17 @@ -114,16 +114,6 @@ #define MEGABYTE (1024 * 1024) #define GIGABYTE (1024 * MEGABYTE) -#define DB_USES_LOCKING(env) \ - (DB_INIT_LOCK & ((env)->get_open_flags((env), NULL))) -#define DB_USES_TRANSACTIONS(env) \ - (DB_INIT_TXN & ((env)->get_open_flags((env), NULL))) -#define DB_USES_MPOOL(env) \ - (DB_INIT_MPOOL & ((env)->get_open_flags((env), NULL))) -#define DB_USES_LOGGING(env) \ - (DB_INIT_LOG & ((env)->get_open_flags((env), NULL))) - - /* include NSPR header files */ #include "nspr.h" #include "plhash.h" Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- dblayer.c 8 Oct 2008 17:29:03 -0000 1.28 +++ dblayer.c 9 Oct 2008 17:40:14 -0000 1.29 @@ -277,6 +277,31 @@ return slapi_berval_cmp(&bv1, &bv2); } +static int db_uses_feature(DB_ENV *db_env, u_int32_t flags) +{ + u_int32_t openflags = 0; + PR_ASSERT(db_env); + (*db_env->get_open_flags)(db_env, &openflags); + + return (flags & openflags); +} + +int dblayer_db_uses_locking(DB_ENV *db_env) { + return db_uses_feature(db_env, DB_INIT_LOCK); +} + +int dblayer_db_uses_transactions(DB_ENV *db_env) { + return db_uses_feature(db_env, DB_INIT_TXN); +} + +int dblayer_db_uses_mpool(DB_ENV *db_env) { + return db_uses_feature(db_env, DB_INIT_MPOOL); +} + +int dblayer_db_uses_logging(DB_ENV *db_env) { + return db_uses_feature(db_env, DB_INIT_LOG); +}; + /* this flag use if user remotely turned batching off */ #define FLUSH_REMOTEOFF -1 @@ -3456,7 +3481,7 @@ { if (priv->dblayer_enable_transactions) { - if (DB_USES_LOCKING(priv->dblayer_env->dblayer_DB_ENV)) { + if (dblayer_db_uses_locking(priv->dblayer_env->dblayer_DB_ENV)) { int aborted; if ((rval = LOCK_DETECT(priv->dblayer_env->dblayer_DB_ENV, 0, @@ -3626,7 +3651,7 @@ checkpoint_interval) continue; - if (!DB_USES_TRANSACTIONS(priv->dblayer_env->dblayer_DB_ENV)) + if (!dblayer_db_uses_transactions(priv->dblayer_env->dblayer_DB_ENV)) continue; /* now checkpoint */ @@ -3784,7 +3809,7 @@ DS_Sleep(interval); /* 622855: wait for other threads fully started */ if (priv->dblayer_enable_transactions) { - if ( DB_USES_MPOOL(priv->dblayer_env->dblayer_DB_ENV) && + if ( dblayer_db_uses_mpool(priv->dblayer_env->dblayer_DB_ENV) && (0 != priv->dblayer_trickle_percentage) ) { int pages_written = 0; Index: perfctrs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/perfctrs.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- perfctrs.c 8 Oct 2008 17:29:04 -0000 1.10 +++ perfctrs.c 9 Oct 2008 17:40:14 -0000 1.11 @@ -296,7 +296,7 @@ return; } /* Call libdb to get the various stats */ - if (DB_USES_LOGGING(db_env)) + if (dblayer_db_uses_logging(db_env)) { DB_LOG_STAT *logstat = NULL; ret = LOG_STAT(db_env,&logstat,0,malloc); @@ -307,7 +307,7 @@ } free(logstat); } - if (DB_USES_TRANSACTIONS(db_env)) + if (dblayer_db_uses_transactions(db_env)) { DB_TXN_STAT *txnstat = NULL; ret = TXN_STAT(db_env, &txnstat, 0, malloc); @@ -320,7 +320,7 @@ if (txnstat) free(txnstat); } - if (DB_USES_LOCKING(db_env)) + if (dblayer_db_uses_locking(db_env)) { DB_LOCK_STAT *lockstat = NULL; ret = LOCK_STAT(db_env,&lockstat,0,malloc); @@ -338,7 +338,7 @@ } free(lockstat); } - if (DB_USES_MPOOL(db_env)) + if (dblayer_db_uses_mpool(db_env)) { DB_MPOOL_STAT *mpstat = NULL; ret = MEMP_STAT(db_env,&mpstat,NULL,0,malloc); Index: proto-back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- proto-back-ldbm.h 2 Oct 2007 18:39:51 -0000 1.14 +++ proto-back-ldbm.h 9 Oct 2008 17:40:14 -0000 1.15 @@ -166,6 +166,10 @@ char *buf, int buflen); void autosize_import_cache(struct ldbminfo *li); +int dblayer_db_uses_locking(DB_ENV *db_env); +int dblayer_db_uses_transactions(DB_ENV *db_env); +int dblayer_db_uses_mpool(DB_ENV *db_env); +int dblayer_db_uses_logging(DB_ENV *db_env); /* * dn2entry.c From rmeggins at fedoraproject.org Mon Oct 13 16:32:46 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Mon, 13 Oct 2008 16:32:46 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver configure.ac, 1.51, 1.52 aclocal.m4, 1.72, 1.73 configure, 1.89, 1.90 config.h.in, 1.19, 1.20 missing, 1.54, 1.55 install-sh, 1.54, 1.55 depcomp, 1.54, 1.55 compile, 1.49, 1.50 Makefile.in, 1.94, 1.95 config.sub, 1.53, 1.54 config.guess, 1.53, 1.54 Message-ID: <20081013163246.2DB4E7012E@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26598 Modified Files: configure.ac aclocal.m4 configure config.h.in missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: fix inttypes build breakage on HP-UX Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- configure.ac 8 Oct 2008 17:29:00 -0000 1.51 +++ configure.ac 13 Oct 2008 16:32:41 -0000 1.52 @@ -300,6 +300,7 @@ AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) + AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h]) # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -315,6 +316,7 @@ AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) + AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h]) # assume 64 bit initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- configure 8 Oct 2008 17:29:00 -0000 1.89 +++ configure 13 Oct 2008 16:32:41 -0000 1.90 @@ -23392,6 +23392,11 @@ #define _HPUX_SOURCE 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define _INCLUDE_STDC__SOURCE_199901 1 +_ACEOF + # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -23443,6 +23448,11 @@ #define _HPUX_SOURCE 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define _INCLUDE_STDC__SOURCE_199901 1 +_ACEOF + # assume 64 bit initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- config.h.in 8 Oct 2008 17:29:00 -0000 1.19 +++ config.h.in 13 Oct 2008 16:32:42 -0000 1.20 @@ -344,6 +344,9 @@ /* Source namespace */ #undef _HPUX_SOURCE +/* to pick up all of the printf format macros in inttypes.h */ +#undef _INCLUDE_STDC__SOURCE_199901 + /* POSIX revision */ #undef _POSIX_C_SOURCE From nhosoi at fedoraproject.org Wed Oct 15 06:30:13 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:13 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ancestorid.c, 1.5, 1.6 cache.c, 1.5, 1.6 dblayer.c, 1.29, 1.30 dbtest.c, 1.5, 1.6 id2entry.c, 1.6, 1.7 idl.c, 1.6, 1.7 import-merge.c, 1.9, 1.10 import-threads.c, 1.16, 1.17 import.c, 1.12, 1.13 index.c, 1.16, 1.17 instance.c, 1.7, 1.8 ldif2ldbm.c, 1.18, 1.19 monitor.c, 1.8, 1.9 nextid.c, 1.5, 1.6 perfctrs.c, 1.11, 1.12 seq.c, 1.5, 1.6 sort.c, 1.11, 1.12 vlv.c, 1.15, 1.16 vlv_srch.c, 1.8, 1.9 Message-ID: <20081015063014.4A00770147@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/slapd/back-ldbm Modified Files: ancestorid.c cache.c dblayer.c dbtest.c id2entry.c idl.c import-merge.c import-threads.c import.c index.c instance.c ldif2ldbm.c monitor.c nextid.c perfctrs.c seq.c sort.c vlv.c vlv_srch.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: ancestorid.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ancestorid.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ancestorid.c 10 Nov 2006 23:45:39 -0000 1.5 +++ ancestorid.c 15 Oct 2008 06:30:06 -0000 1.6 @@ -373,7 +373,7 @@ out: /* Free the entry value */ - if (data.data != NULL) free(data.data); + slapi_ch_free(&(data.data)); /* Release the id2entry file */ if (db != NULL) { Index: cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/cache.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cache.c 10 Nov 2006 23:45:39 -0000 1.5 +++ cache.c 15 Oct 2008 06:30:06 -0000 1.6 @@ -423,7 +423,7 @@ #define CACHE_FULL(cache) \ (((cache)->c_cursize > (cache)->c_maxsize) || \ (((cache)->c_maxentries > 0) && \ - ((cache)->c_curentries > cache->c_maxentries))) + ((cache)->c_curentries > (cache)->c_maxentries))) /* clear out the cache to make room for new entries Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- dblayer.c 9 Oct 2008 17:40:14 -0000 1.29 +++ dblayer.c 15 Oct 2008 06:30:06 -0000 1.30 @@ -772,6 +772,11 @@ } #endif +void dblayer_free(void *ptr) +{ + slapi_ch_free(&ptr); +} + static void dblayer_init_dbenv(DB_ENV *pEnv, dblayer_private *priv) { size_t mysize; @@ -797,7 +802,7 @@ pEnv->set_tx_max(pEnv, priv->dblayer_tx_max); #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 3300 - pEnv->set_alloc(pEnv, malloc, realloc, free); + pEnv->set_alloc(pEnv, (void *)slapi_ch_malloc, (void *)slapi_ch_realloc, dblayer_free); /* * The log region is used to store filenames and so needs to be @@ -2063,7 +2068,7 @@ } #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 3300 - return_value = dbp->set_malloc(dbp, malloc); + return_value = dbp->set_malloc(dbp, (void *)slapi_ch_malloc); if (0 != return_value) { LDAPDebug(LDAP_DEBUG_ANY, "dbp->set_malloc failed %d\n", @@ -2762,7 +2767,7 @@ goto out; #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 3300 - return_value = dbp->set_malloc(dbp, malloc); + return_value = dbp->set_malloc(dbp, (void *)slapi_ch_malloc); if (0 != return_value) { goto out; } @@ -3727,7 +3732,7 @@ /* find out which log files don't contain active txns */ DB_CHECKPOINT_LOCK(PR_TRUE, penv->dblayer_env_lock); return_value = LOG_ARCHIVE(penv->dblayer_DB_ENV, &list, - 0, malloc); + 0, (void *)slapi_ch_malloc); DB_CHECKPOINT_UNLOCK(PR_TRUE, penv->dblayer_env_lock); checkpoint_debug_message(debug_checkpointing, "Got list of logfiles not needed %d %p\n", @@ -3990,7 +3995,7 @@ env = priv->dblayer_env->dblayer_DB_ENV; PR_ASSERT(NULL != env); - return MEMP_STAT(env, gsp, fsp, 0, malloc); + return MEMP_STAT(env, gsp, fsp, 0, (void *)slapi_ch_malloc); } /* import wants this one */ @@ -4011,7 +4016,7 @@ } PR_ASSERT(NULL != env); - return MEMP_STAT(env, gsp, fsp, 0, malloc); + return MEMP_STAT(env, gsp, fsp, 0, (void *)slapi_ch_malloc); } /* Helper functions for recovery */ @@ -4954,7 +4959,7 @@ /* get the list of logfiles currently existing */ if (priv->dblayer_enable_transactions) { return_value = LOG_ARCHIVE(priv->dblayer_env->dblayer_DB_ENV, - &listA, DB_ARCH_LOG, malloc); + &listA, DB_ARCH_LOG, (void *)slapi_ch_malloc); if ((return_value != 0) || (listA == NULL)) { LDAPDebug(LDAP_DEBUG_ANY, "BAD: can't get list of logs\n", 0, 0, 0); @@ -4990,9 +4995,7 @@ slapi_task_log_notice(task, "ERROR: Instance dir is empty\n"); } - if (listA) { - free(listA); - } + slapi_ch_free((void **)&listA); dblayer_txn_abort(li,&txn); return -1; } @@ -5005,9 +5008,7 @@ "ERROR: error copying directory (%s -> %s): err=%d", inst_dirp, dest_dir, return_value); } - if (listA) { - free(listA); - } + slapi_ch_free((void **)&listA); dblayer_txn_abort(li,&txn); if (inst_dirp != inst_dir) slapi_ch_free_string(&inst_dirp); @@ -5019,11 +5020,11 @@ if (priv->dblayer_enable_transactions) { /* now, get the list of logfiles that still exist */ return_value = LOG_ARCHIVE(priv->dblayer_env->dblayer_DB_ENV, - &listB, DB_ARCH_LOG, malloc); + &listB, DB_ARCH_LOG, (void *)slapi_ch_malloc); if ((return_value != 0) || (listB == NULL)) { LDAPDebug(LDAP_DEBUG_ANY, "ERROR: can't get list of logs\n", 0, 0, 0); - free(listA); + slapi_ch_free((void **)&listA); dblayer_txn_abort(li,&txn); return return_value; } @@ -5107,14 +5108,8 @@ slapi_ch_free((void **)&pathname2); } - if (listA) { - free(listA); - listA = NULL; - } - if (listB) { - free(listB); - listB = NULL; - } + slapi_ch_free((void **)&listA); + slapi_ch_free((void **)&listB); } } while (!ok); Index: dbtest.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbtest.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dbtest.c 10 Nov 2006 23:45:39 -0000 1.5 +++ dbtest.c 15 Oct 2008 06:30:06 -0000 1.6 @@ -260,8 +260,8 @@ fprintf( outfp, "\tdata: %s\n", (char *)data.data ); } } - free( key.data ); - free( data.data ); + slapi_ch_free( &(key.data) ); + slapi_ch_free( &(data.data) ); } dbc->c_close(dbc); } Index: id2entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/id2entry.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- id2entry.c 10 Nov 2006 23:45:39 -0000 1.6 +++ id2entry.c 15 Oct 2008 06:30:06 -0000 1.7 @@ -103,7 +103,7 @@ /* store it */ rc = db->put( db, db_txn, &key, &data, 0); /* DBDB looks like we're freeing memory allocated by another DLL, which is bad */ - free( data.dptr ); + slapi_ch_free( &(data.dptr) ); dblayer_release_id2entry( be, db ); @@ -210,19 +210,30 @@ } do { *err = db->get( db, db_txn, &key, &data, 0 ); - if ( 0 != *err && - DB_NOTFOUND != *err && DB_LOCK_DEADLOCK != *err ) + if ( (0 != *err) && + (DB_NOTFOUND != *err) && (DB_LOCK_DEADLOCK != *err) ) { - LDAPDebug( LDAP_DEBUG_ANY, "id2entry error %d\n", - *err, 0, 0 ); + LDAPDebug( LDAP_DEBUG_ANY, + "id2entry: libdb returned error %d (%s)\n", + *err, dblayer_strerror( *err ), 0 ); } } - while ( DB_LOCK_DEADLOCK == *err && txn == NULL ); + while ( (DB_LOCK_DEADLOCK == *err) && (txn == NULL) ); - if ( 0 != *err && DB_NOTFOUND != *err && DB_LOCK_DEADLOCK != *err ) + if ( (0 != *err) && (DB_NOTFOUND != *err) && (DB_LOCK_DEADLOCK != *err) ) { - LDAPDebug( LDAP_DEBUG_ANY, "id2entry get error %d\n", - *err, 0, 0 ); + if ( (ENOMEM == *err) && (data.dptr == NULL) ) + { + /* + * Now we are setting slapi_ch_malloc and its friends to libdb + * by ENV->set_alloc in dblayer.c. As long as the functions are + * used by libdb, it won't reach here. + */ + LDAPDebug( LDAP_DEBUG_ANY, + "malloc failed in libdb; terminating the server; OS error %d (%s)\n", + *err, slapd_system_strerror( *err ), 0 ); + exit (1); + } dblayer_release_id2entry( be, db ); return( NULL ); } @@ -274,7 +285,7 @@ e = NULL; } - free( data.data ); + slapi_ch_free( &(data.data) ); dblayer_release_id2entry( be, db ); Index: idl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/idl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- idl.c 1 Dec 2006 21:57:57 -0000 1.6 +++ idl.c 15 Oct 2008 06:30:07 -0000 1.7 @@ -141,7 +141,7 @@ PR_ASSERT(NULL != priv->idl_rwlock); PR_DestroyRWLock(priv->idl_rwlock); #endif - free( a->ai_idl ); + slapi_ch_free( (void **)&(a->ai_idl) ); } return 0; } @@ -909,12 +909,8 @@ idl_check_indirect (idl, i, tmp, tmp2, "idl_insert_key", "overflow", key, id); - if ( k2.dptr != NULL ) { - free( k2.dptr ); - } - if ( k3.dptr != NULL ) { - free( k3.dptr ); - } + slapi_ch_free( (void **)&(k2.dptr) ); + slapi_ch_free( (void **)&(k3.dptr) ); idl_free( tmp ); idl_free( tmp2 ); idl_free( idl ); @@ -998,12 +994,8 @@ } } - if ( k2.dptr != NULL ) { - free( k2.dptr ); - } - if ( k3.dptr != NULL ) { - free( k3.dptr ); - } + slapi_ch_free( (void **)&(k2.dptr) ); + slapi_ch_free( (void **)&(k3.dptr) ); idl_free( idl ); idl_free( tmp ); idl_unlock_list(a->ai_idl,key); @@ -1065,12 +1057,8 @@ break; } - if ( k2.dptr != NULL ) { - free( k2.dptr ); - } - if ( k3.dptr != NULL ) { - free( k3.dptr ); - } + slapi_ch_free( (void **)&(k2.dptr) ); + slapi_ch_free( (void **)&(k3.dptr) ); idl_free( tmp ); idl_free( idl ); idl_unlock_list(a->ai_idl,key); @@ -1166,7 +1154,7 @@ /* Now store the continuation block */ ret = idl_store(be,db,&cont_key,this_cont_block,txn); idl_free(this_cont_block); - free(cont_key.data); + slapi_ch_free(&(cont_key.data)); if ( ret != 0 && ret != DB_LOCK_DEADLOCK ) { LDAPDebug( LDAP_DEBUG_ANY, "idl_store_block(%s) 1 BAD %d %s\n",key->data, ret, dblayer_strerror( ret )); @@ -1490,9 +1478,7 @@ } LDAPDebug( LDAP_DEBUG_TRACE, "<= idl_delete_key(%s,%lu) %d idl_fetch_one(contkey)\n", contkey.dptr, (u_long)id, rc ); - if ( contkey.dptr != NULL ) { - free( contkey.dptr ); - } + slapi_ch_free( (void **)&(contkey.dptr) ); return( rc ); } @@ -1572,9 +1558,7 @@ } idl_free( idl ); idl_free( didl ); - if ( contkey.dptr != NULL ) { - free( contkey.dptr ); - } + slapi_ch_free( (void **)&(contkey.dptr) ); idl_unlock_list(a->ai_idl,key); if ( rc != 0 && rc != DB_LOCK_DEADLOCK ) { Index: import-merge.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-merge.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- import-merge.c 8 Oct 2008 17:29:03 -0000 1.9 +++ import-merge.c 15 Oct 2008 06:30:07 -0000 1.10 @@ -100,12 +100,12 @@ thang->payload.idl = idl_fetch(be, db, key, NULL, NULL, &ret); PR_ASSERT(NULL != thang->payload.idl); } else { - free(value.data); - free(key->data); + slapi_ch_free(&(value.data)); + slapi_ch_free(&(key->data)); key->flags = DB_DBT_MALLOC; goto around; /* Just skip these */ } - free(value.data); + slapi_ch_free(&(value.data)); } else { if (DB_NOTFOUND == ret) { /* This means that we're at the end of the file */ @@ -189,7 +189,7 @@ (current_entry->file_referenced_list)[fileno] = 1; /* Because we merged the entries, we no longer need the * key, so free it */ - free(key->data); + slapi_ch_free(&(key->data)); goto done; } else { /* VLV case, we can see exact keys, this is not a bug ! */ @@ -573,7 +573,7 @@ /* Write the vlv index */ ret = output_file->put(output_file, NULL, &key, &(thang.payload.vlv_data),0); - free(thang.payload.vlv_data.data); + slapi_ch_free(&(thang.payload.vlv_data.data)); thang.payload.vlv_data.data = NULL; } else { /* Write the IDL index */ @@ -583,7 +583,7 @@ idl_free(thang.payload.idl); thang.payload.idl = NULL; } - free(key.data); + slapi_ch_free(&(key.data)); key.data = NULL; if (0 != ret) { /* Failed to write--- most obvious cause being out of Index: import-threads.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-threads.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- import-threads.c 8 Oct 2008 17:29:03 -0000 1.16 +++ import-threads.c 15 Oct 2008 06:30:07 -0000 1.17 @@ -734,7 +734,7 @@ } curr_entry++; temp_id = id_stored_to_internal((char *)key.data); - free(key.data); + slapi_ch_free(&(key.data)); /* call post-entry plugin */ plugin_call_entryfetch_plugins((char **) &data.dptr, &data.dsize); @@ -750,7 +750,7 @@ inst->inst_name, (u_long)temp_id, 0); continue; } - free(data.data); + slapi_ch_free(&(data.data)); /* generate uniqueid if necessary */ import_generate_uniqueid(job, e); Index: import.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- import.c 8 Oct 2008 17:29:03 -0000 1.12 +++ import.c 15 Oct 2008 06:30:07 -0000 1.13 @@ -135,7 +135,7 @@ job->fifo.item[i].entry = NULL; job->fifo.item[i].filename = NULL; } - free(job->fifo.item); + slapi_ch_free((void **)&job->fifo.item); job->fifo.item = NULL; } @@ -277,7 +277,7 @@ info->ai = a; if (NULL == info->name) { /* Memory allocation error */ - free(info); + FREE(info); return -1; } info->next = job->index_list; @@ -505,15 +505,15 @@ inst->inst_cache_hits = current_cache_hits; if (mpstat) - free(mpstat); + slapi_ch_free((void **)&mpstat); if (mpfstat) { #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR + DB_VERSION_PATCH <= 3204 /* In DB 3.2.4 and earlier, we need to free each element */ DB_MPOOL_FSTAT **tfsp; for (tfsp = mpfstat; *tfsp; tfsp++) - free(*tfsp); + slapi_ch_free((void **)tfsp); #endif - free(mpfstat); + slapi_ch_free((void **)&mpfstat); } } return cache_hit_ratio; Index: index.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- index.c 27 Aug 2008 21:05:44 -0000 1.16 +++ index.c 15 Oct 2008 06:30:08 -0000 1.17 @@ -187,7 +187,7 @@ if (0 != ret) { goto error; } - slapi_ch_free((void**)&bin->key.data ); + slapi_ch_free( &(bin->key.data) ); idl_free(bin->value); /* If we're already at allids, store an allids block to prevent needless accumulation of blocks */ if (old_idl && ALLIDS(old_idl)) { @@ -262,13 +262,11 @@ idl_free(bin->value); bin->value = NULL; } - if (bin->key.data) { - free(bin->key.data); - } + slapi_ch_free(&(bin->key.data)); } - free(handle->bins); + slapi_ch_free((void **)&(handle->bins)); /* Now free the handle */ - free(handle); + slapi_ch_free((void **)&handle); return 0; } @@ -334,7 +332,7 @@ retry: if (!(bin->key).data) { (bin->key).size = key->size; - (bin->key).data = malloc(key->size); + (bin->key).data = slapi_ch_malloc(key->size); if (NULL == bin->key.data) { return -1; } @@ -1018,7 +1016,7 @@ /* Means that we never allocated a new key */ ; } else { - free(saved_key); + slapi_ch_free(&saved_key); } } return ret; @@ -1248,7 +1246,7 @@ *err = dbc->c_get(dbc,&lowerkey,&data,DB_SET_RANGE); /* lowerkey, if allocated and needs freed */ DBT_FREE_PAYLOAD(data); if (old_lower_key_data != lowerkey.data) { - free(old_lower_key_data); + slapi_ch_free(&old_lower_key_data); } } /* If the seek above fails due to DB_NOTFOUND, this means that there are no keys @@ -2044,7 +2042,7 @@ for (bcnt = 0; b[bcnt] != NULL; bcnt++); /* allocate return array as big as a */ - c = (Slapi_Value**)calloc(acnt+1, sizeof(Slapi_Value*)); + c = (Slapi_Value**)slapi_ch_calloc(acnt+1, sizeof(Slapi_Value*)); if (acnt == 0) return c; /* sort a */ Index: instance.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/instance.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- instance.c 15 Mar 2007 18:21:43 -0000 1.7 +++ instance.c 15 Oct 2008 06:30:08 -0000 1.8 @@ -60,7 +60,7 @@ inst = (ldbm_instance *) slapi_ch_calloc(1, sizeof(ldbm_instance)); /* Record the name of this instance. */ - inst->inst_name = strdup(name); + inst->inst_name = slapi_ch_strdup(name); /* initialize the entry cache */ if (! cache_init(&(inst->inst_cache), DEFAULT_CACHE_SIZE, Index: ldif2ldbm.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ldif2ldbm.c 9 Oct 2008 14:57:32 -0000 1.18 +++ ldif2ldbm.c 15 Oct 2008 06:30:08 -0000 1.19 @@ -463,7 +463,7 @@ key.flags = DB_DBT_MALLOC; ret = dbc->c_get(dbc,&key,&data,DB_NEXT_NODUP); if (NULL != data.data) { - free(data.data); + slapi_ch_free(&(data.data)); data.data = NULL; } if (0 != ret) { @@ -471,7 +471,7 @@ ldbm_nasty(sourcefile,62,ret); } if (NULL != key.data) { - free(key.data); + slapi_ch_free(&(key.data)); key.data = NULL; } break; @@ -521,7 +521,7 @@ } } if (NULL != key.data) { - free(key.data); + slapi_ch_free(&(key.data)); key.data = NULL; } } @@ -985,8 +985,8 @@ keepgoing = 0; } else { lastid = id_stored_to_internal((char *)key.data); - free( key.data ); - free( data.data ); + slapi_ch_free( &(key.data) ); + slapi_ch_free( &(data.data) ); isfirst = 1; } } @@ -1089,7 +1089,7 @@ /* back to internal format */ temp_id = id_stored_to_internal((char *)key.data); - free(key.data); + slapi_ch_free(&(key.data)); } /* call post-entry plugin */ @@ -1097,7 +1097,7 @@ ep = backentry_alloc(); ep->ep_entry = slapi_str2entry( data.data, str2entry_options ); - free(data.data); + slapi_ch_free(&(data.data)); if ( (ep->ep_entry) != NULL ) { ep->ep_id = temp_id; @@ -1176,7 +1176,7 @@ } backentry_free( &ep ); - free( data.data ); + slapi_ch_free( &(data.data) ); } /* DB_NOTFOUND -> successful end */ if (return_value == DB_NOTFOUND) @@ -1383,8 +1383,8 @@ isfirst = 0; /* neither a first nor a last */ } else if (rc == 0) { lastid = id_stored_to_internal((char *)key.data); - free(key.data); - free(data.data); + slapi_ch_free(&(key.data)); + slapi_ch_free(&(data.data)); isfirst = 1; } else { LDAPDebug(LDAP_DEBUG_ANY, @@ -1560,7 +1560,7 @@ break; } temp_id = id_stored_to_internal((char *)key.data); - free(key.data); + slapi_ch_free(&(key.data)); } /* call post-entry plugin */ @@ -1568,7 +1568,7 @@ ep = backentry_alloc(); ep->ep_entry = slapi_str2entry( data.data, 0 ); - free(data.data); + slapi_ch_free(&(data.data)); if ( ep->ep_entry != NULL ) { ep->ep_id = temp_id; Index: monitor.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/monitor.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- monitor.c 8 Oct 2008 17:29:04 -0000 1.8 +++ monitor.c 15 Oct 2008 06:30:09 -0000 1.9 @@ -218,9 +218,9 @@ #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR + DB_VERSION_PATCH <= 3204 /* In DB 3.2.4 and earlier, we need to free each element */ for (i = 0; mpfstat[i]; i++) - free(mpfstat[i]); + slapi_ch_free((void **)&mpfstat[i]); #endif - free(mpfstat); + slapi_ch_free((void **)&mpfstat); *returncode = LDAP_SUCCESS; return SLAPI_DSE_CALLBACK_OK; @@ -275,16 +275,16 @@ sprintf(buf, "%u", mpstat->st_rw_evict); MSET("dbCacheRWEvict"); - free(mpstat); + slapi_ch_free((void **)&mpstat); if (mpfstat) { #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR + DB_VERSION_PATCH <= 3204 /* In DB 3.2.4 and earlier, we need to free each element */ int i; for (i = 0; mpfstat[i]; i++) - free(mpfstat[i]); + slapi_ch_free((void **)&mpfstat[i]); #endif - free(mpfstat); + slapi_ch_free((void **)&mpfstat); } *returncode = LDAP_SUCCESS; Index: nextid.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/nextid.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- nextid.c 10 Nov 2006 23:45:39 -0000 1.5 +++ nextid.c 15 Oct 2008 06:30:09 -0000 1.6 @@ -177,35 +177,26 @@ /*Get the last key*/ DBC *dbc = NULL; - DBT key = {0}; /*For the nextid*/ + DBT key = {0}; /*For the nextid*/ DBT Value = {0}; + Value.flags = DB_DBT_MALLOC; key.flags = DB_DBT_MALLOC; return_value = id2entrydb->cursor(id2entrydb,NULL,&dbc,0); if (0 == return_value) { return_value = dbc->c_get(dbc,&key,&Value,DB_LAST); - if (0 == return_value) { + if ( (0 == return_value) && (NULL != key.dptr) ) { inst->inst_nextid = id_stored_to_internal(key.dptr) + 1; + } else { + inst->inst_nextid = 1; /* error case: set 1 */ } - if (NULL != key.data) { - free(key.data); - } - if (NULL != Value.data) { - free(Value.data); - } + slapi_ch_free(&(key.data)); + slapi_ch_free(&(Value.data)); dbc->c_close(dbc); + } else { + inst->inst_nextid = 1; /* when there is no id2entry, start from id 1 */ } - if ( (key.dptr == NULL) || (0 != return_value) ) { - inst->inst_nextid = 1; - /*close the cache*/ - dblayer_release_id2entry( be, id2entrydb ); - - /* unlock */ - PR_Unlock( inst->inst_nextid_mutex ); - return; - } - } /*close the cache*/ @@ -213,6 +204,8 @@ /* unlock */ PR_Unlock( inst->inst_nextid_mutex ); + + return; } Index: perfctrs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/perfctrs.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- perfctrs.c 9 Oct 2008 17:40:14 -0000 1.11 +++ perfctrs.c 15 Oct 2008 06:30:10 -0000 1.12 @@ -91,7 +91,7 @@ char *string = NULL; string_length = strlen(a) + strlen(b) + 1; - string = malloc(string_length); + string = slapi_ch_malloc(string_length); if (NULL == string) { return string; } @@ -188,7 +188,7 @@ /* * We need the perfctrs_private area on all platforms. */ - priv = calloc(1,sizeof(perfctrs_private)); + priv = (perfctrs_private *)slapi_ch_calloc(1,sizeof(perfctrs_private)); if (NULL == priv) { return; } @@ -210,7 +210,7 @@ /* * On other platforms, the performance counters reside in regular memory. */ - if ( NULL == ( priv->memory = calloc( 1, sizeof( performance_counters )))) { + if ( NULL == ( priv->memory = slapi_ch_calloc( 1, sizeof( performance_counters )))) { return; } #endif @@ -226,13 +226,13 @@ DB_LOG_STAT *logstat = NULL; DB_LOCK_STAT *lockstat = NULL; - MEMP_STAT(db_env, &mpstat, NULL, DB_STAT_CLEAR, malloc); + MEMP_STAT(db_env, &mpstat, NULL, DB_STAT_CLEAR, (void *)slapi_ch_malloc); slapi_ch_free((void**)&mpstat); - TXN_STAT(db_env, &txnstat, DB_STAT_CLEAR, malloc); + TXN_STAT(db_env, &txnstat, DB_STAT_CLEAR, (void *)slapi_ch_malloc); slapi_ch_free((void**)&txnstat); - LOG_STAT(db_env, &logstat, DB_STAT_CLEAR, malloc); + LOG_STAT(db_env, &logstat, DB_STAT_CLEAR, (void *)slapi_ch_malloc); slapi_ch_free((void**)&logstat); - LOCK_STAT(db_env, &lockstat, DB_STAT_CLEAR, malloc); + LOCK_STAT(db_env, &lockstat, DB_STAT_CLEAR, (void *)slapi_ch_malloc); slapi_ch_free((void**)&lockstat); #if defined(_WIN32) if (NULL != (*priv)->memory) { @@ -246,12 +246,11 @@ } #else if (NULL != (*priv)->memory) { - free((*priv)->memory); + slapi_ch_free(&(*priv)->memory); } #endif - free( (*priv) ); - (*priv) = NULL; + slapi_ch_free( (void **)priv ); } /* Wait while checking for perfctr update requests */ @@ -299,31 +298,30 @@ if (dblayer_db_uses_logging(db_env)) { DB_LOG_STAT *logstat = NULL; - ret = LOG_STAT(db_env,&logstat,0,malloc); + ret = LOG_STAT(db_env,&logstat,0,(void *)slapi_ch_malloc); if (0 == ret) { perf->log_region_wait_rate = logstat->st_region_wait; perf->log_write_rate = 1024*1024*logstat->st_w_mbytes + logstat->st_w_bytes; perf->log_bytes_since_checkpoint = 1024*1024*logstat->st_wc_mbytes + logstat->st_wc_bytes; } - free(logstat); + slapi_ch_free((void **)&logstat); } if (dblayer_db_uses_transactions(db_env)) { DB_TXN_STAT *txnstat = NULL; - ret = TXN_STAT(db_env, &txnstat, 0, malloc); + ret = TXN_STAT(db_env, &txnstat, 0, (void *)slapi_ch_malloc); if (0 == ret) { perf->active_txns = txnstat->st_nactive; perf->commit_rate = txnstat->st_ncommits; perf->abort_rate = txnstat->st_naborts; perf->txn_region_wait_rate = txnstat->st_region_wait; } - if (txnstat) - free(txnstat); + slapi_ch_free((void **)&txnstat); } if (dblayer_db_uses_locking(db_env)) { DB_LOCK_STAT *lockstat = NULL; - ret = LOCK_STAT(db_env,&lockstat,0,malloc); + ret = LOCK_STAT(db_env,&lockstat,0,(void *)slapi_ch_malloc); if (0 == ret) { perf->lock_region_wait_rate = lockstat->st_region_wait; perf->deadlock_rate = lockstat->st_ndeadlocks; @@ -336,12 +334,12 @@ perf->current_lock_objects = lockstat->st_nobjects; perf->max_lock_objects = lockstat->st_maxnobjects; } - free(lockstat); + slapi_ch_free((void **)&lockstat); } if (dblayer_db_uses_mpool(db_env)) { DB_MPOOL_STAT *mpstat = NULL; - ret = MEMP_STAT(db_env,&mpstat,NULL,0,malloc); + ret = MEMP_STAT(db_env,&mpstat,NULL,0,(void *)slapi_ch_malloc); if (0 == ret) { #define ONEG 1073741824 perf->cache_size_bytes = mpstat->st_gbytes * ONEG + mpstat->st_bytes; @@ -362,7 +360,7 @@ perf->clean_pages = mpstat->st_page_clean; perf->page_trickle_rate = mpstat->st_page_trickle; perf->cache_region_wait_rate = mpstat->st_region_wait; - free(mpstat); + slapi_ch_free((void **)&mpstat); } } /* Place the stats in the shared memory region */ Index: seq.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/seq.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- seq.c 10 Nov 2006 23:45:39 -0000 1.5 +++ seq.c 15 Oct 2008 06:30:10 -0000 1.6 @@ -184,7 +184,7 @@ return_value = dbc->c_get(dbc,&key,&data,DB_SET); if (0 == return_value) { - free(data.data); + slapi_ch_free(&(data.data)); return_value = dbc->c_get(dbc,&key,&data,DB_NEXT); } else @@ -198,7 +198,7 @@ return_value = dbc->c_get(dbc,&key,&data,DB_SET); if (0 == return_value ) { - free(data.data); + slapi_ch_free(&(data.data)); return_value = dbc->c_get(dbc,&key,&data,DB_PREV); } else @@ -216,7 +216,7 @@ return_value = dbc->c_get(dbc,&key,&data,DB_SET_RANGE); if (0 == return_value || DB_NOTFOUND == return_value) { - free(data.data); + slapi_ch_free(&(data.data)); return_value = dbc->c_get(dbc,&key,&data,DB_PREV); } } @@ -252,11 +252,11 @@ } else if ( err != 0 && err != DB_NOTFOUND ) { ldbm_nasty("ldbm_back_seq database error", 1650, err); } - free( data.data ); + slapi_ch_free( &(data.data) ); if ( key.data != little_buffer && key.data != &keystring ) { - free( key.data ); + slapi_ch_free( &(key.data) ); } - free( big_buffer ); + slapi_ch_free_string( &big_buffer ); } /* null idlist means there were no matching keys */ Index: sort.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/sort.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- sort.c 18 Oct 2007 00:08:34 -0000 1.11 +++ sort.c 15 Oct 2008 06:30:10 -0000 1.12 @@ -395,7 +395,7 @@ } /* normalize */ type = slapi_attr_syntax_normalize(rtype); - free(rtype); + slapi_ch_free_string(&rtype); /* Now look for the next tag. */ Index: vlv.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/vlv.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- vlv.c 2 Oct 2007 23:21:31 -0000 1.15 +++ vlv.c 15 Oct 2008 06:30:10 -0000 1.16 @@ -959,14 +959,14 @@ err= dbc->c_get(dbc,&key,&data,DB_SET_RANGE); if(err==0) { - free(data.data); + slapi_ch_free(&(data.data)); err= dbc->c_get(dbc,&key,&data,DB_GET_RECNO); if(err==0) { si= *((db_recno_t*)data.data); /* Records are numbered from one. */ si--; - free(data.data); + slapi_ch_free(&(data.data)); LDAPDebug( LDAP_DEBUG_TRACE, "<= vlv_build_candidate_list_byvalue: Found. Index=%lu\n",si,0,0); } else @@ -1029,7 +1029,7 @@ err = dbc->c_get(dbc, &key, &data, DB_SET_RECNO); while ((err == 0) && (recno <= stop+1)) { if (key.data != &recno) - free(key.data); + slapi_ch_free(&(key.data)); idl_append(idl, *(ID *)data.data); if (++recno <= stop+1) { err = dbc->c_get(dbc, &key, &data, DB_NEXT); @@ -1955,7 +1955,7 @@ /* similar to what the console GUI does */ char *create_vlv_search_tag(const char* dn) { - char *tmp2=strdup(dn); + char *tmp2=slapi_ch_strdup(dn); replace_char(tmp2,',',' '); replace_char(tmp2,'"','-'); Index: vlv_srch.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/vlv_srch.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- vlv_srch.c 20 Sep 2007 16:58:41 -0000 1.8 +++ vlv_srch.c 15 Oct 2008 06:30:11 -0000 1.9 @@ -673,8 +673,8 @@ err= dbc->c_get(dbc,&key,&data,DB_LAST); if(err==0) { - free(key.data); key.data= NULL; - free(data.data); data.data= NULL; + slapi_ch_free(&(key.data)); + slapi_ch_free(&(data.data)); err= dbc->c_get(dbc,&key,&data,DB_GET_RECNO); if(err==0) { @@ -682,7 +682,7 @@ p->vlv_indexlength_cached= 1; p->vlv_indexlength= *((db_recno_t*)data.data); PR_Unlock(p->vlv_indexlength_lock); - free(data.data); + slapi_ch_free(&(data.data)); } } dbc->c_close(dbc); From nhosoi at fedoraproject.org Wed Oct 15 06:30:14 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:14 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools pwenc.c, 1.10, 1.11 Message-ID: <20081015063014.A06A670145@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/slapd/tools Modified Files: pwenc.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: pwenc.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/pwenc.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- pwenc.c 8 Oct 2008 17:29:04 -0000 1.10 +++ pwenc.c 15 Oct 2008 06:30:11 -0000 1.11 @@ -105,7 +105,7 @@ if ( NULL == orig ) { return NULL; } - r = calloc( 1, strlen( orig ) + 2 ); + r = slapi_ch_calloc( 1, strlen( orig ) + 2 ); strcpy( r, orig ); if ( heflag ) { @@ -282,7 +282,7 @@ } puts( enc ); - free( enc ); + slapi_ch_free_string( &enc ); } else { /* compare passwords */ if (( rc = (*(cmppwsp->pws_cmp))( decode( argv[ optind ]), cmp )) == 0 ) { printf( "%s: password ok.\n", name ); From nhosoi at fedoraproject.org Wed Oct 15 06:29:58 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:29:58 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_conn_stateless.c, 1.7, 1.8 Message-ID: <20081015063028.763EF7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/chainingdb Modified Files: cb_conn_stateless.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: cb_conn_stateless.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_conn_stateless.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cb_conn_stateless.c 18 Oct 2007 00:08:28 -0000 1.7 +++ cb_conn_stateless.c 15 Oct 2008 06:29:54 -0000 1.8 @@ -386,7 +386,7 @@ rc=ldap_get_lderrno( ld, NULL, NULL ); prerr=PR_GetError(); } - if ( ret == 0 ) free(plain); /* free plain only if it has been duplicated */ + if ( ret == 0 ) slapi_ch_free_string(&plain); /* free plain only if it has been duplicated */ if ( rc != LDAP_SUCCESS ) { if (cb_debug_on()) { From nhosoi at fedoraproject.org Wed Oct 15 06:29:59 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:29:59 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.11, 1.12 Message-ID: <20081015063029.2F83B7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- dna.c 8 Oct 2008 17:29:02 -0000 1.11 +++ dna.c 15 Oct 2008 06:29:56 -0000 1.12 @@ -680,7 +680,7 @@ value = slapi_entry_get_ndn(e); if (value) { - entry->dn = strdup(value); + entry->dn = slapi_ch_strdup(value); } slapi_log_error(SLAPI_LOG_CONFIG, DNA_PLUGIN_SUBSYSTEM, From nhosoi at fedoraproject.org Wed Oct 15 06:29:59 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:29:59 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/pam_passthru pam_ptimpl.c, 1.12, 1.13 Message-ID: <20081015063030.0B09E7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/pam_passthru Modified Files: pam_ptimpl.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: pam_ptimpl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/pam_passthru/pam_ptimpl.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- pam_ptimpl.c 8 Oct 2008 17:29:02 -0000 1.12 +++ pam_ptimpl.c 15 Oct 2008 06:29:56 -0000 1.13 @@ -77,7 +77,7 @@ delete_my_str_buf(MyStrBuf *buf) { if (buf->str != buf->fixbuf) { - slapi_ch_free_string(&buf->str); + slapi_ch_free_string(&(buf->str)); } } @@ -152,7 +152,7 @@ /* returns a berval value as a null terminated string */ static char *strdupbv(struct berval *bv) { - char *str = malloc(bv->bv_len+1); + char *str = slapi_ch_malloc(bv->bv_len+1); memcpy(str, bv->bv_val, bv->bv_len); str[bv->bv_len] = 0; return str; @@ -164,10 +164,10 @@ int ii; for (ii = 0; ii < nresp; ++ii) { if (resp[ii].resp) { - free(resp[ii].resp); + slapi_ch_free((void **)&(resp[ii].resp)); } } - free(resp); + slapi_ch_free((void **)&resp); } /* @@ -190,7 +190,7 @@ } /* empty reply structure */ - reply = (struct pam_response *)calloc(num_msg, + reply = (struct pam_response *)slapi_ch_calloc(num_msg, sizeof(struct pam_response)); slapi_pblock_get( my_data->pb, SLAPI_BIND_CREDENTIALS, &creds ); /* the password */ for (ii = 0; ii < num_msg; ++ii) { @@ -206,7 +206,7 @@ reply[ii].resp = strdupbv(creds); #endif } else if (msg[ii]->msg_style == PAM_PROMPT_ECHO_ON) { /* assume username */ - reply[ii].resp = strdup(my_data->pam_identity); + reply[ii].resp = slapi_ch_strdup(my_data->pam_identity); } else if (msg[ii]->msg_style == PAM_ERROR_MSG) { slapi_log_error(SLAPI_LOG_FATAL, PAM_PASSTHRU_PLUGIN_SUBSYSTEM, "pam msg [%d] error [%s]\n", ii, msg[ii]->msg); From nhosoi at fedoraproject.org Wed Oct 15 06:30:00 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:00 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/referint referint.c, 1.7, 1.8 Message-ID: <20081015063030.483D37012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/referint In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/referint Modified Files: referint.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: referint.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/referint/referint.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- referint.c 18 Oct 2007 00:08:31 -0000 1.7 +++ referint.c 15 Oct 2008 06:29:57 -0000 1.8 @@ -444,13 +444,11 @@ if(dnParts != NULL){ for(x=0; dnParts[x] != NULL; x++) { - free(dnParts[x]); + slapi_ch_free_string(&dnParts[x]); } - free(dnParts); - } - if(newDN != NULL){ - slapi_ch_free((void**)&newDN); + slapi_ch_free((void **)&dnParts); } + slapi_ch_free_string(&newDN); } @@ -485,15 +483,12 @@ free_and_return: /* free filter and search_results_pb */ - if(filter != NULL) - { - free(filter); - } + slapi_ch_free_string(&filter); if(search_result_pb != NULL) { slapi_free_search_results_internal(search_result_pb); - free(search_result_pb); + slapi_pblock_destroy(search_result_pb); } return(rc); From nhosoi at fedoraproject.org Wed Oct 15 06:30:02 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:02 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/retrocl retrocl_po.c, 1.6, 1.7 Message-ID: <20081015063032.200DD70130@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/retrocl Modified Files: retrocl_po.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: retrocl_po.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl/retrocl_po.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- retrocl_po.c 10 Nov 2006 23:45:18 -0000 1.6 +++ retrocl_po.c 15 Oct 2008 06:29:59 -0000 1.7 @@ -133,7 +133,7 @@ addlenstr( l, buf ); - free( buf ); + slapi_ch_free_string( &buf ); } addlenstr( l, "-\n" ); } @@ -219,7 +219,7 @@ val.bv_val = format_genTime (curtime); val.bv_len = strlen( val.bv_val ); slapi_entry_add_values( e, attr_changetime, vals ); - free( val.bv_val ); + slapi_ch_free( (void **)&val.bv_val ); /* * Finish constructing the entry. How to do it depends on the type @@ -329,7 +329,7 @@ val.bv_val = p; val.bv_len = len - ( p - estr ); /* length + terminating \0 */ slapi_entry_add_values( e, attr_changes, vals ); - free( estr ); + slapi_ch_free_string( &estr ); return 0; } From nhosoi at fedoraproject.org Wed Oct 15 06:30:01 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:01 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.22, 1.23 repl5_agmt.c, 1.13, 1.14 repl_controls.c, 1.9, 1.10 repl_objset.c, 1.5, 1.6 replutil.c, 1.11, 1.12 urp.c, 1.6, 1.7 Message-ID: <20081015063032.082B17012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/replication Modified Files: cl5_api.c repl5_agmt.c repl_controls.c repl_objset.c replutil.c urp.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: cl5_api.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- cl5_api.c 8 Oct 2008 17:29:02 -0000 1.22 +++ cl5_api.c 15 Oct 2008 06:29:58 -0000 1.23 @@ -1008,7 +1008,7 @@ } /* copy db log files */ - rc = LOG_ARCHIVE(s_cl5Desc.dbEnv, &list, DB_ARCH_LOG, malloc); + rc = LOG_ARCHIVE(s_cl5Desc.dbEnv, &list, DB_ARCH_LOG, (void *)slapi_ch_malloc); if (rc != 0) { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, @@ -1037,7 +1037,7 @@ logFile ++; } - free(list); + slapi_ch_free((void **)&list); } /* now, copy the version file */ @@ -2535,7 +2535,7 @@ } /* allocate data buffer */ - (*data) = (char *) slapi_ch_malloc (size); + (*data) = slapi_ch_malloc (size); if ((*data) == NULL) { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, @@ -3029,7 +3029,7 @@ bv->bv_len = length; if (bv->bv_len > 0) { - bv->bv_val = (char*)slapi_ch_malloc (bv->bv_len); + bv->bv_val = slapi_ch_malloc (bv->bv_len); memcpy (bv->bv_val, *buff, bv->bv_len); *buff += bv->bv_len; } @@ -3216,7 +3216,7 @@ char filename[MAXPATHLEN + 1]; /* find out which log files don't contain active txns */ - rc = LOG_ARCHIVE(s_cl5Desc.dbEnv, &list, 0, malloc); + rc = LOG_ARCHIVE(s_cl5Desc.dbEnv, &list, 0, (void *)slapi_ch_malloc); if (0 == rc && NULL != list) { /* zap 'em ! */ @@ -3982,6 +3982,16 @@ s_cl5Desc.dbConfig.fileMode = FILE_CREATE_MODE; } +/* + * a wrapper for slapi_ch_free; it's declared to set slapi_ch_free in BDB + * dbEnv->set_alloc(dbEnv, (void *)slapi_ch_malloc, (void *)slapi_ch_realloc, _cl5_api_free); + * + */ +void _cl5_api_free(void *ptr) +{ + slapi_ch_free(&ptr); +} + #define ONEG 1073741824 /* one giga bytes */ static void _cl5InitDBEnv(DB_ENV *dbEnv) { @@ -4011,7 +4021,7 @@ dbEnv->set_errcall(dbEnv, _cl5DBLogPrint); } #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 3300 - dbEnv->set_alloc(dbEnv, malloc, realloc, free); + dbEnv->set_alloc(dbEnv, (void *)slapi_ch_malloc, (void *)slapi_ch_realloc, _cl5_api_free); #endif } @@ -4393,7 +4403,7 @@ { case 0: pos = data.data; rc = _cl5ReadBervals (&vals, &pos, data.size); - free (data.data); + slapi_ch_free (&(data.data)); if (rc != CL5_SUCCESS) return rc; @@ -4473,7 +4483,7 @@ #endif rc = file->db->put(file->db, txnid, &key, &data, DEFAULT_DB_OP_FLAGS); - slapi_ch_free ((void**)&data.data); + slapi_ch_free (&(data.data)); if ( rc == 0 ) { #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 4100 @@ -4748,7 +4758,7 @@ switch (rc) { case 0: file->entryCount = *(int*)data.data; - free (data.data); + slapi_ch_free (&(data.data)); /* delete the entry. the entry is re-added when file is successfully closed */ @@ -4765,7 +4775,7 @@ #elif 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 3300 rc = file->db->stat(file->db, (void*)&stats, 0); #else - rc = file->db->stat(file->db, (void*)&stats, malloc, 0); + rc = file->db->stat(file->db, (void*)&stats, (void *)slapi_ch_malloc, 0); #endif if (rc != 0) { @@ -4784,7 +4794,7 @@ "_cl5GetEntryCount: %d changes for replica %s\n", file->entryCount, file->replName); - free (stats); + slapi_ch_free ((void **)&stats); return CL5_SUCCESS; default: slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name_cl, @@ -4950,7 +4960,7 @@ } /* allocate buffer */ - buff = (char*)slapi_ch_malloc (len); + buff = slapi_ch_malloc (len); start = buff; if (buff == NULL) { @@ -5315,7 +5325,7 @@ rc = CL5_SUCCESS; done: if (data->data) - slapi_ch_free ((void**)&data->data); + slapi_ch_free (&(data->data)); slapi_ch_free((void**) &data); if (file_obj) @@ -5353,15 +5363,15 @@ /* skip service entries */ if (cl5HelperEntry ((char*)key.data, NULL)) { - free (key.data); - free (data.data); + slapi_ch_free (&(key.data)); + slapi_ch_free (&(data.data)); continue; } /* format entry */ - free (key.data); + slapi_ch_free (&(key.data)); rc = cl5DBData2Entry (data.data, data.size, entry); - free (data.data); + slapi_ch_free (&(data.data)); if (rc != 0) { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, @@ -5397,8 +5407,8 @@ /* successfully retrieved next entry but it was out of range */ if (rc == CL5_SUCCESS) { - free (key.data); - free (data.data); + slapi_ch_free (&(key.data)); + slapi_ch_free (&(data.data)); rc = CL5_NOTFOUND; goto done; } @@ -5429,15 +5439,15 @@ { if (cl5HelperEntry ((char*)key.data, NULL)) { - free (key.data); - free (data.data); + slapi_ch_free (&(key.data)); + slapi_ch_free (&(data.data)); continue; } - free (key.data); + slapi_ch_free (&(key.data)); /* format entry */ rc = cl5DBData2Entry (data.data, data.size, entry); - free (data.data); + slapi_ch_free (&(data.data)); if (rc != 0) { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, @@ -5558,8 +5568,7 @@ if (obj) object_release (obj); - if (data.data) - free (data.data); + slapi_ch_free (&(data.data)); return rc; } @@ -6341,7 +6350,7 @@ } #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR < 3300 - rc = db->set_malloc(db, malloc); + rc = db->set_malloc(db, (void *)slapi_ch_malloc); if (0 != rc) { goto out; } Index: repl5_agmt.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_agmt.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- repl5_agmt.c 8 Oct 2008 17:29:02 -0000 1.13 +++ repl5_agmt.c 15 Oct 2008 06:29:58 -0000 1.14 @@ -977,12 +977,12 @@ if (NULL != sval) { const char *val = slapi_value_get_string(sval); - ra->binddn = strdup(val); + ra->binddn = slapi_ch_strdup(val); } } /* If no BindDN set, set to zero-length string */ if (ra->binddn == NULL) { - ra->binddn = strdup(""); + ra->binddn = slapi_ch_strdup(""); } PR_Unlock(ra->lock); prot_notify_agmt_changed(ra->protocol, ra->long_name); Index: repl_controls.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_controls.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- repl_controls.c 18 Oct 2007 00:08:31 -0000 1.9 +++ repl_controls.c 15 Oct 2008 06:29:58 -0000 1.10 @@ -254,7 +254,7 @@ goto loser; } slapi_mods_add_modbvps(&modrdn_smods, op, type, embvals); - free( type ); + slapi_ch_free_string( &type ); ber_bvecfree( embvals ); } got_modrdn_mods = PR_TRUE; @@ -364,7 +364,7 @@ to end up in the entry. We need to remove the old ones. */ } - free( type ); + slapi_ch_free_string( &type ); ber_bvecfree( embvals ); } } Index: repl_objset.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_objset.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- repl_objset.c 10 Nov 2006 23:45:17 -0000 1.5 +++ repl_objset.c 15 Oct 2008 06:29:58 -0000 1.6 @@ -95,7 +95,7 @@ p->lock = PR_NewLock(); if (NULL == p->lock) { - free(p); p = NULL; + slapi_ch_free((void **)&p); } p->objects = llistNew(); p->destructor = destructor; @@ -196,7 +196,7 @@ /* Free the linked list */ llistDestroy(&(*o)->objects, (*o)->destructor); PR_DestroyLock((*o)->lock); - free(*o); *o = NULL; + slapi_ch_free((void **)o); } } @@ -270,9 +270,9 @@ llistRemove(o->objects, co->key); /* Destroy the object */ o->destructor(&(co->data)); - free(co->key); + slapi_ch_free((void **)&(co->key)); /* Deallocate the container */ - free(co); + slapi_ch_free((void **)&co); } static Repl_Objset_object * @@ -287,9 +287,9 @@ ro = llistRemoveCurrentAndGetNext (o->objects, &iterator); o->destructor(&(co->data)); - free(co->key); + slapi_ch_free((void **)&(co->key)); /* Deallocate the container */ - free(co); + slapi_ch_free((void **)&co); return ro; } Index: replutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- replutil.c 18 Oct 2007 00:08:31 -0000 1.11 +++ replutil.c 15 Oct 2008 06:29:58 -0000 1.12 @@ -170,7 +170,7 @@ } puts( p ); fflush( stdout ); - free( p ); + slapi_ch_free_string( &p ); return; } @@ -198,8 +198,8 @@ int return_value = -1; int bytes_to_write = 0; - /* malloc the buffer */ - buffer = (char*) malloc(64*1024); + /* allocate the buffer */ + buffer = slapi_ch_malloc(64*1024); if (NULL == buffer) { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "copy file: memory allocation failed\n"); @@ -250,10 +250,7 @@ { close(dest_fd); } - if (NULL != buffer) - { - free(buffer); - } + slapi_ch_free_string(&buffer); return return_value; #endif } @@ -263,7 +260,7 @@ age_str2time (const char *age) { char *maxage; - char unit; + char unit; time_t ageval; if (age == NULL || age[0] == '\0' || strcmp (age, "0") == 0) @@ -272,14 +269,11 @@ } maxage = slapi_ch_strdup ( age ); - unit = maxage[ strlen( maxage ) - 1 ]; - maxage[ strlen( maxage ) - 1 ] = '\0'; - ageval = strntoul( maxage, strlen( maxage ), 10 ); - if ( maxage) - { - slapi_ch_free ( (void **) &maxage ); - } - switch ( unit ) + unit = maxage[ strlen( maxage ) - 1 ]; + maxage[ strlen( maxage ) - 1 ] = '\0'; + ageval = strntoul( maxage, strlen( maxage ), 10 ); + slapi_ch_free_string(&maxage); + switch ( unit ) { case 's': break; @@ -297,10 +291,10 @@ break; default: slapi_log_error( SLAPI_LOG_PLUGIN, repl_plugin_name, - "age_str2time: unknown unit \"%c\" " + "age_str2time: unknown unit \"%c\" " "for maxiumum changelog age\n", unit ); ageval = -1; - } + } return ageval; } @@ -394,7 +388,7 @@ addlenstr( l, buf ); - free( buf ); + slapi_ch_free_string( &buf ); } addlenstr( l, "-\n" ); } @@ -635,7 +629,7 @@ control = (LDAPControl*)slapi_ch_malloc (sizeof (LDAPControl)); control->ldctl_oid = slapi_ch_strdup ("2.16.840.1.113730.3.4.14"); - control->ldctl_value.bv_val = strdup(be_name); + control->ldctl_value.bv_val = slapi_ch_strdup(be_name); control->ldctl_value.bv_len = strlen (be_name); control->ldctl_iscritical = 1; } Index: urp.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/urp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- urp.c 10 Nov 2006 23:45:17 -0000 1.6 +++ urp.c 15 Oct 2008 06:29:59 -0000 1.7 @@ -343,7 +343,7 @@ * Remember to turn this entry back to tombstone in post op. * We'll just borrow an obsolete pblock type here. */ - slapi_pblock_set (pb, SLAPI_URP_TOMBSTONE_UNIQUEID, strdup(op_uniqueid)); + slapi_pblock_set (pb, SLAPI_URP_TOMBSTONE_UNIQUEID, slapi_ch_strdup(op_uniqueid)); rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_TARGET_ENTRY); rc = 0; } From nhosoi at fedoraproject.org Wed Oct 15 06:30:02 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:02 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/rever des.c, 1.9, 1.10 Message-ID: <20081015063032.BAA857012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/rever In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/rever Modified Files: des.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: des.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/rever/des.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- des.c 24 Sep 2007 22:54:54 -0000 1.9 +++ des.c 15 Oct 2008 06:29:59 -0000 1.10 @@ -431,7 +431,8 @@ } /* store->crypt will hold the crypted password - it must be >= clear length */ - store->crypt = (unsigned char *)slapi_ch_calloc(sizeof(unsigned char), + /* store->crypt is freed in NSS; let's not use slapi_ch_calloc */ + store->crypt = (unsigned char *)calloc(sizeof(unsigned char), store->length+1); if (!store->crypt) { From nhosoi at fedoraproject.org Wed Oct 15 06:30:03 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:03 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/roles roles_cache.c, 1.7, 1.8 roles_plugin.c, 1.9, 1.10 Message-ID: <20081015063034.070007012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/roles In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/roles Modified Files: roles_cache.c roles_plugin.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: roles_cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_cache.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- roles_cache.c 12 Oct 2007 18:03:43 -0000 1.7 +++ roles_cache.c 15 Oct 2008 06:30:00 -0000 1.8 @@ -272,7 +272,7 @@ { slapi_log_error( SLAPI_LOG_FATAL, ROLES_PLUGIN_SUBSYSTEM, "roles_cache_init: slapi_vattrspi_regattr failed\n"); - free(vattr_handle); + slapi_ch_free((void **)&vattr_handle); PR_DestroyRWLock(global_lock); global_lock = NULL; return(-1); Index: roles_plugin.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/roles/roles_plugin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- roles_plugin.c 8 Oct 2008 17:29:03 -0000 1.9 +++ roles_plugin.c 15 Oct 2008 06:30:01 -0000 1.10 @@ -246,7 +246,7 @@ if (rc == 0) { *free_flags = SLAPI_VIRTUALATTRS_RETURNED_COPIES; - *actual_type_name = strdup(NSROLEATTR); + *actual_type_name = slapi_ch_strdup(NSROLEATTR); if (type_name_disposition) { From nhosoi at fedoraproject.org Wed Oct 15 06:30:04 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/shared utils.c, 1.7, 1.8 Message-ID: <20081015063034.56C8F7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/shared In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/shared Modified Files: utils.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: utils.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/shared/utils.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- utils.c 18 Oct 2007 00:08:32 -0000 1.7 +++ utils.c 15 Oct 2008 06:30:01 -0000 1.8 @@ -441,10 +441,10 @@ DNLink *cacheInit() { DNLink *root; slapi_lock_mutex(cache_lock); - root = (DNLink *)malloc( sizeof(DNLink) ); + root = (DNLink *)slapi_ch_malloc( sizeof(DNLink) ); root->next = NULL; root->data = NULL; - root->dn = (char *)malloc(1); + root->dn = (char *)slapi_ch_malloc(1); root->dn[0] = 0; slapi_unlock_mutex(cache_lock); return root; @@ -457,7 +457,7 @@ slapi_lock_mutex(cache_lock); for( ; root->next; root = root->next ) { } - root->next = (DNLink *)malloc( sizeof(DNLink) ); + root->next = (DNLink *)slapi_ch_malloc( sizeof(DNLink) ); root = root->next; root->dn = dn; root->data = data; From nhosoi at fedoraproject.org Wed Oct 15 06:30:04 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.15, 1.16 Message-ID: <20081015063034.B8FAA7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/syntaxes Modified Files: string.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: string.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- string.c 7 Aug 2008 21:55:30 -0000 1.15 +++ string.c 15 Oct 2008 06:30:02 -0000 1.16 @@ -357,6 +357,11 @@ Slapi_Value **bvlp; char *w, *c, *p; + if (NULL == bvals) { + *ivals = NULL; + return 0; + } + switch ( ftype ) { case LDAP_FILTER_EQUALITY: /* allocate a new array for the normalized values */ From nhosoi at fedoraproject.org Wed Oct 15 06:30:05 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:05 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.11, 1.12 Message-ID: <20081015063035.65E1C7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/views Modified Files: views.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research Index: views.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- views.c 18 Oct 2007 00:08:32 -0000 1.11 +++ views.c 15 Oct 2008 06:30:02 -0000 1.12 @@ -542,7 +542,7 @@ theCache.view_count++; - theCache.ppViewIndex = (viewEntry**)calloc(theCache.view_count, sizeof(viewEntry*)); + theCache.ppViewIndex = (viewEntry**)slapi_ch_calloc(theCache.view_count, sizeof(viewEntry*)); if(theCache.ppViewIndex) { /* copy over the views */ @@ -687,7 +687,7 @@ /* make the space for them */ pView->child_count = child_count; - pView->pChildren = calloc(child_count, sizeof(viewEntry*)); + pView->pChildren = (void **)slapi_ch_calloc(child_count, sizeof(viewEntry*)); /* add them */ for(current = head; current != NULL; current = current->list.pNext) @@ -1211,7 +1211,7 @@ pDn = slapi_entry_get_ndn(e); /* create the view */ - pView = calloc(1, sizeof(viewEntry)); + pView = (viewEntry *)slapi_ch_calloc(1, sizeof(viewEntry)); pView->pDn = slapi_ch_strdup(pDn); if(!slapi_entry_first_attr(e, &dnAttr)) @@ -1517,7 +1517,7 @@ */ if(modtype == LDAP_CHANGETYPE_ADD) { - theView = calloc(1, sizeof(viewEntry)); + theView = (viewEntry *)slapi_ch_calloc(1, sizeof(viewEntry)); theView->pDn = slapi_ch_strdup(pDn); /* get the view filter, the entryid, and the parentid */ From nhosoi at fedoraproject.org Wed Oct 15 06:30:08 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 15 Oct 2008 06:30:08 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd mempool.c, NONE, 1.1 add.c, 1.12, 1.13 attrsyntax.c, 1.7, 1.8 ava.c, 1.7, 1.8 bind.c, 1.14, 1.15 ch_malloc.c, 1.9, 1.10 computed.c, 1.5, 1.6 connection.c, 1.19, 1.20 entry.c, 1.18, 1.19 filter.c, 1.10, 1.11 filtercmp.c, 1.6, 1.7 libglobs.c, 1.25, 1.26 main.c, 1.25, 1.26 operation.c, 1.6, 1.7 proto-slap.h, 1.36, 1.37 rwlock.c, 1.5, 1.6 slap.h, 1.35, 1.36 slapi2nspr.c, 1.5, 1.6 Message-ID: <20081015063038.EC6BB7012D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/slapd Modified Files: add.c attrsyntax.c ava.c bind.c ch_malloc.c computed.c connection.c entry.c filter.c filtercmp.c libglobs.c main.c operation.c proto-slap.h rwlock.c slap.h slapi2nspr.c Added Files: mempool.c Log Message: Resolves: #466702 Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research --- NEW FILE mempool.c --- /** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * Copyright (C) 2008 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef MEMPOOL_EXPERIMENTAL #ifdef HAVE_CONFIG_H # include #endif #include #include struct mempool_object { struct mempool_object *mempool_next; }; typedef int (*mempool_cleanup_callback)(void *object); #ifdef SHARED_MEMPOOL /* * shared mempool among threads * contention causes the performance degradation * (Warning: SHARED_MEMPOOL code is obsolete) */ #define MEMPOOL_END NULL static struct mempool { const char *mempool_name; struct mempool_object *mempool_head; PRLock *mempool_mutex; mempool_cleanup_callback mempool_cleanup_fn; unsigned long mempool_count; } mempool[] = { {"2K", NULL, NULL, NULL, 0}, {"4K", NULL, NULL, NULL, 0}, {"8K", NULL, NULL, NULL, 0}, {"16K", NULL, NULL, NULL, 0}, {"32K", NULL, NULL, NULL, 0}, {"64K", NULL, NULL, NULL, 0}, {"128K", NULL, NULL, NULL, 0}, {"256K", NULL, NULL, NULL, 0}, {"512K", NULL, NULL, NULL, 0}, {"1M", NULL, NULL, NULL, 0}, {"2M", NULL, NULL, NULL, 0}, {"4M", NULL, NULL, NULL, 0}, {"8M", NULL, NULL, NULL, 0}, {"16M", NULL, NULL, NULL, 0}, {"32M", NULL, NULL, NULL, 0}, {"64M", NULL, NULL, NULL, 0}, {MEMPOOL_END, NULL, NULL, NULL, 0} }; #else /* * mempool per thread; no lock is needed */ #define MAX_MEMPOOL 16 #define MEMPOOL_END 0 struct mempool { const char *mempool_name; struct mempool_object *mempool_head; mempool_cleanup_callback mempool_cleanup_fn; unsigned long mempool_count; }; char *mempool_names[] = { "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K", "512K", "1M", "2M", "4M", "8M", "16M", "32M", "64M" }; #endif static PRUintn mempool_index; /* thread private index used to store mempool in NSPR ThreadPrivateIndex */ static void mempool_destroy(); /* * mempool_init creates NSPR thread private index, * then allocates per-thread-private. * mempool is initialized at the first mempool_return */ static void mempool_init(struct mempool **my_mempool) { int i; if (NULL == my_mempool) { return; } #ifdef SHARED_MEMPOOL for (i = 0; MEMPOOL_END != mempool[i].mempool_name; i++) { mempool[i].mempool_mutex = PR_NewLock(); if (NULL == mempool[i].mempool_mutex) { PRErrorCode ec = PR_GetError(); slapi_log_error (SLAPI_LOG_FATAL, "mempool", "mempool_init: " "failed to create mutex - (%d - %s); mempool(%s) is disabled", ec, slapd_pr_strerror(ec), mempool[i].mempool_name); rc = LDAP_OPERATIONS_ERROR; } } #else PR_NewThreadPrivateIndex (&mempool_index, mempool_destroy); *my_mempool = (struct mempool *)slapi_ch_calloc(MAX_MEMPOOL, sizeof(struct mempool)); for (i = 0; i < MAX_MEMPOOL; i++) { (*my_mempool)[i].mempool_name = mempool_names[i]; } #endif } /* * mempool_destroy is a callback which is set to NSPR ThreadPrivateIndex */ static void mempool_destroy() { int i = 0; struct mempool *my_mempool; #ifdef SHARED_MEMPOOL for (i = 0; MEMPOOL_END != mempool[i].mempool_name; i++) { struct mempool_object *object = NULL; if (NULL == mempool[i].mempool_mutex) { /* mutex is NULL; this mempool is not enabled */ continue; } object = mempool[i].mempool_head; mempool[i].mempool_head = NULL; while (NULL != object) { struct mempool_object *next = object->mempool_next; if (NULL != mempool[i].mempool_cleanup_fn) { (mempool[i].mempool_cleanup_fn)((void *)object); } slapi_ch_free((void **)&object); object = next; } PR_DestroyLock(mempool[i].mempool_mutex); mempool[i].mempool_mutex = NULL; } #else my_mempool = (struct mempool *)PR_GetThreadPrivate(mempool_index); if (NULL == my_mempool || my_mempool[0].mempool_name != mempool_names[0]) { /* mempool is not initialized */ return; } for (i = 0; i < MAX_MEMPOOL; i++) { struct mempool_object *object = my_mempool[i].mempool_head; while (NULL != object) { struct mempool_object *next = object->mempool_next; if (NULL != my_mempool[i].mempool_cleanup_fn) { (my_mempool[i].mempool_cleanup_fn)((void *)object); } slapi_ch_free((void **)&object); object = next; } my_mempool[i].mempool_head = NULL; my_mempool[i].mempool_count = 0; } slapi_ch_free((void **)&my_mempool); PR_SetThreadPrivate (mempool_index, (void *)NULL); #endif } /* * return memory to memory pool * (Callback cleanup function was intented to release nested memory in the * memory area. Initially, memory had its structure which could point * other memory area. But the current code (#else) expects no structure. * Thus, the cleanup callback is not needed) * The current code (#else) uses the memory pool stored in the * per-thread-private data. */ int mempool_return(int type, void *object, mempool_cleanup_callback cleanup) { PR_ASSERT(type >= 0 && type < MEMPOOL_END); if (!config_get_mempool_switch()) { return LDAP_SUCCESS; /* memory pool: off */ } #ifdef SHARED_MEMPOOL if (NULL == mempool[type].mempool_mutex) { /* mutex is NULL; this mempool is not enabled */ return LDAP_SUCCESS; } PR_Lock(mempool[type].mempool_mutex); ((struct mempool_object *)object)->mempool_next = mempool[type].mempool_head; mempool[type].mempool_head = (struct mempool_object *)object; mempool[type].mempool_cleanup_fn = cleanup; mempool[type].mempool_count++; PR_Unlock(mempool[type].mempool_mutex); return LDAP_SUCCESS; #else { struct mempool *my_mempool; int maxfreelist; my_mempool = (struct mempool *)PR_GetThreadPrivate(mempool_index); if (NULL == my_mempool || my_mempool[0].mempool_name != mempool_names[0]) { /* mempool is not initialized */ mempool_init(&my_mempool); } ((struct mempool_object *)object)->mempool_next = my_mempool[type].mempool_head; maxfreelist = config_get_mempool_maxfreelist(); if ((maxfreelist > 0) && (my_mempool[type].mempool_count > maxfreelist)) { return LDAP_UNWILLING_TO_PERFORM; } else { my_mempool[type].mempool_head = (struct mempool_object *)object; my_mempool[type].mempool_cleanup_fn = cleanup; my_mempool[type].mempool_count++; PR_SetThreadPrivate (mempool_index, (void *)my_mempool); return LDAP_SUCCESS; } } #endif } /* * get memory from memory pool * The current code (#else) uses the memory pool stored in the * per-thread-private data. */ void * mempool_get(int type) { struct mempool_object *object = NULL; struct mempool *my_mempool; PR_ASSERT(type >= 0 && type < MEMPOOL_END); if (!config_get_mempool_switch()) { return NULL; /* memory pool: off */ } #ifdef SHARED_MEMPOOL if (NULL == mempool[type].mempool_mutex) { /* mutex is NULL; this mempool is not enabled */ return NULL; } PR_Lock(mempool[type].mempool_mutex); object = mempool[type].mempool_head; if (NULL != object) { mempool[type].mempool_head = object->mempool_next; mempool[type].mempool_count--; object->mempool_next = NULL; } PR_Unlock(mempool[type].mempool_mutex); #else my_mempool = (struct mempool *)PR_GetThreadPrivate(mempool_index); if (NULL == my_mempool || my_mempool[0].mempool_name != mempool_names[0]) { /* mempool is not initialized */ return NULL; } object = my_mempool[type].mempool_head; if (NULL != object) { my_mempool[type].mempool_head = object->mempool_next; my_mempool[type].mempool_count--; object->mempool_next = NULL; PR_SetThreadPrivate (mempool_index, (void *)my_mempool); } #endif return object; } /***************************************************************************** * The rest is slapi_ch_malloc and its friends, which are adjusted to mempool. * The challenge is mempool_return needs to know the size of the memory, but * free does not pass the info. To work around it, malloc allocates the extra * space in front of the memory to be returned and store the size in the extra * space. * * Also, to simplify the code, it allocates the smallest 2^n size which * could store the requested size. We should make the granurality higher for * the real use. * * Above 64MB, the functions call mmap directly. The reason * why I chose mmap over mempool is in mempool, the memory stays until the * server is shutdown even if the memory is never be requested. By using mmap, * the memory is returned to the system and it's guaranteed to shrink the * process size. * * In this implementation, it changes the behavior based on the requested * size (+ size space -- unsigned long)* : * 1B ~ 1KB: call system *alloc/free; but still it needs to store the size to * support realloc. The function needs to know if the passed address * is the real address or shifted for the size. * 1KB + 1B ~ 64MB: use mempool * 64MB + 1B ~ : call mmap */ #include static int slapi_ch_munmap_no_roundup(void **start, unsigned long len); char *slapi_ch_mmap(unsigned long len); static int counters_created= 0; PR_DEFINE_COUNTER(slapi_ch_counter_malloc); PR_DEFINE_COUNTER(slapi_ch_counter_calloc); PR_DEFINE_COUNTER(slapi_ch_counter_realloc); PR_DEFINE_COUNTER(slapi_ch_counter_strdup); PR_DEFINE_COUNTER(slapi_ch_counter_free); PR_DEFINE_COUNTER(slapi_ch_counter_created); PR_DEFINE_COUNTER(slapi_ch_counter_exist); #define OOM_PREALLOC_SIZE 65536 static void *oom_emergency_area = NULL; static PRLock *oom_emergency_lock = NULL; #define SLAPD_MODULE "memory allocator" static const char* const oom_advice = "\nThe server has probably allocated all available virtual memory. To solve\n" "this problem, make more virtual memory available to your server, or reduce\n" "one or more of the following server configuration settings:\n" " nsslapd-cachesize (Database Settings - Maximum entries in cache)\n" " nsslapd-cachememsize (Database Settings - Memory available for cache)\n" " nsslapd-dbcachesize (LDBM Plug-in Settings - Maximum cache size)\n" " nsslapd-import-cachesize (LDBM Plug-in Settings - Import cache size).\n" "Can't recover; calling exit(1).\n"; static void create_counters() { PR_CREATE_COUNTER(slapi_ch_counter_malloc,"slapi_ch","malloc",""); PR_CREATE_COUNTER(slapi_ch_counter_calloc,"slapi_ch","calloc",""); PR_CREATE_COUNTER(slapi_ch_counter_realloc,"slapi_ch","realloc",""); PR_CREATE_COUNTER(slapi_ch_counter_strdup,"slapi_ch","strdup",""); PR_CREATE_COUNTER(slapi_ch_counter_free,"slapi_ch","free",""); PR_CREATE_COUNTER(slapi_ch_counter_created,"slapi_ch","created",""); PR_CREATE_COUNTER(slapi_ch_counter_exist,"slapi_ch","exist",""); /* ensure that we have space to allow for shutdown calls to malloc() * from should we run out of memory. */ if (oom_emergency_area == NULL) { oom_emergency_area = malloc(OOM_PREALLOC_SIZE); } oom_emergency_lock = PR_NewLock(); } static void log_negative_alloc_msg( const char *op, const char *units, unsigned long size ) { slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE, "cannot %s %lu %s;\n" "trying to allocate 0 or a negative number of %s is not portable and\n" "gives different results on different platforms.\n", op, size, units, units ); } static char * slapi_ch_malloc_core( unsigned long lsize ) { char *newmem; if ( (newmem = (char *) malloc( lsize )) == NULL ) { int oserr = errno; oom_occurred(); slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE, "malloc of %lu bytes failed; OS error %d (%s)%s\n", lsize, oserr, slapd_system_strerror( oserr ), oom_advice ); exit( 1 ); } *(unsigned long *)newmem = lsize; newmem += sizeof(unsigned long); return newmem; } char * slapi_ch_malloc( unsigned long size ) { char *newmem; unsigned long lsize; if (size <= 0) { log_negative_alloc_msg( "malloc", "bytes", size ); return 0; } lsize = size + sizeof(unsigned long); if (lsize <= 1024) { newmem = slapi_ch_malloc_core( lsize ); } else if (lsize <= 67108864) { /* return 2KB ~ 64MB memory to memory pool */ unsigned long roundup = 1; int n = 0; while (1) { roundup <<= 1; n++; if (roundup >= lsize) { break; } } PR_ASSERT(n >= 11 && n <= 26); newmem = (char *)mempool_get(n-11); /* 11: 2^11 = 2K */ if (NULL == newmem) { newmem = slapi_ch_malloc_core( roundup ); } } else { newmem = slapi_ch_mmap( size ); } if(!counters_created) { create_counters(); counters_created= 1; } PR_INCREMENT_COUNTER(slapi_ch_counter_malloc); PR_INCREMENT_COUNTER(slapi_ch_counter_created); PR_INCREMENT_COUNTER(slapi_ch_counter_exist); #if defined(_WIN32) && defined(DEBUG) if(recording) { add_memory_record(newmem,size); } #endif return( newmem ); } static char * slapi_ch_realloc_core( char *block, unsigned long lsize ) { char *realblock; char *newmem; realblock = block - sizeof(unsigned long); if ( (newmem = (char *) realloc( realblock, lsize )) == NULL ) { int oserr = errno; oom_occurred(); slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE, "realloc of %lu bytes failed; OS error %d (%s)%s\n", lsize, oserr, slapd_system_strerror( oserr ), oom_advice ); exit( 1 ); } *(unsigned long *)newmem = lsize; newmem += sizeof(unsigned long); return newmem; } char * slapi_ch_realloc( char *block, unsigned long size ) { char *newmem; unsigned long lsize; unsigned long origsize; char *realblock; char *realnewmem; if ( block == NULL ) { return( slapi_ch_malloc( size ) ); } if (size <= 0) { log_negative_alloc_msg( "realloc", "bytes", size ); return block; } lsize = size + sizeof(unsigned long); if (lsize <= 1024) { newmem = slapi_ch_realloc_core( block, lsize ); } else if (lsize <= 67108864) { /* return 2KB ~ 64MB memory to memory pool */ unsigned long roundup = 1; int n = 0; while (1) { roundup <<= 1; n++; if (roundup >= lsize) { break; } } PR_ASSERT(n >= 11 && n <= 26); newmem = (char *)mempool_get(n-11); /* 11: 2^11 = 2K */ if (NULL == newmem) { newmem = slapi_ch_realloc_core( block, roundup ); } else { realblock = block - sizeof(unsigned long); origsize = *(unsigned long *)realblock - sizeof(unsigned long);; memcpy(newmem, block, origsize); slapi_ch_free_string(&block); } } else { realblock = block - sizeof(unsigned long); origsize = *(unsigned long *)realblock - sizeof(unsigned long);; newmem = slapi_ch_mmap( size ); memcpy(newmem, block, origsize); realnewmem = newmem - sizeof(unsigned long); *(unsigned long *)realnewmem = lsize; slapi_ch_free_string(&block); } if(!counters_created) { create_counters(); counters_created= 1; } PR_INCREMENT_COUNTER(slapi_ch_counter_realloc); #if defined(_WIN32) && defined(DEBUG) if(recording) { remove_memory_record(block); add_memory_record(newmem,size); } #endif return( newmem ); } static char * slapi_ch_calloc_core( unsigned long lsize ) { char *newmem; if ( (newmem = (char *) calloc( 1, lsize )) == NULL ) { int oserr = errno; oom_occurred(); slapi_log_error( SLAPI_LOG_FATAL, SLAPD_MODULE, "calloc of %lu bytes failed; OS error %d (%s)%s\n", lsize, oserr, slapd_system_strerror( oserr ), oom_advice ); exit( 1 ); } *(unsigned long *)newmem = lsize; newmem += sizeof(unsigned long); return newmem; } char * slapi_ch_calloc( unsigned long nelem, unsigned long size ) { char *newmem; unsigned long lsize; if (size <= 0) { log_negative_alloc_msg( "calloc", "bytes", size ); return 0; } if (nelem <= 0) { log_negative_alloc_msg( "calloc", "elements", nelem ); return 0; } lsize = nelem * size + sizeof(unsigned long); if (lsize <= 1024) { newmem = slapi_ch_calloc_core( lsize ); } else if (lsize <= 67108864) { /* return 2KB ~ 64MB memory to memory pool */ unsigned long roundup = 1; int n = 0; while (1) { roundup <<= 1; n++; if (roundup >= lsize) { break; } } PR_ASSERT(n >= 11 && n <= 26); newmem = (char *)mempool_get(n-11); /* 11: 2^11 = 2K */ if (NULL == newmem) { newmem = slapi_ch_calloc_core( roundup ); } else { memset (newmem, 0, size * nelem); } } else { unsigned long mysize = size * nelem; newmem = slapi_ch_mmap( mysize ); memset(newmem, 0, mysize); } if(!counters_created) { create_counters(); counters_created= 1; } PR_INCREMENT_COUNTER(slapi_ch_counter_calloc); PR_INCREMENT_COUNTER(slapi_ch_counter_created); PR_INCREMENT_COUNTER(slapi_ch_counter_exist); #if defined(_WIN32) && defined(DEBUG) if(recording) { add_memory_record(newmem,size); } #endif return( newmem ); } char * slapi_ch_strdup ( const char* s1 ) { char* newmem; unsigned long lsize; /* strdup pukes on NULL strings...bail out now */ if(NULL == s1) return NULL; lsize = strlen(s1) + sizeof(unsigned long) + 1; newmem = slapi_ch_malloc( lsize ); sprintf(newmem, "%s", s1); if(!counters_created) { create_counters(); counters_created= 1; } PR_INCREMENT_COUNTER(slapi_ch_counter_strdup); PR_INCREMENT_COUNTER(slapi_ch_counter_created); PR_INCREMENT_COUNTER(slapi_ch_counter_exist); #if defined(_WIN32) && defined(DEBUG) if(recording) { add_memory_record(newmem,strlen(s1)+1); } #endif return newmem; } /* * Function: slapi_ch_free * * Returns: nothing * * Description: frees the pointer, and then sets it to NULL to * prevent free-memory writes. * Note: pass in the address of the pointer you want to free. * Note: you can pass in null pointers, it's cool. * * Implementation: get the size from the size space, and determine the behavior * based upon the size: * 1B ~ 1KB: call system free * 1KB + 1B ~ 64MB: return memory to mempool * 64MB + 1B ~ : call munmap */ void slapi_ch_free(void **ptr) { void *realptr; unsigned long size; if (ptr==NULL || *ptr == NULL){ return; } #if defined(_WIN32) && defined(DEBUG) if(recording) { remove_memory_record(*ptr); } #endif realptr = (void *)((char *)*ptr - sizeof(unsigned long)); size = *(unsigned long *)realptr; if (size <= 1024) { free (realptr); } else if (size <= 67108864) { /* return 2KB ~ 64MB memory to memory pool */ unsigned long roundup = 1; int n = 0; int rc = LDAP_SUCCESS; while (1) { roundup <<= 1; n++; if (roundup >= size) { break; } } PR_ASSERT(n >= 11 && n <= 26); rc = mempool_return(n-11, *ptr, (mempool_cleanup_callback)NULL); if (LDAP_SUCCESS != rc) { free (realptr); } } else { slapi_ch_munmap_no_roundup( ptr, size ); } *ptr = NULL; if(!counters_created) { create_counters(); counters_created= 1; } PR_INCREMENT_COUNTER(slapi_ch_counter_free); PR_DECREMENT_COUNTER(slapi_ch_counter_exist); return; } char * slapi_ch_mmap(unsigned long len) { char *newmem; long sc_page_size = config_get_system_page_size(); int sc_page_bits = config_get_system_page_bits(); unsigned long roundup = (len&(sc_page_size-1))?(((len>>sc_page_bits)+1)<>sc_page_bits)+1)<ava_value ) == LBER_ERROR ) { - slapi_ch_free_string(&type); + slapi_ch_free_string( &type ); ava_done(ava); LDAPDebug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 ); return( LDAP_PROTOCOL_ERROR ); } ava->ava_type = slapi_attr_syntax_normalize(type); - free( type ); + slapi_ch_free_string( &type ); return( 0 ); } Index: bind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bind.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- bind.c 8 Oct 2008 17:29:03 -0000 1.14 +++ bind.c 15 Oct 2008 06:30:03 -0000 1.15 @@ -652,12 +652,8 @@ if (be) slapi_be_Unlock(be); slapi_sdn_done(&sdn); - if ( saslmech != NULL ) { - free( saslmech ); - } - if ( cred.bv_val != NULL ) { - free( cred.bv_val ); - } + slapi_ch_free_string( &saslmech ); + slapi_ch_free( (void **)&cred.bv_val ); if ( bind_target_entry != NULL ) slapi_entry_free(bind_target_entry); } Index: ch_malloc.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ch_malloc.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ch_malloc.c 10 Nov 2006 23:45:40 -0000 1.9 +++ ch_malloc.c 15 Oct 2008 06:30:03 -0000 1.10 @@ -139,6 +139,7 @@ op, size, units, units ); } +#if !defined(MEMPOOL_EXPERIMENTAL) char * slapi_ch_malloc( unsigned long size @@ -300,6 +301,7 @@ #endif return newmem; } +#endif /* !MEMPOOL_EXPERIMENTAL */ struct berval* slapi_ch_bvdup (const struct berval* v) @@ -334,6 +336,7 @@ return newberval; } +#if !defined(MEMPOOL_EXPERIMENTAL) /* * Function: slapi_ch_free * @@ -368,6 +371,7 @@ PR_DECREMENT_COUNTER(slapi_ch_counter_exist); return; } +#endif /* !MEMPOOL_EXPERIMENTAL */ /* just like slapi_ch_free, takes the address of the struct berval pointer */ @@ -414,6 +418,7 @@ the operating system. But if this changes in the future, this function will have to change as well. */ +#if !defined(MEMPOOL_EXPERIMENTAL) char * slapi_ch_smprintf(const char *fmt, ...) { @@ -430,6 +435,7 @@ return p; } +#endif /* ========================= NT Specific Leak Checking Code ================================== */ Index: computed.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/computed.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- computed.c 10 Nov 2006 23:45:40 -0000 1.5 +++ computed.c 15 Oct 2008 06:30:03 -0000 1.6 @@ -139,7 +139,7 @@ PR_ASSERT(NULL != function); PR_ASSERT(NULL != compute_evaluators_lock); PR_RWLock_Wlock(compute_evaluators_lock); - new_eval = calloc(1,sizeof (compute_evaluator)); + new_eval = (compute_evaluator *)slapi_ch_calloc(1,sizeof (compute_evaluator)); if (NULL == new_eval) { rc = ENOMEM; } else { @@ -180,7 +180,7 @@ while (current != NULL) { compute_evaluator *asabird = current; current = current->next; - free(asabird); + slapi_ch_free((void **)&asabird); } PR_RWLock_Unlock(compute_evaluators_lock); /* Free the lock */ @@ -192,7 +192,7 @@ while (current != NULL) { compute_rewriter *asabird = current; current = current->next; - free(asabird); + slapi_ch_free((void **)&asabird); } PR_RWLock_Unlock(compute_rewriters_lock); PR_DestroyRWLock(compute_rewriters_lock); @@ -208,7 +208,7 @@ compute_rewriter *new_rewriter = NULL; PR_ASSERT(NULL != function); PR_ASSERT(NULL != compute_rewriters_lock); - new_rewriter = calloc(1,sizeof (compute_rewriter)); + new_rewriter = (compute_rewriter *)slapi_ch_calloc(1,sizeof (compute_rewriter)); if (NULL == new_rewriter) { rc = ENOMEM; } else { Index: connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- connection.c 19 Oct 2007 18:48:27 -0000 1.19 +++ connection.c 15 Oct 2008 06:30:03 -0000 1.20 @@ -191,12 +191,12 @@ conn->c_prfd= NULL; /* c_ci stays as it is */ conn->c_fdi= SLAPD_INVALID_SOCKET_INDEX; - conn->c_next= NULL; - conn->c_prev= NULL; + conn->c_next= NULL; + conn->c_prev= NULL; conn->c_extension= NULL; /* remove any SASL I/O from the connection */ sasl_io_cleanup(conn); - sasl_dispose((sasl_conn_t**)&conn->c_sasl_conn); + sasl_dispose((sasl_conn_t**)&conn->c_sasl_conn); /* free the connection socket buffer */ connection_free_private_buffer(conn); @@ -2310,7 +2310,7 @@ pb = tmp->pb; /* Free the memory used by the pb found. */ - free ((char *) tmp); + slapi_ch_free ((void **)&tmp); return (pb); } @@ -2448,7 +2448,7 @@ typelen= conn->c_authtype ? strlen (conn->c_authtype) : 0; slapi_sdn_done(&op->o_sdn); - slapi_ch_free((void **) &(op->o_authtype)); + slapi_ch_free_string(&(op->o_authtype)); if (dnlen <= 0 && typelen <= 0) { op->o_authtype = NULL; } else { Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- entry.c 3 Oct 2008 04:28:22 -0000 1.18 +++ entry.c 15 Oct 2008 06:30:03 -0000 1.19 @@ -1918,7 +1918,7 @@ *actual_type_name = (char**)slapi_ch_malloc(sizeof(*actual_type_name)); slapi_attr_get_type( tmp_attr, &vattr_type ); - **actual_type_name = strdup(vattr_type); + **actual_type_name = slapi_ch_strdup(vattr_type); } } @@ -1974,7 +1974,7 @@ *results = valueset_dup(&(tmp_attr->a_present_values)); slapi_attr_get_type( tmp_attr, &vattr_type ); - *actual_type_name = strdup(vattr_type); + *actual_type_name = slapi_ch_strdup(vattr_type); } } Index: filter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filter.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- filter.c 8 Oct 2008 17:29:03 -0000 1.10 +++ filter.c 15 Oct 2008 06:30:04 -0000 1.11 @@ -303,7 +303,7 @@ } else { err = LDAP_SUCCESS; f->f_type = slapi_attr_syntax_normalize( type ); - free( type ); + slapi_ch_free_string( &type ); filter_compute_hash(f); *fstr = slapi_ch_smprintf( "(%s=*)", f->f_type ); } @@ -458,7 +458,7 @@ return( LDAP_PROTOCOL_ERROR ); } f->f_sub_type = slapi_attr_syntax_normalize( type ); - free( type ); + slapi_ch_free_string( &type ); f->f_sub_initial = NULL; f->f_sub_any = NULL; f->f_sub_final = NULL; @@ -477,7 +477,7 @@ } if ( val == NULL || *val == '\0' ) { if ( val != NULL ) { - free( val ); + slapi_ch_free_string( &val ); } return( LDAP_INVALID_SYNTAX ); } @@ -593,7 +593,7 @@ rc = LDAP_PROTOCOL_ERROR; } else { mrf->mrf_type = slapi_attr_syntax_normalize(type); - free (type); + slapi_ch_free_string (&type); } } gotelem++; @@ -642,7 +642,7 @@ Slapi_Filter * slapi_filter_dup(Slapi_Filter *f) { - Slapi_Filter *out = 0; + Slapi_Filter *out = 0; struct slapi_filter *fl = 0; struct slapi_filter **outl = 0; struct slapi_filter *lastout = 0; @@ -651,7 +651,7 @@ return NULL; } - out = (struct slapi_filter*)calloc(1, sizeof(struct slapi_filter)); + out = (struct slapi_filter*)slapi_ch_calloc(1, sizeof(struct slapi_filter)); if ( out == NULL ) { LDAPDebug(LDAP_DEBUG_ANY, "slapi_filter_dup: memory allocation error\n", 0, 0, 0 ); Index: filtercmp.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filtercmp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- filtercmp.c 10 Nov 2006 23:45:40 -0000 1.6 +++ filtercmp.c 15 Oct 2008 06:30:05 -0000 1.7 @@ -264,7 +264,7 @@ return 1; ret = 1; /* assume failure until done comparing */ if (count1 > 20) - tally = (int *)malloc(count1); + tally = (int *)slapi_ch_malloc(count1); else tally = buf; if (!tally) @@ -292,7 +292,7 @@ done: if ((count1 > 20) && tally) - free(tally); + slapi_ch_free((void **)&tally); return ret; } @@ -310,7 +310,7 @@ return 1; ret = 1; if (count1 > 20) - tally = (int *)malloc(count1); + tally = (int *)slapi_ch_malloc(count1); else tally = buf; if (!tally) @@ -336,7 +336,7 @@ done: if ((count1 > 20) && tally) - free(tally); + slapi_ch_free((void **)&tally); return ret; } Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- libglobs.c 8 Oct 2008 17:29:03 -0000 1.25 +++ libglobs.c 15 Oct 2008 06:30:05 -0000 1.26 @@ -585,6 +585,14 @@ NULL, 0, (void **)&global_slapdFrontendConfig.outbound_ldap_io_timeout, CONFIG_INT, NULL} +#ifdef MEMPOOL_EXPERIMENTAL + ,{CONFIG_MEMPOOL_SWITCH_ATTRIBUTE, config_set_mempool_switch, + NULL, 0, + (void**)&global_slapdFrontendConfig.mempool_switch, CONFIG_ON_OFF, (ConfigGetFunc)config_get_mempool_switch}, + {CONFIG_MEMPOOL_MAXFREELIST_ATTRIBUTE, config_set_mempool_maxfreelist, + NULL, 0, + (void**)&global_slapdFrontendConfig.mempool_maxfreelist, CONFIG_INT, (ConfigGetFunc)config_get_mempool_maxfreelist} +#endif /* MEMPOOL_EXPERIMENTAL */ }; /* @@ -940,6 +948,19 @@ cfg->auditlog_exptime = 1; cfg->auditlog_exptimeunit = slapi_ch_strdup("month"); +#ifdef MEMPOOL_EXPERIMENTAL + cfg->mempool_switch = LDAP_ON; + cfg->mempool_maxfreelist = 1024; + cfg->system_page_size = sysconf(_SC_PAGE_SIZE); /* not to get every time; no set, get only */ + { + long sc_size = cfg->system_page_size; + cfg->system_page_bits = 0; + while ((sc_size >>= 1) > 0) { + cfg->system_page_bits++; /* to calculate once; no set, get only */ + } + } +#endif /* MEMPOOL_EXPERIMENTAL */ + init_config_get_and_set(); } @@ -4840,6 +4861,79 @@ return retVal; } +#ifdef MEMPOOL_EXPERIMENTAL +int +config_set_mempool_switch( const char *attrname, char *value, char *errorbuf, int apply ) { + int retVal = LDAP_SUCCESS; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + retVal = config_set_onoff(attrname, + value, + &(slapdFrontendConfig->mempool_switch), + errorbuf, + apply); + + return retVal; +} + +int +config_get_mempool_switch() +{ + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + return slapdFrontendConfig->mempool_switch; +} + +int +config_set_mempool_maxfreelist( const char *attrname, char *value, char *errorbuf, int apply ) +{ + int retVal = LDAP_SUCCESS; + char *endp = NULL; + int maxfreelist; + + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + if ( config_value_is_null( attrname, value, errorbuf, 0 )) { + return LDAP_OPERATIONS_ERROR; + } + errno = 0; + maxfreelist = strtol(value, &endp, 10); + if (0 != errno ) { + return LDAP_OPERATIONS_ERROR; + } + + if ( apply ) { + CFG_LOCK_WRITE(slapdFrontendConfig); + + slapdFrontendConfig->mempool_maxfreelist = maxfreelist; + + CFG_UNLOCK_WRITE(slapdFrontendConfig); + } + + return retVal; +} + +int +config_get_mempool_maxfreelist() +{ + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + return slapdFrontendConfig->mempool_maxfreelist; +} + +long +config_get_system_page_size() +{ + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + return slapdFrontendConfig->system_page_size; +} + +int +config_get_system_page_bits() +{ + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + return slapdFrontendConfig->system_page_bits; +} +#endif /* MEMPOOL_EXPERIMENTAL */ + int config_set_csnlogging(const char *attrname, char *value, char *errorbuf, int apply) { Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- main.c 8 Oct 2008 17:29:03 -0000 1.25 +++ main.c 15 Oct 2008 06:30:05 -0000 1.26 @@ -225,7 +225,7 @@ char *log=NULL, *ptr=NULL; int rc=0; - log=strdup(name); + log=slapi_ch_strdup(name); if(strip_fn) { if((ptr=strrchr(log,'/'))==NULL) @@ -250,7 +250,7 @@ } PR_CloseDir( dir ); } - free(log); + slapi_ch_free_string(&log); } /* Changes the owner of the files in the logs and @@ -621,6 +621,12 @@ } #endif /* WIN32 */ +#ifdef MEMPOOL_EXPERIMENTAL +void _free_wrapper(void *ptr) +{ + slapi_ch_free(&ptr); +} +#endif int main( int argc, char **argv) @@ -635,6 +641,19 @@ _main(); #endif #endif +#ifdef MEMPOOL_EXPERIMENTAL + /* to use LDAP C SDK lber functions seemlessly with slapi_ch_malloc funcs, + * setting the slapi_ch_malloc funcs to lber option here. */ + { + struct ldap_memalloc_fns memalloc_fns; + + memalloc_fns.ldapmem_malloc = (LDAP_MALLOC_CALLBACK *)slapi_ch_malloc; + memalloc_fns.ldapmem_calloc = (LDAP_CALLOC_CALLBACK *)slapi_ch_calloc; + memalloc_fns.ldapmem_realloc = (LDAP_REALLOC_CALLBACK *)slapi_ch_realloc; + memalloc_fns.ldapmem_free = (LDAP_FREE_CALLBACK *)_free_wrapper; + ldap_set_option( 0x1, LDAP_OPT_MEMALLOC_FN_PTRS, &memalloc_fns ); + } +#endif /* * Initialize NSPR very early. NSPR supports implicit initialization, * but it is not bulletproof -- so it is better to be explicit. Index: operation.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/operation.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- operation.c 10 Nov 2006 23:45:40 -0000 1.6 +++ operation.c 15 Oct 2008 06:30:05 -0000 1.7 @@ -170,7 +170,7 @@ factory_destroy_extension(get_operation_object_type(),*op,conn,&((*op)->o_extension)); slapi_sdn_done(&(*op)->o_sdn); slapi_sdn_free(&(*op)->o_target_spec); - free( (*op)->o_authtype ); + slapi_ch_free_string( &(*op)->o_authtype ); if ( (*op)->o_searchattrs != NULL ) { cool_charray_free( (*op)->o_searchattrs ); } Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- proto-slap.h 27 Aug 2008 21:56:07 -0000 1.36 +++ proto-slap.h 15 Oct 2008 06:30:05 -0000 1.37 @@ -346,6 +346,11 @@ int config_set_localuser( const char *attrname, char *value, char *errorbuf, int apply ); #endif /* !_WIN32 */ +#ifdef MEMPOOL_EXPERIMENTAL +int config_set_mempool_switch( const char *attrname, char *value, char *errorbuf, int apply ); +int config_set_mempool_maxfreelist( const char *attrname, char *value, char *errorbuf, int apply ); +#endif /* MEMPOOL_EXPERIMENTAL */ + int config_get_SSLclientAuth(); int config_get_ssl_check_hostname(); char *config_get_SSL3ciphers(); @@ -451,6 +456,13 @@ int config_get_rewrite_rfc1274(); int config_get_outbound_ldap_io_timeout(void); int config_get_csnlogging(); +#ifdef MEMPOOL_EXPERIMENTAL +int config_get_mempool_switch(); +int config_get_mempool_maxfreelist(); +long config_get_system_page_size(); +int config_get_system_page_bits(); +#endif + int is_abspath(const char *); char* rel2abspath( char * ); char* rel2abspath_ext( char *, char * ); Index: rwlock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/rwlock.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- rwlock.c 10 Nov 2006 23:45:40 -0000 1.5 +++ rwlock.c 15 Oct 2008 06:30:05 -0000 1.6 @@ -193,23 +193,21 @@ { rwl *rp; - if (( rp = (rwl *)malloc( sizeof( rwl ))) == NULL ) { - return NULL; - } + rp = (rwl *)slapi_ch_malloc( sizeof( rwl )); if (( rp->rwl_readers_mutex = PR_NewLock()) == NULL ) { - free( rp ); + slapi_ch_free( (void **)&rp ); return NULL; } if (( rp->rwl_writers_mutex = PR_NewLock()) == NULL ) { PR_DestroyLock( rp->rwl_readers_mutex ); - free( rp ); + slapi_ch_free( (void **)&rp ); return NULL; } if (( rp->rwl_writer_waiting_cv = PR_NewCondVar( rp->rwl_readers_mutex )) == NULL ) { PR_DestroyLock( rp->rwl_readers_mutex ); PR_DestroyLock( rp->rwl_writers_mutex ); - free( rp ); + slapi_ch_free( (void **)&rp ); } rp->rwl_num_readers = rp->rwl_writer_waiting = 0; @@ -254,6 +252,6 @@ PR_DestroyCondVar( rp->rwl_writer_waiting_cv ); } memset( rp, '\0', sizeof( rwl )); - free( rp ); + slapi_ch_free( (void **)&rp ); *rh = NULL; } Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- slap.h 15 Jul 2008 16:49:42 -0000 1.35 +++ slap.h 15 Oct 2008 06:30:05 -0000 1.36 @@ -1769,6 +1769,11 @@ #define CONFIG_HASH_FILTERS_ATTRIBUTE "nsslapd-hash-filters" #define CONFIG_OUTBOUND_LDAP_IO_TIMEOUT_ATTRIBUTE "nsslapd-outbound-ldap-io-timeout" +#ifdef MEMPOOL_EXPERIMENTAL +#define CONFIG_MEMPOOL_SWITCH_ATTRIBUTE "nsslapd-mempool" +#define CONFIG_MEMPOOL_MAXFREELIST_ATTRIBUTE "nsslapd-mempool-maxfreelist" +#endif /* MEMPOOL_EXPERIMENTAL */ + /* flag used to indicate that the change to the config parameter should be saved */ #define CONFIG_APPLY 1 @@ -1960,6 +1965,12 @@ #ifndef _WIN32 struct passwd *localuserinfo; /* userinfo of localuser */ #endif /* _WIN32 */ +#ifdef MEMPOOL_EXPERIMENTAL + int mempool_switch; /* switch to turn memory pool on/off */ + int mempool_maxfreelist; /* max free list length per memory pool item */ + long system_page_size; /* system page size */ + int system_page_bits; /* bit count to shift the system page size */ +#endif /* MEMPOOL_EXPERIMENTAL */ } slapdFrontendConfig_t; #define SLAPD_FULL 0 Index: slapi2nspr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi2nspr.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- slapi2nspr.c 10 Nov 2006 23:45:40 -0000 1.5 +++ slapi2nspr.c 15 Oct 2008 06:30:05 -0000 1.6 @@ -214,6 +214,12 @@ return( prrc == PR_SUCCESS ? 1 : 0 ); } +#ifdef MEMPOOL_EXPERIMENTAL +void _free_wrapper(void *ptr) +{ + slapi_ch_free(&ptr); +} +#endif /* * Function: slapi_ldap_init() @@ -239,18 +245,40 @@ * Note that ldapssl_init() uses libprldap implicitly. */ +#ifdef MEMPOOL_EXPERIMENTAL + { + /* + * slapi_ch_malloc functions need to be set to LDAP C SDK + */ + struct ldap_memalloc_fns memalloc_fns; + memalloc_fns.ldapmem_malloc = (LDAP_MALLOC_CALLBACK *)slapi_ch_malloc; + memalloc_fns.ldapmem_calloc = (LDAP_CALLOC_CALLBACK *)slapi_ch_calloc; + memalloc_fns.ldapmem_realloc = (LDAP_REALLOC_CALLBACK *)slapi_ch_realloc; + memalloc_fns.ldapmem_free = (LDAP_FREE_CALLBACK *)_free_wrapper; + } + /* + * MEMPOOL_EXPERIMENTAL: + * These LDAP C SDK init function needs to be revisited. + * In ldap_init called via ldapssl_init and prldap_init initializes + * options and set default values including memalloc_fns, then it + * initializes as sasl client by calling sasl_client_init. In + * sasl_client_init, it creates mechlist using the malloc function + * available at the moment which could mismatch the malloc/free functions + * set later. + */ +#endif if ( secure ) { ld = ldapssl_init( ldaphost, ldapport, secure ); } else { ld = prldap_init( ldaphost, ldapport, shared ); } - /* Update snmp interaction table */ - if ( ld == NULL) { - set_snmp_interaction_row( ldaphost, ldapport, -1); - } else { - set_snmp_interaction_row( ldaphost, ldapport, 0); - } + /* Update snmp interaction table */ + if ( ld == NULL) { + set_snmp_interaction_row( ldaphost, ldapport, -1); + } else { + set_snmp_interaction_row( ldaphost, ldapport, 0); + } if ( ld != NULL ) { /* From rmeggins at fedoraproject.org Thu Oct 16 16:43:40 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Thu, 16 Oct 2008 16:43:40 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.72, 1.73 aclocal.m4, 1.73, 1.74 configure, 1.90, 1.91 missing, 1.55, 1.56 install-sh, 1.55, 1.56 depcomp, 1.55, 1.56 compile, 1.50, 1.51 Makefile.in, 1.95, 1.96 config.sub, 1.54, 1.55 config.guess, 1.54, 1.55 Message-ID: <20081016164340.486F370132@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18141/ldapserver Modified Files: Makefile.am aclocal.m4 configure missing install-sh depcomp compile Makefile.in config.sub config.guess Log Message: Resolves: bug 455026 bug 441026 Bug Description: RFE: include RFC4876 schema - Autofs does not include LDAP schema for Fedora Directory Server Reviewed by: nkinder (Thanks!) Fix Description: Pieter D.J. Krul has contributed many schema files that have been tested in production environments. They are divided into two groups - those that conflict with existing schema in DS, CertSys, and IPA, and those which do not. The latter are installed in the default schema directory to be available for new instances - the former are installed in the data directory just as the rfc2307bis schema. The schema provided cover autofs and rfc4876, as in the bug reports, and more. Here is the full list of new files: 60trust.ldif 60pureftpd.ldif 60sudo.ldif 60nis.ldif 60samba.ldif 60mozilla.ldif 60samba3.ldif 60krb5kdc.ldif 60sabayon.ldif 60kerberos.ldif 60rfc4876.ldif 60inetmail.ldif 60rfc3712.ldif 60eduperson.ldif 60rfc2739.ldif 60changelog.ldif 60radius.ldif 60autofs.ldif 60qmail.ldif Platforms tested: RHEL5 Flag Day: no Doc impact: yes - document the new schema Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Makefile.am 15 Jul 2008 15:50:55 -0000 1.72 +++ Makefile.am 16 Oct 2008 16:43:36 -0000 1.73 @@ -158,6 +158,11 @@ config_DATA = $(srcdir)/lib/ldaputil/certmap.conf \ $(srcdir)/ldap/schema/slapd-collations.conf +# the schema files in this list are either not +# standard schema, not tested, or not compatible +# with the default schema e.g. there is +# considerable overlap of 60changelog.ldif and 01common.ldif +# and 60inetmail.ldif and 50ns-mail.ldif among others sampledata_DATA = $(srcdir)/ldap/ldif/Ace.ldif \ $(srcdir)/ldap/ldif/European.ldif \ $(srcdir)/ldap/ldif/Eurosuffix.ldif \ @@ -184,7 +189,17 @@ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits \ - $(srcdir)/ldap/schema/10rfc2307bis.ldif + $(srcdir)/ldap/schema/10rfc2307bis.ldif \ + $(srcdir)/ldap/schema/60changelog.ldif \ + $(srcdir)/ldap/schema/60inetmail.ldif \ + $(srcdir)/ldap/schema/60krb5kdc.ldif \ + $(srcdir)/ldap/schema/60kerberos.ldif \ + $(srcdir)/ldap/schema/60nis.ldif \ + $(srcdir)/ldap/schema/60qmail.ldif \ + $(srcdir)/ldap/schema/60radius.ldif \ + $(srcdir)/ldap/schema/60rfc4876.ldif \ + $(srcdir)/ldap/schema/60samba.ldif \ + $(srcdir)/ldap/schema/60samba3.ldif schema_DATA = $(srcdir)/ldap/schema/00core.ldif \ $(srcdir)/ldap/schema/01common.ldif \ @@ -203,6 +218,15 @@ $(srcdir)/ldap/schema/50ns-value.ldif \ $(srcdir)/ldap/schema/50ns-web.ldif \ $(srcdir)/ldap/schema/60pam-plugin.ldif \ + $(srcdir)/ldap/schema/60autofs.ldif \ + $(srcdir)/ldap/schema/60eduperson.ldif \ + $(srcdir)/ldap/schema/60mozilla.ldif \ + $(srcdir)/ldap/schema/60pureftpd.ldif \ + $(srcdir)/ldap/schema/60rfc2739.ldif \ + $(srcdir)/ldap/schema/60rfc3712.ldif \ + $(srcdir)/ldap/schema/60sabayon.ldif \ + $(srcdir)/ldap/schema/60sudo.ldif \ + $(srcdir)/ldap/schema/60trust.ldif \ $(srcdir)/ldap/schema/99user.ldif sbin_SCRIPTS = ldap/admin/src/scripts/setup-ds.pl \ Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- Makefile.in 13 Oct 2008 16:32:42 -0000 1.95 +++ Makefile.in 16 Oct 2008 16:43:37 -0000 1.96 @@ -1091,6 +1091,12 @@ config_DATA = $(srcdir)/lib/ldaputil/certmap.conf \ $(srcdir)/ldap/schema/slapd-collations.conf + +# the schema files in this list are either not +# standard schema, not tested, or not compatible +# with the default schema e.g. there is +# considerable overlap of 60changelog.ldif and 01common.ldif +# and 60inetmail.ldif and 50ns-mail.ldif among others sampledata_DATA = $(srcdir)/ldap/ldif/Ace.ldif \ $(srcdir)/ldap/ldif/European.ldif \ $(srcdir)/ldap/ldif/Eurosuffix.ldif \ @@ -1117,7 +1123,17 @@ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-FamilyNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-GivenNames \ $(srcdir)/ldap/servers/slapd/tools/rsearch/scripts/dbgen-OrgUnits \ - $(srcdir)/ldap/schema/10rfc2307bis.ldif + $(srcdir)/ldap/schema/10rfc2307bis.ldif \ + $(srcdir)/ldap/schema/60changelog.ldif \ + $(srcdir)/ldap/schema/60inetmail.ldif \ + $(srcdir)/ldap/schema/60krb5kdc.ldif \ + $(srcdir)/ldap/schema/60kerberos.ldif \ + $(srcdir)/ldap/schema/60nis.ldif \ + $(srcdir)/ldap/schema/60qmail.ldif \ + $(srcdir)/ldap/schema/60radius.ldif \ + $(srcdir)/ldap/schema/60rfc4876.ldif \ + $(srcdir)/ldap/schema/60samba.ldif \ + $(srcdir)/ldap/schema/60samba3.ldif schema_DATA = $(srcdir)/ldap/schema/00core.ldif \ $(srcdir)/ldap/schema/01common.ldif \ @@ -1136,6 +1152,15 @@ $(srcdir)/ldap/schema/50ns-value.ldif \ $(srcdir)/ldap/schema/50ns-web.ldif \ $(srcdir)/ldap/schema/60pam-plugin.ldif \ + $(srcdir)/ldap/schema/60autofs.ldif \ + $(srcdir)/ldap/schema/60eduperson.ldif \ + $(srcdir)/ldap/schema/60mozilla.ldif \ + $(srcdir)/ldap/schema/60pureftpd.ldif \ + $(srcdir)/ldap/schema/60rfc2739.ldif \ + $(srcdir)/ldap/schema/60rfc3712.ldif \ + $(srcdir)/ldap/schema/60sabayon.ldif \ + $(srcdir)/ldap/schema/60sudo.ldif \ + $(srcdir)/ldap/schema/60trust.ldif \ $(srcdir)/ldap/schema/99user.ldif sbin_SCRIPTS = ldap/admin/src/scripts/setup-ds.pl \ From rmeggins at fedoraproject.org Thu Oct 16 16:43:38 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Thu, 16 Oct 2008 16:43:38 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/schema 60autofs.ldif, NONE, 1.1 60changelog.ldif, NONE, 1.1 60eduperson.ldif, NONE, 1.1 60inetmail.ldif, NONE, 1.1 60kerberos.ldif, NONE, 1.1 60krb5kdc.ldif, NONE, 1.1 60mozilla.ldif, NONE, 1.1 60nis.ldif, NONE, 1.1 60pureftpd.ldif, NONE, 1.1 60qmail.ldif, NONE, 1.1 60radius.ldif, NONE, 1.1 60rfc2739.ldif, NONE, 1.1 60rfc3712.ldif, NONE, 1.1 60rfc4876.ldif, NONE, 1.1 60sabayon.ldif, NONE, 1.1 60samba.ldif, NONE, 1.1 60samba3.ldif, NONE, 1.1 60sudo.ldif, NONE, 1.1 60trust.ldif, NONE, 1.1 Message-ID: <20081016164338.9C2E670132@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/schema In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18141/ldapserver/ldap/schema Added Files: 60autofs.ldif 60changelog.ldif 60eduperson.ldif 60inetmail.ldif 60kerberos.ldif 60krb5kdc.ldif 60mozilla.ldif 60nis.ldif 60pureftpd.ldif 60qmail.ldif 60radius.ldif 60rfc2739.ldif 60rfc3712.ldif 60rfc4876.ldif 60sabayon.ldif 60samba.ldif 60samba3.ldif 60sudo.ldif 60trust.ldif Log Message: Resolves: bug 455026 bug 441026 Bug Description: RFE: include RFC4876 schema - Autofs does not include LDAP schema for Fedora Directory Server Reviewed by: nkinder (Thanks!) Fix Description: Pieter D.J. Krul has contributed many schema files that have been tested in production environments. They are divided into two groups - those that conflict with existing schema in DS, CertSys, and IPA, and those which do not. The latter are installed in the default schema directory to be available for new instances - the former are installed in the data directory just as the rfc2307bis schema. The schema provided cover autofs and rfc4876, as in the bug reports, and more. Here is the full list of new files: 60trust.ldif 60pureftpd.ldif 60sudo.ldif 60nis.ldif 60samba.ldif 60mozilla.ldif 60samba3.ldif 60krb5kdc.ldif 60sabayon.ldif 60kerberos.ldif 60rfc4876.ldif 60inetmail.ldif 60rfc3712.ldif 60eduperson.ldif 60rfc2739.ldif 60changelog.ldif 60radius.ldif 60autofs.ldif 60qmail.ldif Platforms tested: RHEL5 Flag Day: no Doc impact: yes - document the new schema --- NEW FILE 60autofs.ldif --- # 60autofs.ldif - From draft-howard-rfc2307bis ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.1.1.1.33 NAME 'automountInformation' DESC 'Information used by the autofs automounter' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 1.3.6.1.1.1.2.17 NAME 'automount' DESC 'An entry in an automounter map' SUP top STRUCTURAL MUST ( cn $ automountInformation ) MAY ( description ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.1.1.2.16 NAME 'automountMap' DESC 'An group of related automount objects' SUP top STRUCTURAL MUST ( ou ) ) # ################################################################################ # --- NEW FILE 60changelog.ldif --- # 60changelog.ldif - From draft-good-ldap-changelog-03 ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.5 NAME 'changeNumber' DESC 'a number which uniquely identifies a change made to a directory entry' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.6 NAME 'targetDN' DESC 'the DN of the entry which was modified' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.7 NAME 'changeType' DESC 'the type of change made to an entry' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.8 NAME 'changes' DESC 'a set of changes to apply to an entry' SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.9 NAME 'newRDN' DESC 'the new RDN of an entry which is the target of a modrdn operation' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.10 NAME 'deleteOldRDN' DESC 'a flag which indicates if the old RDN should be retained as an attribute of the entry' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.11 NAME 'newSuperior' DESC 'the new parent of an entry which is the target of a moddn operation' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 2.16.840.1.113730.3.2.1 NAME 'changeLogEntry' SUP top STRUCTURAL MUST ( changeNumber $ targetDN $ changeType ) MAY ( changes $ newRDN $ deleteOldRDN $ newSuperior ) ) # ################################################################################ # --- NEW FILE 60eduperson.ldif --- # 60eduperson.ldif - See http://www.educause.edu/eduperso ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.1 NAME 'eduPersonAffiliation' DESC 'Affiliation' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.2 NAME 'eduPersonNickName' DESC 'NickName' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.3 NAME 'eduPersonOrgDN' DESC 'Organization DN' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.4 NAME 'eduPersonOrgUnitDN' DESC 'Organizational Unit DN' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.5 NAME 'eduPersonPrimaryAffiliation' DESC 'Primary Affiliation' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.6 NAME 'eduPersonPrincipalName' DESC 'Principal Name' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.7 NAME 'eduPersonEntitlement' DESC 'Entitlement' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.8 NAME 'eduPersonPrimaryOrgUnitDN' DESC 'Primary Organizational Unit' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5923.1.1.1.9 NAME 'eduPersonScopedAffiliation' DESC 'Scoped Affiliation' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.5923.1.1.2 NAME 'eduPerson' AUXILIARY MAY ( eduPersonAffiliation $ eduPersonNickName $ eduPersonOrgDN $ eduPersonOrgUnitDN $ eduPersonPrimaryAffiliation $ eduPersonPrincipalName $ eduPersonEntitlement $eduPersonPrimaryOrgUnitDN $ eduPersonScopedAffiliation ) ) # ################################################################################ # --- NEW FILE 60inetmail.ldif --- # 60inetmail.ldif - From the Lachman Intranet Mail Routing - The mailRecipient # Object Class ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15347.2.102 NAME 'transport' SUP name ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.24 NAME 'mailRoutingAddress' SUP mail ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15347.2.110 NAME 'maildest' DESC 'Restricted to send only to local network' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15347.2.111 NAME 'mailaccess' DESC 'Can be mailed to restricted groups' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15347.2.100 NAME ( 'maildrop' ) DESC 'RFC1274: RFC822 Mailbox' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.10018.1.1.1 NAME 'mailbox' DESC 'The absolute path to the mailbox for a mail account in a non-default location' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.15347.2.1 NAME 'mailUser' DESC 'E-Mail User' SUP top AUXILIARY MUST ( uid $ mail $ maildrop ) MAY ( cn $ mailbox $ maildest $ mailaccess ) ) # ################################################################################ # objectClasses: ( 2.16.840.1.113730.3.2.4 NAME 'mailGroup' DESC 'E-Mail Group' SUP top STRUCTURAL MUST ( cn $ mail ) MAY ( mailRoutingAddress $ member $ description ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.15347.2.3 NAME 'transportTable' DESC 'MTA Transport Table' SUP top STRUCTURAL MUST ( cn $ transport ) ) # ################################################################################ # --- NEW FILE 60kerberos.ldif --- dn: cn=schema # Novell Kerberos Schema Definitions # Novell Inc. # 1800 South Novell Place # Provo, UT 84606 # # VeRsIoN=1.0 # CoPyRiGhT=(c) Copyright 2006, Novell, Inc. All rights reserved # # OIDs: # joint-iso-ccitt(2) # country(16) # us(840) # organization(1) # Novell(113719) # applications(1) # kerberos(301) # Kerberos Attribute Type(4) attr# version# # specific attribute definitions # Kerberos Attribute Syntax(5) # specific syntax definitions # Kerberos Object Class(6) class# version# # specific class definitions ######################################################################## ######################################################################## # Attribute Type Definitions # ######################################################################## ##### This is the principal name in the RFC 1964 specified format attributetypes: ( 2.16.840.1.113719.1.301.4.1.1 NAME 'krbPrincipalName' EQUALITY caseExactIA5Match SUBSTR caseExactSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26) ##### This specifies the type of the principal, the types could be any of ##### the types mentioned in section 6.2 of RFC 4120 attributetypes: ( 2.16.840.1.113719.1.301.4.3.1 NAME 'krbPrincipalType' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### This flag is used to find whether directory User Password has to be used ##### as kerberos password. ##### TRUE, if User Password is to be used as the kerberos password. ##### FALSE, if User Password and the kerberos password are different. attributetypes: ( 2.16.840.1.113719.1.301.4.5.1 NAME 'krbUPEnabled' DESC 'Boolean' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE) ##### The time at which the principal expires attributetypes: ( 2.16.840.1.113719.1.301.4.6.1 NAME 'krbPrincipalExpiration' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE) ##### The krbTicketFlags attribute holds information about the kerberos flags for a principal ##### The values (0x00000001 - 0x00800000) are reserved for standards and ##### values (0x01000000 - 0x80000000) can be used for proprietary extensions. ##### The flags and values as per RFC 4120 and MIT implementation are, ##### DISALLOW_POSTDATED 0x00000001 ##### DISALLOW_FORWARDABLE 0x00000002 ##### DISALLOW_TGT_BASED 0x00000004 ##### DISALLOW_RENEWABLE 0x00000008 ##### DISALLOW_PROXIABLE 0x00000010 ##### DISALLOW_DUP_SKEY 0x00000020 ##### DISALLOW_ALL_TIX 0x00000040 ##### REQUIRES_PRE_AUTH 0x00000080 ##### REQUIRES_HW_AUTH 0x00000100 ##### REQUIRES_PWCHANGE 0x00000200 ##### DISALLOW_SVR 0x00001000 ##### PWCHANGE_SERVICE 0x00002000 attributetypes: ( 2.16.840.1.113719.1.301.4.8.1 NAME 'krbTicketFlags' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### The maximum ticket lifetime for a principal in seconds attributetypes: ( 2.16.840.1.113719.1.301.4.9.1 NAME 'krbMaxTicketLife' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Maximum renewable lifetime for a principal's ticket in seconds attributetypes: ( 2.16.840.1.113719.1.301.4.10.1 NAME 'krbMaxRenewableAge' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Forward reference to the Realm object. ##### (FDN of the krbRealmContainer object). ##### Example: cn=ACME.COM, cn=Kerberos, cn=Security attributetypes: ( 2.16.840.1.113719.1.301.4.14.1 NAME 'krbRealmReferences' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### List of LDAP servers that kerberos servers can contact. ##### The attribute holds data in the ldap uri format, ##### Example: ldaps://acme.com:636 ##### ##### The values of this attribute need to be updated, when ##### the LDAP servers listed here are renamed, moved or deleted. attributetypes: ( 2.16.840.1.113719.1.301.4.15.1 NAME 'krbLdapServers' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15) ##### A set of forward references to the KDC Service objects. ##### (FDNs of the krbKdcService objects). ##### Example: cn=kdc - server 1, ou=uvw, o=xyz attributetypes: ( 2.16.840.1.113719.1.301.4.17.1 NAME 'krbKdcServers' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### A set of forward references to the Password Service objects. ##### (FDNs of the krbPwdService objects). ##### Example: cn=kpasswdd - server 1, ou=uvw, o=xyz attributetypes: ( 2.16.840.1.113719.1.301.4.18.1 NAME 'krbPwdServers' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### This attribute holds the Host Name or the ip address, ##### transport protocol and ports of the kerberos service host ##### The format is host_name-or-ip_address#protocol#port ##### Protocol can be 0 or 1. 0 is for UDP. 1 is for TCP. attributetypes: ( 2.16.840.1.113719.1.301.4.24.1 NAME 'krbHostServer' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26) ##### This attribute holds the scope for searching the principals ##### under krbSubTree attribute of krbRealmContainer ##### The value can either be 1 (ONE) or 2 (SUB_TREE). attributetypes: ( 2.16.840.1.113719.1.301.4.25.1 NAME 'krbSearchScope' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### FDNs pointing to Kerberos principals attributetypes: ( 2.16.840.1.113719.1.301.4.26.1 NAME 'krbPrincipalReferences' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### This attribute specifies which attribute of the user objects ##### be used as the principal name component for Kerberos. ##### The allowed values are cn, sn, uid, givenname, fullname. attributetypes: ( 2.16.840.1.113719.1.301.4.28.1 NAME 'krbPrincNamingAttr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE) ##### A set of forward references to the Administration Service objects. ##### (FDNs of the krbAdmService objects). ##### Example: cn=kadmindd - server 1, ou=uvw, o=xyz attributetypes: ( 2.16.840.1.113719.1.301.4.29.1 NAME 'krbAdmServers' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### Maximum lifetime of a principal's password attributetypes: ( 2.16.840.1.113719.1.301.4.30.1 NAME 'krbMaxPwdLife' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Minimum lifetime of a principal's password attributetypes: ( 2.16.840.1.113719.1.301.4.31.1 NAME 'krbMinPwdLife' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Minimum number of character clases allowed in a password attributetypes: ( 2.16.840.1.113719.1.301.4.32.1 NAME 'krbPwdMinDiffChars' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Minimum length of the password attributetypes: ( 2.16.840.1.113719.1.301.4.33.1 NAME 'krbPwdMinLength' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### Number of previous versions of passwords that are stored attributetypes: ( 2.16.840.1.113719.1.301.4.34.1 NAME 'krbPwdHistoryLength' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### FDN pointing to a Kerberos Password Policy object attributetypes: ( 2.16.840.1.113719.1.301.4.36.1 NAME 'krbPwdPolicyReference' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE) ##### The time at which the principal's password expires attributetypes: ( 2.16.840.1.113719.1.301.4.37.1 NAME 'krbPasswordExpiration' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE) ##### This attribute holds the principal's key (krbPrincipalKey) that is encrypted with ##### the master key (krbMKey). ##### The attribute is ASN.1 encoded. ##### ##### The format of the value for this attribute is explained below, ##### KrbKeySet ::= SEQUENCE { ##### attribute-major-vno [0] UInt16, ##### attribute-minor-vno [1] UInt16, ##### kvno [2] UInt32, ##### mkvno [3] UInt32 OPTIONAL, ##### keys [4] SEQUENCE OF KrbKey, ##### ... ##### } ##### ##### KrbKey ::= SEQUENCE { ##### salt [0] KrbSalt OPTIONAL, ##### key [1] EncryptionKey, ##### s2kparams [2] OCTET STRING OPTIONAL, ##### ... ##### } ##### ##### KrbSalt ::= SEQUENCE { ##### type [0] Int32, ##### salt [1] OCTET STRING OPTIONAL ##### } ##### ##### EncryptionKey ::= SEQUENCE { ##### keytype [0] Int32, ##### keyvalue [1] OCTET STRING ##### } attributetypes: ( 2.16.840.1.113719.1.301.4.39.1 NAME 'krbPrincipalKey' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40) ##### FDN pointing to a Kerberos Ticket Policy object. attributetypes: ( 2.16.840.1.113719.1.301.4.40.1 NAME 'krbTicketPolicyReference' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE) ##### Forward reference to an entry that starts sub-trees ##### where principals and other kerberos objects in the realm are configured. ##### Example: ou=acme, ou=pq, o=xyz attributetypes: ( 2.16.840.1.113719.1.301.4.41.1 NAME 'krbSubTrees' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### Holds the default encryption/salt type combinations of principals for ##### the Realm. Stores in the form of key:salt strings. ##### Example: des-cbc-crc:normal attributetypes: ( 2.16.840.1.113719.1.301.4.42.1 NAME 'krbDefaultEncSaltTypes' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15) ##### Holds the Supported encryption/salt type combinations of principals for ##### the Realm. Stores in the form of key:salt strings. ##### The supported encryption types are mentioned in RFC 3961 ##### The supported salt types are, ##### NORMAL ##### V4 ##### NOREALM ##### ONLYREALM ##### SPECIAL ##### AFS3 ##### Example: des-cbc-crc:normal ##### ##### This attribute obsoletes the krbSupportedEncTypes and krbSupportedSaltTypes ##### attributes. attributetypes: ( 2.16.840.1.113719.1.301.4.43.1 NAME 'krbSupportedEncSaltTypes' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15) ##### This attribute holds the principal's old keys (krbPwdHistory) that is encrypted with ##### the kadmin/history key. ##### The attribute is ASN.1 encoded. ##### ##### The format of the value for this attribute is explained below, ##### KrbKeySet ::= SEQUENCE { ##### attribute-major-vno [0] UInt16, ##### attribute-minor-vno [1] UInt16, ##### kvno [2] UInt32, ##### mkvno [3] UInt32 OPTIONAL -- actually kadmin/history key, ##### keys [4] SEQUENCE OF KrbKey, ##### ... ##### } ##### ##### KrbKey ::= SEQUENCE { ##### salt [0] KrbSalt OPTIONAL, ##### key [1] EncryptionKey, ##### s2kparams [2] OCTET STRING OPTIONAL, ##### ... ##### } ##### ##### KrbSalt ::= SEQUENCE { ##### type [0] Int32, ##### salt [1] OCTET STRING OPTIONAL ##### } ##### ##### EncryptionKey ::= SEQUENCE { ##### keytype [0] Int32, ##### keyvalue [1] OCTET STRING ##### } attributetypes: ( 2.16.840.1.113719.1.301.4.44.1 NAME 'krbPwdHistory' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40) ##### The time at which the principal's password last password change happened. attributetypes: ( 2.16.840.1.113719.1.301.4.45.1 NAME 'krbLastPwdChange' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE) ##### This attribute holds the kerberos master key. ##### This can be used to encrypt principal keys. ##### This attribute has to be secured in directory. ##### ##### This attribute is ASN.1 encoded. ##### The format of the value for this attribute is explained below, ##### KrbMKey ::= SEQUENCE { ##### kvno [0] UInt32, ##### key [1] MasterKey ##### } ##### ##### MasterKey ::= SEQUENCE { ##### keytype [0] Int32, ##### keyvalue [1] OCTET STRING ##### } attributetypes: ( 2.16.840.1.113719.1.301.4.46.1 NAME 'krbMKey' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40) ##### This stores the alternate principal names for the principal in the RFC 1961 specified format attributetypes: ( 2.16.840.1.113719.1.301.4.47.1 NAME 'krbPrincipalAliases' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26) ##### The time at which the principal's last successful authentication happened. attributetypes: ( 2.16.840.1.113719.1.301.4.48.1 NAME 'krbLastSuccessfulAuth' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE) ##### The time at which the principal's last failed authentication happened. attributetypes: ( 2.16.840.1.113719.1.301.4.49.1 NAME 'krbLastFailedAuth' EQUALITY generalizedTimeMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE) ##### This attribute stores the number of failed authentication attempts ##### happened for the principal since the last successful authentication. attributetypes: ( 2.16.840.1.113719.1.301.4.50.1 NAME 'krbLoginFailedCount' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE) ##### This attribute holds the application specific data. attributetypes: ( 2.16.840.1.113719.1.301.4.51.1 NAME 'krbExtraData' EQUALITY octetStringMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.40) ##### This attributes holds references to the set of directory objects. ##### This stores the DNs of the directory objects to which the ##### principal object belongs to. attributetypes: ( 2.16.840.1.113719.1.301.4.52.1 NAME 'krbObjectReferences' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ##### This attribute holds references to a Container object where ##### the additional principal objects and stand alone principal ##### objects (krbPrincipal) can be created. attributetypes: ( 2.16.840.1.113719.1.301.4.53.1 NAME 'krbPrincContainerRef' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) ######################################################################## ######################################################################## # Object Class Definitions # ######################################################################## #### This is a kerberos container for all the realms in a tree. objectClasses: ( 2.16.840.1.113719.1.301.6.1.1 NAME 'krbContainer' SUP top MUST ( cn ) ) ##### The krbRealmContainer is created per realm and holds realm specific data. objectClasses: ( 2.16.840.1.113719.1.301.6.2.1 NAME 'krbRealmContainer' SUP top MUST ( cn ) MAY ( krbMKey $ krbUPEnabled $ krbSubTrees $ krbSearchScope $ krbLdapServers $ krbSupportedEncSaltTypes $ krbDefaultEncSaltTypes $ krbTicketPolicyReference $ krbKdcServers $ krbPwdServers $ krbAdmServers $ krbPrincNamingAttr $krbPwdPolicyReference $ krbPrincContainerRef ) ) ##### An instance of a class derived from krbService is created per ##### kerberos authentication or administration server in an realm and holds ##### references to the realm objects. These references is used to further read ##### realm specific data to service AS/TGS requests. Additionally this object ##### contains some server specific data like pathnames and ports that the ##### server uses. This is the identity the kerberos server logs in with. A key ##### pair for the same is created and the kerberos server logs in with the same. ##### ##### krbKdcService, krbAdmService and krbPwdService derive from this class. objectClasses: ( 2.16.840.1.113719.1.301.6.3.1 NAME 'krbService' ABSTRACT SUP ( top ) MUST ( cn ) MAY ( krbHostServer $ krbRealmReferences ) ) ##### Representative object for the KDC server to bind into a LDAP directory ##### and have a connection to access Kerberos data with the required ##### access rights. objectClasses: ( 2.16.840.1.113719.1.301.6.4.1 NAME 'krbKdcService' SUP ( krbService ) ) ##### Representative object for the Kerberos Password server to bind into a LDAP directory ##### and have a connection to access Kerberos data with the required ##### access rights. objectClasses: ( 2.16.840.1.113719.1.301.6.5.1 NAME 'krbPwdService' SUP ( krbService ) ) ###### The principal data auxiliary class. Holds principal information ###### and is used to store principal information for Person, Service objects. objectClasses: ( 2.16.840.1.113719.1.301.6.8.1 NAME 'krbPrincipalAux' AUXILIARY MAY ( krbPrincipalName $ krbUPEnabled $ krbPrincipalKey $ krbTicketPolicyReference $ krbPrincipalExpiration $ krbPasswordExpiration $ krbPwdPolicyReference $ krbPrincipalType $ krbPwdHistory $ krbLastPwdChange $ krbPrincipalAliases $ krbLastSuccessfulAuth $ krbLastFailedAuth $ krbLoginFailedCount $ krbExtraData ) ) ###### This class is used to create additional principals and stand alone principals. objectClasses: ( 2.16.840.1.113719.1.301.6.9.1 NAME 'krbPrincipal' SUP ( top ) MUST ( krbPrincipalName ) MAY ( krbObjectReferences ) ) ###### The principal references auxiliary class. Holds all principals referred ###### from a service objectClasses: ( 2.16.840.1.113719.1.301.6.11.1 NAME 'krbPrincRefAux' SUP top AUXILIARY MAY krbPrincipalReferences ) ##### Representative object for the Kerberos Administration server to bind into a LDAP directory ##### and have a connection Id to access Kerberos data with the required access rights. objectClasses: ( 2.16.840.1.113719.1.301.6.13.1 NAME 'krbAdmService' SUP ( krbService ) ) ##### The krbPwdPolicy object is a template password policy that ##### can be applied to principals when they are created. ##### These policy attributes will be in effect, when the Kerberos ##### passwords are different from users' passwords (UP). objectClasses: ( 2.16.840.1.113719.1.301.6.14.1 NAME 'krbPwdPolicy' SUP top MUST ( cn ) MAY ( krbMaxPwdLife $ krbMinPwdLife $ krbPwdMinDiffChars $ krbPwdMinLength $ krbPwdHistoryLength ) ) ##### The krbTicketPolicyAux holds Kerberos ticket policy attributes. ##### This class can be attached to a principal object or realm object. objectClasses: ( 2.16.840.1.113719.1.301.6.16.1 NAME 'krbTicketPolicyAux' AUXILIARY MAY ( krbTicketFlags $ krbMaxTicketLife $ krbMaxRenewableAge ) ) ##### The krbTicketPolicy object is an effective ticket policy that is associated with a realm or a principal objectClasses: ( 2.16.840.1.113719.1.301.6.17.1 NAME 'krbTicketPolicy' SUP top MUST ( cn ) ) --- NEW FILE 60krb5kdc.ldif --- # ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.1 NAME 'krb5PrincipalName' DESC 'The unparsed Kerberos principal name' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.2 NAME 'krb5KeyVersionNumber' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.3 NAME 'krb5MaxLife' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.4 NAME 'krb5MaxRenew' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.5 NAME 'krb5KDCFlags' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.6 NAME 'krb5EncryptionType' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.7 NAME 'krb5ValidStart' EQUALITY generalizedTimeMatch ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.8 NAME 'krb5ValidEnd' EQUALITY generalizedTimeMatch ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.9 NAME 'krb5PasswordEnd' EQUALITY generalizedTimeMatch ORDERING generalizedTimeOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.10 NAME 'krb5Key' DESC 'Encoded ASN1 Key as an octet string' SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.11 NAME 'krb5PrincipalRealm' DESC 'Distinguished name of krb5Realm entry' SUP distinguishedName ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.5322.10.1.12 NAME 'krb5RealmName' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.5322.10.2.1 NAME 'krb5Principal' SUP top AUXILIARY MUST ( krb5PrincipalName ) MAY ( cn $ krb5PrincipalRealm ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.5322.10.2.2 NAME 'krb5KDCEntry' SUP krb5Principal AUXILIARY MUST ( krb5KeyVersionNumber ) MAY ( krb5ValidStart $ krb5ValidEnd $ krb5PasswordEnd $ krb5MaxLife $ krb5MaxRenew $ krb5KDCFlags $ krb5EncryptionType $ krb5Key ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.5322.10.2.3 NAME 'krb5Realm' SUP top AUXILIARY MUST ( krb5RealmName ) ) # ################################################################################ # --- NEW FILE 60mozilla.ldif --- # 60mozilla.ldif # mozillaAbPersonAlpha # # Created initial version --[[User:Standard8|Standard8]] 12:21, 5 Dec 2005 (PST) # # This file contains LDAPv3 schema for use with the Mozilla Address Book # and is intended to ... # # Depends upon # Definition of an X.500 Attribute Type and an Object Class to Hold # Uniform Resource Identifiers (URIs) [RFC2079], and A Summary of # the X.500(96) User Schema for use with LDAPv3 [RFC2256] (core.schema) # # The COSINE and Internet X.500 Schema [RFC1274] (cosine.schema) # # The InetOrgPerson Schema [RFC2798] (inetorgperson.schema) # # 1.3.6.1.4.1.13769.4.x - Mozilla AB 'Other' tab ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.4.1 NAME 'mozillaCustom1' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.4.2 NAME 'mozillaCustom2' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.4.3 NAME 'mozillaCustom3' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.4.4 NAME 'mozillaCustom4' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.1 NAME 'mozillaHomeStreet' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.2 NAME 'mozillaHomeStreet2' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.3 NAME 'mozillaHomeLocalityName' SUP name SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.4 NAME 'mozillaHomeState' SUP name SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.5 NAME 'mozillaHomePostalCode' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.6 NAME 'mozillaHomeCountryName' SUP name SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.7 NAME 'mozillaHomeUrl' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.8 NAME 'mozillaWorkStreet2' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.3.9 NAME 'mozillaWorkUrl' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.2.1 NAME ( 'mozillaNickname' 'xmozillanickname' ) SUP name ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.2.2 NAME ( 'mozillaSecondEmail' 'xmozillasecondemail' ) EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.13769.2.3 NAME ( 'mozillaUseHtmlMail' 'xmozillausehtmlmail' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # nsAIMid is already defined in 10presence.ldif as 2.16.840.1.113730.3.1.2013 attributeTypes: ( 1.3.6.1.4.1.13769.2.4 NAME ( 'nscpaimscreenname' ) EQUALITY telephoneNumberMatch SUBSTR telephoneNumberSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 ) # ################################################################################ # 1.3.6.1.4.1.13769.9 - Mozilla AB objectclasses # # The mozillaAddressBookEntry object class is used to define entries # representing Cards in the Mozilla Address Book. The commonName attribute # is used for naming entries of this object class, but may not be unique. # objectClasses: ( 1.3.6.1.4.1.13769.9.1 NAME 'mozillaAbPersonAlpha' SUP top AUXILIARY MUST ( cn ) MAY ( c $ description $ displayName $ fax $ givenName $ homePhone $ l $ mail $ mobile $ mozillaCustom1 $ mozillaCustom2 $ mozillaCustom3 $ mozillaCustom4 $ mozillaHomeCountryName $ mozillaHomeLocalityName $ mozillaHomePostalCode $ mozillaHomeState $ mozillaHomeStreet $ mozillaHomeStreet2 $ mozillaHomeUrl $ mozillaNickname $ mozillaSecondEmail $ mozillaUseHtmlMail $ mozillaWorkStreet2 $ mozillaWorkUrl $ nsAIMid $ o $ ou $ pager $ postalCode $ postOfficeBox $ sn $ st $ street $ telephoneNumber $ title ) ) # ################################################################################ # --- NEW FILE 60nis.ldif --- # 60nis.ldif - NIS schema, including mailgroups # This is basically an extension of 10rfc2307.ldif ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.1.1.1.28 NAME 'nisPublickey' DESC 'nisPublickey' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.1.1.1.29 NAME 'nisSecretkey' DESC 'nisSecretkey' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.1.1.1.12 NAME 'nisDomain' DESC 'NIS domain' SUP name SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 2.16.840.1.113730.3.1.30 NAME 'mgrpRFC822MailMember' DESC 'mgrpRFC822MailMember' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.42.2.27.1.1.12 NAME 'nisNetIdUser' DESC 'nisNetIdUser' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.42.2.27.1.1.13 NAME 'nisNetIdGroup' DESC 'nisNetIdGroup' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.42.2.27.1.1.14 NAME 'nisNetIdHost' DESC 'nisNetIdHost' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # objectClasses: ( 1.3.6.1.1.1.2.14 NAME 'NisKeyObject' DESC 'NisKeyObject' SUP top MUST ( cn $ nisPublickey $ nisSecretkey ) MAY ( uidNumber $ description ) ) # ################################################################################ # objectClasses: ( 1.3.1.6.1.1.1.2.15 NAME 'nisDomainObject' DESC 'nisDomainObject' SUP top AUXILIARY MUST ( nisDomain ) ) # ################################################################################ # objectClasses: ( 2.16.840.1.113730.3.2.4 NAME 'mailGroup' DESC 'mailGroup' SUP top MUST ( mail ) MAY ( cn $ mgrpRFC822MailMember ) ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.42.2.27.2.1.15 NAME 'rfc822MailMember' DESC 'rfc822 mail address of group member(s)' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.42.2.27.1.2.5 NAME 'nisMailAlias' DESC 'NIS mail alias' SUP top STRUCTURAL MUST cn MAY rfc822MailMember ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.42.2.27.1.2.6 NAME 'nisNetId' DESC 'nisNetId' SUP top MUST ( cn ) MAY ( nisNetIdUser $ nisNetIdGroup $ nisNetIdHost ) ) # ################################################################################ # --- NEW FILE 60pureftpd.ldif --- # 60pureftpd.ldif - pureftpd.schema for Fedora / Red Hat Directory Server ################################################################################ # # See README.LDAP in the Pure-FTPd documentation for more information. # # Written 2002-01-24 by Ben Gertzfield # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.1 NAME 'FTPQuotaFiles' DESC 'Quota (in number of files) for an FTP user' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.2 NAME 'FTPQuotaMBytes' DESC 'Quota (in megabytes) for an FTP user' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.3 NAME 'FTPUploadRatio' DESC 'Ratio (compared with FTPRatioDown) for uploaded files' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.4 NAME 'FTPDownloadRatio' DESC 'Ratio (compared with FTPRatioUp) for downloaded files' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.5 NAME 'FTPUploadBandwidth' DESC 'Bandwidth (in KB/s) to limit upload speeds to' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.6 NAME 'FTPDownloadBandwidth' DESC 'Bandwidth (in KB/s) to limit download speeds to' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.7 NAME 'FTPStatus' DESC 'Account status: enabled or disabled' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.8 NAME 'FTPuid' DESC 'System uid (overrides uidNumber if present)' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.6981.11.3.9 NAME 'FTPgid' DESC 'System uid (overrides gidNumber if present)' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.6981.11.2.3 NAME 'PureFTPdUser' DESC 'PureFTPd user with optional quota, throttling and ratio' MAY ( FTPStatus $ FTPQuotaFiles $ FTPQuotaMBytes $ FTPUploadRatio $ FTPDownloadRatio $ FTPUploadBandwidth $ FTPDownloadBandwidth $ FTPuid $ FTPgid ) ) # ################################################################################ # --- NEW FILE 60qmail.ldif --- # 60qmail.ldif - From qmail-ldap # Attributes mailMessageStore, mailAlternateAddress, mailForwardingAddress, and # mailHost are already present in 50ns-mail.ldif ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.1 NAME 'qmailUID' DESC 'UID of the user on the mailsystem' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.2 NAME 'qmailGID' DESC 'GID of the user on the mailsystem' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # Present in 50ns-mail.ldif # attributeTypes: ( # 1.3.6.1.4.1.7914.1.2.1.3 # NAME 'mailMessageStore' # DESC 'Path to the maildir/mbox on the mail system' # EQUALITY caseExactIA5Match # SUBSTR caseIgnoreIA5SubstringsMatch # SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} # SINGLE-VALUE # ) # ################################################################################ # Present in 50ns-mail.ldif # attributeTypes: ( # 1.3.6.1.4.1.7914.1.2.1.4 # NAME 'mailAlternateAddress' # DESC 'Secondary (alias) mailaddresses for the same user' # EQUALITY caseIgnoreIA5Match # SUBSTR caseIgnoreIA5SubstringsMatch # SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} # ) # ################################################################################ # Present in 50ns-mail.ldif # attributeTypes: ( # 1.3.6.1.4.1.7914.1.2.1.6 # NAME 'mailHost' # DESC 'On which qmail server the messagestore of this user is located.' # EQUALITY caseIgnoreIA5Match # SUBSTR caseIgnoreIA5SubstringsMatch # SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} # SINGLE-VALUE # ) # ################################################################################ # Present in 50ns-mail.ldif # attributeTypes: ( # 1.3.6.1.4.1.7914.1.2.1.7 # NAME 'mailForwardingAddress' # DESC 'Address(es) to forward all incoming messages to.' # EQUALITY caseIgnoreIA5Match # SUBSTR caseIgnoreIA5SubstringsMatch # SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} # ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.8 NAME 'deliveryProgramPath' DESC 'Program to execute for all incoming mails.' EQUALITY caseExactIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.9 NAME 'qmailDotMode' DESC 'Interpretation of .qmail files: both, dotonly, ldaponly, ldapwithprog' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.10 NAME 'deliveryMode' DESC 'multi field entries of: nolocal, noforward, noprogram, reply' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.11 NAME 'mailReplyText' DESC 'A reply text for every incoming message' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.12 NAME 'accountStatus' DESC 'The status of a user account: active, noaccess, disabled, deleted' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.13 NAME 'qmailAccountPurge' DESC 'The earliest date when a mailMessageStore will be purged' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.15 NAME 'mailQuotaSize' DESC 'The size of space the user can have until further messages get bounced.' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.16 NAME 'mailQuotaCount' DESC 'The number of messages the user can have until further messages get bounced.' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.2.1.17 NAME 'mailSizeMax' DESC 'The maximum size of a single messages the user accepts.' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.1 NAME 'dnmember' DESC 'Group member specified as distinguished name.' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.2 NAME 'rfc822member' DESC 'Group member specified as normal rf822 email address.' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.3 NAME 'filtermember' DESC 'Group member specified as ldap search filter.' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.4 NAME 'senderconfirm' DESC 'Sender to Group has to answer confirmation email.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.5 NAME 'membersonly' DESC 'Sender to Group must be group member itself.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.6 NAME 'confirmtext' DESC 'Text that will be sent with sender confirmation email.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.7 NAME 'dnmoderator' DESC 'Group moderator specified as Distinguished name.' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.8 NAME 'rfc822moderator' DESC 'Group moderator specified as normal rfc822 email address.' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.9 NAME 'moderatortext' DESC 'Text that will be sent with request for moderation email.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.10 NAME 'dnsender' DESC 'Allowed sender specified as distinguished name.' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.11 NAME 'rfc822sender' DESC 'Allowed sender specified as normal rf822 email address.' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.3.1.12 NAME 'filtersender' DESC 'Allowed sender specified as ldap search filter.' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.1 NAME 'qladnmanager' DESC EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.2 NAME 'qlaDomainList' DESC EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.3 NAME 'qlaUidPrefix' DESC EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.4 NAME 'qlaQmailUid' DESC EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.5 NAME 'qlaQmailGid' DESC EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.6 NAME 'qlaMailMStorePrefix' DESC EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.7 NAME 'qlaMailQuotaSize' DESC EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.8 NAME 'qlaMailQuotaCount' DESC EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.9 NAME 'qlaMailSizeMax' DESC EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7914.1.4.1.10 NAME 'qlaMailHostList' DESC EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7914.1.2.2.1 NAME 'qmailUser' DESC 'QMail-LDAP User' SUP top AUXILIARY MUST ( mail ) MAY ( uid $ mailMessageStore $ homeDirectory $ userPassword $ mailAlternateAddress $ qmailUID $ qmailGID $ mailHost $ mailForwardingAddress $ deliveryProgramPath $ qmailDotMode $ deliveryMode $ mailReplyText $ accountStatus $ qmailAccountPurge $ mailQuotaSize $ mailQuotaCount $ mailSizeMax ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7914.1.3.2.1 NAME 'qmailGroup' DESC 'QMail-LDAP Group' SUP top AUXILIARY MUST ( mail $ mailAlternateAddress $ mailMessageStore ) MAY ( dnmember $ rfc822member $ filtermember $ senderconfirm $ membersonly $ confirmtext $ dnmoderator $ rfc822moderator $ moderatortext $ dnsender $ rfc822sender $ filtersender) ) # ################################################################################ # --- NEW FILE 60radius.ldif --- # This is a LDAPv3 schema for RADIUS attributes. # Tested on OpenLDAP 2.0.7 # Posted by Javier Fernandez-Sanguino Pena # LDAP v3 version by Jochen Friedrich # Updates by Adrian Pavlykevych # Modified by John Dennis for use with Directory Sever/IPA # # Note: These OID's do not seem to be registered, the closest I could find # was 1.3.6.1.4.1.3317 # {iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) gnome(3317)} # ############## dn: cn=schema attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.1 NAME 'radiusArapFeatures' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.2 NAME 'radiusArapSecurity' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.3 NAME 'radiusArapZoneAccess' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.44 NAME 'radiusAuthType' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.4 NAME 'radiusCallbackId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.5 NAME 'radiusCallbackNumber' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.6 NAME 'radiusCalledStationId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.7 NAME 'radiusCallingStationId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.8 NAME 'radiusClass' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.45 NAME 'radiusClientIPAddress' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.9 NAME 'radiusFilterId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.10 NAME 'radiusFramedAppleTalkLink' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.11 NAME 'radiusFramedAppleTalkNetwork' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.12 NAME 'radiusFramedAppleTalkZone' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.13 NAME 'radiusFramedCompression' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.14 NAME 'radiusFramedIPAddress' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.15 NAME 'radiusFramedIPNetmask' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.16 NAME 'radiusFramedIPXNetwork' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.17 NAME 'radiusFramedMTU' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.18 NAME 'radiusFramedProtocol' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.19 NAME 'radiusFramedRoute' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.20 NAME 'radiusFramedRouting' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.46 NAME 'radiusGroupName' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.47 NAME 'radiusHint' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.48 NAME 'radiusHuntgroupName' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.21 NAME 'radiusIdleTimeout' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.22 NAME 'radiusLoginIPHost' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.23 NAME 'radiusLoginLATGroup' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.24 NAME 'radiusLoginLATNode' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.25 NAME 'radiusLoginLATPort' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.26 NAME 'radiusLoginLATService' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.27 NAME 'radiusLoginService' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.28 NAME 'radiusLoginTCPPort' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.29 NAME 'radiusPasswordRetry' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.30 NAME 'radiusPortLimit' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.49 NAME 'radiusProfileDn' DESC '' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.31 NAME 'radiusPrompt' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.50 NAME 'radiusProxyToRealm' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.51 NAME 'radiusReplicateToRealm' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.52 NAME 'radiusRealm' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.32 NAME 'radiusServiceType' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.33 NAME 'radiusSessionTimeout' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.34 NAME 'radiusTerminationAction' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.35 NAME 'radiusTunnelAssignmentId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.36 NAME 'radiusTunnelMediumType' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.37 NAME 'radiusTunnelPassword' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.38 NAME 'radiusTunnelPreference' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.39 NAME 'radiusTunnelPrivateGroupId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.40 NAME 'radiusTunnelServerEndpoint' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.41 NAME 'radiusTunnelType' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.42 NAME 'radiusVSA' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.43 NAME 'radiusTunnelClientEndpoint' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) #need to change asn1.id attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.53 NAME 'radiusSimultaneousUse' DESC '' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.54 NAME 'radiusLoginTime' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.55 NAME 'radiusUserCategory' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.56 NAME 'radiusStripUserName' DESC '' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.57 NAME 'dialupAccess' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.58 NAME 'radiusExpiration' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.59 NAME 'radiusCheckItem' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.60 NAME 'radiusReplyItem' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.61 NAME 'radiusNASIpAddress' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.62 NAME 'radiusReplyMessage' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) objectClasses: ( 1.3.6.1.4.1.3317.4.3.2.1 NAME 'radiusprofile' SUP top AUXILIARY DESC '' MUST uid MAY ( radiusArapFeatures $ radiusArapSecurity $ radiusArapZoneAccess $ radiusAuthType $ radiusCallbackId $ radiusCallbackNumber $ radiusCalledStationId $ radiusCallingStationId $ radiusClass $ radiusClientIPAddress $ radiusFilterId $ radiusFramedAppleTalkLink $ radiusFramedAppleTalkNetwork $ radiusFramedAppleTalkZone $ radiusFramedCompression $ radiusFramedIPAddress $ radiusFramedIPNetmask $ radiusFramedIPXNetwork $ radiusFramedMTU $ radiusFramedProtocol $ radiusCheckItem $ radiusReplyItem $ radiusFramedRoute $ radiusFramedRouting $ radiusIdleTimeout $ radiusGroupName $ radiusHint $ radiusHuntgroupName $ radiusLoginIPHost $ radiusLoginLATGroup $ radiusLoginLATNode $ radiusLoginLATPort $ radiusLoginLATService $ radiusLoginService $ radiusLoginTCPPort $ radiusLoginTime $ radiusPasswordRetry $ radiusPortLimit $ radiusPrompt $ radiusProxyToRealm $ radiusRealm $ radiusReplicateToRealm $ radiusServiceType $ radiusSessionTimeout $ radiusStripUserName $ radiusTerminationAction $ radiusTunnelClientEndpoint $ radiusProfileDn $ radiusSimultaneousUse $ radiusTunnelAssignmentId $ radiusTunnelMediumType $ radiusTunnelPassword $ radiusTunnelPreference $ radiusTunnelPrivateGroupId $ radiusTunnelServerEndpoint $ radiusTunnelType $ radiusUserCategory $ radiusVSA $ radiusExpiration $ dialupAccess $ radiusNASIpAddress $ radiusReplyMessage ) ) objectClasses: ( 1.3.6.1.4.1.3317.4.3.2.2 NAME 'radiusObjectProfile' SUP top STRUCTURAL DESC 'A Container Objectclass to be used for creating radius profile object' MUST cn MAY ( uid $ userPassword $ description ) ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.64 NAME 'radiusClientSecret' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.65 NAME 'radiusClientNASType' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) attributeTypes: ( 1.3.6.1.4.1.3317.4.3.1.66 NAME 'radiusClientShortName' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) objectClasses: ( 1.3.6.1.4.1.3317.4.3.2.3 NAME 'radiusClientProfile' SUP top STRUCTURAL DESC 'A Container Objectclass to be used for describing radius clients' MUST (radiusClientIPAddress $ radiusClientSecret) MAY ( radiusClientNASType $ radiusClientShortName $ description ) ) --- NEW FILE 60rfc2739.ldif --- # 60rfc2739.ldif - RFC 2739, Calendar Attributes for vCard and LDAP ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.478 NAME 'calCalURI' DESC 'RFC2739: URI of entire default calendar' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.479 NAME 'calFBURL' DESC 'RFC2739: URI to the users default freebusy data' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.480 NAME 'calCAPURI' DESC 'RFC2739: URI used to communicate with the users calendar' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.481 NAME 'calCalAdrURI' DESC 'RFC2739: URI for event equests destination' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.482 NAME 'calOtherCalURIs' DESC 'RFC2739: multi-value URI for snapshots of other calendars' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.483 NAME 'calOtherFBURLs' DESC 'RFC2739: multi-value URI for other free/busy data' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.484 NAME 'calOtherCAPURIs' DESC 'RFC2739: multi-value URI to other calendars' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # attributeTypes: ( 1.2.840.113556.1.4.485 NAME 'calOtherCalAdrURIs' DESC 'RFC2739: multi-value URI to other request destinations' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 USAGE userApplications ) # ################################################################################ # objectClasses: ( 1.2.840.113556.1.5.87 NAME 'calEntry' DESC 'RFC2739: Calendar Entry' SUP top AUXILIARY MAY ( calCalURI $ calFBURL $ calOtherCalURIs $ calOtherFBURLs $ calCAPURI $ calOtherCAPURIs ) ) # ################################################################################ # --- NEW FILE 60rfc3712.ldif --- # 60rfc3712.ldif - LDAP Schema for Printer Services ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1140 NAME 'printer-uri' DESC 'A URI supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1107 NAME 'printer-xri-supported' DESC 'The unordered list of XRI (extended resource identifiers) supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1135 NAME 'printer-name' DESC 'The site-specific administrative name of this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1119 NAME 'printer-natural-language-configured' DESC 'The configured natural language in which error and status messages will be generated (by default) by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1136 NAME 'printer-location' DESC 'The physical location of this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1139 NAME 'printer-info' DESC 'Descriptive information about this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1134 NAME 'printer-more-info' DESC 'A URI for more information about this specific printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1138 NAME 'printer-make-and-model' DESC 'Make and model of this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1133 NAME 'printer-ipp-versions-supported' DESC 'IPP protocol version(s) that this printer supports.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1132 NAME 'printer-multiple-document-jobs-supported' DESC 'Indicates whether or not this printer supports more than one document per job.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1109 NAME 'printer-charset-configured' DESC 'The configured charset in which error and status messages will be generated (by default) by this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1131 NAME 'printer-charset-supported' DESC 'Set of charsets supported for the attribute values of syntax DirectoryString for this directory entry.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1137 NAME 'printer-generated-natural-language-supported' DESC 'Natural language(s) supported for this directory entry.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{63} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1130 NAME 'printer-document-format-supported' DESC 'The possible source document formats which may be interpreted and printed by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1129 NAME 'printer-color-supported' DESC 'Indicates whether this printer is capable of any type of color printing at all, including highlight color.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1128 NAME 'printer-compression-supported' DESC 'Compression algorithms supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1127 NAME 'printer-pages-per-minute' DESC 'The nominal number of pages per minute which may be output by this printer.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1126 NAME 'printer-pages-per-minute-color' DESC 'The nominal number of color pages per minute which may be output by this printer.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1125 NAME 'printer-finishings-supported' DESC 'The possible finishing operations supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1124 NAME 'printer-number-up-supported' DESC 'The possible numbers of print-stream pages to impose upon a single side of an instance of a selected medium.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1123 NAME 'printer-sides-supported' DESC 'The number of impression sides (one or two) and the two-sided impression rotations supported by this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1122 NAME 'printer-media-supported' DESC 'The standard names/types/sizes (and optional color suffixes) of the media supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1117 NAME 'printer-media-local-supported' DESC 'Site-specific names of media supported by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1121 NAME 'printer-resolution-supported' DESC 'List of resolutions supported for printing documents by this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1120 NAME 'printer-print-quality-supported' DESC 'List of print qualities supported for printing documents on this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1110 NAME 'printer-job-priority-supported' DESC 'Indicates the number of job priority levels supported by this printer.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1118 NAME 'printer-copies-supported' DESC 'The maximum number of copies of a document that may be printed as a single job on this printer.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1111 NAME 'printer-job-k-octets-supported' DESC 'The maximum size in kilobytes (1,024 octets actually) incoming print job that this printer will accept.' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1112 NAME 'printer-current-operator' DESC 'The identity of the current human operator responsible for operating this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1113 NAME 'printer-service-person' DESC 'The identity of the current human service person responsible for servicing this printer.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1114 NAME 'printer-delivery-orientation-supported' DESC 'The possible delivery orientations of pages as they are printed and ejected from this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1115 NAME 'printer-stacking-order-supported' DESC 'The possible stacking order of pages as they are printed and ejected from this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1116 NAME 'printer-output-features-supported' DESC 'The possible output features supported by this printer.' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # attributeTypes: ( 1.3.18.0.2.4.1108 NAME 'printer-aliases' DESC 'List of site-specific administrative names of this printer in addition to the value specified for printer-name.' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{127} ) # ################################################################################ # objectClasses: ( NAME 'printer-uri' DESC 'A URI supported by this printer.' ) # ################################################################################ # objectClasses: ( 1.3.18.0.2.6.258 NAME 'printerAbstract' DESC 'Printer related information.' SUP top ABSTRACT MAY ( printer-name $ printer-natural-language-configured $ printer-location $ printer-info $ printer-more-info $ printer-make-and-model $ printer-multiple-document-jobs-supported $ printer-charset-configured $ printer-charset-supported $ printer-generated-natural-language-supported $ printer-document-format-supported $ printer-color-supported $ printer-compression-supported $ printer-pages-per-minute $ printer-pages-per-minute-color $ printer-finishings-supported $ printer-number-up-supported $ printer-sides-supported $ printer-media-supported $ printer-media-local-supported $ printer-resolution-supported $ printer-print-quality-supported $ printer-job-priority-supported $ printer-copies-supported $ printer-job-k-octets-supported $ printer-current-operator $ printer-service-person $ printer-delivery-orientation-supported $ printer-stacking-order-supported $ printer-output-features-supported ) ) # ################################################################################ # objectClasses: ( 1.3.18.0.2.6.255 NAME 'printerService' DESC 'Printer information.' SUP printerAbstract STRUCTURAL MAY ( printer-uri $ printer-xri-supported ) ) # ################################################################################ # objectClasses: ( 1.3.18.0.2.6.257 NAME 'printerServiceAuxClass' DESC 'Printer information.' SUP printerAbstract AUXILIARY MAY ( printer-uri $ printer-xri-supported ) ) # ################################################################################ # objectClasses: ( 1.3.18.0.2.6.256 NAME 'printerIPP' DESC 'Internet Printing Protocol (IPP) information.' SUP top AUXILIARY MAY ( printer-ipp-versions-supported $ printer-multiple-document-jobs-supported ) ) # ################################################################################ # objectClasses: ( 1.3.18.0.2.6.253 NAME 'printerLPR' DESC 'LPR information.' SUP top AUXILIARY MUST ( printer-name ) MAY ( printer-aliases ) ) # ################################################################################ # --- NEW FILE 60rfc4876.ldif --- # 60rfc4876.ldif - Updated from draft-joslin-config-schema ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.0 NAME 'defaultServerList' DESC 'List of default servers' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.1 NAME 'defaultSearchBase' DESC 'Default base for searches' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.2 NAME 'preferredServerList' DESC 'List of preferred servers' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.3 NAME 'searchTimeLimit' DESC 'Maximum time an agent or service allows for a search to complete' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.4 NAME 'bindTimeLimit' DESC 'Maximum time an agent or service allows for a bind operation to complete' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.5 NAME 'followReferrals' DESC 'An agent or service does or should follow referrals' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.6 NAME 'authenticationMethod' DESC 'Identifies the types of authentication methods either used, required, or provided by a service or peer' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.7 NAME 'profileTTL' DESC 'Time to live, in seconds, before a profile is considered stale' EQUALITY integerMatch ORDERING integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.9 NAME 'attributeMap' DESC 'Attribute mappings used, required, or supported by an agent or service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.10 NAME 'credentialLevel' DESC 'Identifies type of credentials either used, required, or supported by an agent or service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.11 NAME 'objectclassMap' DESC 'Object class mappings used, required, or supported by an agent or service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.12 NAME 'defaultSearchScope' DESC 'Default scope used when performing a search' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.13 NAME 'serviceCredentialLevel' DESC 'Specifies the type of credentials either used, required, or supported by a specific service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # This was 1.3.6.1.4.1.11.1.3.1.1.8 in the draft attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.14 NAME 'serviceSearchDescriptor' DESC 'Specifies search descriptors required, used, or supported by a particular service or agent' EQUALITY caseExactMatch SUBSTR caseExactSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.15 NAME 'serviceAuthenticationMethod' DESC 'Specifies types authentication methods either used, required, or supported by a particular service' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.11.1.3.1.1.16 NAME 'dereferenceAliases' DESC 'Specifies if a service or agent either requires, supports, or uses dereferencing of aliases.' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.11.1.3.1.2.5 NAME 'DUAConfigProfile' DESC 'Abstraction of a base configuration for a DUA' SUP top STRUCTURAL MUST ( cn ) MAY ( defaultServerList $ preferredServerList $ defaultSearchBase $ defaultSearchScope $ searchTimeLimit $ bindTimeLimit $ credentialLevel $ authenticationMethod $ followReferrals $ dereferenceAliases $ serviceSearchDescriptor $ serviceCredentialLevel $ serviceAuthenticationMethod $ objectclassMap $ attributeMap $ profileTTL ) ) # ################################################################################ # --- NEW FILE 60sabayon.ldif --- ########################################################### # 1.3.6.1.4.1.2312 dot notation # 1.3.6.1.4.1.2312.4.3.3 attributeTypes # 1.3.6.1.4.1.2312.4.3.4 objectClasses ########################################################### dn: cn=schema # These example schema can be used to integrate sabayon with ldap # However, the ldap support in sabayon is very flexible, so you can # choose to do your own ldap integration using a different schema # This attribute is used to point to a sabayon profile file # that is accessible via a (typically http) url attributeTypes: ( 1.3.6.1.4.1.2312.4.3.3.1 NAME 'sabayonProfileURL' DESC 'The URL of a sabayon profile' SUP labeledURI ) # This attribute is used to store the name of a sabayon profile. # It can refer to either a local zipfile (which will be looked up # in /etc/desktop-profiles/$(name).zip), or it can be used to # map to another ldap object that maps to the final profile URL attributeTypes: ( 1.3.6.1.4.1.2312.4.3.3.2 NAME 'sabayonProfileName' DESC 'The Name of a sabayon profile' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # Simple example object to store profile information # If you use this or something similar instead of a direct URL # in your user object you get more flexibility. objectClasses: ( 1.3.6.1.4.1.2312.4.3.4.1 NAME 'sabayonProfile' DESC 'sabayon profile' SUP top STRUCTURAL MUST cn MAY ( sabayonProfileURL $ description ) ) # Use these to put sabayonProfileName or sabayonProfileURL # attributes in an objetc objectClasses: ( 1.3.6.1.4.1.2312.4.3.4.2 NAME 'sabayonProfileNameObject' DESC 'contains sabayon profile name' SUP top AUXILIARY MUST sabayonProfileName ) objectClasses: ( 1.3.6.1.4.1.2312.4.3.4.3 NAME 'sabayonProfileURLObject' DESC 'contains sabayon profile' SUP top AUXILIARY MUST cn MAY sabayonProfileURL ) --- NEW FILE 60samba.ldif --- # 60samba.ldif - Samba general schema ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.1 NAME 'lmPassword' DESC 'LanManager Passwd' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.2 NAME 'ntPassword' DESC 'NT Passwd' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.4 NAME 'acctFlags' DESC 'Account Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet' DESC 'NT pwdLastSet' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.5 NAME 'logonTime' DESC 'NT logonTime' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.6 NAME 'logoffTime' DESC 'NT logoffTime' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.7 NAME 'kickoffTime' DESC 'NT kickoffTime' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.8 NAME 'pwdCanChange' DESC 'NT pwdCanChange' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # Present in 00core.ldif with RHDS # attributeTypes: ( # 1.3.6.1.4.1.7165.2.1.9 # NAME 'pwdMustChange' # DESC 'NT pwdMustChange' # EQUALITY integerMatch # SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 # SINGLE-VALUE # ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.10 NAME 'homeDrive' DESC 'NT homeDrive' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.11 NAME 'scriptPath' DESC 'NT scriptPath' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.12 NAME 'profilePath' DESC 'NT profilePath' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.13 NAME 'userWorkstations' DESC 'userWorkstations' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.17 NAME 'smbHome' DESC 'smbHome' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.18 NAME 'domain' DESC 'Windows NT domain to which the user belongs' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.14 NAME 'rid' DESC 'NT rid' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID' DESC 'NT Group RID' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' DESC 'Samba Auxilary Account' SUP top AUXILIARY MUST ( uid $ rid ) # MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ description $ userWorkstations $ primaryGroupID $ domain ) MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ acctFlags $ displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ description $ userWorkstations $ primaryGroupID $ domain ) ) # ################################################################################ # --- NEW FILE 60samba3.ldif --- # 60samba3.ldif - Samba v3 schemas ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.24 NAME 'sambaLMPassword' DESC 'LanManager Password' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.25 NAME 'sambaNTPassword' DESC 'MD4 hash of the unicode password' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.26 NAME 'sambaAcctFlags' DESC 'Account Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.27 NAME 'sambaPwdLastSet' DESC 'Timestamp of the last password update' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.28 NAME 'sambaPwdCanChange' DESC 'Timestamp of when the user is allowed to update the password' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.29 NAME 'sambaPwdMustChange' DESC 'Timestamp of when the password will expire' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.30 NAME 'sambaLogonTime' DESC 'Timestamp of last logon' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.31 NAME 'sambaLogoffTime' DESC 'Timestamp of last logoff' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.32 NAME 'sambaKickoffTime' DESC 'Timestamp of when the user will be logged off automatically' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.48 NAME 'sambaBadPasswordCount' DESC 'Bad password attempt count' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.49 NAME 'sambaBadPasswordTime' DESC 'Time of the last bad password attempt' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.55 NAME 'sambaLogonHours' DESC 'Logon Hours' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{42} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.33 NAME 'sambaHomeDrive' DESC 'Driver letter of home directory mapping' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.34 NAME 'sambaLogonScript' DESC 'Logon script path' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.35 NAME 'sambaProfilePath' DESC 'Roaming profile path' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.36 NAME 'sambaUserWorkstations' DESC 'List of user workstations the user is allowed to logon to' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.37 NAME 'sambaHomePath' DESC 'Home directory UNC path' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.38 NAME 'sambaDomainName' DESC 'Windows NT domain to which the user belongs' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.47 NAME 'sambaMungedDial' DESC '' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1050} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.54 NAME 'sambaPasswordHistory' DESC 'Concatenated MD4 hashes of the unicode passwords used on this account' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.20 NAME 'sambaSID' DESC 'Security ID' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.23 NAME 'sambaPrimaryGroupSID' DESC 'Primary Group Security ID' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.51 NAME 'sambaSIDList' DESC 'Security ID List' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.19 NAME 'sambaGroupType' DESC 'NT Group Type' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.21 NAME 'sambaNextUserRid' DESC 'Next NT rid to give our for users' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.22 NAME 'sambaNextGroupRid' DESC 'Next NT rid to give out for groups' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.39 NAME 'sambaNextRid' DESC 'Next NT rid to give out for anything' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.40 NAME 'sambaAlgorithmicRidBase' DESC 'Base at which the samba RID generation algorithm should operate' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.41 NAME 'sambaShareName' DESC 'Share Name' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.42 NAME 'sambaOptionName' DESC 'Option Name' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.43 NAME 'sambaBoolOption' DESC 'A boolean option' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.44 NAME 'sambaIntegerOption' DESC 'An integer option' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.45 NAME 'sambaStringOption' DESC 'A string option' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.46 NAME 'sambaStringListOption' DESC 'A string list option' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.50 NAME 'sambaPrivName' SUP name ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.52 NAME 'sambaPrivilegeList' DESC 'Privileges List' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.7165.2.1.53 NAME 'sambaTrustFlags' DESC 'Trust Password Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' DESC 'Samba 3.0 Auxilary SAM Account' SUP top AUXILIARY MUST ( uid $ sambaSID ) MAY ( cn $ sambaLMPassword $ sambaNTPassword $ sambaPwdLastSet $ sambaLogonTime $ sambaLogoffTime $ sambaKickoffTime $ sambaPwdCanChange $ sambaPwdMustChange $ sambaAcctFlags $ displayName $ sambaHomePath $ sambaHomeDrive $ sambaLogonScript $ sambaProfilePath $ description $ sambaUserWorkstations $ sambaPrimaryGroupSID $ sambaDomainName $ sambaMungedDial $ sambaBadPasswordCount $ sambaBadPasswordTime $ sambaPasswordHistory $ sambaLogonHours ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.4 NAME 'sambaGroupMapping' DESC 'Samba Group Mapping' SUP top AUXILIARY MUST ( gidNumber $ sambaSID $ sambaGroupType ) MAY ( displayName $ description $ sambaSIDList ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.14 NAME 'sambaTrustPassword' DESC 'Samba Trust Password' SUP top STRUCTURAL MUST ( sambaDomainName $ sambaNTPassword $ sambaTrustFlags ) MAY ( sambaSID $ sambaPwdLastSet ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.5 NAME 'sambaDomain' DESC 'Samba Domain Information' SUP top STRUCTURAL MUST ( sambaDomainName $ sambaSID ) MAY ( sambaNextRid $ sambaNextGroupRid $ sambaNextUserRid $ sambaAlgorithmicRidBase ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.7 NAME 'sambaUnixIdPool' DESC 'Pool for allocating UNIX uids/gids' SUP top AUXILIARY MUST ( uidNumber $ gidNumber ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.8 NAME 'sambaIdmapEntry' DESC 'Mapping from a SID to an ID' SUP top AUXILIARY MUST ( sambaSID ) MAY ( uidNumber $ gidNumber ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.9 NAME 'sambaSidEntry' DESC 'Structural Class for a SID' SUP top STRUCTURAL MUST ( sambaSID ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.1.2.2.10 NAME 'sambaConfig' DESC 'Samba Configuration Section' SUP top AUXILIARY MAY ( description ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.11 NAME 'sambaShare' DESC 'Samba Share Section' SUP top STRUCTURAL MUST ( sambaShareName ) MAY ( description ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.12 NAME 'sambaConfigOption' DESC 'Samba Configuration Option' SUP top STRUCTURAL MUST ( sambaOptionName ) MAY ( sambaBoolOption $ sambaIntegerOption $ sambaStringOption $ sambaStringListoption $ description ) ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.7165.2.2.13 NAME 'sambaPrivilege' DESC 'Samba Privilege' SUP top AUXILIARY MUST ( sambaSID ) MAY ( sambaPrivilegeList ) ) # ################################################################################ # --- NEW FILE 60sudo.ldif --- # 60sudo.ldif - Schema for SUDO ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15953.9.1.1 NAME 'sudoUser' DESC 'User(s) who may run sudo' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'SUDO' ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15953.9.1.2 NAME 'sudoHost' DESC 'Host(s) who may run sudo' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'SUDO' ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15953.9.1.3 NAME 'sudoCommand' DESC 'Command(s) to be executed by sudo' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'SUDO' ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15953.9.1.4 NAME 'sudoRunAs' DESC 'User(s) impersonated by sudo' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'SUDO' ) # ################################################################################ # attributeTypes: ( 1.3.6.1.4.1.15953.9.1.5 NAME 'sudoOption' DESC 'Options(s) followed by sudo' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'SUDO' ) # ################################################################################ # objectClasses: ( 1.3.6.1.4.1.15953.9.2.1 NAME 'sudoRole' SUP top STRUCTURAL DESC 'Sudoer Entries' MUST ( cn ) MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoOption $ description ) X-ORIGIN 'SUDO' ) # ################################################################################ # --- NEW FILE 60trust.ldif --- # 60trust.ldif - Commonly used for trust relationships # For nss_ldap and/or pam_ldap # dc=com?sub?objectclass=posixAccount)(|(trustmodel=fullaccess)(accessto=server) ################################################################################ # dn: cn=schema # ################################################################################ # attributeTypes: ( 5.3.6.1.1.1.1.0 NAME 'trustModel' DESC 'Access scheme' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) # ################################################################################ # attributeTypes: ( 5.3.6.1.1.1.1.1 NAME 'accessTo' DESC 'Access to which servers user is allowed' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) # ################################################################################ # objectClasses: ( 5.3.6.1.1.1.2.0 NAME 'trustAccount' DESC 'Sets trust accounts information' SUP top AUXILIARY MUST ( trustModel ) MAY ( accessTo ) ) # ################################################################################ # From rmeggins at fedoraproject.org Fri Oct 17 16:54:49 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Fri, 17 Oct 2008 16:54:49 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd dse.c, 1.10, 1.11 Message-ID: <20081017165449.69AA270139@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16120/ldapserver/ldap/servers/slapd Modified Files: dse.c Log Message: Resolves: bug 454030 Bug Description: Need to address 64-bit compiler warnings Fix Description: As it turns out, there is no portable format specifier for size_t that works on all of our supported platforms. Afaict, %lu should work everywhere. C99 uses the "z" specifier, but alas not all of the compilers we use support C99 and/or "z". Platforms tested: RHEL5, Solaris Flag Day: no Doc impact: no Index: dse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dse.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- dse.c 8 Oct 2008 17:29:03 -0000 1.10 +++ dse.c 17 Oct 2008 16:54:47 -0000 1.11 @@ -72,13 +72,6 @@ #include #endif /* _WIN32 */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - /* #define SLAPI_DSE_DEBUG */ /* define this to force trace log */ /* messages to always be logged */ @@ -612,7 +605,7 @@ struct berval val; vals[0] = &val; vals[1] = NULL; - sprintf(value_buffer,"%" PRIuPTR,current_sub_count); + sprintf(value_buffer,"%lu",current_sub_count); val.bv_val = value_buffer; val.bv_len = strlen (val.bv_val); switch(mod_op) From rmeggins at fedoraproject.org Fri Oct 17 16:54:49 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Fri, 17 Oct 2008 16:54:49 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.30, 1.31 import-merge.c, 1.10, 1.11 import-threads.c, 1.17, 1.18 import.c, 1.13, 1.14 ldbm_config.c, 1.15, 1.16 ldif2ldbm.c, 1.19, 1.20 monitor.c, 1.9, 1.10 parents.c, 1.6, 1.7 Message-ID: <20081017165449.9ADA970139@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16120/ldapserver/ldap/servers/slapd/back-ldbm Modified Files: dblayer.c import-merge.c import-threads.c import.c ldbm_config.c ldif2ldbm.c monitor.c parents.c Log Message: Resolves: bug 454030 Bug Description: Need to address 64-bit compiler warnings Fix Description: As it turns out, there is no portable format specifier for size_t that works on all of our supported platforms. Afaict, %lu should work everywhere. C99 uses the "z" specifier, but alas not all of the compilers we use support C99 and/or "z". Platforms tested: RHEL5, Solaris Flag Day: no Doc impact: no Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- dblayer.c 15 Oct 2008 06:30:06 -0000 1.30 +++ dblayer.c 17 Oct 2008 16:54:47 -0000 1.31 @@ -97,13 +97,6 @@ #include "dblayer.h" #include -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4100 #define DB_OPEN(oflags, db, txnid, file, database, type, flags, mode, rval) \ { \ @@ -929,7 +922,7 @@ if (feof(f)) break; if (strncmp(s, "VmSize:", 7) == 0) { - sscanf(s+7, "%" PRIuPTR, procpages); + sscanf(s+7, "%lu", procpages); break; } } Index: import-merge.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-merge.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- import-merge.c 15 Oct 2008 06:30:07 -0000 1.10 +++ import-merge.c 17 Oct 2008 16:54:47 -0000 1.11 @@ -49,13 +49,6 @@ #include "back-ldbm.h" #include "import.h" -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - struct _import_merge_thang { int type; @@ -674,7 +667,7 @@ if (1 == job->number_indexers) { import_log_notice(job, "Beginning %d-way merge of one file...", passes); } else { - import_log_notice(job, "Beginning %d-way merge of up to %" PRIuPTR " files...", + import_log_notice(job, "Beginning %d-way merge of up to %lu files...", passes, job->number_indexers); } Index: import-threads.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import-threads.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- import-threads.c 15 Oct 2008 06:30:07 -0000 1.17 +++ import-threads.c 17 Oct 2008 16:54:47 -0000 1.18 @@ -49,13 +49,6 @@ * a wire import (aka "fast replica" import) won't have a producer thread. */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #include "back-ldbm.h" #include "vlv_srch.h" #include "import.h" @@ -579,7 +572,7 @@ escape_string(slapi_entry_get_dn(e), ebuf), curr_lineno, curr_filename); import_log_notice(job, "REASON: entry too large (%ld bytes) for " - "the buffer size (%" PRIuPTR " bytes)", newesize, job->fifo.bsize); + "the buffer size (%lu bytes)", newesize, job->fifo.bsize); backentry_free(&ep); job->skipped++; continue; @@ -812,8 +805,8 @@ char ebuf[BUFSIZ]; import_log_notice(job, "WARNING: skipping entry \"%s\"", escape_string(slapi_entry_get_dn(e), ebuf)); - import_log_notice(job, "REASON: entry too large (%" PRIuPTR " bytes) for " - "the buffer size (%" PRIuPTR " bytes)", newesize, job->fifo.bsize); + import_log_notice(job, "REASON: entry too large (%lu bytes) for " + "the buffer size (%lu bytes)", newesize, job->fifo.bsize); backentry_free(&ep); job->skipped++; continue; @@ -1606,8 +1599,8 @@ char ebuf[BUFSIZ]; import_log_notice(job, "WARNING: skipping entry \"%s\"", escape_string(slapi_entry_get_dn(ep->ep_entry), ebuf)); - import_log_notice(job, "REASON: entry too large (%" PRIuPTR " bytes) for " - "the import buffer size (%" PRIuPTR " bytes). Try increasing nsslapd-cachememsize.", newesize, job->fifo.bsize); + import_log_notice(job, "REASON: entry too large (%lu bytes) for " + "the import buffer size (%lu bytes). Try increasing nsslapd-cachememsize.", newesize, job->fifo.bsize); backentry_clear_entry(ep); /* entry is released in the frontend on failure*/ backentry_free( &ep ); /* release the backend wrapper, here */ PR_Unlock(job->wire_lock); Index: import.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- import.c 15 Oct 2008 06:30:07 -0000 1.13 +++ import.c 17 Oct 2008 16:54:47 -0000 1.14 @@ -46,13 +46,6 @@ * please make sure you use 4-space indentation on this file. */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #include "back-ldbm.h" #include "vlv_srch.h" #include "import.h" @@ -1155,7 +1148,7 @@ import_log_notice(job, "Index buffering is disabled."); else import_log_notice(job, - "Index buffering enabled with bucket size %" PRIuPTR, + "Index buffering enabled with bucket size %lu", job->job_index_buffer_suggestion); job->worker_list = producer; @@ -1318,7 +1311,7 @@ if (job->not_here_skipped) { if (job->skipped) - import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " + import_log_notice(job, "Import complete. Processed %lu entries " "(%d bad entries were skipped, " "%d entries were skipped because they don't " "belong to this database) in %d seconds. " @@ -1326,7 +1319,7 @@ job->skipped, job->not_here_skipped, seconds_to_import, entries_per_second); else - import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " + import_log_notice(job, "Import complete. Processed %lu entries " "(%d entries were skipped because they don't " "belong to this database) " "in %d seconds. (%.2f entries/sec)", @@ -1336,13 +1329,13 @@ else { if (job->skipped) - import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " + import_log_notice(job, "Import complete. Processed %lu entries " "(%d were skipped) in %d seconds. " "(%.2f entries/sec)", entries_processed, job->skipped, seconds_to_import, entries_per_second); else - import_log_notice(job, "Import complete. Processed %" PRIuPTR " entries " + import_log_notice(job, "Import complete. Processed %lu entries " "in %d seconds. (%.2f entries/sec)", entries_processed, seconds_to_import, entries_per_second); Index: ldbm_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ldbm_config.c 8 Oct 2008 17:29:03 -0000 1.15 +++ ldbm_config.c 17 Oct 2008 16:54:47 -0000 1.16 @@ -42,13 +42,6 @@ /* ldbm_config.c - Handles configuration information that is global to all ldbm instances. */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #include "back-ldbm.h" #include "dblayer.h" @@ -1426,7 +1419,7 @@ break; case CONFIG_TYPE_SIZE_T: val = (size_t) config->config_get_fn(arg); - sprintf(buf, "%" PRIuPTR, val); + sprintf(buf, "%lu", val); break; case CONFIG_TYPE_STRING: /* Remember the get function for strings returns memory Index: ldif2ldbm.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ldif2ldbm.c 15 Oct 2008 06:30:08 -0000 1.19 +++ ldif2ldbm.c 17 Oct 2008 16:54:47 -0000 1.20 @@ -47,13 +47,6 @@ * code for db2index (is this still in use?) */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #include "back-ldbm.h" #include "vlv_srch.h" #include "dblayer.h" @@ -327,7 +320,7 @@ * let's do it so we can reuse the modify routines) */ cache_lock_entry( &inst->inst_cache, e ); modify_init(&mc,e); - sprintf(value_buffer,"%" PRIuPTR,sub_count); + sprintf(value_buffer,"%lu",sub_count); /* attr numsubordinates could already exist in the entry, let's check whether it's already there or not */ isreplace = (attrlist_find(e->ep_entry->e_attrs, numsubordinates) != NULL); Index: monitor.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/monitor.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- monitor.c 15 Oct 2008 06:30:09 -0000 1.9 +++ monitor.c 17 Oct 2008 16:54:47 -0000 1.10 @@ -42,13 +42,6 @@ /* monitor.c - ldbm backend monitor function */ -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - #include "back-ldbm.h" #include "dblayer.h" /* XXXmcs: not sure this is good to do... */ #include @@ -124,9 +117,9 @@ MSET("entryCacheTries"); sprintf(buf, "%lu", (unsigned long)(100.0*(double)hits / (double)(tries > 0 ? tries : 1))); MSET("entryCacheHitRatio"); - sprintf(buf, "%" PRIuPTR, size); + sprintf(buf, "%lu", size); MSET("currentEntryCacheSize"); - sprintf(buf, "%" PRIuPTR, maxsize); + sprintf(buf, "%lu", maxsize); MSET("maxEntryCacheSize"); sprintf(buf, "%ld", nentries); MSET("currentEntryCacheCount"); Index: parents.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/parents.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- parents.c 8 Oct 2008 17:29:04 -0000 1.6 +++ parents.c 17 Oct 2008 16:54:47 -0000 1.7 @@ -44,13 +44,6 @@ #include "back-ldbm.h" -/* Required to get portable printf/scanf format macros */ -#ifdef HAVE_INTTYPES_H -#include -#else -#error Need to define portable format macros such as PRIu64 -#endif /* HAVE_INTTYPES_H */ - char *numsubordinates = "numsubordinates"; char *hassubordinates = "hassubordinates"; @@ -137,7 +130,7 @@ else { char value_buffer[20]; /* enough digits for 2^64 children */ - sprintf(value_buffer,"%" PRIuPTR, current_sub_count); + sprintf(value_buffer,"%lu", current_sub_count); slapi_mods_add(smods, mod_op | LDAP_MOD_BVALUES, numsubordinates, strlen(value_buffer), value_buffer); } ret = modify_apply_mods(mc,smods); /* smods passed in */ From rmeggins at fedoraproject.org Fri Oct 17 17:13:57 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Fri, 17 Oct 2008 17:13:57 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm dblayer.c, 1.31, 1.32 Message-ID: <20081017171357.7028570139@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17579 Modified Files: dblayer.c Log Message: fix typo Index: dblayer.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- dblayer.c 17 Oct 2008 16:54:47 -0000 1.31 +++ dblayer.c 17 Oct 2008 17:13:55 -0000 1.32 @@ -293,7 +293,7 @@ int dblayer_db_uses_logging(DB_ENV *db_env) { return db_uses_feature(db_env, DB_INIT_LOG); -}; +} /* this flag use if user remotely turned batching off */ From nkinder at fedoraproject.org Fri Oct 17 22:12:49 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:49 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.11, 1.12 acl.h, 1.5, 1.6 acl_ext.c, 1.8, 1.9 aclanom.c, 1.7, 1.8 Message-ID: <20081017221249.391D87013A@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/plugins/acl Modified Files: acl.c acl.h acl_ext.c aclanom.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- acl.c 30 Jun 2008 17:28:16 -0000 1.11 +++ acl.c 17 Oct 2008 22:12:46 -0000 1.12 @@ -297,7 +297,7 @@ if ( !privateBackend && (be_readonly || slapi_config_get_readonly () )){ slapi_log_error (loglevel, plugin_name, - "conn=%d op=%d (main): Deny %s on entry(%s)" + "conn=%" PRIu64 " op=%d (main): Deny %s on entry(%s)" ": readonly backend\n", op->o_connid, op->o_opid, acl_access2str(access), @@ -310,7 +310,7 @@ TNF_PROBE_0_DEBUG(acl_skipaccess_start,"ACL",""); if ( acl_skip_access_check ( pb, e )) { slapi_log_error (loglevel, plugin_name, - "conn=%d op=%d (main): Allow %s on entry(%s)" + "conn=%" PRIu64 " op=%d (main): Allow %s on entry(%s)" ": root user\n", op->o_connid, op->o_opid, acl_access2str(access), @@ -438,7 +438,7 @@ TNF_PROBE_0_DEBUG(acl_entry_first_touch_start,"ACL",""); slapi_log_error(loglevel, plugin_name, - "#### conn=%d op=%d binddn=\"%s\"\n", + "#### conn=%" PRIu64 " op=%d binddn=\"%s\"\n", op->o_connid, op->o_opid, clientDn); aclpb->aclpb_stat_total_entries++; @@ -755,7 +755,7 @@ null_user); slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)" + "conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)" ": %s\n", op->o_connid, op->o_opid, source, @@ -768,7 +768,7 @@ } else { proxy_user = null_user; slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)" + "conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)" ": %s\n", op->o_connid, op->o_opid, source, @@ -781,7 +781,7 @@ } } else{ slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to %s" + "conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to %s" ": %s\n", op->o_connid, op->o_opid, source, Index: acl.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- acl.h 10 Nov 2006 23:44:49 -0000 1.5 +++ acl.h 17 Oct 2008 22:12:47 -0000 1.6 @@ -49,6 +49,22 @@ #ifndef _ACL_H_ #define _ACL_H_ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include #include #include Index: acl_ext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- acl_ext.c 3 Apr 2008 17:18:10 -0000 1.8 +++ acl_ext.c 17 Oct 2008 22:12:47 -0000 1.9 @@ -973,7 +973,7 @@ static void acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type) { - int connid = 0; + PRUint64 connid = 0; int opid = 0; Slapi_PBlock *pb = NULL; @@ -985,7 +985,7 @@ /* DUMP STAT INFO */ slapi_log_error( SLAPI_LOG_ACL, plugin_name, - "**** ACL OPERATION STAT BEGIN ( aclpb:%p Block type: %s): Conn:%d Operation:%d *******\n", + "**** ACL OPERATION STAT BEGIN ( aclpb:%p Block type: %s): Conn:%" PRIu64 " Operation:%d *******\n", aclpb, block_type, connid, opid ); slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of entries scanned: %d\n", aclpb->aclpb_stat_total_entries); Index: aclanom.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclanom.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- aclanom.c 19 Oct 2007 15:36:01 -0000 1.7 +++ aclanom.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -543,14 +543,14 @@ aci_ndn = slapi_sdn_get_ndn (acl_anom_profile->anom_targetinfo[i].anom_target); slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n", + "conn=%" PRIu64 " op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n", op->o_connid, op->o_opid, escape_string_with_punctuation(ndn, ebuf), attr ? attr:"NULL", escape_string_with_punctuation(aci_ndn, ebuf)); } else { slapi_log_error(loglevel, plugin_name, - "conn=%d op=%d: Deny access on entry(%s).attr(%s) to anonymous\n", + "conn=%" PRIu64 " op=%d: Deny access on entry(%s).attr(%s) to anonymous\n", op->o_connid, op->o_opid, escape_string_with_punctuation(ndn, ebuf), attr ? attr:"NULL" ); } From nkinder at fedoraproject.org Fri Oct 17 22:12:50 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:50 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.17, 1.18 ldbm_delete.c, 1.8, 1.9 ldbm_modrdn.c, 1.8, 1.9 misc.c, 1.6, 1.7 Message-ID: <20081017221250.407AF7013A@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h ldbm_delete.c ldbm_modrdn.c misc.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- back-ldbm.h 9 Oct 2008 17:40:14 -0000 1.17 +++ back-ldbm.h 17 Oct 2008 22:12:48 -0000 1.18 @@ -59,6 +59,22 @@ #endif #endif +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + /* A bunch of random system headers taken from all the source files, no source file should #include any system headers now */ #include Index: ldbm_delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_delete.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ldbm_delete.c 18 Oct 2007 22:40:18 -0000 1.8 +++ ldbm_delete.c 17 Oct 2008 22:12:48 -0000 1.9 @@ -93,7 +93,7 @@ if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); @@ -666,7 +666,7 @@ slapi_ch_free_string(&e_uniqueid); if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "leave conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } return rc; } Index: ldbm_modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ldbm_modrdn.c 29 Jul 2008 20:37:22 -0000 1.8 +++ ldbm_modrdn.c 17 Oct 2008 22:12:48 -0000 1.9 @@ -117,7 +117,7 @@ if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "enter conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } inst = (ldbm_instance *) be->be_instance_info; @@ -862,7 +862,7 @@ slapi_pblock_set( pb, SLAPI_ENTRY_POST_OP, postentry ); if (pb->pb_conn) { - slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "leave conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); + slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_modrdn", "leave conn=%" PRIu64 " op=%d\n", pb->pb_conn->c_connid, operation->o_opid); } return retval; } Index: misc.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/misc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- misc.c 10 Nov 2006 23:45:39 -0000 1.6 +++ misc.c 17 Oct 2008 22:12:48 -0000 1.7 @@ -68,7 +68,7 @@ void ldbm_log_access_message(Slapi_PBlock *pblock,char *string) { int ret = 0; - int connection_id = 0; + PRUint64 connection_id = 0; int operation_id = 0; Operation *operation = NULL; /* DBDB this is sneaky---opid should be covered by the API directly */ @@ -81,7 +81,7 @@ return; } operation_id = operation->o_opid; - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d %s\n",connection_id, operation_id,string); + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d %s\n",connection_id, operation_id,string); } int return_on_disk_full(struct ldbminfo *li) From nkinder at fedoraproject.org Fri Oct 17 22:12:49 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:49 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl.h, 1.7, 1.8 repl5.h, 1.11, 1.12 repl5_init.c, 1.7, 1.8 repl5_replica.c, 1.18, 1.19 repl5_total.c, 1.11, 1.12 repl_connext.c, 1.6, 1.7 repl_extop.c, 1.13, 1.14 replutil.c, 1.12, 1.13 Message-ID: <20081017221249.A583D70138@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/plugins/replication Modified Files: repl.h repl5.h repl5_init.c repl5_replica.c repl5_total.c repl_connext.c repl_extop.c replutil.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: repl.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- repl.h 10 Nov 2006 23:45:17 -0000 1.7 +++ repl.h 17 Oct 2008 22:12:47 -0000 1.8 @@ -44,6 +44,22 @@ #ifndef _REPL_H_ #define _REPL_H_ +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #include #include #include Index: repl5.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- repl5.h 24 Jun 2008 22:22:09 -0000 1.11 +++ repl5.h 17 Oct 2008 22:12:47 -0000 1.12 @@ -443,10 +443,10 @@ during addition of the replica over LDAP */ Replica *replica_new_from_entry (Slapi_Entry *e, char *errortext, PRBool is_add_operation); void replica_destroy(void **arg); -PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, int connid, int opid, +PRBool replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid, const char *locking_purl, char **current_purl); -void replica_relinquish_exclusive_access(Replica *r, int connid, int opid); +void replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid); PRBool replica_get_tombstone_reap_active(const Replica *r); const Slapi_DN *replica_get_root(const Replica *r); const char *replica_get_name(const Replica *r); Index: repl5_init.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_init.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- repl5_init.c 10 Nov 2006 23:45:17 -0000 1.7 +++ repl5_init.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -178,7 +178,8 @@ char* get_repl_session_id (Slapi_PBlock *pb, char *idstr, CSN **csn) { - int connid=-1, opid=-1; + int opid=-1; + PRUint64 connid = 0; CSN *opcsn; char opcsnstr[CSN_STRSIZE]; @@ -192,7 +193,7 @@ /* Avoid "Connection is NULL and hence cannot access SLAPI_CONN_ID" */ if (opid) { slapi_pblock_get (pb, SLAPI_CONN_ID, &connid); - PR_snprintf (idstr, REPL_SESSION_ID_SIZE, "conn=%d op=%d", connid, opid); + PR_snprintf (idstr, REPL_SESSION_ID_SIZE, "conn=%" PRIu64 " op=%d", connid, opid); } slapi_pblock_get ( pb, SLAPI_OPERATION, &op ); Index: repl5_replica.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- repl5_replica.c 8 Oct 2008 17:29:03 -0000 1.18 +++ repl5_replica.c 17 Oct 2008 22:12:47 -0000 1.19 @@ -405,7 +405,7 @@ * current_purl is the supplier who already has access, if any */ PRBool -replica_get_exclusive_access(Replica *r, PRBool *isInc, int connid, int opid, +replica_get_exclusive_access(Replica *r, PRBool *isInc, PRUint64 connid, int opid, const char *locking_purl, char **current_purl) { @@ -421,7 +421,7 @@ *isInc = (r->repl_state_flags & REPLICA_INCREMENTAL_IN_PROGRESS); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "Replica in use locking_purl=%s\n", connid, opid, escape_string(slapi_sdn_get_dn(r->repl_root),ebuf), @@ -435,7 +435,7 @@ else { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": Acquired replica\n", + "conn=%" PRIu64 " op=%d repl=\"%s\": Acquired replica\n", connid, opid, escape_string(slapi_sdn_get_dn(r->repl_root),ebuf)); r->repl_state_flags |= REPLICA_IN_USE; @@ -463,7 +463,7 @@ * Relinquish exclusive access to the replica */ void -replica_relinquish_exclusive_access(Replica *r, int connid, int opid) +replica_relinquish_exclusive_access(Replica *r, PRUint64 connid, int opid) { char ebuf[BUFSIZ]; PRBool isInc; @@ -476,13 +476,13 @@ if (!(r->repl_state_flags & REPLICA_IN_USE)) { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "Replica not in use\n", connid, opid, escape_string(slapi_sdn_get_dn(r->repl_root),ebuf)); } else { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "Released replica\n", connid, opid, escape_string(slapi_sdn_get_dn(r->repl_root),ebuf)); Index: repl5_total.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_total.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- repl5_total.c 25 Jan 2008 00:59:00 -0000 1.11 +++ repl5_total.c 17 Oct 2008 22:12:47 -0000 1.12 @@ -76,6 +76,7 @@ } */ +#include "repl.h" #include "repl5.h" #define CSN_TYPE_VALUE_UPDATED_ON_WIRE 1 @@ -848,11 +849,10 @@ int rc; Slapi_Entry *e = NULL; Slapi_Connection *conn = NULL; - int connid, opid; + PRUint64 connid = 0; + int opid = 0; - connid = 0; slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); - opid = 0; slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid); /* Decode the extended operation */ @@ -881,7 +881,7 @@ const char *dn = slapi_entry_get_dn_const(e); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Error %d: could not import entry dn %s " - "for total update operation conn=%d op=%d\n", + "for total update operation conn=%" PRIu64 " op=%d\n", rc, dn, connid, opid); rc = -1; } @@ -891,7 +891,7 @@ { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Error %d: could not decode the total update extop " - "for total update operation conn=%d op=%d\n", + "for total update operation conn=%" PRIu64 " op=%d\n", rc, connid, opid); } Index: repl_connext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_connext.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- repl_connext.c 10 Nov 2006 23:45:17 -0000 1.6 +++ repl_connext.c 17 Oct 2008 22:12:47 -0000 1.7 @@ -78,7 +78,7 @@ /* consumer connection extension destructor */ void consumer_connection_extension_destructor (void *ext, void *object, void *parent) { - int connid = 0; + PRUint64 connid = 0; if (ext) { /* Check to see if this replication session has acquired @@ -101,7 +101,7 @@ slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "Aborting total update in progress for replicated " - "area %s connid=%d\n", slapi_sdn_get_dn(repl_root_sdn), + "area %s connid=%" PRIu64 "\n", slapi_sdn_get_dn(repl_root_sdn), connid); slapi_stop_bulk_import(pb); } Index: repl_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_extop.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- repl_extop.c 24 Jun 2008 22:22:09 -0000 1.13 +++ repl_extop.c 17 Oct 2008 22:12:47 -0000 1.14 @@ -562,7 +562,8 @@ char *bind_dn = NULL; Object *ruv_object = NULL; RUV *supplier_ruv = NULL; - int connid, opid; + PRUint64 connid = 0; + int opid = 0; PRBool isInc = PR_FALSE; /* true if incremental update */ char *locking_purl = NULL; /* the supplier contacting us */ char *current_purl = NULL; /* the supplier which already has exclusive access */ @@ -581,9 +582,7 @@ goto send_response; } - connid = 0; slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); - opid = 0; slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid); /* @@ -606,7 +605,7 @@ /* Stash info that this is an incremental update session */ connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL; slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": Begin incremental protocol\n", + "conn=%" PRIu64 " op=%d repl=\"%s\": Begin incremental protocol\n", connid, opid, repl_root); isInc = PR_TRUE; } @@ -618,7 +617,7 @@ connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE; } slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": Begin total protocol\n", + "conn=%" PRIu64 " op=%d repl=\"%s\": Begin total protocol\n", connid, opid, repl_root); isInc = PR_FALSE; } @@ -627,7 +626,7 @@ /* Stash info that this is an incremental update session */ connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL; slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": Begin 7.1 incremental protocol\n", + "conn=%" PRIu64 " op=%d repl=\"%s\": Begin 7.1 incremental protocol\n", connid, opid, repl_root); isInc = PR_TRUE; } @@ -639,7 +638,7 @@ connext->repl_protocol_version = REPL_PROTOCOL_71_TOTALUPDATE; } slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": Begin 7.1 total protocol\n", + "conn=%" PRIu64 " op=%d repl=\"%s\": Begin 7.1 total protocol\n", connid, opid, repl_root); isInc = PR_FALSE; } @@ -661,7 +660,7 @@ if (replica_is_being_configured(repl_root)) { slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d replica=\"%s\": " + "conn=%" PRIu64 " op=%d replica=\"%s\": " "Replica is being configured: try again later\n", connid, opid, repl_root); response = NSDS50_REPL_REPLICA_BUSY; @@ -714,7 +713,7 @@ { response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW; slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "Excessive clock skew from supplier RUV\n", connid, opid, repl_root); goto send_response; @@ -750,7 +749,7 @@ if (check_replica_id_uniqueness(replica, supplier_ruv) != 0){ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "Replica has same replicaID %d as supplier\n", connid, opid, repl_root, replica_get_rid(replica)); response = NSDS50_REPL_REPLICAID_ERROR; @@ -763,7 +762,7 @@ * the session's conn id and op id to identify the the supplier. */ /* junkrc = ruv_get_first_id_and_purl(supplier_ruv, &junkrid, &locking_purl); */ - PR_snprintf(locking_session, sizeof(locking_session), "conn=%d id=%d", connid, opid); + PR_snprintf(locking_session, sizeof(locking_session), "conn=%" PRIu64 " id=%d", connid, opid); locking_purl = &locking_session[0]; if (replica_get_exclusive_access(replica, &isInc, connid, opid, locking_purl, @@ -877,7 +876,7 @@ } slapi_log_error (resp_log_level, repl_plugin_name, - "conn=%d op=%d replica=\"%s\": " + "conn=%" PRIu64 " op=%d replica=\"%s\": " "Unable to acquire replica: error: %s%s\n", connid, opid, (replica ? slapi_sdn_get_dn(replica_get_root(replica)) : "unknown"), @@ -901,7 +900,7 @@ slapi_pblock_set(pb, SLAPI_EXT_OP_RET_OID, REPL_NSDS50_REPLICATION_RESPONSE_OID); slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, resp_bval); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, - "conn=%d op=%d repl=\"%s\": " + "conn=%" PRIu64 " op=%d repl=\"%s\": " "StartNSDS50ReplicationRequest: response=%d rc=%d\n", connid, opid, repl_root, response, rc); @@ -1008,7 +1007,8 @@ ber_int_t response; void *conn; consumer_connection_extension *connext = NULL; - int connid=-1, opid=-1; + PRUint64 connid = 0; + int opid=-1; /* Decode the extended operation */ if (decode_endrepl_extop(pb, &repl_root) == -1) Index: replutil.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- replutil.c 15 Oct 2008 06:29:58 -0000 1.12 +++ replutil.c 17 Oct 2008 22:12:47 -0000 1.13 @@ -817,16 +817,17 @@ int repl_op = 0; int local_backend = -1; /* index of local backend */ int chaining_backend = -1; /* index of chain backend */ + int is_internal = 0; PRBool local_online = PR_FALSE; /* true if the local db is online */ int ii; int opid; #ifdef DEBUG_CHAIN_ON_UPDATE - int connid; + PRUint64 connid = 0; #endif slapi_pblock_get(pb, SLAPI_OPERATION, &op); #ifdef DEBUG_CHAIN_ON_UPDATE if (operation_is_flag_set(op, OP_FLAG_INTERNAL)) { - connid=-1; /* -1: internal op in a log msg */ + is_internal = 1; } else { slapi_pblock_get(pb, SLAPI_CONN_ID, &connid); } @@ -853,11 +854,18 @@ } } #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d be " - "%s is the %s backend and is %s\n", - connid, opid, - mtn_be_names[ii], (chaining_backend == ii) ? "chaining" : "local", - (mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" : "offline"); + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d be " + "%s is the %s backend and is %s\n", opid, + mtn_be_names[ii], (chaining_backend == ii) ? "chaining" : "local", + (mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" : "offline"); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d be " + "%s is the %s backend and is %s\n", connid, opid, + mtn_be_names[ii], (chaining_backend == ii) ? "chaining" : "local", + (mtn_be_states[ii] == SLAPI_BE_STATE_ON) ? "online" : "offline"); + + } #endif } @@ -880,9 +888,13 @@ (op_type == SLAPI_OPERATION_UNBIND) || (op_type == SLAPI_OPERATION_COMPARE))) { #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d op is " - "%d: using local backend\n", - connid, opid, op_type); + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d op is " + "%d: using local backend\n", opid, op_type); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d op is " + "%d: using local backend\n", connid, opid, op_type); + } #endif return local_backend; } @@ -899,8 +911,13 @@ slapi_pblock_get(pb, SLAPI_REQUESTOR_DN, &requestor_dn); if (slapi_dn_isroot(requestor_dn)) { #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d requestor " + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d requestor " + "is root: using local backend\n", opid); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d requestor " "is root: using local backend\n", connid, opid); + } #endif return local_backend; } @@ -911,8 +928,13 @@ slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op); if (repl_op) { #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d op is " + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d op is " + "replicated: using local backend\n", opid); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d op is " "replicated: using local backend\n", connid, opid); + } #endif return local_backend; } @@ -923,8 +945,13 @@ extern int config_get_pw_is_global_policy(); if (!config_get_pw_is_global_policy()) { #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d using " + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d using " + "local backend for local password policy\n", opid); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d using " "local backend for local password policy\n", connid, opid); + } #endif return local_backend; } @@ -935,8 +962,13 @@ * use the chaining backend */ #ifdef DEBUG_CHAIN_ON_UPDATE - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%d op=%d using " + if (is_internal) { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=-1 op=%d using " + "chaining backend\n", opid); + } else { + slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "repl_chain_on_update: conn=%" PRIu64 " op=%d using " "chaining backend\n", connid, opid); + } #endif return chaining_backend; } From nkinder at fedoraproject.org Fri Oct 17 22:12:49 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:49 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna dna.c, 1.12, 1.13 Message-ID: <20081017221249.4D7957013A@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/plugins/dna Modified Files: dna.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: dna.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- dna.c 15 Oct 2008 06:29:56 -0000 1.12 +++ dna.c 17 Oct 2008 22:12:47 -0000 1.13 @@ -58,6 +58,15 @@ /* Required to get portable printf/scanf format macros */ #ifdef HAVE_INTTYPES_H #include + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + #else #error Need to define portable format macros such as PRIu64 #endif /* HAVE_INTTYPES_H */ From nkinder at fedoraproject.org Fri Oct 17 22:12:50 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:50 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd abandon.c, 1.7, 1.8 add.c, 1.13, 1.14 auth.c, 1.11, 1.12 bind.c, 1.15, 1.16 compare.c, 1.7, 1.8 connection.c, 1.20, 1.21 conntable.c, 1.10, 1.11 daemon.c, 1.20, 1.21 delete.c, 1.8, 1.9 extendop.c, 1.8, 1.9 fe.h, 1.8, 1.9 globals.c, 1.7, 1.8 init.c, 1.6, 1.7 modify.c, 1.16, 1.17 modrdn.c, 1.9, 1.10 opshared.c, 1.12, 1.13 pblock.c, 1.17, 1.18 plugin_internal_op.c, 1.10, 1.11 proto-slap.h, 1.37, 1.38 psearch.c, 1.9, 1.10 result.c, 1.13, 1.14 sasl_io.c, 1.14, 1.15 search.c, 1.9, 1.10 slap.h, 1.36, 1.37 slapi-plugin.h, 1.31, 1.32 snmp_collator.c, 1.14, 1.15 stubrepl.c, 1.6, 1.7 unbind.c, 1.5, 1.6 value.c, 1.7, 1.8 Message-ID: <20081017221250.8347070138@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/slapd Modified Files: abandon.c add.c auth.c bind.c compare.c connection.c conntable.c daemon.c delete.c extendop.c fe.h globals.c init.c modify.c modrdn.c opshared.c pblock.c plugin_internal_op.c proto-slap.h psearch.c result.c sasl_io.c search.c slap.h slapi-plugin.h snmp_collator.c stubrepl.c unbind.c value.c Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: abandon.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/abandon.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- abandon.c 10 Nov 2006 23:45:40 -0000 1.7 +++ abandon.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -153,15 +153,15 @@ } if ( NULL == o ) { - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d ABANDON" + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d ABANDON" " targetop=NOTFOUND msgid=%d\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, id ); } else if ( suppressed_by_plugin ) { - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d ABANDON" + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64" op=%d ABANDON" " targetop=SUPPRESSED-BY-PLUGIN msgid=%d\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, id ); } else { - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d ABANDON" + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d ABANDON" " targetop=%d msgid=%d nentries=%d etime=%ld\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, o->o_opid, id, o->o_results.r.r_search.nentries, current_time() - o->o_time ); Index: add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- add.c 15 Oct 2008 06:30:03 -0000 1.13 +++ add.c 17 Oct 2008 22:12:47 -0000 1.14 @@ -166,7 +166,7 @@ if (( rc = slapi_entry_add_values( e, normtype, vals )) != LDAP_SUCCESS ) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d ADD dn=\"%s\", add values for type %s failed\n", + "conn=%" PRIu64 " op=%d ADD dn=\"%s\", add values for type %s failed\n", pb->pb_conn->c_connid, operation->o_opid, escape_string( slapi_entry_get_dn_const(e), ebuf ), normtype ); send_ldap_result( pb, rc, NULL, NULL, 0, NULL ); @@ -432,7 +432,7 @@ { if ( !internal_op ) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d ADD dn=\"%s\"\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d ADD dn=\"%s\"\n", pb->pb_conn->c_connid, operation->o_opid, escape_string(slapi_entry_get_dn_const(e), ebuf)); Index: auth.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/auth.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- auth.c 8 Oct 2008 17:29:03 -0000 1.11 +++ auth.c 17 Oct 2008 22:12:47 -0000 1.12 @@ -391,7 +391,7 @@ char* subject = subject_of (clientCert); char* issuer = issuer_of (clientCert); slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d " SLAPI_COMPONENT_NAME_NSPR " error %i (%s); unauthenticated client %s; issuer %s\n", + "conn=%" PRIu64 " " SLAPI_COMPONENT_NAME_NSPR " error %i (%s); unauthenticated client %s; issuer %s\n", conn->c_connid, errorCode, slapd_pr_strerror(errorCode), subject ? escape_string( subject, sbuf ) : "NULL", issuer ? escape_string( issuer, ibuf ) : "NULL" ); @@ -425,7 +425,7 @@ if ( (slapd_ssl_getChannelInfo (prfd, &channelInfo, sizeof(channelInfo))) != SECSuccess ) { PRErrorCode errorCode = PR_GetError(); slapi_log_access (LDAP_DEBUG_STATS, - "conn=%d SSL failed to obtain channel info; " + "conn=%" PRIu64 " SSL failed to obtain channel info; " SLAPI_COMPONENT_NAME_NSPR " error %i (%s)\n", conn->c_connid, errorCode, slapd_pr_strerror(errorCode)); return; @@ -434,7 +434,7 @@ != SECSuccess) { PRErrorCode errorCode = PR_GetError(); slapi_log_access (LDAP_DEBUG_STATS, - "conn=%d SSL failed to obtain cipher info; " + "conn=%" PRIu64 " SSL failed to obtain cipher info; " SLAPI_COMPONENT_NAME_NSPR " error %i (%s)\n", conn->c_connid, errorCode, slapd_pr_strerror(errorCode)); return; @@ -455,13 +455,13 @@ } if (config_get_SSLclientAuth() == SLAPD_SSLCLIENTAUTH_OFF ) { - slapi_log_access (LDAP_DEBUG_STATS, "conn=%d SSL %i-bit %s\n", + slapi_log_access (LDAP_DEBUG_STATS, "conn=%" PRIu64 " SSL %i-bit %s\n", conn->c_connid, keySize, cipher ? cipher : "NULL" ); slapi_ch_free_string(&cipher); return; } if (clientCert == NULL) { - slapi_log_access (LDAP_DEBUG_STATS, "conn=%d SSL %i-bit %s\n", + slapi_log_access (LDAP_DEBUG_STATS, "conn=%" PRIu64 " SSL %i-bit %s\n", conn->c_connid, keySize, cipher ? cipher : "NULL" ); } else { char* subject = subject_of (clientCert); @@ -469,7 +469,7 @@ char* issuer = issuer_of (clientCert); char sbuf[ BUFSIZ ], ibuf[ BUFSIZ ]; slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d SSL %i-bit %s; client %s; issuer %s\n", + "conn=%" PRIu64 " SSL %i-bit %s; client %s; issuer %s\n", conn->c_connid, keySize, cipher ? cipher : "NULL", subject ? escape_string( subject, sbuf ) : "NULL", issuer ? escape_string( issuer, ibuf ) : "NULL"); @@ -507,11 +507,11 @@ if (clientDN != NULL) { char ebuf[ BUFSIZ ]; - slapi_log_access (LDAP_DEBUG_STATS, "conn=%d SSL client bound as %s\n", + slapi_log_access (LDAP_DEBUG_STATS, "conn=%" PRIu64 " SSL client bound as %s\n", conn->c_connid, escape_string( clientDN, ebuf )); } else if (clientCert != NULL) { slapi_log_access (LDAP_DEBUG_STATS, - "conn=%d SSL failed to map client certificate to LDAP DN (%s)\n", + "conn=%" PRIu64 " SSL failed to map client certificate to LDAP DN (%s)\n", conn->c_connid, extraErrorMsg ); } Index: bind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bind.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- bind.c 15 Oct 2008 06:30:03 -0000 1.15 +++ bind.c 17 Oct 2008 22:12:47 -0000 1.16 @@ -686,25 +686,25 @@ if (method == LDAP_AUTH_SASL && saslmech && msg) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d BIND dn=\"%s\" " + "conn=%" PRIu64 " op=%d BIND dn=\"%s\" " "method=sasl version=%d mech=%s, %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, edn, version, saslmech, msg ); } else if (method == LDAP_AUTH_SASL && saslmech) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d BIND dn=\"%s\" " + "conn=%" PRIu64 " op=%d BIND dn=\"%s\" " "method=sasl version=%d mech=%s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, edn, version, saslmech ); } else if (msg) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d BIND dn=\"%s\" " + "conn=%" PRIu64 " op=%d BIND dn=\"%s\" " "method=%d version=%d, %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, edn, method, version, msg ); } else { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d BIND dn=\"%s\" " + "conn=%" PRIu64 " op=%d BIND dn=\"%s\" " "method=%d version=%d\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, edn, method, version ); Index: compare.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/compare.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- compare.c 18 Oct 2007 00:08:34 -0000 1.7 +++ compare.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -122,7 +122,7 @@ dn, ava.ava_type, 0 ); slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d CMP dn=\"%s\" attr=\"%s\"\n", + "conn=%" PRIu64 " op=%d CMP dn=\"%s\" attr=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string( dn, ebuf ), ava.ava_type ); Index: connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- connection.c 15 Oct 2008 06:30:03 -0000 1.20 +++ connection.c 17 Oct 2008 22:12:47 -0000 1.21 @@ -147,14 +147,14 @@ if (conn->c_prfd && (conn->c_flags & CONN_FLAG_SSL)) { LDAPDebug( LDAP_DEBUG_CONNS, - "conn=%d fd=%d closed now\n", + "conn=%" PRIu64 " fd=%d closed now\n", conn->c_connid, conn->c_sd,0); PR_Close(conn->c_prfd); } else if (conn->c_sd) { LDAPDebug( LDAP_DEBUG_CONNS, - "conn=%d fd=%d closed now\n", + "conn=%" PRIu64 " fd=%d closed now\n", conn->c_connid, conn->c_sd,0); closesocket(conn->c_sd); } @@ -217,9 +217,7 @@ LDAPDebug( LDAP_DEBUG_CONNS, "new %sconnection on %d\n", pTmp, conn->c_sd, 0 ); /* bump our count of connections and update SNMP stats */ - PR_Lock( num_conns_mutex ); - conn->c_connid = num_conns++; - PR_Unlock( num_conns_mutex ); + conn->c_connid = slapi_counter_increment(num_conns); if (! in_referral_mode) { snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); @@ -354,7 +352,7 @@ /* log useful stuff to our access log */ slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d fd=%d slot=%d %sconnection from %s to %s\n", + "conn=%" PRIu64 " fd=%d slot=%d %sconnection from %s to %s\n", conn->c_connid, conn->c_sd, ns, pTmp, str_ip, str_destip ); /* initialize the remaining connection fields */ @@ -454,7 +452,7 @@ op->o_tag != LDAP_REQ_ABANDON ) { slapi_add_pwd_control ( pb, LDAP_CONTROL_PWEXPIRED, 0); - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d %s\n", + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, "need new password" ); send_ldap_result( pb, LDAP_UNWILLING_TO_PERFORM, @@ -524,7 +522,7 @@ { ret = setsockopt(conn->c_sd,IPPROTO_TCP,TCP_CORK,&i,sizeof(i)); if (ret < 0) { - LDAPDebug(LDAP_DEBUG_ANY, "Failed to set TCP_CORK on connection %d\n",conn->c_connid, 0, 0); + LDAPDebug(LDAP_DEBUG_ANY, "Failed to set TCP_CORK on connection %" PRIu64 "\n",conn->c_connid, 0, 0); } } #endif @@ -538,7 +536,7 @@ { ret = setsockopt(conn->c_sd,IPPROTO_TCP,TCP_CORK,&i,sizeof(i)); if (ret < 0) { - LDAPDebug(LDAP_DEBUG_ANY, "Failed to clear TCP_CORK on connection %d\n",conn->c_connid, 0, 0); + LDAPDebug(LDAP_DEBUG_ANY, "Failed to clear TCP_CORK on connection %" PRIu64 "\n",conn->c_connid, 0, 0); } } } @@ -564,7 +562,7 @@ default: LDAPDebug( LDAP_DEBUG_ANY, - "ignoring unknown LDAP request (conn=%d, tag=0x%lx)\n", + "ignoring unknown LDAP request (conn=%" PRIu64 ", tag=0x%lx)\n", conn->c_connid, op->o_tag, 0 ); break; } @@ -576,7 +574,7 @@ if (conn->c_refcnt <= 0) { slapi_log_error(SLAPI_LOG_FATAL, "connection", - "conn=%d fd=%d Attempt to release connection that is not aquired\n", + "conn=%" PRIu64 " fd=%d Attempt to release connection that is not aquired\n", conn->c_connid, conn->c_sd); PR_ASSERT (PR_FALSE); return -1; @@ -597,7 +595,7 @@ { /* This may happen while other threads are still working on this connection */ slapi_log_error(SLAPI_LOG_FATAL, "connection", - "conn=%d fd=%d Attempt to acquire connection in the closing state\n", + "conn=%" PRIu64 " fd=%d Attempt to acquire connection in the closing state\n", conn->c_connid, conn->c_sd); return -1; } @@ -775,7 +773,7 @@ /* if connection is closing */ if (return_value != 0) { LDAPDebug(LDAP_DEBUG_CONNS, - "handle_read_data returns as conn %d closing, fd=%d\n", + "handle_read_data returns as conn %" PRIu64 " closing, fd=%d\n", conn->c_connid,conn->c_sd,0); return return_value; } @@ -838,7 +836,7 @@ != LDAP_TAG_MSGID ) { /* log, close and send error */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d unable to read tag for incoming request\n", conn->c_connid, 0, 0 ); + "conn=%" PRIu64 " unable to read tag for incoming request\n", conn->c_connid, 0, 0 ); return_value = -1; goto done; } @@ -850,7 +848,7 @@ case LDAP_TAG_LDAPDN: /* optional username, for CLDAP */ /* log, close and send error */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d ber_peek_tag returns 0x%lx\n", conn->c_connid, tag, 0 ); + "conn=%" PRIu64 " ber_peek_tag returns 0x%lx\n", conn->c_connid, tag, 0 ); return_value = -1; goto done; default: @@ -981,7 +979,7 @@ PR_Lock( conn->c_mutex ); if (connection_is_active_nolock(conn) == 0) { LDAPDebug(LDAP_DEBUG_CONNS, - "not creating a new operation when conn %d closing\n", + "not creating a new operation when conn %" PRIu64 " closing\n", conn->c_connid,0,0); PR_Unlock( conn->c_mutex ); return -1; @@ -1073,7 +1071,7 @@ So, we toss it away ! */ if (LBER_OVERFLOW == tag) { slapi_log_error( SLAPI_LOG_FATAL, "connection", - "conn=%d fd=%d The length of BER Element was too long.\n", + "conn=%" PRIu64 " fd=%d The length of BER Element was too long.\n", conn->c_connid, conn->c_sd ); } PR_Lock( conn->c_mutex ); @@ -1110,7 +1108,7 @@ * We received a non-LDAP message. Log and close connection. */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d received a non-LDAP message" + "conn=%" PRIu64 " received a non-LDAP message" " (tag 0x%lx, expected 0x%lx)\n", conn->c_connid, tag, LDAP_TAG_MESSAGE ); PR_Lock( conn->c_mutex ); @@ -1128,7 +1126,7 @@ if (Bytes_Scanned != Bytes_Read) { if (connection_increment_reference(conn) == -1) { LDAPDebug(LDAP_DEBUG_CONNS, - "could not acquire lock in issue_new_read as conn %d closing fd=%d\n", + "could not acquire lock in issue_new_read as conn %" PRIu64 " closing fd=%d\n", conn->c_connid,conn->c_sd,0); /* XXX how to handle this error? */ /* MAB: 25 Jan 01: let's try like this and pray this won't leak... */ @@ -1150,7 +1148,7 @@ */ connection_decrement_reference(conn); LDAPDebug(LDAP_DEBUG_CONNS, - "push_back_data failed: closing conn %d fd=%d\n", + "push_back_data failed: closing conn %" PRIu64 " fd=%d\n", conn->c_connid,conn->c_sd,0); } } else { @@ -1248,7 +1246,7 @@ if (connection_increment_reference(conn) == -1) { LDAPDebug(LDAP_DEBUG_CONNS, - "could not acquire lock in issue_new_read as conn %d closing fd=%d\n", + "could not acquire lock in issue_new_read as conn %" PRIu64 " closing fd=%d\n", conn->c_connid,conn->c_sd,0); /* This means that the connection is closing */ return -1; @@ -1410,7 +1408,7 @@ be decremented in wait_for_new_work(). */ if (connection_acquire_nolock (conn) == -1) { LDAPDebug(LDAP_DEBUG_CONNS, - "could not acquire lock in connection_activity as conn %d closing fd=%d\n", + "could not acquire lock in connection_activity as conn %" PRIu64 " closing fd=%d\n", conn->c_connid,conn->c_sd,0); /* XXX how to handle this error? */ /* MAB: 25 Jan 01: let's return on error and pray this won't leak */ @@ -1646,7 +1644,7 @@ syserr = errno; /* Bad stuff happened, like the client sent us some junk */ LDAPDebug( LDAP_DEBUG_CONNS, - "ber_get_next failed for connection %d\n", conn->c_connid, 0, 0 ); + "ber_get_next failed for connection %" PRIu64 "\n", conn->c_connid, 0, 0 ); /* reset private buffer */ conn->c_private->c_buffer_bytes = conn->c_private->c_buffer_offset = 0; @@ -1715,7 +1713,7 @@ ret = sasl_io_setup(conn); if (ret) { LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d unable to enable SASL I/O\n", conn->c_connid, 0, 0 ); + "conn=%" PRIu64 " unable to enable SASL I/O\n", conn->c_connid, 0, 0 ); disconnect_server( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BAD_BER_TAG, EPROTO ); return CONN_DONE; } @@ -1776,7 +1774,7 @@ } else { /* Otherwise we loop, unless we exceeded the ioblock timeout */ if (waits_done > ioblocktimeout_waits) { - LDAPDebug( LDAP_DEBUG_CONNS,"ioblock timeout expired on connection %d\n", conn->c_connid, 0, 0 ); + LDAPDebug( LDAP_DEBUG_CONNS,"ioblock timeout expired on connection %" PRIu64 "\n", conn->c_connid, 0, 0 ); disconnect_server( conn, conn->c_connid, -1, SLAPD_DISCONNECT_IO_TIMEOUT, 0 ); return CONN_DONE; @@ -1796,7 +1794,7 @@ err = PR_GetError(); syserr = PR_GetOSError(); LDAPDebug( LDAP_DEBUG_ANY, - "PR_Poll for connection %d returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) ); + "PR_Poll for connection %" PRIu64 " returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) ); /* If this happens we should close the connection */ disconnect_server( conn, conn->c_connid, -1, err, syserr ); return CONN_DONE; @@ -1805,7 +1803,7 @@ /* Some other error, typically meaning bad stuff */ syserr = PR_GetOSError(); LDAPDebug( LDAP_DEBUG_CONNS, - "PR_Recv for connection %d returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) ); + "PR_Recv for connection %" PRIu64 " returns %d (%s)\n", conn->c_connid, err, slapd_pr_strerror( err ) ); /* If this happens we should close the connection */ disconnect_server( conn, conn->c_connid, -1, err, syserr ); return CONN_DONE; @@ -1837,7 +1835,7 @@ * We received a non-LDAP message. Log and close connection. */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d received a non-LDAP message (tag 0x%lx, expected 0x%lx)\n", + "conn=%" PRIu64 " received a non-LDAP message (tag 0x%lx, expected 0x%lx)\n", conn->c_connid, *tag, LDAP_TAG_MESSAGE ); disconnect_server( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BAD_BER_TAG, EPROTO ); @@ -1848,7 +1846,7 @@ != LDAP_TAG_MSGID ) { /* log, close and send error */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d unable to read tag for incoming request\n", conn->c_connid, 0, 0 ); + "conn=%" PRIu64 " unable to read tag for incoming request\n", conn->c_connid, 0, 0 ); disconnect_server( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BAD_BER_TAG, EPROTO ); return CONN_DONE; } @@ -1865,7 +1863,7 @@ case LDAP_TAG_LDAPDN: /* optional username, for CLDAP */ /* log, close and send error */ LDAPDebug( LDAP_DEBUG_ANY, - "conn=%d ber_peek_tag returns 0x%lx\n", conn->c_connid, *tag, 0 ); + "conn=%" PRIu64 " ber_peek_tag returns 0x%lx\n", conn->c_connid, *tag, 0 ); disconnect_server( conn, conn->c_connid, -1, SLAPD_DISCONNECT_BER_PEEK, EPROTO ); return CONN_DONE; default: @@ -1902,7 +1900,7 @@ /* update the last checked time */ conn->c_private->previous_count_check_time = current_time(); PR_Unlock( conn->c_mutex ); - LDAPDebug(LDAP_DEBUG_CONNS,"conn %d activity level = %d\n",conn->c_connid,delta_count,0); + LDAPDebug(LDAP_DEBUG_CONNS,"conn %" PRIu64 " activity level = %d\n",conn->c_connid,delta_count,0); } typedef struct table_iterate_info_struct { @@ -1957,7 +1955,7 @@ } else { double activet = 0.0; connection_find_our_rank(conn,&connection_count, &our_rank); - LDAPDebug(LDAP_DEBUG_CONNS,"conn %d turbo rank = %d out of %d conns\n",conn->c_connid,our_rank,connection_count); + LDAPDebug(LDAP_DEBUG_CONNS,"conn %" PRIu64 " turbo rank = %d out of %d conns\n",conn->c_connid,our_rank,connection_count); activet = (double)g_get_active_threadcnt(); threshold_rank = (int)(activet * ((double)CONN_TURBO_PERCENTILE / 100.0)); @@ -1999,9 +1997,9 @@ PR_Unlock(conn->c_mutex); if (current_mode != new_mode) { if (current_mode) { - LDAPDebug(LDAP_DEBUG_CONNS,"conn %d leaving turbo mode\n",conn->c_connid,0,0); + LDAPDebug(LDAP_DEBUG_CONNS,"conn %" PRIu64 " leaving turbo mode\n",conn->c_connid,0,0); } else { - LDAPDebug(LDAP_DEBUG_CONNS,"conn %d entering turbo mode\n",conn->c_connid,0,0); + LDAPDebug(LDAP_DEBUG_CONNS,"conn %" PRIu64 " entering turbo mode\n",conn->c_connid,0,0); } } *new_turbo_flag = new_mode; @@ -2092,7 +2090,7 @@ /* turn off turbo mode immediately if any pb waiting in global queue */ if (thread_turbo_flag && (counter > 0)) { thread_turbo_flag = 0; - LDAPDebug(LDAP_DEBUG_CONNS,"conn %d leaving turbo mode\n",conn->c_connid,0,0); + LDAPDebug(LDAP_DEBUG_CONNS,"conn %" PRIu64 " leaving turbo mode\n",conn->c_connid,0,0); } #endif @@ -2235,7 +2233,7 @@ if (connection_acquire_nolock (conn) == -1) { LDAPDebug(LDAP_DEBUG_CONNS, - "could not acquire lock in connection_activity as conn %d closing fd=%d\n", + "could not acquire lock in connection_activity as conn %" PRIu64 " closing fd=%d\n", conn->c_connid,conn->c_sd,0); /* XXX how to handle this error? */ /* MAB: 25 Jan 01: let's return on error and pray this won't leak */ @@ -2355,9 +2353,9 @@ static void connection_add_operation(Connection* conn,Operation* op) { - Operation **olist= &conn->c_ops; - int id= conn->c_opsinitiated++; - int connid= conn->c_connid; + Operation **olist= &conn->c_ops; + int id= conn->c_opsinitiated++; + PRUint64 connid = conn->c_connid; Operation **tmp; /* slapi_ch_stop_recording(); */ @@ -2387,7 +2385,7 @@ if ( *tmp == NULL ) { - LDAPDebug( LDAP_DEBUG_ANY, "connection_remove_operation: can't find op %d for conn %d\n", + LDAPDebug( LDAP_DEBUG_ANY, "connection_remove_operation: can't find op %d for conn %" PRIu64 "\n", (int)op->o_msgid, conn->c_connid, 0 ); } else @@ -2498,13 +2496,13 @@ } if (0 == ber_len) { slapi_log_error( SLAPI_LOG_FATAL, "connection", - "conn=%d fd=%d Incoming BER Element was too long, max allowable" + "conn=%" PRIu64 " fd=%d Incoming BER Element was too long, max allowable" " is %u bytes. Change the nsslapd-maxbersize attribute in" " cn=config to increase.\n", conn->c_connid, conn->c_sd, maxbersize ); } else { slapi_log_error( SLAPI_LOG_FATAL, "connection", - "conn=%d fd=%d Incoming BER Element was %u bytes, max allowable" + "conn=%" PRIu64 " fd=%d Incoming BER Element was %u bytes, max allowable" " is %u bytes. Change the nsslapd-maxbersize attribute in" " cn=config to increase.\n", conn->c_connid, conn->c_sd, ber_len, maxbersize ); @@ -2513,7 +2511,7 @@ void -disconnect_server( Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ) +disconnect_server( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ) { PR_Lock( conn->c_mutex ); disconnect_server_nomutex( conn, opconnid, opid, reason, error ); @@ -2530,7 +2528,7 @@ */ void -disconnect_server_nomutex( Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ) +disconnect_server_nomutex( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ) { if ( ( conn->c_sd != SLAPD_INVALID_SOCKET && conn->c_connid == opconnid ) && !(conn->c_flags & CONN_FLAG_CLOSING) ) { @@ -2557,13 +2555,13 @@ */ if (error && (EPIPE != error) ) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d fd=%d closed error %d (%s) - %s\n", + "conn=%" PRIu64 " op=%d fd=%d closed error %d (%s) - %s\n", conn->c_connid, opid, conn->c_sd, error, slapd_system_strerror(error), slapd_pr_strerror(reason)); } else { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d fd=%d closed - %s\n", + "conn=%" PRIu64 " op=%d fd=%d closed - %s\n", conn->c_connid, opid, conn->c_sd, slapd_pr_strerror(reason)); } Index: conntable.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/conntable.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- conntable.c 8 Oct 2008 17:29:03 -0000 1.10 +++ conntable.c 17 Oct 2008 22:12:47 -0000 1.11 @@ -449,9 +449,7 @@ val.bv_len = strlen( buf ); attrlist_replace( &e->e_attrs, "currentconnections", vals ); - PR_Lock( num_conns_mutex ); - sprintf( buf, "%d", num_conns ); - PR_Unlock( num_conns_mutex ); + sprintf( buf, "%" PRIu64, slapi_counter_get_value(num_conns)); val.bv_val = buf; val.bv_len = strlen( buf ); attrlist_replace( &e->e_attrs, "totalconnections", vals ); Index: daemon.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/daemon.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- daemon.c 16 May 2008 20:39:11 -0000 1.20 +++ daemon.c 17 Oct 2008 22:12:47 -0000 1.21 @@ -1496,7 +1496,7 @@ * trying to acquire a closing connection */ LDAPDebug (LDAP_DEBUG_ANY, - "connection_activity: abandoning conn %d as fd=%d is already closing\n", + "connection_activity: abandoning conn %" PRIu64 " as fd=%d is already closing\n", c->c_connid,c->c_sd,0); /* The call disconnect_server should do nothing, * as the connection c should be already set to CLOSING */ @@ -2216,7 +2216,7 @@ if(conn->c_dn) { /* log the auto bind */ - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d AUTOBIND dn=\"%s\"\n", conn->c_connid, conn->c_dn); + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " AUTOBIND dn=\"%s\"\n", conn->c_connid, conn->c_dn); } return ret; Index: delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/delete.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- delete.c 18 Oct 2007 00:08:34 -0000 1.8 +++ delete.c 17 Oct 2008 22:12:47 -0000 1.9 @@ -257,7 +257,7 @@ { if (!internal_op ) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d DEL dn=\"%s\"\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d DEL dn=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(dn, ebuf)); Index: extendop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/extendop.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- extendop.c 10 Nov 2006 23:45:40 -0000 1.8 +++ extendop.c 17 Oct 2008 22:12:47 -0000 1.9 @@ -267,14 +267,14 @@ if ( NULL == ( name = extended_op_oid2string( extoid ))) { LDAPDebug( LDAP_DEBUG_ARGS, "do_extended: oid (%s)\n", extoid, 0, 0 ); - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d EXT oid=\"%s\"\n", + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d EXT oid=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, extoid ); } else { LDAPDebug( LDAP_DEBUG_ARGS, "do_extended: oid (%s-%s)\n", extoid, name, 0 ); slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d EXT oid=\"%s\" name=\"%s\"\n", + "conn=%" PRIu64 " op=%d EXT oid=\"%s\" name=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, extoid, name ); } Index: fe.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/fe.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- fe.h 20 Sep 2007 16:54:38 -0000 1.8 +++ fe.h 17 Oct 2008 22:12:47 -0000 1.9 @@ -61,8 +61,7 @@ extern PRLock *ops_mutex; extern PRThread *listener_tid; extern PRThread *listener_tid; -extern int num_conns; -extern PRLock *num_conns_mutex; +extern Slapi_Counter *num_conns; extern char *pid_file; extern char *start_pid_file; extern int should_detach; Index: globals.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/globals.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- globals.c 20 Sep 2007 16:54:38 -0000 1.7 +++ globals.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -91,8 +91,8 @@ PRInt32 ops_initiated; PRInt32 ops_completed; PRLock *ops_mutex; -int num_conns; -PRLock *num_conns_mutex; +Slapi_Counter *num_conns; + /* DEC/COMPAQ has released a patch for 4.0d (e?) which will speed up Index: init.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/init.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- init.c 10 Nov 2006 23:45:40 -0000 1.6 +++ init.c 17 Oct 2008 22:12:47 -0000 1.7 @@ -70,14 +70,17 @@ } #endif /* _WIN32 */ + /* We don't worry about free'ing this stuff + * since the only time we want to do that is when + * the process is exiting. */ ops_mutex = PR_NewLock(); - num_conns_mutex = PR_NewLock(); + num_conns = slapi_counter_new(); g_set_num_sent_mutex( PR_NewLock() ); g_set_current_conn_count_mutex( PR_NewLock() ); + slapd_re_init(); if ( ops_mutex == NULL || - num_conns_mutex == NULL || g_get_num_sent_mutex() == NULL || g_get_current_conn_count_mutex() == NULL ) { Index: modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- modify.c 18 Oct 2007 00:08:34 -0000 1.16 +++ modify.c 17 Oct 2008 22:12:47 -0000 1.17 @@ -575,7 +575,7 @@ { if ( !internal_op ) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\"\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d MOD dn=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(slapi_sdn_get_dn(&sdn), ebuf)); @@ -956,7 +956,7 @@ if (operation_is_flag_set(operation,OP_FLAG_ACTION_LOG_ACCESS)) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\", %s\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d MOD dn=\"%s\", %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(slapi_sdn_get_dn(&sdn), ebuf), "user is not allowed to change password"); @@ -976,7 +976,7 @@ { if ( !internal_op ) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\", %s\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d MOD dn=\"%s\", %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(slapi_sdn_get_dn(&sdn), ebuf), @@ -1011,7 +1011,7 @@ { if ( !internal_op ) { - slapi_log_access(LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\", %s\n", + slapi_log_access(LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d MOD dn=\"%s\", %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(slapi_sdn_get_dn(&sdn), ebuf), "invalid password syntax"); Index: modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modrdn.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- modrdn.c 18 Oct 2007 00:08:34 -0000 1.9 +++ modrdn.c 17 Oct 2008 22:12:47 -0000 1.10 @@ -351,7 +351,7 @@ if ( !internal_op ) { slapi_log_access(LDAP_DEBUG_STATS, - "conn=%d op=%d MODRDN dn=\"%s\" newrdn=\"%s\" newsuperior=\"%s\"\n", + "conn=%" PRIu64 " op=%d MODRDN dn=\"%s\" newrdn=\"%s\" newsuperior=\"%s\"\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(dn, dnbuf), @@ -374,7 +374,7 @@ if ((rdns = ldap_explode_rdn(newrdn, 0)) == NULL) { slapi_log_error(SLAPI_LOG_FATAL, NULL, - "conn=%d op=%d MODRDN invalid new RDN (\"%s\")\n", + "conn=%" PRIu64 " op=%d MODRDN invalid new RDN (\"%s\")\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, (NULL == newrdn) ? "(null)" : newrdn); @@ -391,7 +391,7 @@ { LDAPDebug(LDAP_DEBUG_ARGS, "ldap_explode_dn of newSuperior failed\n", 0, 0, 0); slapi_log_error(SLAPI_LOG_FATAL, NULL, - "conn=%d op=%d MODRDN invalid new superior (\"%s\")", + "conn=%" PRIu64 " op=%d MODRDN invalid new superior (\"%s\")", pb->pb_conn->c_connid, pb->pb_op->o_opid, (NULL == newsuperior) ? "(null)" : newsuperiorbuf); Index: opshared.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- opshared.c 27 Jun 2008 19:28:21 -0000 1.12 +++ opshared.c 17 Oct 2008 22:12:47 -0000 1.13 @@ -230,7 +230,7 @@ { char *fmtstr; -#define SLAPD_SEARCH_FMTSTR_BASE "conn=%d op=%d SRCH base=\"%s\" scope=%d " +#define SLAPD_SEARCH_FMTSTR_BASE "conn=%" PRIu64 " op=%d SRCH base=\"%s\" scope=%d " #define SLAPD_SEARCH_FMTSTR_BASE_INT "conn=%s op=%d SRCH base=\"%s\" scope=%d " #define SLAPD_SEARCH_FMTSTR_REMAINDER " attrs=%s%s\n" @@ -1329,7 +1329,7 @@ void op_shared_log_error_access (Slapi_PBlock *pb, const char *type, const char *dn, const char *msg) { char ebuf[BUFSIZ]; - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d %s dn=\"%s\", %s\n", + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d %s dn=\"%s\", %s\n", ( pb->pb_conn ? pb->pb_conn->c_connid : 0), ( pb->pb_op ? pb->pb_op->o_opid : 0), type, Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- pblock.c 8 Oct 2008 17:29:03 -0000 1.17 +++ pblock.c 17 Oct 2008 22:12:47 -0000 1.18 @@ -188,7 +188,7 @@ "Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 ); return (-1); } - (*(int *)value) = pblock->pb_conn->c_connid; + (*(PRUint64 *)value) = pblock->pb_conn->c_connid; break; case SLAPI_CONN_DN: /* @@ -1665,7 +1665,7 @@ "Connection is NULL and hence cannot access SLAPI_CONN_ID \n", 0, 0, 0 ); return (-1); } - pblock->pb_conn->c_connid = *((int *) value); + pblock->pb_conn->c_connid = *((PRUint64 *) value); break; case SLAPI_CONN_DN: /* Index: plugin_internal_op.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_internal_op.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- plugin_internal_op.c 19 Oct 2007 15:36:01 -0000 1.10 +++ plugin_internal_op.c 17 Oct 2008 22:12:47 -0000 1.11 @@ -188,7 +188,7 @@ static get_disconnect_server_fn_ptr disconnect_server_fn = NULL; void -do_disconnect_server(Connection *conn, int opconnid, int opid) +do_disconnect_server(Connection *conn, PRUint64 opconnid, int opid) { if (NULL == disconnect_server_fn) { if (get_entry_point(ENTRY_POINT_DISCONNECT_SERVER, (caddr_t *)(&disconnect_server_fn)) < 0) { Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- proto-slap.h 15 Oct 2008 06:30:05 -0000 1.37 +++ proto-slap.h 17 Oct 2008 22:12:47 -0000 1.38 @@ -825,7 +825,7 @@ void g_set_default_referral( struct berval **ldap_url ); struct berval **g_get_default_referral(); PRLock *g_get_num_sent_mutex(); -void disconnect_server( Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ); +void disconnect_server( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ); int send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **ectrls, char **attrs, int attrsonly ); void send_ldap_result( Slapi_PBlock *pb, int err, char *matched, char *text, @@ -839,7 +839,7 @@ struct berval ***urls ); int send_ldapv3_referral( Slapi_PBlock *pb, struct berval **urls ); int set_db_default_result_handlers(Slapi_PBlock *pb); -void disconnect_server_nomutex( Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ); +void disconnect_server_nomutex( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ); long g_get_current_conn_count(); void g_increment_current_conn_count(); void g_decrement_current_conn_count(); @@ -1075,7 +1075,7 @@ /* * plugin_internal_op.c */ -void do_disconnect_server( Connection *conn, int opconnid, int opid ); +void do_disconnect_server( Connection *conn, PRUint64 opconnid, int opid ); /* * regex.c Index: psearch.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/psearch.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- psearch.c 20 Sep 2007 16:54:38 -0000 1.9 +++ psearch.c 17 Oct 2008 22:12:47 -0000 1.10 @@ -305,7 +305,7 @@ if (conn_acq_flag) { slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search", - "conn=%d op=%d Could not acquire the connection - psearch aborted\n", + "conn=%" PRIu64 " op=%d Could not acquire the connection - psearch aborted\n", ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid); } @@ -315,7 +315,7 @@ /* Check for an abandoned operation */ if ( ps->ps_pblock->pb_op == NULL || slapi_op_abandoned( ps->ps_pblock ) ) { slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search", - "conn=%d op=%d The operation has been abandoned\n", + "conn=%" PRIu64 " op=%d The operation has been abandoned\n", ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid); break; } @@ -373,7 +373,7 @@ ectrls, attrs, attrsonly ); if (rc) { slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search", - "conn=%d op=%d Error %d sending entry %s with op status %d\n", + "conn=%" PRIu64 " op=%d Error %d sending entry %s with op status %d\n", ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid, rc, slapi_entry_get_dn_const(ec), ps->ps_pblock->pb_op->o_status); } @@ -421,7 +421,7 @@ PR_Lock( ps->ps_pblock->pb_conn->c_mutex ); slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search", - "conn=%d op=%d Releasing the connection and operation\n", + "conn=%" PRIu64 " op=%d Releasing the connection and operation\n", ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid); /* Delete this op from the connection's list */ connection_remove_operation( ps->ps_pblock->pb_conn, ps->ps_pblock->pb_op ); @@ -557,7 +557,7 @@ } slapi_log_error(SLAPI_LOG_CONNS, "Persistent Search", - "conn=%d op=%d entry %s with chgtype %d " + "conn=%" PRIu64 " op=%d entry %s with chgtype %d " "matches the ps changetype %d\n", ps->ps_pblock->pb_conn->c_connid, ps->ps_pblock->pb_op->o_opid, edn, chgtype, ps->ps_changetypes); Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- result.c 27 Jun 2008 19:28:21 -0000 1.13 +++ result.c 17 Oct 2008 22:12:47 -0000 1.14 @@ -1689,7 +1689,7 @@ if ( !internal_op ) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d RESULT err=%d" + "conn=%" PRIu64 " op=%d RESULT err=%d" " tag=%u nentries=%d etime=%s%s%s" ", SASL bind in progress\n", op->o_connid, @@ -1721,7 +1721,7 @@ if ( !internal_op ) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d RESULT err=%d" + "conn=%" PRIu64 " op=%d RESULT err=%d" " tag=%u nentries=%d etime=%s%s%s" " dn=\"%s\"\n", op->o_connid, @@ -1747,7 +1747,7 @@ if ( !internal_op ) { slapi_log_access( LDAP_DEBUG_STATS, - "conn=%d op=%d RESULT err=%d" + "conn=%" PRIu64 " op=%d RESULT err=%d" " tag=%u nentries=%d etime=%s%s%s\n", op->o_connid, op->o_opid, @@ -1780,7 +1780,7 @@ if ( !internal_op ) { - slapi_log_access( LDAP_DEBUG_STATS2, "conn=%d op=%d ENTRY dn=\"%s\"\n", + slapi_log_access( LDAP_DEBUG_STATS2, "conn=%" PRIu64 " op=%d ENTRY dn=\"%s\"\n", op->o_connid, op->o_opid, escape_string( slapi_entry_get_dn_const(e), ebuf )); } @@ -1805,7 +1805,7 @@ if ( !internal_op ) { - slapi_log_access( LDAP_DEBUG_STATS2, "conn=%d op=%d REFERRAL\n", + slapi_log_access( LDAP_DEBUG_STATS2, "conn=%" PRIu64 " op=%d REFERRAL\n", op->o_connid, op->o_opid ); } else Index: sasl_io.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_io.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- sasl_io.c 5 Mar 2008 19:57:03 -0000 1.14 +++ sasl_io.c 17 Oct 2008 22:12:47 -0000 1.15 @@ -82,7 +82,7 @@ int ret = 0; LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_io_enable for connection %d\n", c->c_connid, 0, 0 ); + "sasl_io_enable for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); /* Flag that we should enable SASL I/O for the next read operation on this connection */ c->c_enable_sasl_io = 1; @@ -108,7 +108,7 @@ sasl_io_private *sp = (sasl_io_private*) slapi_ch_calloc(1, sizeof(sasl_io_private)); LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_io_setup for connection %d\n", c->c_connid, 0, 0 ); + "sasl_io_setup for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); /* Get the current functions and store them for later */ real_iofns->lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; ber_sockbuf_get_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, real_iofns ); @@ -142,7 +142,7 @@ sasl_io_private *sp = c->c_sasl_io_private; if (sp) { LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_io_cleanup for connection %d\n", c->c_connid, 0, 0 ); + "sasl_io_cleanup for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); /* Free the buffers */ slapi_ch_free((void**)&(sp->encrypted_buffer)); slapi_ch_free((void**)&(sp->decrypted_buffer)); @@ -203,7 +203,7 @@ } if (ret != 0 && ret < sizeof(buffer)) { LDAPDebug( LDAP_DEBUG_ANY, - "failed to read sasl packet length on connection %d\n", c->c_connid, 0, 0 ); + "failed to read sasl packet length on connection %" PRIu64 "\n", c->c_connid, 0, 0 ); return -1; } @@ -214,7 +214,7 @@ packet_length += 4; LDAPDebug( LDAP_DEBUG_CONNS, - "read sasl packet length %ld on connection %d\n", packet_length, c->c_connid, 0 ); + "read sasl packet length %ld on connection %" PRIu64 "\n", packet_length, c->c_connid, 0 ); sasl_io_resize_encrypted_buffer(c->c_sasl_io_private, packet_length); /* Cyrus SASL implementation expects to have the length at the first 4 bytes */ @@ -257,7 +257,7 @@ *err = 0; LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_recv_connection for connection %d\n", c->c_connid, 0, 0 ); + "sasl_recv_connection for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); /* Do we have decrypted data buffered from 'before' ? */ bytes_in_buffer = sp->decrypted_buffer_count - sp->decrypted_buffer_offset; if (0 == bytes_in_buffer) { @@ -284,12 +284,12 @@ const char *output_buffer = NULL; unsigned int output_length = 0; LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_recv_connection finished reading packet for connection %d\n", c->c_connid, 0, 0 ); + "sasl_recv_connection finished reading packet for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); /* Now decode it */ ret = sasl_decode(c->c_sasl_conn,sp->encrypted_buffer,sp->encrypted_buffer_count,&output_buffer,&output_length); if (SASL_OK == ret) { LDAPDebug( LDAP_DEBUG_CONNS, - "sasl_recv_connection decoded packet length %d for connection %d\n", output_length, c->c_connid, 0 ); + "sasl_recv_connection decoded packet length %d for connection %" PRIu64 "\n", output_length, c->c_connid, 0 ); if (output_length) { sasl_io_resize_decrypted_buffer(sp,output_length); memcpy(sp->decrypted_buffer,output_buffer,output_length); @@ -300,7 +300,7 @@ } } else { LDAPDebug( LDAP_DEBUG_ANY, - "sasl_recv_connection failed to decode packet for connection %d\n", c->c_connid, 0, 0 ); + "sasl_recv_connection failed to decode packet for connection %" PRIu64 "\n", c->c_connid, 0, 0 ); } } } Index: search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/search.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- search.c 27 Jun 2008 19:28:21 -0000 1.9 +++ search.c 17 Oct 2008 22:12:47 -0000 1.10 @@ -384,7 +384,7 @@ { char ebuf[BUFSIZ]; slapi_log_access(LDAP_DEBUG_STATS, - "conn=%d op=%d SRCH base=\"%s\" scope=%d filter=\"%s\", %s\n", + "conn=%" PRIu64 " op=%d SRCH base=\"%s\" scope=%d filter=\"%s\", %s\n", pb->pb_conn->c_connid, pb->pb_op->o_opid, escape_string(base, ebuf), scope, fstr, msg ? msg : ""); Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- slap.h 15 Oct 2008 06:30:05 -0000 1.36 +++ slap.h 17 Oct 2008 22:12:47 -0000 1.37 @@ -97,6 +97,7 @@ #include #if defined(SOLARIS) #include /* for LONG_MAX */ + #endif /* there's a bug in the dbm code we import (from where?) -- FIXME */ @@ -116,6 +117,22 @@ #define LDAP_IOCP #endif +/* Required to get portable printf/scanf format macros */ +#ifdef HAVE_INTTYPES_H +#include + +/* NSPR uses the print macros a bit differently than ANSI C. We + * need to use ll for a 64-bit integer, even when a long is 64-bit. + */ +#undef PRIu64 +#define PRIu64 "llu" +#undef PRI64 +#define PRI64 "ll" + +#else +#error Need to define portable format macros such as PRIu64 +#endif /* HAVE_INTTYPES_H */ + #define LOG_INTERNAL_OP_CON_ID "Internal" #define LOG_INTERNAL_OP_OP_ID -1 @@ -1164,7 +1181,7 @@ Slapi_DN o_sdn; /* dn bound when op was initiated */ char *o_authtype; /* auth method used to bind dn */ int o_opid; /* id of this operation */ - int o_connid; /* id of conn initiating this op; for logging only */ + PRUint64 o_connid; /* id of conn initiating this op; for logging only */ void *o_handler_data; result_handler o_result_handler; search_entry_handler o_search_entry_handler; @@ -1223,7 +1240,7 @@ int c_gettingber; /* in the middle of ber_get_next */ BerElement *c_currentber; /* ber we're getting */ time_t c_starttime; /* when the connection was opened */ - int c_connid; /* id of this connection for stats*/ + PRUint64 c_connid; /* id of this connection for stats*/ int c_opsinitiated; /* # ops initiated/next op id */ PRInt32 c_opscompleted; /* # ops completed */ PRInt32 c_threadnumber; /* # threads used in this conn */ @@ -1582,7 +1599,7 @@ typedef void (*ps_wakeup_all_fn_ptr)( void ); typedef void (*ps_service_fn_ptr)(Slapi_Entry *, Slapi_Entry *, int, int ); typedef char *(*get_config_dn_fn_ptr)(); -typedef void (*get_disconnect_server_fn_ptr)(Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ); +typedef void (*get_disconnect_server_fn_ptr)(Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ); typedef int (*slapd_SSL_client_init_fn_ptr)( void ); typedef int (*modify_config_dse_fn_ptr)( Slapi_PBlock *pb ); typedef int (*slapd_ssl_init_fn_ptr)( void ); Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- slapi-plugin.h 3 Oct 2008 04:28:22 -0000 1.31 +++ slapi-plugin.h 17 Oct 2008 22:12:47 -0000 1.32 @@ -152,6 +152,7 @@ typedef struct slapi_mod Slapi_Mod; typedef struct slapi_mods Slapi_Mods; typedef struct slapi_componentid Slapi_ComponentId; +typedef struct slapi_counter Slapi_Counter; /* Online tasks interface (to support import, export, etc) */ #define SLAPI_TASK_PUBLIC 1 /* tell old plugins that the task api is now public */ @@ -1340,6 +1341,17 @@ void slapi_destroy_task(void *arg); /* End of interface to support online tasks **********************************/ +/* Slapi_Counter Interface */ +Slapi_Counter *slapi_counter_new(); +void slapi_counter_init(Slapi_Counter *counter); +void slapi_counter_destroy(Slapi_Counter **counter); +PRUint64 slapi_counter_increment(Slapi_Counter *counter); +PRUint64 slapi_counter_decrement(Slapi_Counter *counter); +PRUint64 slapi_counter_add(Slapi_Counter *counter, PRUint64 addvalue); +PRUint64 slapi_counter_subtract(Slapi_Counter *counter, PRUint64 subvalue); +PRUint64 slapi_counter_set_value(Slapi_Counter *counter, PRUint64 newvalue); +PRUint64 slapi_counter_get_value(Slapi_Counter *counter); + /* Binder-based (connection centric) resource limits */ /* * Valid values for `type' parameter to slapi_reslimit_register(). Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- snmp_collator.c 8 Oct 2008 17:29:03 -0000 1.14 +++ snmp_collator.c 17 Oct 2008 22:12:47 -0000 1.15 @@ -611,6 +611,9 @@ } } +/* NGK - We should not be using a plain int here. All of these counters + * are PRUint32 types for now, but they will be PRUint64 once converted + * to use Slapi_Counter. */ static void add_counter_to_value(Slapi_Entry *e, const char *type, int countervalue) { Index: stubrepl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/stubrepl.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- stubrepl.c 10 Nov 2006 23:45:40 -0000 1.6 +++ stubrepl.c 17 Oct 2008 22:12:47 -0000 1.7 @@ -74,6 +74,6 @@ } void -disconnect_server( Connection *conn, int opconnid, int opid, PRErrorCode reason, PRInt32 error ) +disconnect_server( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ) { } Index: unbind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/unbind.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- unbind.c 10 Nov 2006 23:45:40 -0000 1.5 +++ unbind.c 17 Oct 2008 22:12:47 -0000 1.6 @@ -79,7 +79,7 @@ * UnBindRequest ::= NULL */ if ( ber_get_null( ber ) == LBER_ERROR ) { - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND," + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d UNBIND," " decoding error: UnBindRequest not null\n", pb->pb_conn->c_connid, operation->o_opid ); /* LDAPv3 does not allow a response to an unbind... so just return. */ @@ -92,7 +92,7 @@ * pass them to the backend. */ if ( (err = get_ldapmessage_controls( pb, ber, NULL )) != 0 ) { - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND," + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d UNBIND," " error processing controls - error %d (%s)\n", pb->pb_conn->c_connid, operation->o_opid, err, ldap_err2string( err )); @@ -107,7 +107,7 @@ /* ONREPL - plugins should be called and passed bind dn and, possibly, other data */ - slapi_log_access( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND\n", + slapi_log_access( LDAP_DEBUG_STATS, "conn=%" PRIu64 " op=%d UNBIND\n", pb->pb_conn->c_connid, operation->o_opid ); /* pass the unbind to all backends */ Index: value.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/value.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- value.c 24 Sep 2008 21:21:52 -0000 1.7 +++ value.c 17 Oct 2008 22:12:47 -0000 1.8 @@ -487,7 +487,7 @@ p = slapi_ch_malloc(value->bv.bv_len + 1); memcpy (p, value->bv.bv_val, value->bv.bv_len); p [value->bv.bv_len] = '\0'; - r = atoll(p); + r = strtoll(p, (char **)NULL, 0); slapi_ch_free((void **)&p); } return r; @@ -503,7 +503,7 @@ p = slapi_ch_malloc(value->bv.bv_len + 1); memcpy (p, value->bv.bv_val, value->bv.bv_len); p [value->bv.bv_len] = '\0'; - r = (unsigned long long)atoll(p); + r = strtoull(p, (char **)NULL, 0); slapi_ch_free((void **)&p); } return r; From nkinder at fedoraproject.org Fri Oct 17 22:12:48 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:12:48 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.73, 1.74 Makefile.in, 1.96, 1.97 aclocal.m4, 1.74, 1.75 config.guess, 1.55, 1.56 config.h.in, 1.20, 1.21 config.sub, 1.55, 1.56 configure, 1.91, 1.92 depcomp, 1.56, 1.57 install-sh, 1.56, 1.57 ltmain.sh, 1.27, 1.28 missing, 1.56, 1.57 Message-ID: <20081017221249.7C80070138@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144 Modified Files: Makefile.am Makefile.in aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing Log Message: Related: 207457 Summary: Add support for 64-bit counters (phase 1). Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- Makefile.am 16 Oct 2008 16:43:36 -0000 1.73 +++ Makefile.am 17 Oct 2008 22:12:45 -0000 1.74 @@ -516,6 +516,7 @@ ldap/servers/slapd/schemaparse.c \ ldap/servers/slapd/security_wrappers.c \ ldap/servers/slapd/slapd_plhash.c \ + ldap/servers/slapd/slapi_counter.c \ ldap/servers/slapd/slapi2nspr.c \ ldap/servers/slapd/snmp_collator.c \ ldap/servers/slapd/ssl.c \ @@ -533,6 +534,10 @@ ldap/servers/slapd/vattr.c \ $(libavl_a_SOURCES) +if SOLARIS +libslapd_la_SOURCES += ldap/servers/slapd/slapi_counter_sunos_sparcv9.il +endif + libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@ libslapd_la_LIBADD = $(LDAPSDK_LINK) $(SASL_LINK) $(SVRCORE_LINK) $(NSS_LINK) $(NSPR_LINK) View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.96 -r 1.97 Makefile.in Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- Makefile.in 16 Oct 2008 16:43:37 -0000 1.96 +++ Makefile.in 17 Oct 2008 22:12:45 -0000 1.97 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,15 +18,11 @@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -46,12 +42,13 @@ ldif-bin$(EXEEXT) migratecred-bin$(EXEEXT) mmldif-bin$(EXEEXT) \ pwdhash-bin$(EXEEXT) rsearch-bin$(EXEEXT) noinst_PROGRAMS = makstrdb$(EXEEXT) - at SOLARIS_TRUE@am__append_1 = ldap/servers/slapd/tools/ldclt/opCheck.c + at SOLARIS_TRUE@am__append_1 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.il + at SOLARIS_TRUE@am__append_2 = ldap/servers/slapd/tools/ldclt/opCheck.c +subdir = . DIST_COMMON = $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure compile \ config.guess config.sub depcomp install-sh ltmain.sh missing -subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/fhs.m4 $(top_srcdir)/m4/nspr.m4 \ $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/mozldap.m4 \ @@ -61,7 +58,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -127,6 +124,9 @@ ldap/servers/plugins/shared/libattr_unique_plugin_la-utils.lo libattr_unique_plugin_la_OBJECTS = \ $(am_libattr_unique_plugin_la_OBJECTS) +libattr_unique_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libattr_unique_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libback_ldbm_la_DEPENDENCIES = libslapd.la $(am__DEPENDENCIES_1) am_libback_ldbm_la_OBJECTS = \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-ancestorid.lo \ @@ -189,10 +189,16 @@ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_key.lo \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_srch.lo libback_ldbm_la_OBJECTS = $(am_libback_ldbm_la_OBJECTS) +libback_ldbm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libback_ldbm_la_LDFLAGS) $(LDFLAGS) -o $@ libbitwise_plugin_la_LIBADD = am_libbitwise_plugin_la_OBJECTS = \ ldap/servers/plugins/bitwise/libbitwise_plugin_la-bitwise.lo libbitwise_plugin_la_OBJECTS = $(am_libbitwise_plugin_la_OBJECTS) +libbitwise_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libbitwise_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_bitwise_TRUE at am_libbitwise_plugin_la_rpath = -rpath \ @enable_bitwise_TRUE@ $(serverplugindir) libchainingdb_plugin_la_LIBADD = @@ -223,6 +229,9 @@ ldap/servers/plugins/chainingdb/libchainingdb_plugin_la-cb_utils.lo libchainingdb_plugin_la_OBJECTS = \ $(am_libchainingdb_plugin_la_OBJECTS) +libchainingdb_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libchainingdb_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libcollation_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libcollation_plugin_la_OBJECTS = ldap/servers/plugins/collation/libcollation_plugin_la-collate.lo \ @@ -234,29 +243,47 @@ ldap/servers/plugins/cos/libcos_plugin_la-cos.lo \ ldap/servers/plugins/cos/libcos_plugin_la-cos_cache.lo libcos_plugin_la_OBJECTS = $(am_libcos_plugin_la_OBJECTS) +libcos_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libcos_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdes_plugin_la_LIBADD = am_libdes_plugin_la_OBJECTS = \ ldap/servers/plugins/rever/libdes_plugin_la-des.lo \ ldap/servers/plugins/rever/libdes_plugin_la-rever.lo libdes_plugin_la_OBJECTS = $(am_libdes_plugin_la_OBJECTS) +libdes_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdes_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdistrib_plugin_la_LIBADD = am_libdistrib_plugin_la_OBJECTS = \ ldap/servers/plugins/distrib/libdistrib_plugin_la-distrib.lo libdistrib_plugin_la_OBJECTS = $(am_libdistrib_plugin_la_OBJECTS) +libdistrib_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdistrib_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdna_plugin_la_LIBADD = am_libdna_plugin_la_OBJECTS = \ ldap/servers/plugins/dna/libdna_plugin_la-dna.lo libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS) +libdna_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdna_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_dna_TRUE at am_libdna_plugin_la_rpath = -rpath $(serverplugindir) libhttp_client_plugin_la_LIBADD = am_libhttp_client_plugin_la_OBJECTS = ldap/servers/plugins/http/libhttp_client_plugin_la-http_client.lo \ ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.lo libhttp_client_plugin_la_OBJECTS = \ $(am_libhttp_client_plugin_la_OBJECTS) +libhttp_client_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libhttp_client_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libmemberof_plugin_la_LIBADD = am_libmemberof_plugin_la_OBJECTS = ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof.lo \ ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof_config.lo libmemberof_plugin_la_OBJECTS = $(am_libmemberof_plugin_la_OBJECTS) +libmemberof_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmemberof_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libns_dshttpd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @@ -328,6 +355,10 @@ ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo libpam_passthru_plugin_la_OBJECTS = \ $(am_libpam_passthru_plugin_la_OBJECTS) +libpam_passthru_plugin_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libpam_passthru_plugin_la_LDFLAGS) \ + $(LDFLAGS) -o $@ @enable_pam_passthru_TRUE at am_libpam_passthru_plugin_la_rpath = -rpath \ @enable_pam_passthru_TRUE@ $(serverplugindir) libpassthru_plugin_la_LIBADD = @@ -339,9 +370,15 @@ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptpreop.lo \ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptutil.lo libpassthru_plugin_la_OBJECTS = $(am_libpassthru_plugin_la_OBJECTS) +libpassthru_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpassthru_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpresence_plugin_la_LIBADD = am_libpresence_plugin_la_OBJECTS = ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo libpresence_plugin_la_OBJECTS = $(am_libpresence_plugin_la_OBJECTS) +libpresence_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpresence_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpwdstorage_plugin_la_LIBADD = am_libpwdstorage_plugin_la_OBJECTS = ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo \ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-crypt_pwd.lo \ @@ -353,9 +390,15 @@ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-ssha_pwd.lo libpwdstorage_plugin_la_OBJECTS = \ $(am_libpwdstorage_plugin_la_OBJECTS) +libpwdstorage_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpwdstorage_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreferint_plugin_la_LIBADD = am_libreferint_plugin_la_OBJECTS = ldap/servers/plugins/referint/libreferint_plugin_la-referint.lo libreferint_plugin_la_OBJECTS = $(am_libreferint_plugin_la_OBJECTS) +libreferint_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libreferint_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreplication_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libreplication_plugin_la_OBJECTS = ldap/servers/plugins/replication/libreplication_plugin_la-cl5_api.lo \ @@ -414,6 +457,9 @@ ldap/servers/plugins/replication/libreplication_plugin_la-windows_tot_protocol.lo libreplication_plugin_la_OBJECTS = \ $(am_libreplication_plugin_la_OBJECTS) +libreplication_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libreplication_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libretrocl_plugin_la_LIBADD = am_libretrocl_plugin_la_OBJECTS = \ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl.lo \ @@ -423,19 +469,83 @@ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl_rootdse.lo \ [...6230 lines suppressed...] install-mibDATA: $(mib_DATA) @$(NORMAL_INSTALL) - test -z "$(mibdir)" || $(mkdir_p) "$(DESTDIR)$(mibdir)" + test -z "$(mibdir)" || $(MKDIR_P) "$(DESTDIR)$(mibdir)" @list='$(mib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -8927,7 +9015,7 @@ done install-nodist_propertyDATA: $(nodist_property_DATA) @$(NORMAL_INSTALL) - test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" + test -z "$(propertydir)" || $(MKDIR_P) "$(DESTDIR)$(propertydir)" @list='$(nodist_property_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -8944,7 +9032,7 @@ done install-propertyDATA: $(property_DATA) @$(NORMAL_INSTALL) - test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" + test -z "$(propertydir)" || $(MKDIR_P) "$(DESTDIR)$(propertydir)" @list='$(property_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -8961,7 +9049,7 @@ done install-sampledataDATA: $(sampledata_DATA) @$(NORMAL_INSTALL) - test -z "$(sampledatadir)" || $(mkdir_p) "$(DESTDIR)$(sampledatadir)" + test -z "$(sampledatadir)" || $(MKDIR_P) "$(DESTDIR)$(sampledatadir)" @list='$(sampledata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -8978,7 +9066,7 @@ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) - test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)" + test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9044,24 +9132,22 @@ distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/m4 $(distdir)/man/man1 $(distdir)/man/man8 - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -9075,7 +9161,7 @@ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -9150,7 +9236,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -9176,7 +9262,7 @@ $(MANS) $(DATA) config.h installdirs: for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -9311,13 +9397,21 @@ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-taskSCRIPTS +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-sbinPROGRAMS install-sbinSCRIPTS +install-html: install-html-am + install-info: install-info-am install-man: install-man1 install-man8 +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -9341,17 +9435,18 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-man uninstall-mibDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ + uninstall-initconfigSCRIPTS uninstall-man uninstall-mibDATA \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS uninstall-man: uninstall-man1 uninstall-man8 +.MAKE: install-am install-strip + .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \ @@ -9362,27 +9457,29 @@ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-configDATA \ - install-data install-data-am install-exec install-exec-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigSCRIPTS install-man \ install-man1 install-man8 install-mibDATA \ - install-nodist_propertyDATA install-perlSCRIPTS \ - install-propertyDATA install-sampledataDATA \ - install-sbinPROGRAMS install-sbinSCRIPTS install-schemaDATA \ + install-nodist_propertyDATA install-pdf install-pdf-am \ + install-perlSCRIPTS install-propertyDATA install-ps \ + install-ps-am install-sampledataDATA install-sbinPROGRAMS \ + install-sbinSCRIPTS install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-strip install-taskSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-man uninstall-man1 uninstall-man8 uninstall-mibDATA \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA uninstall-sampledataDATA \ - uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ - uninstall-schemaDATA uninstall-serverLTLIBRARIES \ - uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ + uninstall-initconfigSCRIPTS uninstall-man uninstall-man1 \ + uninstall-man8 uninstall-mibDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA \ + uninstall-sampledataDATA uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-schemaDATA \ + uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ + uninstall-taskSCRIPTS dirver.h: Makefile Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- aclocal.m4 16 Oct 2008 16:43:36 -0000 1.74 +++ aclocal.m4 17 Oct 2008 22:12:46 -0000 1.75 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,9 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 48 AC_PROG_LIBTOOL +# serial 51 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -176,7 +181,7 @@ test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -263,8 +268,9 @@ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -276,8 +282,9 @@ # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -293,12 +300,20 @@ # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -529,13 +544,17 @@ rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -551,7 +570,11 @@ esac ;; *64-bit*) + libsuff=64 case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -623,7 +646,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -664,11 +687,12 @@ # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -782,24 +806,27 @@ fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac ]) @@ -1026,7 +1053,8 @@ # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1034,7 +1062,7 @@ mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1174,6 +1202,7 @@ darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1191,7 +1220,8 @@ # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1205,20 +1235,58 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -1375,12 +1443,8 @@ shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1397,18 +1461,6 @@ dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -1446,7 +1498,7 @@ shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1509,7 +1561,7 @@ postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1564,7 +1616,7 @@ ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -1577,28 +1629,13 @@ # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -1610,18 +1647,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -1703,6 +1728,10 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -1808,7 +1837,8 @@ # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2069,7 +2099,7 @@ # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognise shared library +# find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2132,7 +2162,7 @@ # AC_PATH_MAGIC # ------------- -# find a file program which can recognise a shared library +# find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2279,7 +2309,7 @@ # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +[AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2318,16 +2348,22 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -2365,7 +2401,7 @@ esac ;; -interix3*) +interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; @@ -2381,7 +2417,7 @@ ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -2415,6 +2451,10 @@ lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2467,7 +2507,7 @@ lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do @@ -2683,10 +2723,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -2788,10 +2828,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2937,7 +2977,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3096,10 +3136,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3133,7 +3173,7 @@ freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -3182,9 +3222,7 @@ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3252,7 +3290,7 @@ ;; esac ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3292,7 +3330,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -3372,6 +3410,29 @@ # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -3410,16 +3471,20 @@ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -3581,15 +3646,10 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3636,6 +3696,12 @@ fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -3879,7 +3945,7 @@ # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix3*) +interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_AC_TAGVAR(predep_objects,$1)= @@ -3887,13 +3953,46 @@ _LT_AC_TAGVAR(postdeps,$1)= ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;; @@ -3942,10 +4041,17 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4024,10 +4130,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4080,7 +4186,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4169,6 +4275,7 @@ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4215,7 +4322,7 @@ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4305,9 +4412,6 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -4441,11 +4545,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. @@ -4457,7 +4561,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4537,13 +4641,13 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4626,6 +4730,7 @@ # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -4662,7 +4767,7 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -4852,12 +4957,14 @@ # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -4869,7 +4976,7 @@ # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -4935,7 +5042,7 @@ ;; esac ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4978,7 +5085,7 @@ ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -5005,6 +5112,14 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac ;; esac ;; @@ -5125,13 +5240,15 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; @@ -5141,7 +5258,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5199,7 +5316,7 @@ esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -5232,7 +5349,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5251,6 +5368,22 @@ # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; esac ;; @@ -5260,6 +5393,10 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5354,7 +5491,8 @@ # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -5371,7 +5509,7 @@ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5510,7 +5648,7 @@ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -5528,7 +5666,7 @@ fi ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -5543,7 +5681,7 @@ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5561,13 +5699,22 @@ ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5607,7 +5754,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5726,7 +5873,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5819,7 +5966,7 @@ # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -5861,10 +6008,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -5904,7 +6051,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -6026,24 +6173,28 @@ ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -6102,17 +6253,16 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6169,7 +6319,7 @@ fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6244,7 +6394,7 @@ # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6347,6 +6497,30 @@ [AC_CHECK_TOOL(RC, windres, no) ]) + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # @@ -6367,7 +6541,7 @@ test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done @@ -6410,7 +6584,7 @@ AC_MSG_RESULT([$SED]) ]) -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6420,14 +6594,29 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6484,14 +6673,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6500,8 +6689,10 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -6515,15 +6706,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -6551,6 +6741,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -6616,6 +6807,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -6668,7 +6860,8 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -6693,8 +6886,9 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -6741,8 +6935,8 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6765,16 +6959,20 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -6794,6 +6992,9 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -6829,6 +7030,10 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -6864,7 +7069,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -6969,13 +7174,14 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 5 # AM_PROG_CC_C_O # -------------- @@ -6983,6 +7189,7 @@ AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC @@ -6995,18 +7202,22 @@ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -7022,6 +7233,7 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -7032,7 +7244,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7040,60 +7252,23 @@ # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -7205,9 +7380,21 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. Index: config.guess =================================================================== RCS file: /cvs/dirsec/ldapserver/config.guess,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- config.guess 16 Oct 2008 16:43:37 -0000 1.55 +++ config.guess 17 Oct 2008 22:12:46 -0000 1.56 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-07-08' +timestamp='2006-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -106,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -206,8 +207,11 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -764,7 +768,14 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -779,8 +790,11 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -794,7 +808,7 @@ i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:*) + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) @@ -817,6 +831,9 @@ arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -851,7 +868,11 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -870,9 +891,16 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; @@ -916,6 +944,9 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; @@ -961,7 +992,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -971,7 +1002,11 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1182,7 +1217,6 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1261,6 +1295,9 @@ i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- config.h.in 13 Oct 2008 16:32:42 -0000 1.20 +++ config.h.in 17 Oct 2008 22:12:46 -0000 1.21 @@ -377,7 +377,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* SunOS5 */ Index: config.sub =================================================================== RCS file: /cvs/dirsec/ldapserver/config.sub,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- config.sub 16 Oct 2008 16:43:37 -0000 1.55 +++ config.sub 17 Oct 2008 22:12:46 -0000 1.56 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-07-08' +timestamp='2006-09-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -119,8 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -171,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -187,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -231,7 +241,7 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -239,7 +249,8 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -257,28 +268,27 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | ms1 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -286,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -305,7 +318,7 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ @@ -316,7 +329,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -336,31 +349,30 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | ms1-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - m32c-*) - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -696,6 +708,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -803,6 +818,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -859,6 +880,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -885,6 +910,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -1101,7 +1130,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1174,21 +1203,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku*) + | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1340,6 +1371,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1349,9 +1386,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.91 -r 1.92 configure Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- configure 16 Oct 2008 16:43:36 -0000 1.91 +++ configure 17 Oct 2008 22:12:46 -0000 1.92 @@ -1,27 +1,56 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv 1.1.4. +# Generated by GNU Autoconf 2.61 for dirsrv 1.1.4. # # Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -31,8 +60,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -46,18 +110,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +130,388 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { [...19516 lines suppressed...] - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -26820,20 +27487,32 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` else continue fi @@ -26855,53 +27534,79 @@ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Index: depcomp =================================================================== RCS file: /cvs/dirsec/ldapserver/depcomp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- depcomp 16 Oct 2008 16:43:37 -0000 1.56 +++ depcomp 17 Oct 2008 22:12:46 -0000 1.57 @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2006-10-15.18 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,20 @@ ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -276,6 +290,46 @@ rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +342,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is Index: install-sh =================================================================== RCS file: /cvs/dirsec/ldapserver/install-sh,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- install-sh 16 Oct 2008 16:43:37 -0000 1.56 +++ install-sh 17 Oct 2008 22:12:46 -0000 1.57 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,15 +39,24 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" @@ -58,7 +67,13 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -chmodcmd="$chmodprog 0755" +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= @@ -95,7 +110,7 @@ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in -c) shift continue;; @@ -111,9 +126,15 @@ --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" + -m) mode=$2 shift shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac continue;; -o) chowncmd="$chownprog $2" @@ -136,25 +157,33 @@ --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,6 +193,33 @@ exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. @@ -173,15 +229,11 @@ if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -208,53 +260,188 @@ echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. + obsolete_mkdir_used=false - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - pathcomp= + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +449,9 @@ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -276,10 +462,10 @@ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not @@ -291,11 +477,12 @@ # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else @@ -304,16 +491,13 @@ } && # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + $doit $mvcmd "$dsttmp" "$dst" } - } - fi || { (exit 1); exit 1; } -done + } || exit 1 -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} + trap '' 0 + fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- ltmain.sh 2 Jul 2008 16:14:39 -0000 1.27 +++ ltmain.sh 17 Oct 2008 22:12:46 -0000 1.28 @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,14 +43,22 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -105,12 +113,14 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +146,8 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -196,7 +208,13 @@ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -327,7 +345,17 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -454,11 +482,12 @@ ;; --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -755,9 +784,10 @@ *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; + *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1168,9 @@ for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1178,20 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1600,7 +1639,7 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1620,10 +1659,11 @@ # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -pg pass through profiling flag for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1651,9 +1691,9 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. + # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1712,7 +1752,7 @@ continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2094,7 +2134,7 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2490,7 +2530,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3186,7 +3228,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3197,9 +3239,10 @@ age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; @@ -3258,7 +3301,8 @@ versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) @@ -3272,8 +3316,11 @@ ;; irix | nonstopux) - major=`expr $current - $age + 1` - + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3410,11 +3457,11 @@ fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3562,12 @@ int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3606,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3638,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3880,7 +3924,10 @@ test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4239,12 +4286,14 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4741,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4765,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4858,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4895,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5302,20 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5458,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5644,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5989,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6200,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6348,8 +6411,10 @@ if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi fi ;; @@ -6413,12 +6478,12 @@ fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6840,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6856,11 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Index: missing =================================================================== RCS file: /cvs/dirsec/ldapserver/missing,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- missing 16 Oct 2008 16:43:37 -0000 1.56 +++ missing 17 Oct 2008 22:12:46 -0000 1.57 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,6 +33,8 @@ fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 From nkinder at fedoraproject.org Fri Oct 17 22:15:28 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 17 Oct 2008 22:15:28 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi_counter.c, NONE, 1.1 slapi_counter_sunos_sparcv9.il, NONE, 1.1 Message-ID: <20081017221528.B748E70138@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11405/ldap/servers/slapd Added Files: slapi_counter.c slapi_counter_sunos_sparcv9.il Log Message: Related: 207457 Summary: Add 64-bit counter support (phase 1). --- NEW FILE slapi_counter.c --- /** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * * Copyright (C) 2008 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #include "slap.h" #ifdef HPUX #ifdef ATOMIC_64BIT_OPERATIONS #include #endif #endif /* * Counter Structure */ typedef struct slapi_counter { PRUint64 value; #ifndef ATOMIC_64BIT_OPERATIONS Slapi_Mutex *lock; #endif } slapi_counter; /* * slapi_counter_new() * * Allocates and initializes a new Slapi_Counter. */ Slapi_Counter *slapi_counter_new() { Slapi_Counter *counter = NULL; counter = (Slapi_Counter *)slapi_ch_calloc(1, sizeof(Slapi_Counter)); if (counter != NULL) { slapi_counter_init(counter); } return counter; } /* * slapi_counter_init() * * Initializes a Slapi_Counter. */ void slapi_counter_init(Slapi_Counter *counter) { if (counter != NULL) { #ifndef ATOMIC_64BIT_OPERATIONS /* Create the lock if necessary. */ if (counter->lock == NULL) { counter->lock = slapi_new_mutex(); } #endif /* Set the value to 0. */ slapi_counter_set_value(counter, 0); } } /* * slapi_counter_destroy() * * Destroy's a Slapi_Counter and sets the * pointer to NULL to prevent reuse. */ void slapi_counter_destroy(Slapi_Counter **counter) { if ((counter != NULL) && (*counter != NULL)) { #ifndef ATOMIC_64BIT_OPERATIONS slapi_destroy_mutex((*counter)->lock); #endif slapi_ch_free((void **)counter); } } /* * slapi_counter_increment() * * Atomically increments a Slapi_Counter. */ PRUint64 slapi_counter_increment(Slapi_Counter *counter) { return slapi_counter_add(counter, 1); } /* * slapi_counter_decrement() * * Atomically decrements a Slapi_Counter. Note * that this will not prevent you from wrapping * around 0. */ PRUint64 slapi_counter_decrement(Slapi_Counter *counter) { return slapi_counter_subtract(counter, 1); } /* * slapi_counter_add() * * Atomically add a value to a Slapi_Counter. */ PRUint64 slapi_counter_add(Slapi_Counter *counter, PRUint64 addvalue) { PRUint64 newvalue = 0; #ifdef HPUX PRUint64 prev = 0; #endif if (counter == NULL) { return newvalue; } #ifndef ATOMIC_64BIT_OPERATIONS slapi_lock_mutex(counter->lock); counter->value += addvalue; newvalue = counter->value; slapi_unlock_mutex(counter->lock); #else #ifdef LINUX newvalue = __sync_add_and_fetch(&(counter->value), addvalue); #elif defined(SOLARIS) newvalue = _sparcv9_AtomicAdd_il(&(counter->value), addvalue); #elif defined(HPUX) /* fetchadd only works with values of 1, 4, 8, and 16. In addition, it requires * it's argument to be an integer constant. */ if (addvalue == 1) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), 1, _LDHINT_NONE); newvalue += 1; } else if (addvalue == 4) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), 4, _LDHINT_NONE); newvalue += 4; } else if (addvalue == 8) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), 8, _LDHINT_NONE); newvalue += 8; } else if (addvalue == 16) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), 16, _LDHINT_NONE); newvalue += 16; } else { /* For other values, we have to use cmpxchg. */ do { prev = slapi_counter_get(counter); newvalue = prev + addvalue; /* Put prev in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, prev); } while (prev != _Asm_cmpxchg(_FASZ_D, _SEM_ACQ, &(counter->value), newvalue, _LDHINT_NONE)); } #endif #endif /* ATOMIC_64BIT_OPERATIONS */ return newvalue; } /* * slapi_counter_subtract() * * Atomically subtract a value from a Slapi_Counter. Note * that this will not prevent you from wrapping around 0. */ PRUint64 slapi_counter_subtract(Slapi_Counter *counter, PRUint64 subvalue) { PRUint64 newvalue = 0; #ifdef HPUX PRUint64 prev = 0; #endif if (counter == NULL) { return newvalue; } #ifndef ATOMIC_64BIT_OPERATIONS slapi_lock_mutex(counter->lock); counter->value -= subvalue; newvalue = counter->value; slapi_unlock_mutex(counter->lock); #else #ifdef LINUX newvalue = __sync_sub_and_fetch(&(counter->value), subvalue); #elif defined(SOLARIS) newvalue = _sparcv9_AtomicSub_il(&(counter->value), subvalue); #elif defined(HPUX) /* fetchadd only works with values of -1, -4, -8, and -16. In addition, it requires * it's argument to be an integer constant. */ if (subvalue == 1) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), -1, _LDHINT_NONE); newvalue -= 1; } else if (subvalue == 4) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), -4, _LDHINT_NONE); newvalue -= 4; } else if (subvalue == 8) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), -8, _LDHINT_NONE); newvalue -= 8; } else if (subvalue == 16) { newvalue = _Asm_fetchadd(_FASZ_D, _SEM_ACQ, &(counter->value), -16, _LDHINT_NONE); newvalue -= 16; } else { /* For other values, we have to use cmpxchg. */ do { prev = slapi_counter_get(counter); newvalue = prev - subvalue; /* Put prev in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, prev); } while (prev != _Asm_cmpxchg(_FASZ_D, _SEM_ACQ, &(counter->value), newvalue, _LDHINT_NONE)); } #endif #endif /* ATOMIC_64BIT_OPERATIONS */ return newvalue; } /* * slapi_counter_set_value() * * Atomically sets the value of a Slapi_Counter. */ PRUint64 slapi_counter_set_value(Slapi_Counter *counter, PRUint64 newvalue) { PRUint64 value = 0; if (counter == NULL) { return value; } #ifndef ATOMIC_64BIT_OPERATIONS slapi_lock_mutex(counter->lock); counter->value = newvalue; slapi_unlock_mutex(counter->lock); return newvalue; #else #ifdef LINUX while (1) { value = counter->value; if (__sync_bool_compare_and_swap(&(counter->value), value, newvalue)) { return newvalue; } } #elif defined(SOLARIS) _sparcv9_AtomicSet_il(&(counter->value), newvalue); return newvalue; #elif defined(HPUX) do { value = counter->value; /* Put value in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, value); } while (value != _Asm_cmpxchg(_FASZ_D, _SEM_ACQ, &(counter->value), newvalue, _LDHINT_NONE)); return newvalue; #endif #endif /* ATOMIC_64BIT_OPERATIONS */ } /* * slapi_counter_get_value() * * Returns the value of a Slapi_Counter. */ PRUint64 slapi_counter_get_value(Slapi_Counter *counter) { PRUint64 value = 0; if (counter == NULL) { return value; } #ifndef ATOMIC_64BIT_OPERATIONS slapi_lock_mutex(counter->lock); value = counter->value; slapi_unlock_mutex(counter->lock); #else #ifdef LINUX while (1) { value = counter->value; if (__sync_bool_compare_and_swap(&(counter->value), value, value)) { break; } } #elif defined(SOLARIS) while (1) { value = counter->value; if (value == _sparcv9_AtomicSet_il(&(counter->value), value)) { break; } } #elif defined(HPUX) do { value = counter->value; /* Put value in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, value); } while (value != _Asm_cmpxchg(_FASZ_D, _SEM_ACQ, &(counter->value), value, _LDHINT_NONE)); #endif #endif /* ATOMIC_64BIT_OPERATIONS */ return value; } --- NEW FILE slapi_counter_sunos_sparcv9.il --- // BEGIN COPYRIGHT BLOCK // This Program is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free Software // Foundation; version 2 of the License. // // This Program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this Program; if not, write to the Free Software Foundation, Inc., 59 Temple // Place, Suite 330, Boston, MA 02111-1307 USA. // // In addition, as a special exception, Red Hat, Inc. gives You the additional // right to link the code of this Program with code not covered under the GNU // General Public License ("Non-GPL Code") and to distribute linked combinations // including the two, subject to the limitations in this paragraph. Non-GPL Code // permitted under this exception must only link to the code of this Program // through those well defined interfaces identified in the file named EXCEPTION // found in the source code files (the "Approved Interfaces"). The files of // Non-GPL Code may instantiate templates or use macros or inline functions from // the Approved Interfaces without causing the resulting work to be covered by // the GNU General Public License. Only Red Hat, Inc. may make changes or // additions to the list of Approved Interfaces. You must obey the GNU General // Public License in all respects for all of the Program code and other code used // in conjunction with the Program except the Non-GPL Code covered by this // exception. If you modify this file, you may extend this exception to your // version of the file, but you are not obligated to do so. If you do not wish to // provide this exception without modification, you must delete this exception // statement from your version and license this file solely under the GPL without // exception. // // // The Original Code is the Netscape Portable Runtime (NSPR). // // The Initial Developer of the Original Code is // Netscape Communications Corporation. // Portions created by the Initial Developer are Copyright (C) 1998-2000 // the Initial Developer. All Rights Reserved. // // The original code has been modified to support 64-bit atomic increments by // Red Hat, Inc. These portions are Copyright (C) 2008 Red Hat, Inc. All Rights // reserved. // // END COPYRIGHT BLOCK // // ====================================================================== // // Perform the sequence a = b atomically with respect to other // fetch-and-stores to location a in a wait-free fashion. // // usage : newval = _sparcv9_AtomicSet(address, newval) // // ----------------------- // Note on REGISTER USAGE: // as this is a LEAF procedure, a new stack frame is not created; // we use the caller's stack frame so what would normally be %i (input) // registers are actually %o (output registers). Also, we must not // overwrite the contents of %l (local) registers as they are not // assumed to be volatile during calls. // // So, the registers used are: // %o0 [input] - the address of the value to set // %o1 [input] - the new value to set for [%o0] // %o2 [local] - work register // %o3 [local] - work register // ----------------------- .inline _sparcv9_AtomicSet_il, 0 retryAS: ld [%o0], %o2 ! set o2 to the current value mov %o1, %o3 ! set up the new value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAS ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o3, %o0 ! set the return code to the new value .end // ====================================================================== // // Perform the sequence a = a + b atomically with respect to other // fetch-and-adds to location a in a wait-free fashion. // // usage : newval = _sparcv9_AtomicAdd(address, val) // return: the value after addition // .inline _sparcv9_AtomicAdd_il, 0 retryAA: ld [%o0], %o2 ! set o2 to the current value addx %o2, %o1, %o3 ! calc the new value mov %o3, %o4 ! save the return value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAA ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o4, %o0 ! set the return code to the new value .end // ====================================================================== // // Perform the sequence a = a - b atomically with respect to other // fetch-and-subs to location a in a wait-free fashion. // // usage : newval = _sparcv9_AtomicSub(address, val) // return: the value after addition // .inline _sparcv9_AtomicSub_il, 0 retryAU: ld [%o0], %o2 ! set o2 to the current value subx %o2, %o1, %o3 ! calc the new value mov %o3, %o4 ! save the return value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAU ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o4, %o0 ! set the return code to the new value .end From nhosoi at fedoraproject.org Sun Oct 19 17:12:58 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Sun, 19 Oct 2008 17:12:58 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.97, 1.98 aclocal.m4, 1.75, 1.76 config.guess, 1.56, 1.57 config.h.in, 1.21, 1.22 config.sub, 1.56, 1.57 configure, 1.92, 1.93 depcomp, 1.57, 1.58 install-sh, 1.57, 1.58 ltmain.sh, 1.28, 1.29 missing, 1.57, 1.58 Message-ID: <20081019171258.8FAA270139@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27721 Modified Files: Makefile.in aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing Log Message: reran autogen.sh (automake V1.9.6, autoconf V2.59) View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.97 -r 1.98 Makefile.in Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.97 retrieving revision 1.98 diff -u -r1.97 -r1.98 --- Makefile.in 17 Oct 2008 22:12:45 -0000 1.97 +++ Makefile.in 19 Oct 2008 17:12:55 -0000 1.98 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,11 +18,15 @@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -44,11 +48,11 @@ noinst_PROGRAMS = makstrdb$(EXEEXT) @SOLARIS_TRUE at am__append_1 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.il @SOLARIS_TRUE at am__append_2 = ldap/servers/slapd/tools/ldclt/opCheck.c -subdir = . DIST_COMMON = $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure compile \ config.guess config.sub depcomp install-sh ltmain.sh missing +subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/fhs.m4 $(top_srcdir)/m4/nspr.m4 \ $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/mozldap.m4 \ @@ -58,7 +62,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno + configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -124,9 +128,6 @@ ldap/servers/plugins/shared/libattr_unique_plugin_la-utils.lo libattr_unique_plugin_la_OBJECTS = \ $(am_libattr_unique_plugin_la_OBJECTS) -libattr_unique_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libattr_unique_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libback_ldbm_la_DEPENDENCIES = libslapd.la $(am__DEPENDENCIES_1) am_libback_ldbm_la_OBJECTS = \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-ancestorid.lo \ @@ -189,16 +190,10 @@ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_key.lo \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_srch.lo libback_ldbm_la_OBJECTS = $(am_libback_ldbm_la_OBJECTS) -libback_ldbm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libback_ldbm_la_LDFLAGS) $(LDFLAGS) -o $@ libbitwise_plugin_la_LIBADD = am_libbitwise_plugin_la_OBJECTS = \ ldap/servers/plugins/bitwise/libbitwise_plugin_la-bitwise.lo libbitwise_plugin_la_OBJECTS = $(am_libbitwise_plugin_la_OBJECTS) -libbitwise_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libbitwise_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_bitwise_TRUE at am_libbitwise_plugin_la_rpath = -rpath \ @enable_bitwise_TRUE@ $(serverplugindir) libchainingdb_plugin_la_LIBADD = @@ -229,9 +224,6 @@ ldap/servers/plugins/chainingdb/libchainingdb_plugin_la-cb_utils.lo libchainingdb_plugin_la_OBJECTS = \ $(am_libchainingdb_plugin_la_OBJECTS) -libchainingdb_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libchainingdb_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libcollation_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libcollation_plugin_la_OBJECTS = ldap/servers/plugins/collation/libcollation_plugin_la-collate.lo \ @@ -243,47 +235,29 @@ ldap/servers/plugins/cos/libcos_plugin_la-cos.lo \ ldap/servers/plugins/cos/libcos_plugin_la-cos_cache.lo libcos_plugin_la_OBJECTS = $(am_libcos_plugin_la_OBJECTS) -libcos_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libcos_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdes_plugin_la_LIBADD = am_libdes_plugin_la_OBJECTS = \ ldap/servers/plugins/rever/libdes_plugin_la-des.lo \ ldap/servers/plugins/rever/libdes_plugin_la-rever.lo libdes_plugin_la_OBJECTS = $(am_libdes_plugin_la_OBJECTS) -libdes_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdes_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdistrib_plugin_la_LIBADD = am_libdistrib_plugin_la_OBJECTS = \ ldap/servers/plugins/distrib/libdistrib_plugin_la-distrib.lo libdistrib_plugin_la_OBJECTS = $(am_libdistrib_plugin_la_OBJECTS) -libdistrib_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdistrib_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdna_plugin_la_LIBADD = am_libdna_plugin_la_OBJECTS = \ ldap/servers/plugins/dna/libdna_plugin_la-dna.lo libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS) -libdna_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdna_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_dna_TRUE at am_libdna_plugin_la_rpath = -rpath $(serverplugindir) libhttp_client_plugin_la_LIBADD = am_libhttp_client_plugin_la_OBJECTS = ldap/servers/plugins/http/libhttp_client_plugin_la-http_client.lo \ ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.lo libhttp_client_plugin_la_OBJECTS = \ $(am_libhttp_client_plugin_la_OBJECTS) -libhttp_client_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhttp_client_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libmemberof_plugin_la_LIBADD = am_libmemberof_plugin_la_OBJECTS = ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof.lo \ ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof_config.lo libmemberof_plugin_la_OBJECTS = $(am_libmemberof_plugin_la_OBJECTS) -libmemberof_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libmemberof_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libns_dshttpd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @@ -355,10 +329,6 @@ ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo libpam_passthru_plugin_la_OBJECTS = \ $(am_libpam_passthru_plugin_la_OBJECTS) -libpam_passthru_plugin_la_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libpam_passthru_plugin_la_LDFLAGS) \ - $(LDFLAGS) -o $@ @enable_pam_passthru_TRUE at am_libpam_passthru_plugin_la_rpath = -rpath \ @enable_pam_passthru_TRUE@ $(serverplugindir) libpassthru_plugin_la_LIBADD = @@ -370,15 +340,9 @@ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptpreop.lo \ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptutil.lo libpassthru_plugin_la_OBJECTS = $(am_libpassthru_plugin_la_OBJECTS) -libpassthru_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpassthru_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpresence_plugin_la_LIBADD = am_libpresence_plugin_la_OBJECTS = ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo libpresence_plugin_la_OBJECTS = $(am_libpresence_plugin_la_OBJECTS) -libpresence_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpresence_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpwdstorage_plugin_la_LIBADD = am_libpwdstorage_plugin_la_OBJECTS = ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo \ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-crypt_pwd.lo \ @@ -390,15 +354,9 @@ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-ssha_pwd.lo libpwdstorage_plugin_la_OBJECTS = \ $(am_libpwdstorage_plugin_la_OBJECTS) -libpwdstorage_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpwdstorage_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreferint_plugin_la_LIBADD = am_libreferint_plugin_la_OBJECTS = ldap/servers/plugins/referint/libreferint_plugin_la-referint.lo libreferint_plugin_la_OBJECTS = $(am_libreferint_plugin_la_OBJECTS) -libreferint_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libreferint_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreplication_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libreplication_plugin_la_OBJECTS = ldap/servers/plugins/replication/libreplication_plugin_la-cl5_api.lo \ @@ -457,9 +415,6 @@ ldap/servers/plugins/replication/libreplication_plugin_la-windows_tot_protocol.lo libreplication_plugin_la_OBJECTS = \ $(am_libreplication_plugin_la_OBJECTS) -libreplication_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libreplication_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libretrocl_plugin_la_LIBADD = am_libretrocl_plugin_la_OBJECTS = \ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl.lo \ @@ -469,25 +424,15 @@ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl_rootdse.lo \ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl_trim.lo libretrocl_plugin_la_OBJECTS = $(am_libretrocl_plugin_la_OBJECTS) -libretrocl_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ [...5943 lines suppressed...] install-mibDATA: $(mib_DATA) @$(NORMAL_INSTALL) - test -z "$(mibdir)" || $(MKDIR_P) "$(DESTDIR)$(mibdir)" + test -z "$(mibdir)" || $(mkdir_p) "$(DESTDIR)$(mibdir)" @list='$(mib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9015,7 +8960,7 @@ done install-nodist_propertyDATA: $(nodist_property_DATA) @$(NORMAL_INSTALL) - test -z "$(propertydir)" || $(MKDIR_P) "$(DESTDIR)$(propertydir)" + test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" @list='$(nodist_property_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9032,7 +8977,7 @@ done install-propertyDATA: $(property_DATA) @$(NORMAL_INSTALL) - test -z "$(propertydir)" || $(MKDIR_P) "$(DESTDIR)$(propertydir)" + test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" @list='$(property_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9049,7 +8994,7 @@ done install-sampledataDATA: $(sampledata_DATA) @$(NORMAL_INSTALL) - test -z "$(sampledatadir)" || $(MKDIR_P) "$(DESTDIR)$(sampledatadir)" + test -z "$(sampledatadir)" || $(mkdir_p) "$(DESTDIR)$(sampledatadir)" @list='$(sampledata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9066,7 +9011,7 @@ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) - test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" + test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -9132,22 +9077,24 @@ distdir: $(DISTFILES) $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ + mkdir $(distdir) + $(mkdir_p) $(distdir)/m4 $(distdir)/man/man1 $(distdir)/man/man8 + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -9161,7 +9108,7 @@ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -9236,7 +9183,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -9262,7 +9209,7 @@ $(MANS) $(DATA) config.h installdirs: for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -9397,21 +9344,13 @@ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-taskSCRIPTS -install-dvi: install-dvi-am - install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-sbinPROGRAMS install-sbinSCRIPTS -install-html: install-html-am - install-info: install-info-am install-man: install-man1 install-man8 -install-pdf: install-pdf-am - -install-ps: install-ps-am - installcheck-am: maintainer-clean: maintainer-clean-am @@ -9435,18 +9374,17 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ - uninstall-initconfigSCRIPTS uninstall-man uninstall-mibDATA \ - uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ - uninstall-propertyDATA uninstall-sampledataDATA \ - uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ - uninstall-schemaDATA uninstall-serverLTLIBRARIES \ - uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-info-am \ + uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ + uninstall-man uninstall-mibDATA uninstall-nodist_propertyDATA \ + uninstall-perlSCRIPTS uninstall-propertyDATA \ + uninstall-sampledataDATA uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-schemaDATA \ + uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ + uninstall-taskSCRIPTS uninstall-man: uninstall-man1 uninstall-man8 -.MAKE: install-am install-strip - .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \ @@ -9457,29 +9395,27 @@ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-configDATA \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ + install-data install-data-am install-exec install-exec-am \ install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigSCRIPTS install-man \ install-man1 install-man8 install-mibDATA \ - install-nodist_propertyDATA install-pdf install-pdf-am \ - install-perlSCRIPTS install-propertyDATA install-ps \ - install-ps-am install-sampledataDATA install-sbinPROGRAMS \ - install-sbinSCRIPTS install-schemaDATA \ + install-nodist_propertyDATA install-perlSCRIPTS \ + install-propertyDATA install-sampledataDATA \ + install-sbinPROGRAMS install-sbinSCRIPTS install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-strip install-taskSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ - uninstall-initconfigSCRIPTS uninstall-man uninstall-man1 \ - uninstall-man8 uninstall-mibDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-info-am \ + uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ + uninstall-man uninstall-man1 uninstall-man8 uninstall-mibDATA \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS dirver.h: Makefile Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- aclocal.m4 17 Oct 2008 22:12:46 -0000 1.75 +++ aclocal.m4 19 Oct 2008 17:12:55 -0000 1.76 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,14 +11,9 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 51 AC_PROG_LIBTOOL +# serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -181,7 +176,7 @@ test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -268,9 +263,8 @@ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -282,9 +276,8 @@ # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -300,20 +293,12 @@ # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -544,17 +529,13 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -570,11 +551,7 @@ esac ;; *64-bit*) - libsuff=64 case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -646,7 +623,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -687,12 +664,11 @@ # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], +[AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext + printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -806,27 +782,24 @@ fi ;; *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) @@ -1053,8 +1026,7 @@ # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1062,7 +1034,7 @@ mkdir conftest cd conftest mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1202,7 +1174,6 @@ darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" - old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1220,8 +1191,7 @@ # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1235,58 +1205,20 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) +fi need_lib_prefix=unknown hardcode_into_libs=no @@ -1443,8 +1375,12 @@ shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1461,6 +1397,18 @@ dynamic_linker=no ;; +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -1498,7 +1446,7 @@ shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - *) # from 4.6 on, and DragonFly + freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1561,7 +1509,7 @@ postinstall_cmds='chmod 555 $lib' ;; -interix[[3-9]]*) +interix3*) version_type=linux need_lib_prefix=no need_version=no @@ -1616,7 +1564,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux*) version_type=linux need_lib_prefix=no need_version=no @@ -1629,13 +1577,11 @@ # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -1647,6 +1593,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -1728,10 +1686,6 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -rdos*) - dynamic_linker=no - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -1837,8 +1791,7 @@ # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], +[AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2099,7 +2052,7 @@ # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognize shared library +# find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2162,7 +2115,7 @@ # AC_PATH_MAGIC # ------------- -# find a file program which can recognize a shared library +# find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2309,7 +2262,7 @@ # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognize dependent libraries], +[AC_CACHE_CHECK([how to recognise dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2348,22 +2301,16 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -2401,7 +2348,7 @@ esac ;; -interix[[3-9]]*) +interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; @@ -2417,7 +2364,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux*) lt_cv_deplibs_check_method=pass_all ;; @@ -2451,10 +2398,6 @@ lt_cv_deplibs_check_method=pass_all ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2507,7 +2450,7 @@ lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do @@ -2723,10 +2666,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER @@ -2828,10 +2771,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2977,7 +2920,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - : + _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3136,10 +3079,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3173,7 +3116,7 @@ freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -3222,7 +3165,9 @@ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) ;; + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3290,7 +3235,7 @@ ;; esac ;; - interix[[3-9]]*) + interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3330,7 +3275,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -3410,29 +3355,6 @@ # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; esac ;; lynxos*) @@ -3471,20 +3393,16 @@ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi + output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -3646,10 +3564,15 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3696,12 +3619,6 @@ fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac fi ;; esac @@ -3945,7 +3862,7 @@ # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix[[3-9]]*) +interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_AC_TAGVAR(predep_objects,$1)= @@ -3953,46 +3870,13 @@ _LT_AC_TAGVAR(postdeps,$1)= ;; -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - solaris*) case $cc_basename in CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' ;; esac ;; @@ -4041,17 +3925,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" +lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" +lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4130,10 +4007,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" +lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4186,7 +4063,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4275,7 +4152,6 @@ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4322,7 +4198,7 @@ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4647,7 +4523,7 @@ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4730,7 +4606,6 @@ # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -4767,7 +4642,7 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux* | k*bsd*-gnu) +linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -4957,14 +4832,12 @@ # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32*) + mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -4976,7 +4849,7 @@ # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix[[3-9]]*) + interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5042,7 +4915,7 @@ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -5085,7 +4958,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -5112,14 +4985,6 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac ;; esac ;; @@ -5240,15 +5105,13 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; @@ -5258,7 +5121,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix[[3-9]]*) + interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5316,7 +5179,7 @@ esac ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -5349,7 +5212,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5368,22 +5231,6 @@ # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; esac ;; @@ -5393,10 +5240,6 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5491,8 +5334,7 @@ # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -5509,7 +5351,7 @@ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5648,7 +5490,7 @@ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -5666,7 +5508,7 @@ fi ;; - interix[[3-9]]*) + interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -5681,7 +5523,7 @@ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | k*bsd*-gnu) + linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5699,22 +5541,13 @@ ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5754,7 +5587,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5873,7 +5706,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - : + _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5966,7 +5799,7 @@ # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -6008,10 +5841,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -6051,7 +5884,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -6173,28 +6006,24 @@ ;; openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else - _LT_AC_TAGVAR(ld_shlibs, $1)=no + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac fi ;; @@ -6253,16 +6082,17 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6319,7 +6149,7 @@ fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6394,7 +6224,7 @@ # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6497,30 +6327,6 @@ [AC_CHECK_TOOL(RC, windres, no) ]) - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # @@ -6541,13 +6347,12 @@ test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6580,11 +6385,10 @@ done ]) SED=$lt_cv_path_SED -AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6594,29 +6398,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6673,14 +6462,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6689,10 +6478,8 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' @@ -6706,14 +6493,15 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 +# serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -6741,7 +6529,6 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -6807,7 +6594,6 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -6860,8 +6646,7 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -6886,9 +6671,8 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -6935,8 +6719,8 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6959,20 +6743,16 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl +[AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath @@ -6992,9 +6772,6 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -7030,10 +6807,6 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -7069,7 +6842,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -7174,14 +6947,13 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 3 # AM_PROG_CC_C_O # -------------- @@ -7189,7 +6961,6 @@ AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC @@ -7202,22 +6973,18 @@ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -7233,7 +7000,6 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -7244,7 +7010,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7252,23 +7018,60 @@ # AM_PROG_MKDIR_P # --------------- -# Check for `mkdir -p'. +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- @@ -7380,21 +7183,9 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. Index: config.guess =================================================================== RCS file: /cvs/dirsec/ldapserver/config.guess,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- config.guess 17 Oct 2008 22:12:46 -0000 1.56 +++ config.guess 19 Oct 2008 17:12:55 -0000 1.57 @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-07-02' +timestamp='2005-07-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -107,7 +106,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -207,11 +206,8 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -768,14 +764,7 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -790,11 +779,8 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -808,7 +794,7 @@ i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) @@ -831,9 +817,6 @@ arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; @@ -868,11 +851,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -891,16 +870,9 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; @@ -944,9 +916,6 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; @@ -992,7 +961,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1002,11 +971,7 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1217,6 +1182,7 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1295,9 +1261,6 @@ i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- config.h.in 17 Oct 2008 22:12:46 -0000 1.21 +++ config.h.in 19 Oct 2008 17:12:55 -0000 1.22 @@ -377,7 +377,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned int' if does not define. */ +/* Define to `unsigned' if does not define. */ #undef size_t /* SunOS5 */ Index: config.sub =================================================================== RCS file: /cvs/dirsec/ldapserver/config.sub,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- config.sub 17 Oct 2008 22:12:46 -0000 1.56 +++ config.sub 19 Oct 2008 17:12:55 -0000 1.57 @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2006-09-20' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -120,9 +119,8 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -173,10 +171,6 @@ -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -193,10 +187,6 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -241,7 +231,7 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ @@ -249,8 +239,7 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,27 +257,28 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | mt \ + | ms1 \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -296,9 +286,6 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -318,7 +305,7 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ @@ -329,7 +316,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -349,30 +336,31 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | mt-* \ + | ms1-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -708,9 +696,6 @@ basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -818,12 +803,6 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -880,10 +859,6 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -910,10 +885,6 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -1130,7 +1101,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1203,23 +1174,21 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1371,12 +1340,6 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1386,9 +1349,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.92 -r 1.93 configure Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- configure 17 Oct 2008 22:12:46 -0000 1.92 +++ configure 19 Oct 2008 17:12:55 -0000 1.93 @@ -1,56 +1,27 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for dirsrv 1.1.4. +# Generated by GNU Autoconf 2.59 for dirsrv 1.1.4. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -60,43 +31,8 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -110,19 +46,18 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -130,388 +65,157 @@ # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} -exitcode=0 -if as_func_success; then - : [...19307 lines suppressed...] - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -27487,32 +26718,20 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` else continue fi @@ -27534,79 +26753,53 @@ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Index: depcomp =================================================================== RCS file: /cvs/dirsec/ldapserver/depcomp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- depcomp 17 Oct 2008 22:12:46 -0000 1.57 +++ depcomp 19 Oct 2008 17:12:55 -0000 1.58 @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2005-07-09.11 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,20 +91,7 @@ ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else @@ -290,46 +276,6 @@ rm -f "$tmpdepfile" ;; -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -342,13 +288,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to + # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and + # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is Index: install-sh =================================================================== RCS file: /cvs/dirsec/ldapserver/install-sh,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- install-sh 17 Oct 2008 22:12:46 -0000 1.57 +++ install-sh 19 Oct 2008 17:12:55 -0000 1.58 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-10-14.15 +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,24 +39,15 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi -# Put in absolute file names if you don't have them in your path; -# or use environment vars. +# put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" @@ -67,13 +58,7 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog +chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= @@ -110,7 +95,7 @@ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test $# -ne 0; do +while test -n "$1"; do case $1 in -c) shift continue;; @@ -126,15 +111,9 @@ --help) echo "$usage"; exit $?;; - -m) mode=$2 + -m) chmodcmd="$chmodprog $2" shift shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac continue;; -o) chowncmd="$chownprog $2" @@ -157,33 +136,25 @@ --version) echo "$0 $scriptversion"; exit $?;; - --) shift + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; esac done -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done -fi - -if test $# -eq 0; then +if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -193,33 +164,6 @@ exit 0 fi -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - for src do # Protect names starting with `-'. @@ -229,11 +173,15 @@ if test -n "$dir_arg"; then dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else + src= + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -260,188 +208,53 @@ echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? + dst=$dst/`basename "$src"` fi fi - obsolete_mkdir_used=false + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac + # Make sure that the destination directory exists. - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; - esac - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - oIFS=$IFS - IFS=/ - $posix_glob && set -f - set fnord $dstdir - shift - $posix_glob && set +f - IFS=$oIFS + pathcomp= - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit fi - fi + pathcomp=$pathcomp/ + done fi if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + else + dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -449,9 +262,10 @@ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # @@ -462,10 +276,10 @@ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not @@ -477,12 +291,11 @@ # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { - echo "$0: cannot unlink or rename $dst" >&2 + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else @@ -491,14 +304,17 @@ } && # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } - } || exit 1 - - trap '' 0 - fi + } + fi || { (exit 1); exit 1; } done +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ltmain.sh 17 Oct 2008 22:12:46 -0000 1.28 +++ ltmain.sh 19 Oct 2008 17:12:55 -0000 1.29 @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,22 +43,14 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -113,14 +105,12 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done +if test "${LC_ALL+set}" = set; then + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL +fi +if test "${LANG+set}" = set; then + save_LANG="$LANG"; LANG=C; export LANG +fi # Make sure IFS has a sensible default lt_nl=' @@ -146,8 +136,6 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 ##################################### # Shell function definitions: @@ -208,13 +196,7 @@ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -345,17 +327,7 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -482,12 +454,11 @@ ;; --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -784,10 +755,9 @@ *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; + *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; - *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1168,9 +1138,8 @@ for arg do case $arg in - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) + -all-static | -static) + if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1178,20 +1147,12 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - ;; - -static) + else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac + fi build_libtool_libs=no build_old_libs=yes break @@ -1639,7 +1600,7 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1659,11 +1620,10 @@ # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin + # -pg pass through profiling flag for GCC # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1691,9 +1651,9 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. + # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1752,7 +1712,7 @@ continue ;; - -static | -static-libtool-libs) + -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2134,7 +2094,7 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2530,9 +2490,7 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3228,7 +3186,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows|none) + darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3239,10 +3197,9 @@ age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor` + current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" - lt_irix_increment=no ;; esac ;; @@ -3301,8 +3258,7 @@ versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) @@ -3316,11 +3272,8 @@ ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi + major=`expr $current - $age + 1` + case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3457,11 +3410,11 @@ fi # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3562,12 +3515,13 @@ int main() { return 0; } EOF $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then + if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3606,7 +3560,9 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + $LTCC $LTCFLAGS -o conftest conftest.c $i + # Did it work? + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3638,7 +3594,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3924,10 +3880,7 @@ test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4286,14 +4239,12 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. + # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4741,16 +4692,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` fi ;; * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; esac ;; @@ -4765,13 +4716,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4858,7 +4809,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -4895,7 +4846,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. @@ -5302,20 +5253,6 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5458,7 +5395,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else @@ -5644,7 +5581,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5989,9 +5926,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6200,7 +6137,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6411,10 +6348,8 @@ if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE fi ;; @@ -6478,12 +6413,12 @@ fi # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6840,9 +6775,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6856,11 +6791,9 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Index: missing =================================================================== RCS file: /cvs/dirsec/ldapserver/missing,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- missing 17 Oct 2008 22:12:46 -0000 1.57 +++ missing 19 Oct 2008 17:12:55 -0000 1.58 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2005-06-08.21 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,8 +33,6 @@ fi run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -46,7 +44,7 @@ msg="missing on your system" -case $1 in +case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -79,7 +77,6 @@ aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -109,7 +106,7 @@ # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case $1 in +case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -138,7 +135,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $1 in +case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -167,7 +164,7 @@ test -z "$files" && files="config.h" touch_files= for f in $files; do - case $f in + case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -195,8 +192,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else @@ -217,25 +214,25 @@ in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if test ! -f y.tab.h; then + if [ ! -f y.tab.h ]; then echo >y.tab.h fi - if test ! -f y.tab.c; then + if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -247,18 +244,18 @@ in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if test ! -f lex.yy.c; then + if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -270,9 +267,11 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file @@ -290,17 +289,11 @@ DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -324,13 +317,13 @@ fi firstarg="$1" if shift; then - case $firstarg in + case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case $firstarg in + case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 From nhosoi at fedoraproject.org Wed Oct 22 20:24:39 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 22 Oct 2008 20:24:39 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.74, 1.75 configure.ac, 1.52, 1.53 Message-ID: <20081022202439.396957013A@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8616 Modified Files: Makefile.am configure.ac Log Message: Resolves: 207457 Summary: (64bitcounters) rhds 7.1 - server stats use 32-bit integers - entrycachehitratio 1503% Change description: 1) Makefile.am: instead of the inline assembly langauge file .il, include an independent .S file to the libslapd_la_SOURCES list. 2) add AM_PROG_AS to configure.ac to accept CCAS and CCASFLAGS. 3) slapi_counter.c: adjusted to slapi_counter_sunos_sparcv9.S. 4) add slapi_counter_sunos_sparcv9.S 5) remove slapi_counter_sunos_sparcv9.il Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- Makefile.am 17 Oct 2008 22:12:45 -0000 1.74 +++ Makefile.am 22 Oct 2008 20:24:36 -0000 1.75 @@ -535,7 +535,7 @@ $(libavl_a_SOURCES) if SOLARIS -libslapd_la_SOURCES += ldap/servers/slapd/slapi_counter_sunos_sparcv9.il +libslapd_la_SOURCES += ldap/servers/slapd/slapi_counter_sunos_sparcv9.S endif libslapd_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) @db_inc@ @svrcore_inc@ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- configure.ac 13 Oct 2008 16:32:41 -0000 1.52 +++ configure.ac 22 Oct 2008 20:24:36 -0000 1.53 @@ -13,6 +13,7 @@ AC_PROG_CXX AC_PROG_CC AM_PROG_CC_C_O +AM_PROG_AS # disable static libs by default - we only use a couple AC_DISABLE_STATIC AC_PROG_LIBTOOL From nhosoi at fedoraproject.org Wed Oct 22 20:24:39 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 22 Oct 2008 20:24:39 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi_counter_sunos_sparcv9.S, NONE, 1.1 slapi_counter.c, 1.1, 1.2 slapi_counter_sunos_sparcv9.il, 1.1, NONE Message-ID: <20081022202439.40C5F7013B@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8616/ldap/servers/slapd Modified Files: slapi_counter.c Added Files: slapi_counter_sunos_sparcv9.S Removed Files: slapi_counter_sunos_sparcv9.il Log Message: Resolves: 207457 Summary: (64bitcounters) rhds 7.1 - server stats use 32-bit integers - entrycachehitratio 1503% Change description: 1) Makefile.am: instead of the inline assembly langauge file .il, include an independent .S file to the libslapd_la_SOURCES list. 2) add AM_PROG_AS to configure.ac to accept CCAS and CCASFLAGS. 3) slapi_counter.c: adjusted to slapi_counter_sunos_sparcv9.S. 4) add slapi_counter_sunos_sparcv9.S 5) remove slapi_counter_sunos_sparcv9.il --- NEW FILE slapi_counter_sunos_sparcv9.S --- ! BEGIN COPYRIGHT BLOCK ! This Program is free software; you can redistribute it and/or modify it under ! the terms of the GNU General Public License as published by the Free Software ! Foundation; version 2 of the License. ! ! This Program is distributed in the hope that it will be useful, but WITHOUT ! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! this Program; if not, write to the Free Software Foundation, Inc., 59 Temple ! Place, Suite 330, Boston, MA 02111-1307 USA. ! ! In addition, as a special exception, Red Hat, Inc. gives You the additional ! right to link the code of this Program with code not covered under the GNU ! General Public License ("Non-GPL Code") and to distribute linked combinations ! including the two, subject to the limitations in this paragraph. Non-GPL Code ! permitted under this exception must only link to the code of this Program ! through those well defined interfaces identified in the file named EXCEPTION ! found in the source code files (the "Approved Interfaces"). The files of ! Non-GPL Code may instantiate templates or use macros or inline functions from ! the Approved Interfaces without causing the resulting work to be covered by ! the GNU General Public License. Only Red Hat, Inc. may make changes or ! additions to the list of Approved Interfaces. You must obey the GNU General ! Public License in all respects for all of the Program code and other code used ! in conjunction with the Program except the Non-GPL Code covered by this ! exception. If you modify this file, you may extend this exception to your ! version of the file, but you are not obligated to do so. If you do not wish to ! provide this exception without modification, you must delete this exception ! statement from your version and license this file solely under the GPL without ! exception. ! ! ! The Original Code is the Netscape Portable Runtime (NSPR). ! ! The Initial Developer of the Original Code is ! Netscape Communications Corporation. ! Portions created by the Initial Developer are Copyright (C) 1998-2000 ! the Initial Developer. All Rights Reserved. ! ! The original code has been modified to support 64-bit atomic increments by ! Red Hat, Inc. These portions are Copyright (C) 2008 Red Hat, Inc. All Rights ! reserved. ! ! END COPYRIGHT BLOCK ! #include ! ====================================================================== ! ! Perform the sequence a = b atomically with respect to other ! fetch-and-stores to location a in a wait-free fashion. ! ! usage : old_val = PR_AtomicSet(address, newval) ! ! ----------------------- ! Note on REGISTER USAGE: ! as this is a LEAF procedure, a new stack frame is not created; ! we use the caller's stack frame so what would normally be %i (input) ! registers are actually %o (output registers). Also, we must not ! overwrite the contents of %l (local) registers as they are not ! assumed to be volatile during calls. ! ----------------------- ENTRY(_sparcv9_AtomicSet) ! standard assembler/ELF prologue retryAS: ldx [%o0], %o2 ! set o2 to the current value mov %o1, %o3 ! set up the new value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAS ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o3, %o0 ! set the return code to the prev value SET_SIZE(_sparcv9_AtomicSet) ! standard assembler/ELF epilogue ! ! end ! ! ====================================================================== ! ! Perform the sequence a = a + b atomically with respect to other ! fetch-and-adds to location a in a wait-free fashion. ! ! usage : newval = PR_AtomicAdd(address, val) ! return: the value after addition ! ENTRY(_sparcv9_AtomicAdd) ! standard assembler/ELF prologue retryAA: ldx [%o0], %o2 ! set o2 to the current value addx %o2, %o1, %o3 ! calc the new value mov %o3, %o4 ! save the return value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAA ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o4, %o0 ! set the return code to the new value SET_SIZE(_sparcv9_AtomicAdd) ! standard assembler/ELF epilogue ! ! end ! ! ====================================================================== ! ! Perform the sequence a = a - b atomically with respect to other ! fetch-and-subs to location a in a wait-free fashion. ! ! usage : newval = PR_AtomicSub(address, val) ! return: the value after addition ! ENTRY(_sparcv9_AtomicSub) ! standard assembler/ELF prologue retryAU: ldx [%o0], %o2 ! set o2 to the current value subx %o2, %o1, %o3 ! calc the new value mov %o3, %o4 ! save the return value casx [%o0], %o2, %o3 ! atomically set if o0 hasn't changed cmp %o2, %o3 ! see if we set the value bne retryAU ! if not, try again nop ! empty out the branch pipeline retl ! return back to the caller mov %o4, %o0 ! set the return code to the new value SET_SIZE(_sparcv9_AtomicSub) ! standard assembler/ELF epilogue ! ! end ! Index: slapi_counter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi_counter.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- slapi_counter.c 17 Oct 2008 22:15:26 -0000 1.1 +++ slapi_counter.c 22 Oct 2008 20:24:37 -0000 1.2 @@ -41,6 +41,12 @@ #include "slap.h" +#ifdef SOLARIS +PRUint64 _sparcv9_AtomicSet_il(PRUint64 *address, PRUint64 newval); +PRUint64 _sparcv9_AtomicAdd_il(PRUint64 *address, PRUint64 val); +PRUint64 _sparcv9_AtomicSub_il(PRUint64 *address, PRUint64 val); +#endif + #ifdef HPUX #ifdef ATOMIC_64BIT_OPERATIONS #include @@ -157,7 +163,7 @@ #ifdef LINUX newvalue = __sync_add_and_fetch(&(counter->value), addvalue); #elif defined(SOLARIS) - newvalue = _sparcv9_AtomicAdd_il(&(counter->value), addvalue); + newvalue = _sparcv9_AtomicAdd(&(counter->value), addvalue); #elif defined(HPUX) /* fetchadd only works with values of 1, 4, 8, and 16. In addition, it requires * it's argument to be an integer constant. */ @@ -214,7 +220,7 @@ #ifdef LINUX newvalue = __sync_sub_and_fetch(&(counter->value), subvalue); #elif defined(SOLARIS) - newvalue = _sparcv9_AtomicSub_il(&(counter->value), subvalue); + newvalue = _sparcv9_AtomicSub(&(counter->value), subvalue); #elif defined(HPUX) /* fetchadd only works with values of -1, -4, -8, and -16. In addition, it requires * it's argument to be an integer constant. */ @@ -272,7 +278,7 @@ } } #elif defined(SOLARIS) - _sparcv9_AtomicSet_il(&(counter->value), newvalue); + _sparcv9_AtomicSet(&(counter->value), newvalue); return newvalue; #elif defined(HPUX) do { @@ -313,7 +319,7 @@ #elif defined(SOLARIS) while (1) { value = counter->value; - if (value == _sparcv9_AtomicSet_il(&(counter->value), value)) { + if (value == _sparcv9_AtomicSet(&(counter->value), value)) { break; } } --- slapi_counter_sunos_sparcv9.il DELETED --- From nhosoi at fedoraproject.org Wed Oct 22 20:31:55 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Wed, 22 Oct 2008 20:31:55 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.98, 1.99 aclocal.m4, 1.76, 1.77 configure, 1.93, 1.94 ltmain.sh, 1.29, 1.30 Message-ID: <20081022203155.8A0187013A@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9304 Modified Files: Makefile.in aclocal.m4 configure ltmain.sh Log Message: Resolves: 207457 Summary: (64bitcounters) rhds 7.1 - server stats use 32-bit integers - entrycachehitratio 1503% Description: checking in autoconf derived files. Ran autogen on RHEL5; autoconf version 2.59, automake version 1.9.6 Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.98 retrieving revision 1.99 diff -u -r1.98 -r1.99 --- Makefile.in 19 Oct 2008 17:12:55 -0000 1.98 +++ Makefile.in 22 Oct 2008 20:31:50 -0000 1.99 @@ -46,7 +46,7 @@ ldif-bin$(EXEEXT) migratecred-bin$(EXEEXT) mmldif-bin$(EXEEXT) \ pwdhash-bin$(EXEEXT) rsearch-bin$(EXEEXT) noinst_PROGRAMS = makstrdb$(EXEEXT) - at SOLARIS_TRUE@am__append_1 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.il + at SOLARIS_TRUE@am__append_1 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.S @SOLARIS_TRUE at am__append_2 = ldap/servers/slapd/tools/ldclt/opCheck.c DIST_COMMON = $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ @@ -488,9 +488,9 @@ ldap/servers/slapd/uuid.c ldap/servers/slapd/value.c \ ldap/servers/slapd/valueset.c ldap/servers/slapd/vattr.c \ ldap/libraries/libavl/avl.c \ - ldap/servers/slapd/slapi_counter_sunos_sparcv9.il + ldap/servers/slapd/slapi_counter_sunos_sparcv9.S am__objects_2 = ldap/libraries/libavl/libslapd_la-avl.lo -am__objects_3 = + at SOLARIS_TRUE@am__objects_3 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.lo am_libslapd_la_OBJECTS = ldap/servers/slapd/libslapd_la-add.lo \ ldap/servers/slapd/libslapd_la-agtmmap.lo \ ldap/servers/slapd/libslapd_la-apibroker.lo \ @@ -765,6 +765,9 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ + $(CCASFLAGS) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ @@ -872,6 +875,8 @@ BUNDLE_FALSE = @BUNDLE_FALSE@ BUNDLE_TRUE = @BUNDLE_TRUE@ CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ @@ -925,6 +930,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ @@ -2121,7 +2127,7 @@ $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .cpp .lo .o .obj +.SUFFIXES: .S .c .cpp .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -3491,6 +3497,9 @@ ldap/libraries/libavl/libslapd_la-avl.lo: \ ldap/libraries/libavl/$(am__dirstamp) \ ldap/libraries/libavl/$(DEPDIR)/$(am__dirstamp) +ldap/servers/slapd/slapi_counter_sunos_sparcv9.lo: \ + ldap/servers/slapd/$(am__dirstamp) \ + ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp) libslapd.la: $(libslapd_la_OBJECTS) $(libslapd_la_DEPENDENCIES) $(LINK) -rpath $(serverdir) $(libslapd_la_LDFLAGS) $(libslapd_la_OBJECTS) $(libslapd_la_LIBADD) $(LIBS) ldap/servers/plugins/statechange/$(am__dirstamp): @@ -4627,6 +4636,8 @@ -rm -f ldap/servers/slapd/ns_slapd-stubs.$(OBJEXT) -rm -f ldap/servers/slapd/ns_slapd-tempnam.$(OBJEXT) -rm -f ldap/servers/slapd/ns_slapd-unbind.$(OBJEXT) + -rm -f ldap/servers/slapd/slapi_counter_sunos_sparcv9.$(OBJEXT) + -rm -f ldap/servers/slapd/slapi_counter_sunos_sparcv9.lo -rm -f ldap/servers/slapd/tools/dbscan_bin-dbscan.$(OBJEXT) -rm -f ldap/servers/slapd/tools/ldclt/ldclt_bin-data.$(OBJEXT) -rm -f ldap/servers/slapd/tools/ldclt/ldclt_bin-ldapfct.$(OBJEXT) @@ -5221,6 +5232,15 @@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/libns_dshttpd_la-txtfile.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/makstrdb-makstrdb.Po at am__quote@ +.S.o: + $(CCASCOMPILE) -c $< + +.S.obj: + $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'` + +.S.lo: + $(LTCCASCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \ Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- aclocal.m4 19 Oct 2008 17:12:55 -0000 1.76 +++ aclocal.m4 22 Oct 2008 20:31:51 -0000 1.77 @@ -1578,10 +1578,27 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4288,6 +4305,9 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -4421,11 +4441,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) +predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) +postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -4437,7 +4457,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) +compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4517,7 +4537,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6353,6 +6373,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6385,6 +6406,7 @@ done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) @@ -6407,6 +6429,27 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- configure 19 Oct 2008 17:12:55 -0000 1.93 +++ configure 22 Oct 2008 20:31:51 -0000 1.94 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS CCASFLAGS SED EGREP LN_S ECHO AR ac_ct_AR RANLIB a c_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendo r LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -930,6 +930,14 @@ ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_CCAS_set=${CCAS+set} +ac_env_CCAS_value=$CCAS +ac_cv_env_CCAS_set=${CCAS+set} +ac_cv_env_CCAS_value=$CCAS +ac_env_CCASFLAGS_set=${CCASFLAGS+set} +ac_env_CCASFLAGS_value=$CCASFLAGS +ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set} +ac_cv_env_CCASFLAGS_value=$CCASFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} @@ -1099,6 +1107,8 @@ headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) CPP C preprocessor CXXCPP C++ preprocessor F77 Fortran 77 compiler command @@ -3744,6 +3754,13 @@ CC="$am_aux_dir/compile $CC" fi +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + # disable static libs by default - we only use a couple # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then @@ -3838,6 +3855,7 @@ done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3872,6 +3890,7 @@ fi SED=$lt_cv_path_SED + echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4312,7 +4331,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4315 "configure"' > conftest.$ac_ext + echo '#line 4334 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5447,7 +5466,7 @@ # Provide some information about the compiler. -echo "$as_me:5450:" \ +echo "$as_me:5469:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6510,11 +6529,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6532: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6517: \$? = $ac_status" >&5 + echo "$as_me:6536: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6778,11 +6797,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6781: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6800: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6785: \$? = $ac_status" >&5 + echo "$as_me:6804: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6882,11 +6901,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6904: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6889: \$? = $ac_status" >&5 + echo "$as_me:6908: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8347,10 +8366,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 8373 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9227,7 +9267,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11713: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11674: \$? = $ac_status" >&5 + echo "$as_me:11717: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11771,11 +11814,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11774: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11817: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11778: \$? = $ac_status" >&5 + echo "$as_me:11821: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12303,10 +12346,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 12353 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12690,6 +12754,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -12823,11 +12890,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_CXX +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_CXX +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -12839,7 +12906,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12919,7 +12986,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13341,11 +13408,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13344: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13411: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13348: \$? = $ac_status" >&5 + echo "$as_me:13415: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13445,11 +13512,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13448: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13515: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13452: \$? = $ac_status" >&5 + echo "$as_me:13519: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14890,10 +14957,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 14964 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15277,6 +15365,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -15410,11 +15501,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_F77 +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_F77 +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -15426,7 +15517,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15506,7 +15597,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15648,11 +15739,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15742: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15655: \$? = $ac_status" >&5 + echo "$as_me:15746: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15916,11 +16007,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16010: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15923: \$? = $ac_status" >&5 + echo "$as_me:16014: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16020,11 +16111,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16114: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16027: \$? = $ac_status" >&5 + echo "$as_me:16118: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17485,10 +17576,31 @@ # before this can be enabled. hardcode_into_libs=yes + # find out which ABI we are using + libsuff= + case "$host_cpu" in + x86_64*|s390x*|powerpc64*) + echo '#line 17583 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *64-bit*) + libsuff=64 + sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" + ;; + esac + fi + rm -rf conftest* + ;; + esac + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17872,6 +17984,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18005,11 +18120,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_GCJ +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_GCJ +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18021,7 +18136,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18101,7 +18216,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18353,6 +18468,9 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC +gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` +gcc_ver=\`gcc -dumpversion\` + # An ERE matcher. EGREP=$lt_EGREP @@ -18486,11 +18604,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_RC +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_RC +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18502,7 +18620,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18582,7 +18700,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -26021,6 +26139,9 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s, at CCAS@,$CCAS,;t t +s, at CCASFLAGS@,$CCASFLAGS,;t t +s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ltmain.sh 19 Oct 2008 17:12:55 -0000 1.29 +++ ltmain.sh 22 Oct 2008 20:31:52 -0000 1.30 @@ -46,10 +46,16 @@ VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. @@ -105,12 +111,14 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +144,8 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -327,7 +337,17 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -758,6 +778,7 @@ *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1159,9 @@ for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1169,20 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1712,7 +1742,7 @@ continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2490,7 +2520,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3186,7 +3218,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3410,11 +3442,11 @@ fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done +# for path in $notinst_path; do +# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` +# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` +# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` +# done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3547,12 @@ int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3591,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3623,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -4239,12 +4268,14 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4723,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4747,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4840,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4877,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5284,18 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5438,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5624,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5969,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6180,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6413,12 +6456,15 @@ fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6821,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6837,11 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. From nhosoi at fedoraproject.org Thu Oct 23 22:42:57 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Thu, 23 Oct 2008 22:42:57 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.13, 1.14 Message-ID: <20081023224257.561897013D@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10406/ldap/admin/src/scripts Modified Files: DSCreate.pm.in Log Message: Resolves: #468248 Summary: LDAPI: when nsslapd-ldapiautodnsuffix doesn't exist - Bind is incorrect Description: - introducing --enable-auto-dn-suffix option to configure (disabled by default) - building the auto-dn-suffix code only when the option is set Index: DSCreate.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- DSCreate.pm.in 14 Jul 2008 23:16:47 -0000 1.13 +++ DSCreate.pm.in 23 Oct 2008 22:42:54 -0000 1.14 @@ -342,7 +342,9 @@ $ent->setValues("nsslapd-ldapiuidnumbertype", "uidNumber"); $ent->setValues("nsslapd-ldapigidnumbertype", "gidNumber"); $ent->setValues("nsslapd-ldapientrysearchbase", $inf->{slapd}->{Suffix}); - $ent->setValues("nsslapd-ldapiautodnsuffix", "cn=peercred,cn=external,cn=auth"); + if ("@enable_auto_dn_suffix@") { + $ent->setValues("nsslapd-ldapiautodnsuffix", "cn=peercred,cn=external,cn=auth"); + } } if (!$conn->update($ent)) { $conn->close(); From nhosoi at fedoraproject.org Thu Oct 23 22:42:57 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Thu, 23 Oct 2008 22:42:57 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd daemon.c, 1.21, 1.22 libglobs.c, 1.26, 1.27 Message-ID: <20081023224257.8D6FB7013B@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10406/ldap/servers/slapd Modified Files: daemon.c libglobs.c Log Message: Resolves: #468248 Summary: LDAPI: when nsslapd-ldapiautodnsuffix doesn't exist - Bind is incorrect Description: - introducing --enable-auto-dn-suffix option to configure (disabled by default) - building the auto-dn-suffix code only when the option is set Index: daemon.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/daemon.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- daemon.c 17 Oct 2008 22:12:47 -0000 1.21 +++ daemon.c 23 Oct 2008 22:42:54 -0000 1.22 @@ -2172,6 +2172,7 @@ } } +#if defined(ENABLE_AUTO_DN_SUFFIX) if(ret) { /* create phony auth dn? */ @@ -2209,6 +2210,7 @@ ret = 0; } } +#endif } bail: Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- libglobs.c 15 Oct 2008 06:30:05 -0000 1.26 +++ libglobs.c 23 Oct 2008 22:42:55 -0000 1.27 @@ -483,9 +483,11 @@ {CONFIG_LDAPI_SEARCH_BASE_DN_ATTRIBUTE, config_set_ldapi_search_base_dn, NULL, 0, (void**)&global_slapdFrontendConfig.ldapi_search_base_dn, CONFIG_STRING, NULL}, +#if defined(ENABLE_AUTO_DN_SUFFIX) {CONFIG_LDAPI_AUTO_DN_SUFFIX_ATTRIBUTE, config_set_ldapi_auto_dn_suffix, NULL, 0, (void**)&global_slapdFrontendConfig.ldapi_auto_dn_suffix, CONFIG_STRING, NULL}, +#endif {CONFIG_ACCESSLOG_MINFREEDISKSPACE_ATTRIBUTE, NULL, log_set_mindiskspace, SLAPD_ACCESS_LOG, (void**)&global_slapdFrontendConfig.accesslog_minfreespace, CONFIG_INT, NULL}, @@ -831,7 +833,9 @@ cfg->ldapi_uidnumber_type = slapi_ch_strdup("uidNumber"); cfg->ldapi_gidnumber_type = slapi_ch_strdup("gidNumber"); cfg->ldapi_search_base_dn = slapi_ch_strdup("dc=example, dc=com"); +#if defined(ENABLE_AUTO_DN_SUFFIX) cfg->ldapi_auto_dn_suffix = slapi_ch_strdup("cn=peercred,cn=external,cn=auth"); +#endif cfg->threadnumber = SLAPD_DEFAULT_MAX_THREADS; cfg->maxthreadsperconn = SLAPD_DEFAULT_MAX_THREADS_PER_CONN; cfg->reservedescriptors = SLAPD_DEFAULT_RESERVE_FDS; @@ -1373,6 +1377,7 @@ return retVal; } +#if defined(ENABLE_AUTO_DN_SUFFIX) int config_set_ldapi_auto_dn_suffix( const char *attrname, char *value, char *errorbuf, int apply ) { int retVal = LDAP_SUCCESS; @@ -1391,6 +1396,7 @@ } return retVal; } +#endif int @@ -3420,6 +3426,7 @@ return retVal; } +#if defined(ENABLE_AUTO_DN_SUFFIX) char *config_get_ldapi_auto_dn_suffix(){ char *retVal; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); @@ -3429,7 +3436,7 @@ return retVal; } - +#endif char * config_get_workingdir() { From nhosoi at fedoraproject.org Thu Oct 23 22:42:57 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Thu, 23 Oct 2008 22:42:57 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.75, 1.76 configure.ac, 1.53, 1.54 Message-ID: <20081023224257.9070170134@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10406 Modified Files: Makefile.am configure.ac Log Message: Resolves: #468248 Summary: LDAPI: when nsslapd-ldapiautodnsuffix doesn't exist - Bind is incorrect Description: - introducing --enable-auto-dn-suffix option to configure (disabled by default) - building the auto-dn-suffix code only when the option is set Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- Makefile.am 22 Oct 2008 20:24:36 -0000 1.75 +++ Makefile.am 23 Oct 2008 22:42:54 -0000 1.76 @@ -1028,6 +1028,9 @@ if enable_autobind enable_autobind = 1 endif +if enable_auto_dn_suffix + enable_auto_dn_suffix = 1 +endif ns_slapd_SOURCES = ldap/servers/slapd/abandon.c \ ldap/servers/slapd/auth.c \ @@ -1137,6 +1140,7 @@ -e 's, at enable_bitwise\@,$(enable_bitwise),g' \ -e 's, at enable_dna\@,$(enable_dna),g' \ -e 's, at enable_autobind\@,$(enable_autobind),g' \ + -e 's, at enable_auto_dn_suffix\@,$(enable_auto_dn_suffix),g' \ -e 's, at ECHO_N\@,$(ECHO_N),g' \ -e 's, at ECHO_C\@,$(ECHO_C),g' \ -e 's, at brand\@,$(brand),g' \ @@ -1186,6 +1190,7 @@ -e 's, at enable_bitwise\@,$(enable_bitwise),g' \ -e 's, at enable_dna\@,$(enable_dna),g' \ -e 's, at enable_autobind\@,$(enable_autobind),g' \ + -e 's, at enable_auto_dn_suffix\@,$(enable_auto_dn_suffix),g' \ -e 's, at ECHO_N\@,$(ECHO_N),g' \ -e 's, at ECHO_C\@,$(ECHO_C),g' \ -e 's, at brand\@,$(brand),g' \ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- configure.ac 22 Oct 2008 20:24:36 -0000 1.53 +++ configure.ac 23 Oct 2008 22:42:54 -0000 1.54 @@ -137,6 +137,21 @@ fi AM_CONDITIONAL(enable_autobind,test "$enable_autobind" = "yes") +if test -z "$enable_auto_dn_suffix" ; then + enable_auto_dn_suffix=no # if not set on cmdline, set default +fi +AC_MSG_CHECKING(for --enable-auto-dn-suffix) +AC_ARG_ENABLE(autobind, + AS_HELP_STRING([--enable-auto-dn-suffix], + [enable auto bind with auto dn suffix over unix domain socket (LDAPI) support (default: no)])) +if test "$enable_ldapi" = yes -a "$enable_autobind" = yes -a "$enable_auto_dn_suffix" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE([ENABLE_AUTO_DN_SUFFIX], [1], [enable ldapi auto bind with auto dn suffix support in the server]) +else + AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(enable_auto_dn_suffix,test "$enable_auto_dn_suffix" = "yes") + if test -z "$enable_bitwise" ; then enable_bitwise=yes # if not set on cmdline, set default fi From nhosoi at fedoraproject.org Thu Oct 23 22:48:04 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Thu, 23 Oct 2008 22:48:04 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.99, 1.100 config.h.in, 1.22, 1.23 configure, 1.94, 1.95 Message-ID: <20081023224805.1647570138@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11174 Modified Files: Makefile.in config.h.in configure Log Message: Resolves: #468248 Summary: LDAPI: when nsslapd-ldapiautodnsuffix doesn't exist - Bind is incorrect Description: - introducing --enable-auto-dn-suffix option to configure (disabled by default) - building the auto-dn-suffix code only when the option is set ====================== autoconf version 2.59 automake version 1.9.6 Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- Makefile.in 22 Oct 2008 20:31:50 -0000 1.99 +++ Makefile.in 23 Oct 2008 22:48:01 -0000 1.100 @@ -977,6 +977,8 @@ debug_defs = @debug_defs@ defaultgroup = @defaultgroup@ defaultuser = @defaultuser@ +enable_auto_dn_suffix_FALSE = @enable_auto_dn_suffix_FALSE@ +enable_auto_dn_suffix_TRUE = @enable_auto_dn_suffix_TRUE@ enable_autobind_FALSE = @enable_autobind_FALSE@ enable_autobind_TRUE = @enable_autobind_TRUE@ enable_bitwise_FALSE = @enable_bitwise_FALSE@ @@ -1952,6 +1954,7 @@ @enable_ldapi_TRUE at GETSOCKETPEER = ldap/servers/slapd/getsocketpeer.c @enable_ldapi_TRUE at enable_ldapi = 1 @enable_autobind_TRUE at enable_autobind = 1 + at enable_auto_dn_suffix_TRUE@enable_auto_dn_suffix = 1 ns_slapd_SOURCES = ldap/servers/slapd/abandon.c \ ldap/servers/slapd/auth.c \ ldap/servers/slapd/bind.c \ @@ -2047,6 +2050,7 @@ @BUNDLE_FALSE@ -e 's, at enable_bitwise\@,$(enable_bitwise),g' \ @BUNDLE_FALSE@ -e 's, at enable_dna\@,$(enable_dna),g' \ @BUNDLE_FALSE@ -e 's, at enable_autobind\@,$(enable_autobind),g' \ + at BUNDLE_FALSE@ -e 's, at enable_auto_dn_suffix\@,$(enable_auto_dn_suffix),g' \ @BUNDLE_FALSE@ -e 's, at ECHO_N\@,$(ECHO_N),g' \ @BUNDLE_FALSE@ -e 's, at ECHO_C\@,$(ECHO_C),g' \ @BUNDLE_FALSE@ -e 's, at brand\@,$(brand),g' \ @@ -2106,6 +2110,7 @@ @BUNDLE_TRUE@ -e 's, at enable_bitwise\@,$(enable_bitwise),g' \ @BUNDLE_TRUE@ -e 's, at enable_dna\@,$(enable_dna),g' \ @BUNDLE_TRUE@ -e 's, at enable_autobind\@,$(enable_autobind),g' \ + at BUNDLE_TRUE@ -e 's, at enable_auto_dn_suffix\@,$(enable_auto_dn_suffix),g' \ @BUNDLE_TRUE@ -e 's, at ECHO_N\@,$(ECHO_N),g' \ @BUNDLE_TRUE@ -e 's, at ECHO_C\@,$(ECHO_C),g' \ @BUNDLE_TRUE@ -e 's, at brand\@,$(brand),g' \ Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- config.h.in 19 Oct 2008 17:12:55 -0000 1.22 +++ config.h.in 23 Oct 2008 22:48:02 -0000 1.23 @@ -15,6 +15,9 @@ /* enable ldapi auto bind support in the server */ #undef ENABLE_AUTOBIND +/* enable ldapi auto bind with auto dn suffix support in the server */ +#undef ENABLE_AUTO_DN_SUFFIX + /* enable the bitwise plugin */ #undef ENABLE_BITWISE Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- configure 22 Oct 2008 20:31:51 -0000 1.94 +++ configure 23 Oct 2008 22:48:02 -0000 1.95 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS CCASFLAGS SED EGREP LN_S ECHO AR ac_ct_AR RANLIB a c_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendo r LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS CCASFLAGS SED EGREP LN_S ECHO AR ac_ct_AR RANLIB a c_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_auto_dn_suffix_TRUE enable_auto_dn_suffix_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsn mp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1056,6 +1056,8 @@ (default: yes) --enable-autobind enable auto bind over unix domain socket (LDAPI) support (default: no) + --enable-auto-dn-suffix enable auto bind with auto dn suffix over unix + domain socket (LDAPI) support (default: no) --enable-bitwise enable the bitwise matching rule plugin (default: yes) @@ -4331,7 +4333,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4334 "configure"' > conftest.$ac_ext + echo '#line 4336 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5466,7 +5468,7 @@ # Provide some information about the compiler. -echo "$as_me:5469:" \ +echo "$as_me:5471:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6529,11 +6531,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6532: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6534: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6536: \$? = $ac_status" >&5 + echo "$as_me:6538: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6797,11 +6799,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6800: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6802: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6804: \$? = $ac_status" >&5 + echo "$as_me:6806: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6901,11 +6903,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6904: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6906: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6908: \$? = $ac_status" >&5 + echo "$as_me:6910: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8370,7 +8372,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8373 "configure"' > conftest.$ac_ext + echo '#line 8375 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9267,7 +9269,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11715: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11717: \$? = $ac_status" >&5 + echo "$as_me:11719: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11814,11 +11816,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11817: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11819: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11821: \$? = $ac_status" >&5 + echo "$as_me:11823: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12350,7 +12352,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12353 "configure"' > conftest.$ac_ext + echo '#line 12355 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13408,11 +13410,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13411: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13413: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13415: \$? = $ac_status" >&5 + echo "$as_me:13417: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13512,11 +13514,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13515: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13517: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13519: \$? = $ac_status" >&5 + echo "$as_me:13521: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14961,7 +14963,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 14964 "configure"' > conftest.$ac_ext + echo '#line 14966 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15739,11 +15741,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15742: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15744: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15746: \$? = $ac_status" >&5 + echo "$as_me:15748: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16007,11 +16009,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16010: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16012: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16014: \$? = $ac_status" >&5 + echo "$as_me:16016: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16111,11 +16113,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16114: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16116: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16118: \$? = $ac_status" >&5 + echo "$as_me:16120: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17580,7 +17582,7 @@ libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17583 "configure"' > conftest.$ac_ext + echo '#line 17585 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -23072,6 +23074,39 @@ fi +if test -z "$enable_auto_dn_suffix" ; then + enable_auto_dn_suffix=no # if not set on cmdline, set default +fi +echo "$as_me:$LINENO: checking for --enable-auto-dn-suffix" >&5 +echo $ECHO_N "checking for --enable-auto-dn-suffix... $ECHO_C" >&6 +# Check whether --enable-autobind or --disable-autobind was given. +if test "${enable_autobind+set}" = set; then + enableval="$enable_autobind" + +fi; +if test "$enable_ldapi" = yes -a "$enable_autobind" = yes -a "$enable_auto_dn_suffix" = "yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_AUTO_DN_SUFFIX 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test "$enable_auto_dn_suffix" = "yes"; then + enable_auto_dn_suffix_TRUE= + enable_auto_dn_suffix_FALSE='#' +else + enable_auto_dn_suffix_TRUE='#' + enable_auto_dn_suffix_FALSE= +fi + + if test -z "$enable_bitwise" ; then enable_bitwise=yes # if not set on cmdline, set default fi @@ -25524,6 +25559,13 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${enable_auto_dn_suffix_TRUE}" && test -z "${enable_auto_dn_suffix_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"enable_auto_dn_suffix\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"enable_auto_dn_suffix\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${enable_bitwise_TRUE}" && test -z "${enable_bitwise_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"enable_bitwise\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -26167,6 +26209,8 @@ s, at enable_ldapi_FALSE@,$enable_ldapi_FALSE,;t t s, at enable_autobind_TRUE@,$enable_autobind_TRUE,;t t s, at enable_autobind_FALSE@,$enable_autobind_FALSE,;t t +s, at enable_auto_dn_suffix_TRUE@,$enable_auto_dn_suffix_TRUE,;t t +s, at enable_auto_dn_suffix_FALSE@,$enable_auto_dn_suffix_FALSE,;t t s, at enable_bitwise_TRUE@,$enable_bitwise_TRUE,;t t s, at enable_bitwise_FALSE@,$enable_bitwise_FALSE,;t t s, at with_fhs_opt@,$with_fhs_opt,;t t From nhosoi at fedoraproject.org Fri Oct 24 00:21:20 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Fri, 24 Oct 2008 00:21:20 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd proto-slap.h, 1.38, 1.39 Message-ID: <20081024002120.49BED70139@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17945 Modified Files: proto-slap.h Log Message: Resolves: #468248 Summary: LDAPI: when nsslapd-ldapiautodnsuffix doesn't exist - Bind is incorrect Description: - introducing --enable-auto-dn-suffix option to configure (disabled by default) - building the auto-dn-suffix code only when the option is set Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- proto-slap.h 17 Oct 2008 22:12:47 -0000 1.38 +++ proto-slap.h 24 Oct 2008 00:21:18 -0000 1.39 @@ -252,7 +252,9 @@ int config_set_ldapi_uidnumber_type( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_ldapi_gidnumber_type( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_ldapi_search_base_dn( const char *attrname, char *value, char *errorbuf, int apply ); +#if defined(ENABLE_AUTO_DN_SUFFIX) int config_set_ldapi_auto_dn_suffix( const char *attrname, char *value, char *errorbuf, int apply ); +#endif int config_set_srvtab( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_sizelimit( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_lastmod( const char *attrname, char *value, char *errorbuf, int apply ); @@ -365,7 +367,9 @@ char *config_get_ldapi_uidnumber_type(); char *config_get_ldapi_gidnumber_type(); char *config_get_ldapi_search_base_dn(); +#if defined(ENABLE_AUTO_DN_SUFFIX) char *config_get_ldapi_auto_dn_suffix(); +#endif char *config_get_srvtab(); int config_get_sizelimit(); char *config_get_pw_storagescheme(); From nkinder at fedoraproject.org Fri Oct 24 22:37:01 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 24 Oct 2008 22:37:01 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.18, 1.19 cache.c, 1.6, 1.7 Message-ID: <20081024223701.4DD647013A@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9308/ldap/servers/slapd/back-ldbm Modified Files: back-ldbm.h cache.c Log Message: Resolves: 207457 Summary: Convert counters to 64-bit capable Slapi_Counter type. Index: back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- back-ldbm.h 17 Oct 2008 22:12:48 -0000 1.18 +++ back-ldbm.h 24 Oct 2008 22:36:59 -0000 1.19 @@ -339,7 +339,7 @@ /* for the in-core cache of entries */ struct cache { size_t c_maxsize; /* max size in bytes */ - size_t c_cursize; /* size in bytes */ + Slapi_Counter *c_cursize; /* size in bytes */ long c_maxentries; /* max entries allowed (-1: no limit) */ long c_curentries; /* current # entries in cache */ Hashtable *c_dntable; @@ -347,8 +347,8 @@ #ifdef UUIDCACHE_ON Hashtable *c_uuidtable; #endif - u_long c_hits; /* for analysis of hits/misses */ - u_long c_tries; + Slapi_Counter *c_hits; /* for analysis of hits/misses */ + Slapi_Counter *c_tries; struct backentry *c_lruhead; /* add entries here */ struct backentry *c_lrutail; /* remove entries here */ PRLock *c_mutex; /* lock for cache operations */ Index: cache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/cache.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cache.c 15 Oct 2008 06:30:06 -0000 1.6 +++ cache.c 24 Oct 2008 22:36:59 -0000 1.7 @@ -405,8 +405,15 @@ LDAPDebug(LDAP_DEBUG_TRACE, "=> cache_init\n", 0, 0, 0); cache->c_maxsize = maxsize; cache->c_maxentries = maxentries; - cache->c_cursize = cache->c_curentries = 0; - cache->c_hits = cache->c_tries = 0; + cache->c_cursize = slapi_counter_new(); + cache->c_curentries = 0; + if (config_get_slapi_counters()) { + cache->c_hits = slapi_counter_new(); + cache->c_tries = slapi_counter_new(); + } else { + cache->c_hits = NULL; + cache->c_tries = NULL; + } cache->c_lruhead = cache->c_lrutail = NULL; cache_make_hashes(cache); @@ -421,7 +428,7 @@ } #define CACHE_FULL(cache) \ - (((cache)->c_cursize > (cache)->c_maxsize) || \ + ((slapi_counter_get_value((cache)->c_cursize) > (cache)->c_maxsize) || \ (((cache)->c_maxentries > 0) && \ ((cache)->c_curentries > (cache)->c_maxentries))) @@ -466,7 +473,7 @@ if (e) lru_detach(cache, e); LOG("<= cache_flush (down to %lu entries, %lu bytes)\n", cache->c_curentries, - cache->c_cursize, 0); + slapi_counter_get_value(cache->c_cursize), 0); return e; } @@ -623,16 +630,16 @@ * if it ever wants to pull out more info, we might want to change all * these u_long *'s to a struct */ -void cache_get_stats(struct cache *cache, u_long *hits, u_long *tries, +void cache_get_stats(struct cache *cache, PRUint64 *hits, PRUint64 *tries, long *nentries, long *maxentries, size_t *size, size_t *maxsize) { PR_Lock(cache->c_mutex); - if (hits) *hits = cache->c_hits; - if (tries) *tries = cache->c_tries; + if (hits) *hits = slapi_counter_get_value(cache->c_hits); + if (tries) *tries = slapi_counter_get_value(cache->c_tries); if (nentries) *nentries = cache->c_curentries; if (maxentries) *maxentries = cache->c_maxentries; - if (size) *size = cache->c_cursize; + if (size) *size = slapi_counter_get_value(cache->c_cursize); if (maxsize) *maxsize = cache->c_maxsize; PR_Unlock(cache->c_mutex); } @@ -735,10 +742,11 @@ if (ret == 0) { /* won't be on the LRU list since it has a refcount on it */ /* adjust cache size */ - cache->c_cursize -= e->size; + slapi_counter_subtract(cache->c_cursize, e->size); cache->c_curentries--; LOG("<= cache_remove (size %lu): cache now %lu entries, %lu bytes\n", - e->size, cache->c_curentries, cache->c_cursize); + e->size, cache->c_curentries, + slapi_counter_get_value(cache->c_cursize)); } /* mark for deletion (will be erased when refcount drops to zero) */ @@ -775,7 +783,7 @@ int cache_replace(struct cache *cache, struct backentry *olde, struct backentry *newe) { - int found; + int found; const char *oldndn; const char *newndn; #ifdef UUIDCACHE_ON @@ -799,31 +807,31 @@ PR_Lock(cache->c_mutex); /* - * First, remove the old entry from all the hashtables. - * If the old entry is in cache but not in at least one of the - * cache tables, operation error - */ - if ( (olde->ep_state & ENTRY_STATE_NOTINCACHE) == 0 ) { + * First, remove the old entry from all the hashtables. + * If the old entry is in cache but not in at least one of the + * cache tables, operation error + */ + if ( (olde->ep_state & ENTRY_STATE_NOTINCACHE) == 0 ) { - found = remove_hash(cache->c_dntable, (void *)oldndn, strlen(oldndn)); - found &= remove_hash(cache->c_idtable, &(olde->ep_id), sizeof(ID)); + found = remove_hash(cache->c_dntable, (void *)oldndn, strlen(oldndn)); + found &= remove_hash(cache->c_idtable, &(olde->ep_id), sizeof(ID)); #ifdef UUIDCACHE_ON - found &= remove_hash(cache->c_uuidtable, (void *)olduuid, strlen(olduuid)); + found &= remove_hash(cache->c_uuidtable, (void *)olduuid, strlen(olduuid)); #endif - if (!found) { - LOG("cache replace: cache index tables out of sync\n", 0, 0, 0); - PR_Unlock(cache->c_mutex); - return 1; - } - } + if (!found) { + LOG("cache replace: cache index tables out of sync\n", 0, 0, 0); + PR_Unlock(cache->c_mutex); + return 1; + } + } if (! entry_same_dn(newe, (void *)oldndn) && - (newe->ep_state & ENTRY_STATE_NOTINCACHE) == 0) { + (newe->ep_state & ENTRY_STATE_NOTINCACHE) == 0) { /* if we're doing a modrdn, the new entry can be in the dn table * already, so we need to remove that too. */ if (remove_hash(cache->c_dntable, (void *)newndn, strlen(newndn))) { - cache->c_cursize -= newe->size; + slapi_counter_subtract(cache->c_cursize, newe->size); cache->c_curentries--; LOG("cache replace remove entry size %lu\n", newe->size, 0, 0); } @@ -857,12 +865,12 @@ /* adjust cache meta info */ newe->ep_refcnt = 1; newe->size = cache_entry_size(newe); - cache->c_cursize += (newe->size - olde->size); + slapi_counter_add(cache->c_cursize, newe->size - olde->size); olde->ep_state = ENTRY_STATE_DELETED; newe->ep_state = 0; PR_Unlock(cache->c_mutex); LOG("<= cache_replace OK, cache size now %lu cache count now %ld\n", - cache->c_cursize, cache->c_curentries, 0); + slapi_counter_get_value(cache->c_cursize), cache->c_curentries, 0); return 0; } @@ -930,11 +938,13 @@ } if (e->ep_refcnt == 0) lru_delete(cache, e); + PR_Unlock(cache->c_mutex); e->ep_refcnt++; - cache->c_hits++; + slapi_counter_increment(cache->c_hits); + } else { + PR_Unlock(cache->c_mutex); } - cache->c_tries++; - PR_Unlock(cache->c_mutex); + slapi_counter_increment(cache->c_tries); LOG("<= cache_find_dn (%sFOUND)\n", e ? "" : "NOT ", 0, 0); return e; @@ -959,11 +969,13 @@ } if (e->ep_refcnt == 0) lru_delete(cache, e); + PR_Unlock(cache->c_mutex); e->ep_refcnt++; - cache->c_hits++; + slapi_counter_increment(cache->c_hits); + } else { + PR_Unlock(cache->c_mutex); } - cache->c_tries++; - PR_Unlock(cache->c_mutex); + slapi_counter_increment(cache->c_tries); LOG("<= cache_find_id (%sFOUND)\n", e ? "" : "NOT ", 0, 0); return e; @@ -988,11 +1000,13 @@ } if (e->ep_refcnt == 0) lru_delete(cache, e); + PR_Unlock(cache->c_mutex); e->ep_refcnt++; - cache->c_hits++; + slapi_counter_increment(cache->c_hits); + } else { + PR_Unlock(cache->c_mutex); } - cache->c_tries++; - PR_Unlock(cache->c_mutex); + slapi_counter_increment(cache->c_tries); LOG("<= cache_find_uuid (%sFOUND)\n", e ? "" : "NOT ", 0, 0); return e; @@ -1126,7 +1140,7 @@ 0, 0); remove_hash(cache->c_dntable, (void *)ndn, strlen(ndn)); remove_hash(cache->c_idtable, &(e->ep_id), sizeof(ID)); - e->ep_state |= ENTRY_STATE_NOTINCACHE; + e->ep_state |= ENTRY_STATE_NOTINCACHE; PR_Unlock(cache->c_mutex); return -1; } @@ -1140,11 +1154,11 @@ e->ep_refcnt = 1; e->size = cache_entry_size(e); - cache->c_cursize += e->size; + slapi_counter_add(cache->c_cursize, e->size); cache->c_curentries++; /* don't add to lru since refcnt = 1 */ LOG("added entry of size %lu -> total now %lu out of max %lu\n", - e->size, cache->c_cursize, cache->c_maxsize); + e->size, slapi_counter_get_value(cache->c_cursize), cache->c_maxsize); if (cache->c_maxentries >= 0) { LOG(" total entries %ld out of %ld\n", cache->c_curentries, cache->c_maxentries, 0); From nkinder at fedoraproject.org Fri Oct 24 22:37:01 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 24 Oct 2008 22:37:01 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp ldap-agent.c, 1.12, 1.13 ldap-agent.h, 1.10, 1.11 main.c, 1.15, 1.16 redhat-directory.mib, 1.3, 1.4 Message-ID: <20081024223701.90E1270139@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9308/ldap/servers/snmp Modified Files: ldap-agent.c ldap-agent.h main.c redhat-directory.mib Log Message: Resolves: 207457 Summary: Convert counters to 64-bit capable Slapi_Counter type. Index: ldap-agent.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ldap-agent.c 18 Oct 2007 00:08:35 -0000 1.12 +++ ldap-agent.c 24 Oct 2008 22:36:59 -0000 1.13 @@ -277,6 +277,7 @@ time_t previous_start; int previous_state; int stats_hdl = -1; + sem_t *stats_sem = NULL; snmp_log(LOG_INFO, "Reloading stats.\n"); @@ -291,8 +292,39 @@ snmp_log(LOG_INFO, "Opening stats file (%s) for server: %d\n", serv_p->stats_file, serv_p->port); + /* Open and acquire semaphore */ + if ((stats_sem = sem_open(serv_p->stats_sem_name, 0)) == SEM_FAILED) { + stats_sem = NULL; + snmp_log(LOG_INFO, "Unable to open semaphore for server: %d\n", serv_p->port); + } else { + int i = 0; + int got_sem = 0; + + for (i=0; i < SNMP_NUM_SEM_WAITS; i++) { + if (sem_trywait(stats_sem) == 0) { + got_sem = 1; + break; + } + PR_Sleep(PR_SecondsToInterval(1)); + } + + if (!got_sem) { + /* We're unable to get the semaphore. Assume + * that the server is down. */ + snmp_log(LOG_INFO, "Unable to acquire semaphore for server: %d\n", serv_p->port); + sem_close(stats_sem); + stats_sem = NULL; + } + } + /* Open the stats file */ - if ( agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl) != 0 ) { + if ((stats_sem == NULL) || (agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl) != 0)) { + if (stats_sem) { + /* Release and close semaphore */ + sem_post(stats_sem); + sem_close(stats_sem); + } + /* Server must be down */ serv_p->server_state = SERVER_DOWN; /* Zero out the ops and entries tables */ @@ -313,6 +345,10 @@ snmp_log(LOG_ERR, "Error closing stats file: %s\n", serv_p->stats_file); + /* Release and close semaphore */ + sem_post(stats_sem); + sem_close(stats_sem); + /* Server must be down if the stats file hasn't been * updated in a while */ if (difftime(time(NULL), ctx->hdr_tbl.updateTime) >= UPDATE_THRESHOLD) { @@ -382,135 +418,108 @@ netsnmp_index * item, netsnmp_table_request_info *table_info) { + PRUint64 *the_stat = NULL; + integer64 new_val; netsnmp_variable_list *var = request->requestvb; stats_table_context *context = (stats_table_context *) item; switch (table_info->colnum) { case COLUMN_DSANONYMOUSBINDS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsAnonymousBinds, - sizeof(context->ops_tbl.dsAnonymousBinds)); + the_stat = &context->ops_tbl.dsAnonymousBinds; break; case COLUMN_DSUNAUTHBINDS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsUnAuthBinds, - sizeof(context->ops_tbl.dsUnAuthBinds)); + the_stat = &context->ops_tbl.dsUnAuthBinds; break; case COLUMN_DSSIMPLEAUTHBINDS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsSimpleAuthBinds, - sizeof(context->ops_tbl.dsSimpleAuthBinds)); + the_stat = &context->ops_tbl.dsSimpleAuthBinds; break; case COLUMN_DSSTRONGAUTHBINDS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsStrongAuthBinds, - sizeof(context->ops_tbl.dsStrongAuthBinds)); + the_stat = &context->ops_tbl.dsStrongAuthBinds; break; case COLUMN_DSBINDSECURITYERRORS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsBindSecurityErrors, - sizeof(context->ops_tbl.dsBindSecurityErrors)); + the_stat = &context->ops_tbl.dsBindSecurityErrors; break; case COLUMN_DSINOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsInOps, - sizeof(context->ops_tbl.dsInOps)); + the_stat = &context->ops_tbl.dsInOps; break; case COLUMN_DSREADOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsReadOps, - sizeof(context->ops_tbl.dsReadOps)); + the_stat = &context->ops_tbl.dsReadOps; break; case COLUMN_DSCOMPAREOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsCompareOps, - sizeof(context->ops_tbl.dsCompareOps)); + the_stat = &context->ops_tbl.dsCompareOps; break; case COLUMN_DSADDENTRYOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsAddEntryOps, - sizeof(context->ops_tbl.dsAddEntryOps)); + the_stat = &context->ops_tbl.dsAddEntryOps; break; case COLUMN_DSREMOVEENTRYOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsRemoveEntryOps, - sizeof(context->ops_tbl.dsRemoveEntryOps)); + the_stat = &context->ops_tbl.dsRemoveEntryOps; break; case COLUMN_DSMODIFYENTRYOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsModifyEntryOps, - sizeof(context->ops_tbl.dsModifyEntryOps)); + the_stat = &context->ops_tbl.dsModifyEntryOps; break; case COLUMN_DSMODIFYRDNOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsModifyRDNOps, - sizeof(context->ops_tbl.dsModifyRDNOps)); + the_stat = &context->ops_tbl.dsModifyRDNOps; break; case COLUMN_DSLISTOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsListOps, - sizeof(context->ops_tbl.dsListOps)); + the_stat = &context->ops_tbl.dsListOps; break; case COLUMN_DSSEARCHOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsSearchOps, - sizeof(context->ops_tbl.dsSearchOps)); + the_stat = &context->ops_tbl.dsSearchOps; break; case COLUMN_DSONELEVELSEARCHOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsOneLevelSearchOps, - sizeof(context->ops_tbl.dsOneLevelSearchOps)); + the_stat = &context->ops_tbl.dsOneLevelSearchOps; break; case COLUMN_DSWHOLESUBTREESEARCHOPS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsWholeSubtreeSearchOps, - sizeof(context->ops_tbl.dsWholeSubtreeSearchOps)); + the_stat = &context->ops_tbl.dsWholeSubtreeSearchOps; break; case COLUMN_DSREFERRALS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsReferrals, - sizeof(context->ops_tbl.dsReferrals)); + the_stat = &context->ops_tbl.dsReferrals; break; case COLUMN_DSCHAININGS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsChainings, - sizeof(context->ops_tbl.dsChainings)); + the_stat = &context->ops_tbl.dsChainings; break; case COLUMN_DSSECURITYERRORS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsSecurityErrors, - sizeof(context->ops_tbl.dsSecurityErrors)); + the_stat = &context->ops_tbl.dsSecurityErrors; break; case COLUMN_DSERRORS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->ops_tbl.dsErrors, - sizeof(context->ops_tbl.dsErrors)); + the_stat = &context->ops_tbl.dsErrors; break; default:/* We shouldn't get here */ snmp_log(LOG_ERR, "Unknown column in dsOpsTable_get_value\n"); return SNMP_ERR_GENERR; } + + /* The Net-SNMP integer64 type isn't a true 64-bit value, but instead + * a structure containing the high and low bits separately. We need + * to split our value appropriately. */ + new_val.low = *the_stat & 0x00000000ffffffff; + new_val.high = (*the_stat >> 32) & 0x00000000ffffffff; + + snmp_set_var_typed_value(var, ASN_COUNTER64, + (u_char *) &new_val, + sizeof(new_val)); + return SNMP_ERR_NOERROR; } @@ -527,45 +536,48 @@ netsnmp_index * item, netsnmp_table_request_info *table_info) { + PRUint64 *the_stat = NULL; + integer64 new_val; netsnmp_variable_list *var = request->requestvb; stats_table_context *context = (stats_table_context *) item; switch (table_info->colnum) { case COLUMN_DSMASTERENTRIES: - snmp_set_var_typed_value(var, ASN_GAUGE, - (u_char *) &context->entries_tbl.dsMasterEntries, - sizeof(context->entries_tbl.dsMasterEntries)); + the_stat = &context->entries_tbl.dsMasterEntries; break; case COLUMN_DSCOPYENTRIES: - snmp_set_var_typed_value(var, ASN_GAUGE, - (u_char *) &context->entries_tbl.dsCopyEntries, - sizeof(context->entries_tbl.dsCopyEntries)); + the_stat = &context->entries_tbl.dsCopyEntries; break; case COLUMN_DSCACHEENTRIES: - snmp_set_var_typed_value(var, ASN_GAUGE, - (u_char *) &context->entries_tbl.dsCacheEntries, - sizeof(context->entries_tbl.dsCacheEntries)); + the_stat = &context->entries_tbl.dsCacheEntries; break; case COLUMN_DSCACHEHITS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->entries_tbl.dsCacheHits, - sizeof(context->entries_tbl.dsCacheHits)); + the_stat = &context->entries_tbl.dsCacheHits; break; case COLUMN_DSSLAVEHITS: - snmp_set_var_typed_value(var, ASN_COUNTER, - (u_char *) &context->entries_tbl.dsSlaveHits, - sizeof(context->entries_tbl.dsSlaveHits)); + the_stat = &context->entries_tbl.dsSlaveHits; break; default:/* We shouldn't get here */ snmp_log(LOG_ERR, "Unknown column in dsEntriesTable_get_value\n"); return SNMP_ERR_GENERR; } + + /* The Net-SNMP integer64 type isn't a true 64-bit value, but instead + * a structure containing the high and low bits separately. We need + * to split our value appropriately. */ + new_val.low = *the_stat & 0x00000000ffffffff; + new_val.high = (*the_stat >> 32) & 0x00000000ffffffff; + + snmp_set_var_typed_value(var, ASN_COUNTER64, + (u_char *) &new_val, + sizeof(new_val)); + return SNMP_ERR_NOERROR; } Index: ldap-agent.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ldap-agent.h 8 Oct 2008 17:29:04 -0000 1.10 +++ ldap-agent.h 24 Oct 2008 22:36:59 -0000 1.11 @@ -74,10 +74,19 @@ #include #include #include "../slapd/agtmmap.h" +#include +#include + +#ifdef HPUX +/* HP-UX doesn't define SEM_FAILED like other platforms, so + * * we define it ourselves. */ +#define SEM_FAILED ((sem_t *)(-1)) +#endif #define MAXLINE 4096 #define CACHE_REFRESH_INTERVAL 15 #define UPDATE_THRESHOLD 20 +#define SNMP_NUM_SEM_WAITS 10 #define LDAP_AGENT_PIDFILE ".ldap-agent.pid" #define LDAP_AGENT_LOGFILE "ldap-agent.log" @@ -95,6 +104,7 @@ PRUint32 port; int server_state; char *stats_file; + char *stats_sem_name; char *dse_ldif; struct server_instance_s *next; } server_instance; Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- main.c 22 Oct 2007 18:29:55 -0000 1.15 +++ main.c 24 Oct 2008 22:36:59 -0000 1.16 @@ -355,6 +355,19 @@ instancename = NULL; goto close_and_exit; } + + /* set the semaphore name */ + /* ".stats" + \0 = 7 */ + serv_p->stats_sem_name = malloc(strlen(p) + 7); + if (serv_p->stats_sem_name != NULL) { + snprintf(serv_p->stats_sem_name, strlen(p) + 7, "%s.stats", p); + } else { + printf("ldap-agent: malloc error processing config file\n"); + error = 1; + free(instancename); + instancename = NULL; + goto close_and_exit; + } } /* Open dse.ldif */ Index: redhat-directory.mib =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/redhat-directory.mib,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- redhat-directory.mib 19 Apr 2005 22:07:42 -0000 1.3 +++ redhat-directory.mib 24 Oct 2008 22:36:59 -0000 1.4 @@ -46,7 +46,7 @@ RHDS-MIB DEFINITIONS ::= BEGIN IMPORTS - MODULE-IDENTITY, Counter32, Gauge32, OBJECT-TYPE + MODULE-IDENTITY, Counter64, Counter32, Gauge32, OBJECT-TYPE FROM SNMPv2-SMI DisplayString, TimeStamp, TEXTUAL-CONVENTION FROM SNMPv2-TC @@ -68,7 +68,7 @@ SYNTAX DisplayString rhds MODULE-IDENTITY - LAST-UPDATED "200503020000Z" + LAST-UPDATED "200810230000Z" ORGANIZATION "Red Hat, Inc." CONTACT-INFO "Red Hat, Inc. @@ -103,54 +103,54 @@ -- Bindings dsAnonymousBinds - Counter32, + Counter64, dsUnAuthBinds - Counter32, + Counter64, dsSimpleAuthBinds - Counter32, + Counter64, dsStrongAuthBinds - Counter32, + Counter64 dsBindSecurityErrors - Counter32, + Counter64, -- In-coming operations dsInOps - Counter32, + Counter64, dsReadOps - Counter32, + Counter64, dsCompareOps - Counter32, + Counter64, dsAddEntryOps - Counter32, + Counter64, dsRemoveEntryOps - Counter32, + Counter64, dsModifyEntryOps - Counter32, + Counter64, dsModifyRDNOps - Counter32, + Counter64, dsListOps - Counter32, + Counter64, dsSearchOps - Counter32, + Counter64, dsOneLevelSearchOps - Counter32, + Counter64, dsWholeSubtreeSearchOps - Counter32, + Counter64, -- Out going operations dsReferrals - Counter32, + Counter64, dsChainings - Counter32, + Counter64, -- Errors dsSecurityErrors - Counter32, + Counter64, dsErrors - Counter32 + Counter64 } -- CLDAP does not use binds; for A CLDAP DS the bind @@ -172,7 +172,7 @@ -- CLDAP and LDAP DSs: dsReferrals. dsAnonymousBinds OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -181,7 +181,7 @@ ::= {dsOpsEntry 1} dsUnAuthBinds OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -190,7 +190,7 @@ ::= {dsOpsEntry 2} dsSimpleAuthBinds OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -203,7 +203,7 @@ ::= {dsOpsEntry 3} dsStrongAuthBinds OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -217,7 +217,7 @@ ::= {dsOpsEntry 4} dsBindSecurityErrors OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -230,7 +230,7 @@ ::= {dsOpsEntry 5} dsInOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -240,7 +240,7 @@ ::= {dsOpsEntry 6} dsReadOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -252,7 +252,7 @@ ::= {dsOpsEntry 7} dsCompareOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -264,7 +264,7 @@ ::= {dsOpsEntry 8} dsAddEntryOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -276,7 +276,7 @@ ::= {dsOpsEntry 9} dsRemoveEntryOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -288,7 +288,7 @@ ::= {dsOpsEntry 10} dsModifyEntryOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -300,7 +300,7 @@ ::= {dsOpsEntry 11} dsModifyRDNOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -312,7 +312,7 @@ ::= {dsOpsEntry 12} dsListOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -324,7 +324,7 @@ ::= {dsOpsEntry 13} dsSearchOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -337,7 +337,7 @@ ::= {dsOpsEntry 14} dsOneLevelSearchOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -349,7 +349,7 @@ ::= {dsOpsEntry 15} dsWholeSubtreeSearchOps OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -361,7 +361,7 @@ ::= {dsOpsEntry 16} dsReferrals OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -373,7 +373,7 @@ ::= {dsOpsEntry 17} dsChainings OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -385,7 +385,7 @@ ::= {dsOpsEntry 18} dsSecurityErrors OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -397,7 +397,7 @@ ::= {dsOpsEntry 19} dsErrors OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -437,15 +437,15 @@ DsEntriesEntry ::= SEQUENCE { dsMasterEntries - Gauge32, + Counter64, dsCopyEntries - Gauge32, + Counter64, dsCacheEntries - Gauge32, + Counter64, dsCacheHits - Counter32, + Counter64, dsSlaveHits - Counter32 + Counter64 } -- A (C)LDAP frontend to the X.500 Directory will not have @@ -454,7 +454,7 @@ -- directory: dsMasterEntries, dsCopyEntries, dsSlaveHits. dsMasterEntries OBJECT-TYPE - SYNTAX Gauge32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -462,7 +462,7 @@ ::= {dsEntriesEntry 1} dsCopyEntries OBJECT-TYPE - SYNTAX Gauge32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -471,7 +471,7 @@ ::= {dsEntriesEntry 2} dsCacheEntries OBJECT-TYPE - SYNTAX Gauge32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -480,8 +480,8 @@ cached partially. The negative cache is not counted." ::= {dsEntriesEntry 3} - dsCacheHits OBJECT-TYPE - SYNTAX Counter32 + dsCacheHits OBJECT-TYPE + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION @@ -491,7 +491,7 @@ ::= {dsEntriesEntry 4} dsSlaveHits OBJECT-TYPE - SYNTAX Counter32 + SYNTAX Counter64 MAX-ACCESS read-only STATUS current DESCRIPTION From nkinder at fedoraproject.org Fri Oct 24 22:37:01 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 24 Oct 2008 22:37:01 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd add.c, 1.14, 1.15 agtmmap.c, 1.11, 1.12 agtmmap.h, 1.11, 1.12 bind.c, 1.16, 1.17 compare.c, 1.8, 1.9 connection.c, 1.21, 1.22 defbackend.c, 1.6, 1.7 delete.c, 1.9, 1.10 fe.h, 1.9, 1.10 globals.c, 1.8, 1.9 init.c, 1.7, 1.8 libglobs.c, 1.27, 1.28 libslapd.def, 1.18, 1.19 main.c, 1.26, 1.27 modify.c, 1.17, 1.18 modrdn.c, 1.10, 1.11 monitor.c, 1.7, 1.8 proto-slap.h, 1.39, 1.40 result.c, 1.14, 1.15 search.c, 1.10, 1.11 slap.h, 1.37, 1.38 slapi-private.h, 1.27, 1.28 snmp_collator.c, 1.15, 1.16 Message-ID: <20081024223701.7094970139@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9308/ldap/servers/slapd Modified Files: add.c agtmmap.c agtmmap.h bind.c compare.c connection.c defbackend.c delete.c fe.h globals.c init.c libglobs.c libslapd.def main.c modify.c modrdn.c monitor.c proto-slap.h result.c search.c slap.h slapi-private.h snmp_collator.c Log Message: Resolves: 207457 Summary: Convert counters to 64-bit capable Slapi_Counter type. Index: add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/add.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- add.c 17 Oct 2008 22:12:47 -0000 1.14 +++ add.c 24 Oct 2008 22:36:58 -0000 1.15 @@ -93,7 +93,7 @@ ber = operation->o_ber; /* count the add request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps); /* * Parse the add request. It looks like this: Index: agtmmap.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- agtmmap.c 8 Oct 2008 17:29:03 -0000 1.11 +++ agtmmap.c 24 Oct 2008 22:36:58 -0000 1.12 @@ -87,8 +87,8 @@ * mode -> Must be one of O_RDONLY / O_RDWR. * O_RDWR creates the file if it does not exist. * Outputs: - * hdl -> Opaque handle to the mapped file. Should be passed - * Passed to a subsequent agt_mupdate_stats() or + * hdl -> Opaque handle to the mapped file. Should be + * passed to a subsequent agt_mupdate_stats() or * agt_mread_stats() or agt_mclose_stats() call. * Return Values: * Returns 0 on successfully doing the memmap or error codes Index: agtmmap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- agtmmap.h 18 Oct 2007 01:22:29 -0000 1.11 +++ agtmmap.h 24 Oct 2008 22:36:58 -0000 1.12 @@ -123,32 +123,32 @@ /* * Ops Table attributes */ - PRUint32 dsAnonymousBinds; - PRUint32 dsUnAuthBinds; - PRUint32 dsSimpleAuthBinds; - PRUint32 dsStrongAuthBinds; - PRUint32 dsBindSecurityErrors; - PRUint32 dsInOps; - PRUint32 dsReadOps; - PRUint32 dsCompareOps; - PRUint32 dsAddEntryOps; - PRUint32 dsRemoveEntryOps; - PRUint32 dsModifyEntryOps; - PRUint32 dsModifyRDNOps; - PRUint32 dsListOps; - PRUint32 dsSearchOps; - PRUint32 dsOneLevelSearchOps; - PRUint32 dsWholeSubtreeSearchOps; - PRUint32 dsReferrals; - PRUint32 dsChainings; - PRUint32 dsSecurityErrors; - PRUint32 dsErrors; - PRUint32 dsConnections; /* Number of currently connected clients */ - PRUint32 dsConnectionSeq; /* Monotonically increasing number bumped on each new conn est */ - PRUint32 dsBytesRecv; /* Count of bytes read from clients */ - PRUint32 dsBytesSent; /* Count of bytes sent to clients */ - PRUint32 dsEntriesReturned; /* Number of entries returned by the server */ - PRUint32 dsReferralsReturned; /* Number of entries returned by the server */ + PRUint64 dsAnonymousBinds; + PRUint64 dsUnAuthBinds; + PRUint64 dsSimpleAuthBinds; + PRUint64 dsStrongAuthBinds; + PRUint64 dsBindSecurityErrors; + PRUint64 dsInOps; + PRUint64 dsReadOps; + PRUint64 dsCompareOps; + PRUint64 dsAddEntryOps; + PRUint64 dsRemoveEntryOps; + PRUint64 dsModifyEntryOps; + PRUint64 dsModifyRDNOps; + PRUint64 dsListOps; + PRUint64 dsSearchOps; + PRUint64 dsOneLevelSearchOps; + PRUint64 dsWholeSubtreeSearchOps; + PRUint64 dsReferrals; + PRUint64 dsChainings; + PRUint64 dsSecurityErrors; + PRUint64 dsErrors; + PRUint64 dsConnections; /* Number of currently connected clients */ + PRUint64 dsConnectionSeq; /* Monotonically increasing number bumped on each new conn est */ + PRUint64 dsBytesRecv; /* Count of bytes read from clients */ + PRUint64 dsBytesSent; /* Count of bytes sent to clients */ + PRUint64 dsEntriesReturned; /* Number of entries returned by the server */ + PRUint64 dsReferralsReturned; /* Number of entries returned by the server */ }; struct entries_stats_t @@ -156,11 +156,11 @@ /* * Entries Table Attributes */ - PRUint32 dsMasterEntries; - PRUint32 dsCopyEntries; - PRUint32 dsCacheEntries; - PRUint32 dsCacheHits; - PRUint32 dsSlaveHits; + PRUint64 dsMasterEntries; + PRUint64 dsCopyEntries; + PRUint64 dsCacheEntries; + PRUint64 dsCacheHits; + PRUint64 dsSlaveHits; }; struct int_stats_t Index: bind.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/bind.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- bind.c 17 Oct 2008 22:12:47 -0000 1.16 +++ bind.c 24 Oct 2008 22:36:58 -0000 1.17 @@ -345,7 +345,7 @@ * All SASL auth methods are categorized as strong binds, * although they are not necessarily stronger than simple. */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds); if ( saslmech == NULL || *saslmech == '\0' ) { send_ldap_result( pb, LDAP_AUTH_METHOD_NOT_SUPPORTED, NULL, "SASL mechanism absent", 0, NULL ); @@ -423,13 +423,13 @@ } break; case LDAP_AUTH_SIMPLE: - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds); /* accept null binds */ if (dn == NULL || *dn == '\0') { - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); /* by definition its anonymous is also UnAuthenticated so increment that counter */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); /* call preop plugins */ if (plugin_call_plugins( pb, SLAPI_PLUGIN_PRE_BIND_FN ) == 0){ @@ -455,7 +455,7 @@ if ( isroot && method == LDAP_AUTH_SIMPLE ) { if ( cred.bv_len == 0 ) { /* unauthenticated bind */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); } else { /* a passwd was supplied -- check it */ @@ -473,7 +473,7 @@ send_ldap_result( pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL ); /* increment BindSecurityErrorcount */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); value_done(&cv); goto free_and_return; } @@ -617,11 +617,11 @@ if(cred.bv_len == 0) { /* its an UnAuthenticated Bind, DN specified but no pw */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); }else{ /* password must have been invalid */ /* increment BindSecurityError count */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); } } Index: compare.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/compare.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- compare.c 17 Oct 2008 22:12:47 -0000 1.8 +++ compare.c 24 Oct 2008 22:36:58 -0000 1.9 @@ -77,7 +77,7 @@ LDAPDebug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 ); /* count the compare request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsCompareOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsCompareOps); /* have to init this here so we can "done" it below if we short circuit */ slapi_sdn_init(&sdn); Index: connection.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- connection.c 17 Oct 2008 22:12:47 -0000 1.21 +++ connection.c 24 Oct 2008 22:36:58 -0000 1.22 @@ -220,8 +220,8 @@ conn->c_connid = slapi_counter_increment(num_conns); if (! in_referral_mode) { - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnections); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsConnections); } /* @@ -650,7 +650,7 @@ static void inc_op_count(Connection* conn) { PR_AtomicIncrement(&conn->c_opscompleted); - PR_AtomicIncrement(&ops_completed); + slapi_counter_increment(ops_completed); } static int connection_increment_reference(Connection *conn) @@ -828,8 +828,8 @@ slapi_pblock_set (pb, SLAPI_DESTROY_CONTENT, &destroy_content); if (! config_check_referral_mode()) { - PR_AtomicIncrement(&ops_initiated); - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); + slapi_counter_increment(ops_initiated); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsInOps); } if ( (tag = ber_get_int( op->o_ber, &msgid )) @@ -2064,8 +2064,8 @@ connection_make_new_pb(&pb,conn); PR_Unlock(conn->c_mutex); if (! config_check_referral_mode()) { - PR_AtomicIncrement(&ops_initiated); - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); + slapi_counter_increment(ops_initiated); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsInOps); } } /* Once we're here we have a pb */ @@ -2171,7 +2171,7 @@ /* number of ops on this connection */ PR_AtomicIncrement(&conn->c_opscompleted); /* total number of ops for the server */ - PR_AtomicIncrement(&ops_completed); + slapi_counter_increment(ops_completed); /* If this op isn't a persistent search, remove it */ if ( !( pb->pb_op->o_flags & OP_FLAG_PS )) { /* delete from connection operation queue & decr refcnt */ @@ -2247,8 +2247,8 @@ PR_Unlock( op_thread_lock ); if (! config_check_referral_mode()) { - PR_AtomicIncrement(&ops_initiated); - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsInOps); + slapi_counter_increment(ops_initiated); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsInOps); } return 0; } @@ -2567,7 +2567,7 @@ } if (! config_check_referral_mode()) { - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsConnections); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsConnections); } conn->c_gettingber = 0; Index: defbackend.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/defbackend.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- defbackend.c 18 Oct 2007 00:08:34 -0000 1.6 +++ defbackend.c 24 Oct 2008 22:36:58 -0000 1.7 @@ -216,7 +216,7 @@ slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ); slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &cred ); if ( method == LDAP_AUTH_SIMPLE && cred->bv_len == 0 ) { - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); rc = SLAPI_BIND_ANONYMOUS; } else { send_nobackend_ldap_result( pb ); Index: delete.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/delete.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- delete.c 17 Oct 2008 22:12:47 -0000 1.9 +++ delete.c 24 Oct 2008 22:36:58 -0000 1.10 @@ -80,7 +80,7 @@ ber = operation->o_ber; /* count the delete request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps); /* * Parse the delete request. It looks like this: Index: fe.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/fe.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- fe.h 17 Oct 2008 22:12:47 -0000 1.9 +++ fe.h 24 Oct 2008 22:36:58 -0000 1.10 @@ -56,9 +56,8 @@ #endif /* DONT_DECLARE_SLAPD_LDAP_DEBUG */ #endif #endif -extern PRInt32 ops_initiated; -extern PRInt32 ops_completed; -extern PRLock *ops_mutex; +extern Slapi_Counter *ops_initiated; +extern Slapi_Counter *ops_completed; extern PRThread *listener_tid; extern PRThread *listener_tid; extern Slapi_Counter *num_conns; Index: globals.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/globals.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- globals.c 17 Oct 2008 22:12:47 -0000 1.8 +++ globals.c 24 Oct 2008 22:36:58 -0000 1.9 @@ -88,9 +88,8 @@ /* * global variables that need mutex protection */ -PRInt32 ops_initiated; -PRInt32 ops_completed; -PRLock *ops_mutex; +Slapi_Counter *ops_initiated; +Slapi_Counter *ops_completed; Slapi_Counter *num_conns; @@ -171,4 +170,17 @@ sep->sep_slapd_ssl_init2 = (caddr_t)slapd_ssl_init2; set_dll_entry_points( sep ); + /* To apply the nsslapd-counters config value properly, + these values are initialized here after config file is read */ + if (config_get_slapi_counters()) { + ops_initiated = slapi_counter_new(); + ops_completed = slapi_counter_new(); + g_set_num_entries_sent( slapi_counter_new() ); + g_set_num_bytes_sent( slapi_counter_new() ); + } else { + ops_initiated = NULL; + ops_completed = NULL; + g_set_num_entries_sent( NULL ); + g_set_num_bytes_sent( NULL ); + } } Index: init.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/init.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- init.c 17 Oct 2008 22:12:47 -0000 1.7 +++ init.c 24 Oct 2008 22:36:58 -0000 1.8 @@ -73,16 +73,12 @@ /* We don't worry about free'ing this stuff * since the only time we want to do that is when * the process is exiting. */ - ops_mutex = PR_NewLock(); num_conns = slapi_counter_new(); - g_set_num_sent_mutex( PR_NewLock() ); g_set_current_conn_count_mutex( PR_NewLock() ); slapd_re_init(); - if ( ops_mutex == NULL || - g_get_num_sent_mutex() == NULL || - g_get_current_conn_count_mutex() == NULL ) + if ( g_get_current_conn_count_mutex() == NULL ) { LDAPDebug( LDAP_DEBUG_ANY, "init: PR_NewLock failed\n", 0, 0, 0 ); Index: libglobs.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- libglobs.c 23 Oct 2008 22:42:55 -0000 1.27 +++ libglobs.c 24 Oct 2008 22:36:58 -0000 1.28 @@ -488,6 +488,10 @@ NULL, 0, (void**)&global_slapdFrontendConfig.ldapi_auto_dn_suffix, CONFIG_STRING, NULL}, #endif + {CONFIG_SLAPI_COUNTER_ATTRIBUTE, config_set_slapi_counters, + NULL, 0, + (void**)&global_slapdFrontendConfig.slapi_counters, CONFIG_ON_OFF, + config_get_slapi_counters}, {CONFIG_ACCESSLOG_MINFREEDISKSPACE_ATTRIBUTE, NULL, log_set_mindiskspace, SLAPD_ACCESS_LOG, (void**)&global_slapdFrontendConfig.accesslog_minfreespace, CONFIG_INT, NULL}, @@ -836,6 +840,7 @@ #if defined(ENABLE_AUTO_DN_SUFFIX) cfg->ldapi_auto_dn_suffix = slapi_ch_strdup("cn=peercred,cn=external,cn=auth"); #endif + cfg->slapi_counters = LDAP_ON; cfg->threadnumber = SLAPD_DEFAULT_MAX_THREADS; cfg->maxthreadsperconn = SLAPD_DEFAULT_MAX_THREADS_PER_CONN; cfg->reservedescriptors = SLAPD_DEFAULT_RESERVE_FDS; @@ -1398,6 +1403,22 @@ } #endif +/* + * Set nsslapd-counters: on | off to the internal config variable slapi_counters. + * If set to off, slapi_counters is not initialized and the counters are not + * incremented. Note: counters which are necessary for the server's running + * are not disabled. + */ +int config_set_slapi_counters( const char *attrname, char *value, char *errorbuf, int apply ) +{ + int retVal = LDAP_SUCCESS; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + + retVal = config_set_onoff(attrname, value, + &(slapdFrontendConfig->slapi_counters), errorbuf, apply); + + return retVal; +} int config_set_securelistenhost( const char *attrname, char *value, char *errorbuf, int apply ) { @@ -3438,6 +3459,17 @@ } #endif +int config_get_slapi_counters() +{ + int retVal; + slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); + CFG_LOCK_READ(slapdFrontendConfig); + retVal = slapdFrontendConfig->slapi_counters; + CFG_UNLOCK_READ(slapdFrontendConfig); + + return retVal; +} + char * config_get_workingdir() { slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); Index: libslapd.def =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libslapd.def,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- libslapd.def 4 Oct 2007 16:27:47 -0000 1.18 +++ libslapd.def 24 Oct 2008 22:36:58 -0000 1.19 @@ -211,8 +211,6 @@ g_set_num_bytes_sent @173 g_get_num_entries_sent @174 g_set_num_entries_sent @175 - g_get_num_sent_mutex @176 - g_set_num_sent_mutex @177 g_get_default_referral @178 g_set_default_referral @179 slapi_ch_bvdup @180 Index: main.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- main.c 15 Oct 2008 06:30:05 -0000 1.26 +++ main.c 24 Oct 2008 22:36:58 -0000 1.27 @@ -1039,7 +1039,12 @@ slapdFrontendConfig->configdir); eq_init(); /* must be done before plugins started */ - snmp_collator_start(); + + /* Start the SNMP collator if counters are enabled. */ + if (config_get_slapi_counters()) { + snmp_collator_start(); + } + ps_init_psearch_system(); /* must come before plugin_startall() */ /* Initailize the mapping tree */ Index: modify.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modify.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- modify.c 17 Oct 2008 22:12:47 -0000 1.17 +++ modify.c 24 Oct 2008 22:36:58 -0000 1.18 @@ -138,7 +138,7 @@ ber = operation->o_ber; /* count the modify request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps); /* * Parse the modify request. It looks like this: Index: modrdn.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/modrdn.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- modrdn.c 17 Oct 2008 22:12:47 -0000 1.10 +++ modrdn.c 24 Oct 2008 22:36:58 -0000 1.11 @@ -79,7 +79,7 @@ LDAPDebug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 ); /* count the modrdn request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps); slapi_pblock_get( pb, SLAPI_OPERATION, &operation); ber = operation->o_ber; Index: monitor.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/monitor.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- monitor.c 20 Sep 2007 16:54:38 -0000 1.7 +++ monitor.c 24 Oct 2008 22:36:58 -0000 1.8 @@ -93,30 +93,22 @@ connection_table_as_entry(the_connection_table, e); - PR_Lock( ops_mutex ); - sprintf( buf, "%ld", (long) ops_initiated ); - PR_Unlock( ops_mutex ); + sprintf( buf, "%" PRIu64, slapi_counter_get_value(ops_initiated) ); val.bv_val = buf; val.bv_len = strlen( buf ); attrlist_replace( &e->e_attrs, "opsinitiated", vals ); - PR_Lock( ops_mutex ); - sprintf( buf, "%ld", (long) ops_completed ); - PR_Unlock( ops_mutex ); + sprintf( buf, "%" PRIu64, slapi_counter_get_value(ops_completed) ); val.bv_val = buf; val.bv_len = strlen( buf ); attrlist_replace( &e->e_attrs, "opscompleted", vals ); - PR_Lock( g_get_num_sent_mutex() ); - len = PR_snprintf ( buf, BUFSIZ, "%llu", g_get_num_entries_sent() ); - PR_Unlock( g_get_num_sent_mutex() ); + len = PR_snprintf ( buf, BUFSIZ, "%" PRIu64, g_get_num_entries_sent() ); val.bv_val = buf; val.bv_len = ( unsigned long ) len; attrlist_replace( &e->e_attrs, "entriessent", vals ); - PR_Lock( g_get_num_sent_mutex() ); - len = PR_snprintf ( buf, BUFSIZ, "%llu", g_get_num_bytes_sent() ); - PR_Unlock( g_get_num_sent_mutex() ); + len = PR_snprintf ( buf, BUFSIZ, "%" PRIu64, g_get_num_bytes_sent() ); val.bv_val = buf; val.bv_len = ( unsigned long ) len; attrlist_replace( &e->e_attrs, "bytessent", vals ); Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- proto-slap.h 24 Oct 2008 00:21:18 -0000 1.39 +++ proto-slap.h 24 Oct 2008 22:36:58 -0000 1.40 @@ -255,6 +255,7 @@ #if defined(ENABLE_AUTO_DN_SUFFIX) int config_set_ldapi_auto_dn_suffix( const char *attrname, char *value, char *errorbuf, int apply ); #endif +int config_set_slapi_counters( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_srvtab( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_sizelimit( const char *attrname, char *value, char *errorbuf, int apply ); int config_set_lastmod( const char *attrname, char *value, char *errorbuf, int apply ); @@ -370,6 +371,7 @@ #if defined(ENABLE_AUTO_DN_SUFFIX) char *config_get_ldapi_auto_dn_suffix(); #endif +int config_get_slapi_counters(); char *config_get_srvtab(); int config_get_sizelimit(); char *config_get_pw_storagescheme(); @@ -821,14 +823,12 @@ /* * result.c */ -void g_set_num_entries_sent( PRUint64 val ); +void g_set_num_entries_sent( Slapi_Counter *counter ); PRUint64 g_get_num_entries_sent(); -void g_set_num_bytes_sent( PRUint64 val ); +void g_set_num_bytes_sent( Slapi_Counter *counter ); PRUint64 g_get_num_bytes_sent(); -void g_set_num_sent_mutex( PRLock *plock ); void g_set_default_referral( struct berval **ldap_url ); struct berval **g_get_default_referral(); -PRLock *g_get_num_sent_mutex(); void disconnect_server( Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error ); int send_ldap_search_entry( Slapi_PBlock *pb, Slapi_Entry *e, LDAPControl **ectrls, char **attrs, int attrsonly ); Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- result.c 17 Oct 2008 22:12:47 -0000 1.14 +++ result.c 24 Oct 2008 22:36:58 -0000 1.15 @@ -60,9 +60,8 @@ #include -PRUint64 num_entries_sent; -PRUint64 num_bytes_sent; -PRLock *num_sent_mutex; +Slapi_Counter *num_entries_sent; +Slapi_Counter *num_bytes_sent; static long current_conn_count; static PRLock *current_conn_count_mutex; @@ -82,34 +81,24 @@ #define SLAPI_SEND_VATTR_FLAG_REALONLY 0x01 #define SLAPI_SEND_VATTR_FLAG_VIRTUALONLY 0x02 -void g_set_num_entries_sent( PRUint64 val ) +void g_set_num_entries_sent( Slapi_Counter *counter ) { - num_entries_sent = val; + num_entries_sent = counter; } PRUint64 g_get_num_entries_sent() { - return( num_entries_sent ); + return( slapi_counter_get_value(num_entries_sent) ); } -void g_set_num_bytes_sent( PRUint64 val ) +void g_set_num_bytes_sent( Slapi_Counter *counter ) { - num_bytes_sent = val; + num_bytes_sent = counter; } PRUint64 g_get_num_bytes_sent() { - return( num_bytes_sent ); -} - -void g_set_num_sent_mutex( PRLock *plock ) -{ - num_sent_mutex = plock; -} - -PRLock *g_get_num_sent_mutex() -{ - return( num_sent_mutex ); + return( slapi_counter_get_value(num_bytes_sent) ); } static void @@ -327,8 +316,7 @@ || err == LDAP_INSUFFICIENT_ACCESS || err == LDAP_AUTH_UNKNOWN ) { - if(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors!=NULL) - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors); }else if( err != LDAP_REFERRAL && err != LDAP_OPT_REFERRALS && err != LDAP_PARTIAL_RESULTS) @@ -338,8 +326,7 @@ --referrals -- partially seviced operations will not be conted as an error */ - if(g_get_global_snmp_vars()->ops_tbl.dsErrors!=NULL) - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsErrors); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsErrors); } } @@ -413,7 +400,7 @@ int len; /* count the referral */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsReferrals); /* * figure out how much space we need @@ -486,7 +473,7 @@ */ /* count the referral */ if (! config_check_referral_mode()) - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsReferrals); rc = ber_printf( ber, "{it{esst{s", operation->o_msgid, tag, err, matched ? matched : "", text ? text : "", LDAP_TAG_REFERRAL, urls[0]->bv_val ); @@ -677,7 +664,7 @@ char *attrs[2] = { NULL, NULL }; /* count the referral */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsReferrals); attrs[0] = refAttr; if ( e != NULL && @@ -1526,14 +1513,13 @@ "flush_ber() wrote %u bytes to socket %d\n", bytes, conn->c_sd, 0 ); LL_I2L ( b, bytes ) ; - LL_ADD ( num_bytes_sent, num_bytes_sent, b); + slapi_counter_add(num_bytes_sent, b); if ( type == _LDAP_SEND_ENTRY ) { - LL_I2L ( b, 1 ); - LL_ADD ( num_entries_sent, num_entries_sent, b ); + slapi_counter_increment(num_entries_sent); } if (! config_check_referral_mode()) - (*(g_get_global_snmp_vars()->ops_tbl.dsBytesSent))+= bytes; + slapi_counter_add(g_get_global_snmp_vars()->ops_tbl.dsBytesSent, bytes); } } @@ -1542,11 +1528,11 @@ plugin_call_plugins( pb, SLAPI_PLUGIN_POST_RESULT_FN ); break; case _LDAP_SEND_REFERRAL: - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned); plugin_call_plugins( pb, SLAPI_PLUGIN_POST_REFERRAL_FN ); break; case _LDAP_SEND_ENTRY: - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned); plugin_call_plugins( pb, SLAPI_PLUGIN_POST_ENTRY_FN ); break; } Index: search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/search.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- search.c 17 Oct 2008 22:12:47 -0000 1.10 +++ search.c 24 Oct 2008 22:36:58 -0000 1.11 @@ -87,7 +87,7 @@ ber = operation->o_ber; /* count the search request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); /* * Parse the search request. It looks like this: @@ -141,11 +141,11 @@ /* check and record the scope for snmp */ if ( scope == LDAP_SCOPE_ONELEVEL) { /* count the one level search request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); } else if (scope == LDAP_SCOPE_SUBTREE) { /* count the subtree search request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); + slapi_counter_increment(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); } /* filter - returns a "normalized" version */ Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- slap.h 17 Oct 2008 22:12:47 -0000 1.37 +++ slap.h 24 Oct 2008 22:36:58 -0000 1.38 @@ -152,6 +152,7 @@ #define SLAPD_LOGGING 1 #define NUM_SNMP_INT_TBL_ROWS 5 +#define SNMP_FIELD_LENGTH 100 /* include NSPR header files */ #include "nspr.h" @@ -1529,57 +1530,56 @@ #include "proto-slap.h" LDAPMod** entry2mods(Slapi_Entry *, LDAPMod **, int *, int); -/* SNMP Variables */ +/* SNMP Counter Variables */ struct snmp_ops_tbl_t{ - PRUint32 *dsAnonymousBinds; - PRUint32 *dsUnAuthBinds; - PRUint32 *dsSimpleAuthBinds; - PRUint32 *dsStrongAuthBinds; - PRUint32 *dsBindSecurityErrors; - PRUint32 *dsInOps; - PRUint32 *dsReadOps; - PRUint32 *dsCompareOps; - PRUint32 *dsAddEntryOps; - PRUint32 *dsRemoveEntryOps; - PRUint32 *dsModifyEntryOps; - PRUint32 *dsModifyRDNOps; - PRUint32 *dsListOps; - PRUint32 *dsSearchOps; - PRUint32 *dsOneLevelSearchOps; - PRUint32 *dsWholeSubtreeSearchOps; - PRUint32 *dsReferrals; - PRUint32 *dsChainings; - PRUint32 *dsSecurityErrors; - PRUint32 *dsErrors; - PRUint32 *dsConnections; /* Number of currently connected clients */ - PRUint32 *dsConnectionSeq; /* Monotonically increasing number bumped on each new conn est */ - PRUint32 *dsBytesRecv; /* Count of bytes read from clients */ - PRUint32 *dsBytesSent; /* Count of bytes sent to clients */ - PRUint32 *dsEntriesReturned; - PRUint32 *dsReferralsReturned; + Slapi_Counter *dsAnonymousBinds; + Slapi_Counter *dsUnAuthBinds; + Slapi_Counter *dsSimpleAuthBinds; + Slapi_Counter *dsStrongAuthBinds; + Slapi_Counter *dsBindSecurityErrors; + Slapi_Counter *dsInOps; + Slapi_Counter *dsReadOps; + Slapi_Counter *dsCompareOps; + Slapi_Counter *dsAddEntryOps; + Slapi_Counter *dsRemoveEntryOps; + Slapi_Counter *dsModifyEntryOps; + Slapi_Counter *dsModifyRDNOps; + Slapi_Counter *dsListOps; + Slapi_Counter *dsSearchOps; + Slapi_Counter *dsOneLevelSearchOps; + Slapi_Counter *dsWholeSubtreeSearchOps; + Slapi_Counter *dsReferrals; + Slapi_Counter *dsChainings; + Slapi_Counter *dsSecurityErrors; + Slapi_Counter *dsErrors; + Slapi_Counter *dsConnections; /* Number of currently connected clients */ + Slapi_Counter *dsConnectionSeq; /* Monotonically increasing number bumped on each new conn est */ + Slapi_Counter *dsBytesRecv; /* Count of bytes read from clients */ + Slapi_Counter *dsBytesSent; /* Count of bytes sent to clients */ + Slapi_Counter *dsEntriesReturned; + Slapi_Counter *dsReferralsReturned; }; struct snmp_entries_tbl_t{ - /* entries table */ - PRUint32 *dsMasterEntries; - PRUint32 *dsCopyEntries; - PRUint32 *dsCacheEntries; - PRUint32 *dsCacheHits; - PRUint32 *dsSlaveHits; + /* entries table */ + Slapi_Counter *dsMasterEntries; + Slapi_Counter *dsCopyEntries; + Slapi_Counter *dsCacheEntries; + Slapi_Counter *dsCacheHits; + Slapi_Counter *dsSlaveHits; }; struct snmp_int_tbl_t{ - /* interaction table */ - PRUint32 *dsIntIndex; - char *dsName; - time_t *dsTimeOfCreation; - time_t *dsTimeOfLastAttempt; - time_t *dsTimeOfLastSuccess; - PRUint32 *dsFailuresSinceLastSuccess; - PRUint32 *dsFailures; - PRUint32 *dsSuccesses; - char *dsURL; + PRUint32 dsIntIndex; + char dsName[SNMP_FIELD_LENGTH]; + time_t dsTimeOfCreation; + time_t dsTimeOfLastAttempt; + time_t dsTimeOfLastSuccess; + PRUint32 dsFailuresSinceLastSuccess; + PRUint32 dsFailures; + PRUint32 dsSuccesses; + char dsURL[SNMP_FIELD_LENGTH]; }; /* operation statistics */ @@ -1709,6 +1709,7 @@ #define CONFIG_LDAPI_GIDNUMBER_TYPE_ATTRIBUTE "nsslapd-ldapigidnumbertype" #define CONFIG_LDAPI_SEARCH_BASE_DN_ATTRIBUTE "nsslapd-ldapientrysearchbase" #define CONFIG_LDAPI_AUTO_DN_SUFFIX_ATTRIBUTE "nsslapd-ldapiautodnsuffix" +#define CONFIG_SLAPI_COUNTER_ATTRIBUTE "nsslapd-counters" #define CONFIG_SECURITY_ATTRIBUTE "nsslapd-security" #define CONFIG_SSL3CIPHERS_ATTRIBUTE "nsslapd-SSL3ciphers" #define CONFIG_ACCESSLOG_ATTRIBUTE "nsslapd-accesslog" @@ -1979,6 +1980,7 @@ char *ldapi_gidnumber_type; /* type that contains gid number */ char *ldapi_search_base_dn; /* base dn to search for mapped entries */ char *ldapi_auto_dn_suffix; /* suffix to be appended to auto gen DNs */ + int slapi_counters; /* switch to turn slapi_counters on/off */ #ifndef _WIN32 struct passwd *localuserinfo; /* userinfo of localuser */ #endif /* _WIN32 */ Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- slapi-private.h 3 Oct 2008 04:28:22 -0000 1.27 +++ slapi-private.h 24 Oct 2008 22:36:58 -0000 1.28 @@ -1208,14 +1208,6 @@ #define PRLDAP_SET_PORT(myaddr,myport) \ ((myaddr)->raw.family == PR_AF_INET6 ? ((myaddr)->ipv6.port = PR_htons(myport)) : ((myaddr)->inet.port = PR_htons(myport))) -/* - * snmp_collator.c - * wrapper functions to ease the cast burdon between net-snmp APIs which expect - * unsigned int and PR_AtomicIncrement/PR_AtomicSet which expect signed int. - */ -void snmp_increment_counter(PRUint32 *counter); -void snmp_set_counter(PRUint32 *counter, PRInt32 newval); - #ifdef __cplusplus } #endif Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- snmp_collator.c 17 Oct 2008 22:12:47 -0000 1.15 +++ snmp_collator.c 24 Oct 2008 22:36:58 -0000 1.16 @@ -48,6 +48,7 @@ #include #include #include +#include #endif #include #include @@ -62,6 +63,14 @@ #include "prcvar.h" #include "plstr.h" +#ifdef HPUX +/* HP-UX doesn't define SEM_FAILED like other platforms, so + * we define it ourselves. */ +#define SEM_FAILED ((sem_t *)(-1)) +#endif + +#define SNMP_NUM_SEM_WAITS 10 + #include "snmp_collator.h" #include "../snmp/ntagt/nslagtcom_nt.h" @@ -70,12 +79,18 @@ /* strlen of url portions ie "ldap://:/" */ #define URL_CHARS_LEN 9 -char *make_ds_url(char *host, int port); -void print_snmp_interaction_table(); -int search_interaction_table(char *dsURL, int *isnew); +static char *make_ds_url(char *host, int port); +static void print_snmp_interaction_table(); +static int search_interaction_table(char *dsURL, int *isnew); static void loadConfigStats(); static Slapi_Entry *getConfigEntry( Slapi_Entry **e ); static void freeConfigEntry( Slapi_Entry **e ); +static void snmp_update_ops_table(); +static void snmp_update_entries_table(); +static void snmp_update_interactions_table(); +static void snmp_update_cache_stats(); +static void snmp_collator_create_semaphore(); +static void snmp_collator_sem_wait(); /* snmp stats stuff */ struct agt_stats_t *stats=NULL; @@ -94,12 +109,14 @@ static TCHAR szSpoolRootDir[_MAX_PATH]; #else static char szStatsFile[_MAX_PATH]; +static char stats_sem_name[_MAX_PATH]; #endif /* _WIN32*/ static Slapi_Eq_Context snmp_eq_ctx; static int snmp_collator_stopped = 0; -/* lock stuff */ +/* synchronization stuff */ static PRLock *interaction_table_mutex; +static sem_t *stats_sem; /*********************************************************************************** @@ -110,88 +127,80 @@ * ************************************************************************************/ -int snmp_collator_init(){ - int i; +static int snmp_collator_init(){ + int i; + + /* + * Create the global SNMP counters + */ + g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsInOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsReadOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsCompareOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsListOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsSearchOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsReferrals = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsChainings = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsErrors = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsConnections = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsBytesRecv = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsBytesSent = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned = slapi_counter_new(); + g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned = slapi_counter_new(); + g_get_global_snmp_vars()->entries_tbl.dsMasterEntries = slapi_counter_new(); + g_get_global_snmp_vars()->entries_tbl.dsCopyEntries = slapi_counter_new(); + g_get_global_snmp_vars()->entries_tbl.dsCacheEntries = slapi_counter_new(); + g_get_global_snmp_vars()->entries_tbl.dsCacheHits = slapi_counter_new(); + g_get_global_snmp_vars()->entries_tbl.dsSlaveHits = slapi_counter_new(); + + /* Initialize the global interaction table */ + for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++) + { + g_get_global_snmp_vars()->int_tbl[i].dsIntIndex = i + 1; + strncpy(g_get_global_snmp_vars()->int_tbl[i].dsName, "Not Available", + sizeof(g_get_global_snmp_vars()->int_tbl[i].dsName)); + g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation = 0; + g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt = 0; + g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess = 0; + g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess = 0; + g_get_global_snmp_vars()->int_tbl[i].dsFailures = 0; + g_get_global_snmp_vars()->int_tbl[i].dsSuccesses = 0; + strncpy(g_get_global_snmp_vars()->int_tbl[i].dsURL, "Not Available", + sizeof(g_get_global_snmp_vars()->int_tbl[i].dsURL)); + } + + /* Get the semaphore */ + snmp_collator_sem_wait(); - /* - * Initialize the mmap structure - */ + /* Initialize the mmap structure */ memset((void *) stats, 0, sizeof(*stats)); + + /* Load header stats table */ strncpy(stats->hdr_stats.dsVersion, SLAPD_VERSION_STR, (sizeof(stats->hdr_stats.dsVersion)/sizeof(char)) - 1); stats->hdr_stats.restarted = 0; stats->hdr_stats.startTime = time(0); /* This is a bit off, hope it's ok */ - - /* load config stats */ loadConfigStats(); - /* point these at the mmaped data */ - g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds = &(stats->ops_stats.dsAnonymousBinds); - g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds = &(stats->ops_stats.dsUnAuthBinds); - g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds = &(stats->ops_stats.dsSimpleAuthBinds); - g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds = &(stats->ops_stats.dsStrongAuthBinds); - g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors = &(stats->ops_stats.dsBindSecurityErrors); - g_get_global_snmp_vars()->ops_tbl.dsInOps = &(stats->ops_stats.dsInOps); - g_get_global_snmp_vars()->ops_tbl.dsReadOps = &(stats->ops_stats.dsReadOps); - g_get_global_snmp_vars()->ops_tbl.dsCompareOps = &(stats->ops_stats.dsCompareOps); - g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps = &(stats->ops_stats.dsAddEntryOps); - g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps = &(stats->ops_stats.dsRemoveEntryOps); - g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps = &(stats->ops_stats.dsModifyEntryOps); - g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps = &(stats->ops_stats.dsModifyRDNOps); - g_get_global_snmp_vars()->ops_tbl.dsListOps = &(stats->ops_stats.dsListOps); - g_get_global_snmp_vars()->ops_tbl.dsSearchOps = &(stats->ops_stats.dsSearchOps); - g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps = &(stats->ops_stats.dsOneLevelSearchOps); - g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps = &(stats->ops_stats.dsWholeSubtreeSearchOps); - g_get_global_snmp_vars()->ops_tbl.dsReferrals = &(stats->ops_stats.dsReferrals); - g_get_global_snmp_vars()->ops_tbl.dsChainings = &(stats->ops_stats.dsChainings); - g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors = &(stats->ops_stats.dsSecurityErrors); - g_get_global_snmp_vars()->ops_tbl.dsErrors = &(stats->ops_stats.dsErrors); - g_get_global_snmp_vars()->ops_tbl.dsConnections = &(stats->ops_stats.dsConnections); - g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq = &(stats->ops_stats.dsConnectionSeq); - g_get_global_snmp_vars()->ops_tbl.dsBytesRecv = &(stats->ops_stats.dsBytesRecv); - g_get_global_snmp_vars()->ops_tbl.dsBytesSent = &(stats->ops_stats.dsBytesSent); - g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned = &(stats->ops_stats.dsEntriesReturned); - g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned = &(stats->ops_stats.dsReferralsReturned); - - /* entries table */ - - g_get_global_snmp_vars()->entries_tbl.dsMasterEntries = &(stats->entries_stats.dsMasterEntries); - g_get_global_snmp_vars()->entries_tbl.dsCopyEntries = &(stats->entries_stats.dsCopyEntries); - g_get_global_snmp_vars()->entries_tbl.dsCacheEntries = &(stats->entries_stats.dsCacheEntries); - g_get_global_snmp_vars()->entries_tbl.dsCacheHits = &(stats->entries_stats.dsCacheHits); - g_get_global_snmp_vars()->entries_tbl.dsSlaveHits = &(stats->entries_stats.dsSlaveHits); - - /* interaction table */ + /* update the mmap'd tables */ + snmp_update_ops_table(); + snmp_update_entries_table(); + snmp_update_interactions_table(); - /* set pointers to table */ - for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++) - { - stats->int_stats[i].dsIntIndex=i; - g_get_global_snmp_vars()->int_tbl[i].dsIntIndex = &(stats->int_stats[i].dsIntIndex); - g_get_global_snmp_vars()->int_tbl[i].dsName = stats->int_stats[i].dsName; - g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation = &(stats->int_stats[i].dsTimeOfCreation); - g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt = &(stats->int_stats[i].dsTimeOfLastAttempt); - g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess = &(stats->int_stats[i].dsTimeOfLastSuccess); - g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess - = &(stats->int_stats[i].dsFailuresSinceLastSuccess); - g_get_global_snmp_vars()->int_tbl[i].dsFailures = &(stats->int_stats[i].dsFailures); - g_get_global_snmp_vars()->int_tbl[i].dsSuccesses = &(stats->int_stats[i].dsSuccesses); - g_get_global_snmp_vars()->int_tbl[i].dsURL = stats->int_stats[i].dsURL; - } - - /* initialize table contents */ - for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++) - { - *(g_get_global_snmp_vars()->int_tbl[i].dsIntIndex) = i + 1; - strcpy(g_get_global_snmp_vars()->int_tbl[i].dsName, "Not Available"); - *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation) = 0; - *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt) = 0; - *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess) = 0; - *(g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess) = 0; - *(g_get_global_snmp_vars()->int_tbl[i].dsFailures) = 0; - *(g_get_global_snmp_vars()->int_tbl[i].dsSuccesses) = 0; - strcpy(g_get_global_snmp_vars()->int_tbl[i].dsURL, "Not Available"); - } + /* Release the semaphore */ + sem_post(stats_sem); /* create lock for interaction table */ interaction_table_mutex = PR_NewLock(); @@ -202,7 +211,7 @@ /*********************************************************************************** - * given the name, wether or not it was successfull and the URL updates snmp + * given the name, whether or not it was successful and the URL updates snmp * interaction table appropriately * * @@ -231,32 +240,34 @@ if(isnew){ /* fillin the new row from scratch*/ - *(g_get_global_snmp_vars()->int_tbl[index].dsIntIndex) = index; - strcpy(g_get_global_snmp_vars()->int_tbl[index].dsName, dsName); - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfCreation) = time(0); - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastAttempt) = time(0); + g_get_global_snmp_vars()->int_tbl[index].dsIntIndex = index; + strncpy(g_get_global_snmp_vars()->int_tbl[index].dsName, dsName, + sizeof(g_get_global_snmp_vars()->int_tbl[index].dsName)); + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfCreation = time(0); + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastAttempt = time(0); if(error == 0){ - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess) = time(0); - *(g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess) = 0; - *(g_get_global_snmp_vars()->int_tbl[index].dsFailures) = 0; - *(g_get_global_snmp_vars()->int_tbl[index].dsSuccesses) = 1; + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess = time(0); + g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess = 0; + g_get_global_snmp_vars()->int_tbl[index].dsFailures = 0; + g_get_global_snmp_vars()->int_tbl[index].dsSuccesses = 1; }else{ - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess) = 0; - *(g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess) = 1; - *(g_get_global_snmp_vars()->int_tbl[index].dsFailures) = 1; - *(g_get_global_snmp_vars()->int_tbl[index].dsSuccesses) = 0; + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess = 0; + g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess = 1; + g_get_global_snmp_vars()->int_tbl[index].dsFailures = 1; + g_get_global_snmp_vars()->int_tbl[index].dsSuccesses = 0; } - strcpy(g_get_global_snmp_vars()->int_tbl[index].dsURL, dsURL); + strncpy(g_get_global_snmp_vars()->int_tbl[index].dsURL, dsURL, + sizeof(g_get_global_snmp_vars()->int_tbl[index].dsURL)); }else{ /* just update the appropriate fields */ - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastAttempt) = time(0); + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastAttempt = time(0); if(error == 0){ - *(g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess) = time(0); - *(g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess) = 0; - *(g_get_global_snmp_vars()->int_tbl[index].dsSuccesses) += 1; + g_get_global_snmp_vars()->int_tbl[index].dsTimeOfLastSuccess = time(0); + g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess = 0; + g_get_global_snmp_vars()->int_tbl[index].dsSuccesses += 1; }else{ - *(g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess) +=1; - *(g_get_global_snmp_vars()->int_tbl[index].dsFailures) +=1; + g_get_global_snmp_vars()->int_tbl[index].dsFailuresSinceLastSuccess +=1; + g_get_global_snmp_vars()->int_tbl[index].dsFailures +=1; } } @@ -274,7 +285,7 @@ * * this should point to root DSE ************************************************************************************/ -char *make_ds_url(char *host, int port){ +static char *make_ds_url(char *host, int port){ char *url; @@ -291,14 +302,14 @@ * so caller can rewrite this row ************************************************************************************/ -int search_interaction_table(char *dsURL, int *isnew) +static int search_interaction_table(char *dsURL, int *isnew) { int i; int index = 0; time_t oldestattempt; time_t currentattempt; - oldestattempt = *(g_get_global_snmp_vars()->int_tbl[0].dsTimeOfLastAttempt); + oldestattempt = g_get_global_snmp_vars()->int_tbl[0].dsTimeOfLastAttempt; *isnew = 1; for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++){ @@ -314,7 +325,7 @@ break; }else{ /* not found so figure out oldest row */ - currentattempt = *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt); + currentattempt = g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt; if(currentattempt <= oldestattempt){ index=i; @@ -328,19 +339,19 @@ } /* for debuging until subagent part working, print contents of interaction table */ -void print_snmp_interaction_table() +static void print_snmp_interaction_table() { int i; for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++) { - fprintf(stderr, " dsIntIndex: %d \n", *(g_get_global_snmp_vars()->int_tbl[i].dsIntIndex)); + fprintf(stderr, " dsIntIndex: %d \n", g_get_global_snmp_vars()->int_tbl[i].dsIntIndex); fprintf(stderr, " dsName: %s \n", g_get_global_snmp_vars()->int_tbl[i].dsName); - fprintf(stderr, " dsTimeOfCreation: %ld \n", *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation)); - fprintf(stderr, " dsTimeOfLastAttempt: %ld \n", *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt)); - fprintf(stderr, " dsTimeOfLastSuccess: %ld \n", *(g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess)); - fprintf(stderr, "dsFailuresSinceLastSuccess: %d \n", *(g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess)); - fprintf(stderr, " dsFailures: %d \n", *(g_get_global_snmp_vars()->int_tbl[i].dsFailures)); - fprintf(stderr, " dsSuccesses: %d \n", *(g_get_global_snmp_vars()->int_tbl[i].dsSuccesses)); + fprintf(stderr, " dsTimeOfCreation: %ld \n", g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation); + fprintf(stderr, " dsTimeOfLastAttempt: %ld \n", g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt); + fprintf(stderr, " dsTimeOfLastSuccess: %ld \n", g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess); + fprintf(stderr, "dsFailuresSinceLastSuccess: %d \n", g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess); + fprintf(stderr, " dsFailures: %d \n", g_get_global_snmp_vars()->int_tbl[i].dsFailures); + fprintf(stderr, " dsSuccesses: %d \n", g_get_global_snmp_vars()->int_tbl[i].dsSuccesses); fprintf(stderr, " dsURL: %s \n", g_get_global_snmp_vars()->int_tbl[i].dsURL); fprintf(stderr, "\n"); } @@ -418,6 +429,8 @@ } PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s%s", statspath, instname, AGT_STATS_EXTENSION); + PR_snprintf(stats_sem_name, sizeof(stats_sem_name), "%s%s", + instname, AGT_STATS_EXTENSION); tmpstatsfile = szStatsFile; slapi_ch_free_string(&statspath); slapi_ch_free_string(&instdir); @@ -427,27 +440,22 @@ { if (err != EEXIST) /* Ignore if file already exists */ { - printf("Failed to open stats file (%s) (error %d).\n", - szStatsFile, err); + LDAPDebug( LDAP_DEBUG_ANY, "Failed to open stats file (%s) (error %d).\n", + szStatsFile, err, 0 ); exit(1); } } -/* read config entry for entity table data */ + /* Create semaphore for stats file access */ + snmp_collator_create_semaphore(); -/* point stats struct at mmap data */ + /* point stats struct at mmap data */ stats = (struct agt_stats_t *) mmap_tbl [hdl].fp; -/* initialize stats data */ - + /* initialize stats data */ snmp_collator_init(); -/* -* now that memmap is open and things point the right way -* an atomic set or increment anywhere in slapd should set -* the snmp memmap vars correctly and be able to be polled by snmp -*/ - /* Arrange to be called back periodically */ + /* Arrange to be called back periodically to update the mmap'd stats file. */ snmp_eq_ctx = slapi_eq_repeat(snmp_collator_update, NULL, (time_t)0, SLAPD_SNMP_UPDATE_INTERVAL); return 0; @@ -472,6 +480,9 @@ slapi_eq_cancel(snmp_eq_ctx); snmp_collator_stopped = 1; + /* acquire the semaphore */ + snmp_collator_sem_wait(); + /* close the memory map */ if ((err = agt_mclose_stats(hdl)) != 0) { @@ -485,6 +496,10 @@ tmpstatsfile, errno); } + /* close and delete semaphore */ + sem_close(stats_sem); + sem_unlink(stats_sem_name); + /* delete lock */ PR_DestroyLock(interaction_table_mutex); @@ -498,166 +513,304 @@ return 0; } +/* + * snmp_collator_create_semaphore() + * + * Create a semaphore to synchronize access to the stats file with + * the SNMP sub-agent. NSPR doesn't support a trywait function + * for semaphores, so we just use POSIX semaphores directly. + */ +static void +snmp_collator_create_semaphore() +{ + /* First just try to create the semaphore. This should usually just work. */ + if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) { + if (errno == EEXIST) { + /* It appears that we didn't exit cleanly last time and left the semaphore + * around. Recreate it since we don't know what state it is in. */ + sem_unlink(stats_sem_name); + if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) { + /* No dice */ + LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n", + szStatsFile, errno, 0 ); + exit(1); + } + } else { + /* Some other problem occurred creating the semaphore. */ + LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n", + szStatsFile, errno, 0 ); + exit(1); + } + } + + /* If we've reached this point, everything should be good. */ + return; +} + +/* + * snmp_collator_sem_wait() + * + * A wrapper used to get the semaphore. We don't want to block, + * but we want to retry a specified number of times in case the + * semaphore is help by the sub-agent. + */ +static void +snmp_collator_sem_wait() +{ + int i = 0; + int got_sem = 0; + + for (i=0; i < SNMP_NUM_SEM_WAITS; i++) { + if (sem_trywait(stats_sem) == 0) { + got_sem = 1; + break; + } + PR_Sleep(PR_SecondsToInterval(1)); + } + + if (!got_sem) { + /* If we've been unable to get the semaphore, there's + * something wrong (likely the sub-agent went out to + * lunch). We remove the old semaphore and recreate + * a new one to avoid hanging up the server. */ + sem_close(stats_sem); + sem_unlink(stats_sem_name); + snmp_collator_create_semaphore(); + } +} + /*********************************************************************************** * * int snmp_collator_update() * -* our architecture changed from mail server and we right to mmapped -* area as soon as operation completed, rather than maintining the same data twice -* and doing a polled update. However, to keep traps working correctly (as they depend) -* on the time in the header, it is more efficient to write the header info -* in a polled fashion (ever 1 sec) +* Event callback function that updates the mmap'd stats file +* for the SNMP sub-agent. This will use a semaphore while +* updating the stats file to prevent the SNMP sub-agent from +* reading it in the middle of an update. * ************************************************************************************/ void snmp_collator_update(time_t start_time, void *arg) { - Slapi_Backend *be, *be_next; - char *cookie = NULL; - Slapi_PBlock *search_result_pb = NULL; - Slapi_Entry **search_entries; - Slapi_Attr *attr = NULL; - Slapi_Value *sval = NULL; - int search_result; - - if (snmp_collator_stopped) { - return; - } + if (snmp_collator_stopped) { + return; + } + + /* force an update of the backend cache stats. */ + snmp_update_cache_stats(); + + /* get the semaphore */ + snmp_collator_sem_wait(); /* just update the update time in the header */ if( stats != NULL){ stats->hdr_stats.updateTime = time(0); } + /* update the mmap'd tables */ + snmp_update_ops_table(); + snmp_update_entries_table(); + snmp_update_interactions_table(); + + /* release the semaphore */ + sem_post(stats_sem); +} + +/* + * snmp_update_ops_table() + * + * Updates the mmap'd operations table. The semaphore + * should be acquired before you call this. + */ +static void +snmp_update_ops_table() +{ + stats->ops_stats.dsAnonymousBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds); + stats->ops_stats.dsUnAuthBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds); + stats->ops_stats.dsSimpleAuthBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds); + stats->ops_stats.dsStrongAuthBinds = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds); + stats->ops_stats.dsBindSecurityErrors = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors); + stats->ops_stats.dsInOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsInOps); + stats->ops_stats.dsReadOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReadOps); + stats->ops_stats.dsCompareOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsCompareOps); + stats->ops_stats.dsAddEntryOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps); + stats->ops_stats.dsRemoveEntryOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps); + stats->ops_stats.dsModifyEntryOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps); + stats->ops_stats.dsModifyRDNOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps); + stats->ops_stats.dsListOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsListOps); + stats->ops_stats.dsSearchOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); + stats->ops_stats.dsOneLevelSearchOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); + stats->ops_stats.dsWholeSubtreeSearchOps = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); + stats->ops_stats.dsReferrals = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReferrals); + stats->ops_stats.dsChainings = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsChainings); + stats->ops_stats.dsSecurityErrors = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors); + stats->ops_stats.dsErrors = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsErrors); + stats->ops_stats.dsConnections = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsConnections); + stats->ops_stats.dsConnectionSeq = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq); + stats->ops_stats.dsBytesRecv = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBytesRecv); + stats->ops_stats.dsBytesSent = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBytesSent); + stats->ops_stats.dsEntriesReturned = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned); + stats->ops_stats.dsReferralsReturned = slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned); +} + +/* + * snmp_update_entries_table() + * + * Updated the mmap'd entries table. The semaphore should + * be acquired before you call this. + */ +static void +snmp_update_entries_table() +{ + stats->entries_stats.dsMasterEntries = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsMasterEntries); + stats->entries_stats.dsCopyEntries = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCopyEntries); + stats->entries_stats.dsCacheEntries = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries); + stats->entries_stats.dsCacheHits = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCacheHits); + stats->entries_stats.dsSlaveHits = slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsSlaveHits); +} + +/* + * snmp_update_interactions_table() + * + * Updates the mmap'd interactions table. The semaphore should + * be acquired before you call this. + */ +static void +snmp_update_interactions_table() +{ + int i; + + for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++) { + stats->int_stats[i].dsIntIndex = i; + strncpy(stats->int_stats[i].dsName, g_get_global_snmp_vars()->int_tbl[i].dsName, + sizeof(stats->int_stats[i].dsName)); + stats->int_stats[i].dsTimeOfCreation = g_get_global_snmp_vars()->int_tbl[i].dsTimeOfCreation; + stats->int_stats[i].dsTimeOfLastAttempt = g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastAttempt; + stats->int_stats[i].dsTimeOfLastSuccess = g_get_global_snmp_vars()->int_tbl[i].dsTimeOfLastSuccess; + stats->int_stats[i].dsFailuresSinceLastSuccess = g_get_global_snmp_vars()->int_tbl[i].dsFailuresSinceLastSuccess; + stats->int_stats[i].dsFailures = g_get_global_snmp_vars()->int_tbl[i].dsFailures; + stats->int_stats[i].dsSuccesses = g_get_global_snmp_vars()->int_tbl[i].dsSuccesses; + strncpy(stats->int_stats[i].dsURL, g_get_global_snmp_vars()->int_tbl[i].dsURL, + sizeof(stats->int_stats[i].dsURL)); + } +} + +/* + * snmp_update_cache_stats() + * + * Reads the backend cache stats from the backend monitor entry and + * updates the global counter used by the SNMP sub-agent as well as + * the SNMP monitor entry. + */ +static void +snmp_update_cache_stats() +{ + Slapi_Backend *be, *be_next; + char *cookie = NULL; + Slapi_PBlock *search_result_pb = NULL; + Slapi_Entry **search_entries; + int search_result; + /* set the cache hits/cache entries info */ - be = slapi_get_first_backend(&cookie); - if (!be) - return; + be = slapi_get_first_backend(&cookie); + if (!be) + return; - be_next = slapi_get_next_backend(cookie); + be_next = slapi_get_next_backend(cookie); - slapi_ch_free ((void **) &cookie); + slapi_ch_free ((void **) &cookie); - /* for now, only do it if there is only 1 backend, otherwise don't know - which backend to pick */ + /* for now, only do it if there is only 1 backend, otherwise don't know + * which backend to pick */ if(be_next == NULL) { - Slapi_DN monitordn; - slapi_sdn_init(&monitordn); - be_getmonitordn(be,&monitordn); + Slapi_DN monitordn; + slapi_sdn_init(&monitordn); + be_getmonitordn(be,&monitordn); - /* do a search on the monitor dn to get info */ + /* do a search on the monitor dn to get info */ search_result_pb = slapi_search_internal( slapi_sdn_get_dn(&monitordn), - LDAP_SCOPE_BASE, - "objectclass=*", - NULL, - NULL, - 0); - slapi_sdn_done(&monitordn); - - slapi_pblock_get( search_result_pb, SLAPI_PLUGIN_INTOP_RESULT, &search_result); - - if(search_result == 0) - { - const struct berval *val = NULL; - /* get the entrycachehits */ - slapi_pblock_get( search_result_pb,SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, - &search_entries); - if(slapi_entry_attr_find( search_entries[0], "entrycachehits", &attr) == 0 ) - { - /* get the values out of the attribute */ - val = NULL; - slapi_attr_first_value( attr, &sval ); - if(NULL != sval) - { - val= slapi_value_get_berval( sval ); - } - } - - /* if we got a value for entrycachehits, then set it */ - if(val != NULL) - { - snmp_set_counter(g_get_global_snmp_vars()->entries_tbl.dsCacheHits, atoi(val->bv_val)); - - } + LDAP_SCOPE_BASE, + "objectclass=*", + NULL, + NULL, + 0); + slapi_sdn_done(&monitordn); + + slapi_pblock_get( search_result_pb, SLAPI_PLUGIN_INTOP_RESULT, &search_result); + + if(search_result == 0) + { + slapi_pblock_get( search_result_pb,SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, + &search_entries); + + /* set the entrycachehits */ + slapi_counter_set_value(g_get_global_snmp_vars()->entries_tbl.dsCacheHits, + slapi_entry_attr_get_ulonglong(search_entries[0], "entrycachehits")); - /* get the currententrycachesize */ - attr = NULL; - val = NULL; - sval = NULL; - if(slapi_entry_attr_find( search_entries[0], "currententrycachesize", &attr) == 0 ) - { - /* get the values out of the attribute */ - slapi_attr_first_value( attr,&sval ); - if(NULL != sval) { - val= slapi_value_get_berval( sval ); - } - } - - /* if we got a value for currententrycachesize, then set it */ - if(val != NULL) - { - snmp_set_counter(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries, atoi(val->bv_val)); - - } - - } - - slapi_free_search_results_internal(search_result_pb); - slapi_pblock_destroy(search_result_pb); + /* set the currententrycachesize */ + slapi_counter_set_value(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries, + slapi_entry_attr_get_ulonglong(search_entries[0], "currententrycachesize")); + } + + slapi_free_search_results_internal(search_result_pb); + slapi_pblock_destroy(search_result_pb); } } -/* NGK - We should not be using a plain int here. All of these counters - * are PRUint32 types for now, but they will be PRUint64 once converted - * to use Slapi_Counter. */ static void -add_counter_to_value(Slapi_Entry *e, const char *type, int countervalue) +add_counter_to_value(Slapi_Entry *e, const char *type, PRUint64 countervalue) { char value[40]; - sprintf(value,"%d",countervalue); + sprintf(value,"%" PRIu64, countervalue); slapi_entry_attr_set_charptr( e, type, value); } void snmp_as_entry(Slapi_Entry *e) { - add_counter_to_value(e,"AnonymousBinds",stats->ops_stats.dsAnonymousBinds); - add_counter_to_value(e,"UnAuthBinds",stats->ops_stats.dsUnAuthBinds); - add_counter_to_value(e,"SimpleAuthBinds",stats->ops_stats.dsSimpleAuthBinds); - add_counter_to_value(e,"StrongAuthBinds",stats->ops_stats.dsStrongAuthBinds); - add_counter_to_value(e,"BindSecurityErrors",stats->ops_stats.dsBindSecurityErrors); - add_counter_to_value(e,"InOps",stats->ops_stats.dsInOps); - add_counter_to_value(e,"ReadOps",stats->ops_stats.dsReadOps); - add_counter_to_value(e,"CompareOps",stats->ops_stats.dsCompareOps); - add_counter_to_value(e,"AddEntryOps",stats->ops_stats.dsAddEntryOps); - add_counter_to_value(e,"RemoveEntryOps",stats->ops_stats.dsRemoveEntryOps); - add_counter_to_value(e,"ModifyEntryOps",stats->ops_stats.dsModifyEntryOps); - add_counter_to_value(e,"ModifyRDNOps",stats->ops_stats.dsModifyRDNOps); - add_counter_to_value(e,"ListOps",stats->ops_stats.dsListOps); - add_counter_to_value(e,"SearchOps",stats->ops_stats.dsSearchOps); - add_counter_to_value(e,"OneLevelSearchOps",stats->ops_stats.dsOneLevelSearchOps); - add_counter_to_value(e,"WholeSubtreeSearchOps",stats->ops_stats.dsWholeSubtreeSearchOps); - add_counter_to_value(e,"Referrals",stats->ops_stats.dsReferrals); - add_counter_to_value(e,"Chainings",stats->ops_stats.dsChainings); - add_counter_to_value(e,"SecurityErrors",stats->ops_stats.dsSecurityErrors); - add_counter_to_value(e,"Errors",stats->ops_stats.dsErrors); - add_counter_to_value(e,"Connections",stats->ops_stats.dsConnections); - add_counter_to_value(e,"ConnectionSeq",stats->ops_stats.dsConnectionSeq); - add_counter_to_value(e,"BytesRecv",stats->ops_stats.dsBytesRecv); - add_counter_to_value(e,"BytesSent",stats->ops_stats.dsBytesSent); - add_counter_to_value(e,"EntriesReturned",stats->ops_stats.dsEntriesReturned); - add_counter_to_value(e,"ReferralsReturned",stats->ops_stats.dsReferralsReturned); - add_counter_to_value(e,"MasterEntries",stats->entries_stats.dsMasterEntries); - add_counter_to_value(e,"CopyEntries",stats->entries_stats.dsCopyEntries); - add_counter_to_value(e,"CacheEntries",stats->entries_stats.dsCacheEntries); - add_counter_to_value(e,"CacheHits",stats->entries_stats.dsCacheHits); - add_counter_to_value(e,"SlaveHits",stats->entries_stats.dsSlaveHits); + add_counter_to_value(e,"AnonymousBinds", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsAnonymousBinds)); + add_counter_to_value(e,"UnAuthBinds", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsUnAuthBinds)); + add_counter_to_value(e,"SimpleAuthBinds", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSimpleAuthBinds)); + add_counter_to_value(e,"StrongAuthBinds", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsStrongAuthBinds)); + add_counter_to_value(e,"BindSecurityErrors", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBindSecurityErrors)); + add_counter_to_value(e,"InOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsInOps)); + add_counter_to_value(e,"ReadOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReadOps)); + add_counter_to_value(e,"CompareOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsCompareOps)); + add_counter_to_value(e,"AddEntryOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsAddEntryOps)); + add_counter_to_value(e,"RemoveEntryOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsRemoveEntryOps)); + add_counter_to_value(e,"ModifyEntryOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsModifyEntryOps)); + add_counter_to_value(e,"ModifyRDNOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsModifyRDNOps)); + add_counter_to_value(e,"ListOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsListOps)); + add_counter_to_value(e,"SearchOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSearchOps)); + add_counter_to_value(e,"OneLevelSearchOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps)); + add_counter_to_value(e,"WholeSubtreeSearchOps", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps)); + add_counter_to_value(e,"Referrals", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReferrals)); + add_counter_to_value(e,"Chainings", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsChainings)); + add_counter_to_value(e,"SecurityErrors", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsSecurityErrors)); + add_counter_to_value(e,"Errors", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsErrors)); + add_counter_to_value(e,"Connections", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsConnections)); + add_counter_to_value(e,"ConnectionSeq", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsConnectionSeq)); + add_counter_to_value(e,"BytesRecv", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBytesRecv)); + add_counter_to_value(e,"BytesSent", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsBytesSent)); + add_counter_to_value(e,"EntriesReturned", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsEntriesReturned)); + add_counter_to_value(e,"ReferralsReturned", slapi_counter_get_value(g_get_global_snmp_vars()->ops_tbl.dsReferralsReturned)); + add_counter_to_value(e,"MasterEntries", slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsMasterEntries)); + add_counter_to_value(e,"CopyEntries", slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCopyEntries)); + add_counter_to_value(e,"CacheEntries", slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCacheEntries)); + add_counter_to_value(e,"CacheHits", slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsCacheHits)); + add_counter_to_value(e,"SlaveHits", slapi_counter_get_value(g_get_global_snmp_vars()->entries_tbl.dsSlaveHits)); } +/* + * loadConfigStats() + * + * Reads the header table SNMP settings and sets them in the mmap'd stats + * file. This should be done only when the semaphore is held. + */ static void loadConfigStats() { Slapi_Entry *entry = NULL; @@ -726,20 +879,3 @@ } } -/* - * wrapper functions to ease the cast burdon between net=snmp APIs which expect - * unsigned int and PR_AtomicIncrement/PR_AtomicSet which expect signed int. - * NSPR_API(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval); - * NSPR_API(PRInt32) PR_AtomicIncrement(PRInt32 *val); - */ -void -snmp_increment_counter(PRUint32 *counter) -{ - PR_AtomicIncrement((PRInt32 *)counter); -} - -void snmp_set_counter(PRUint32 *counter, PRInt32 newval) -{ - PR_AtomicSet((PRInt32 *)counter, newval); -} - From nkinder at fedoraproject.org Fri Oct 24 22:37:00 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Fri, 24 Oct 2008 22:37:00 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver config.h.in, 1.23, 1.24 configure, 1.95, 1.96 configure.ac, 1.54, 1.55 Message-ID: <20081024223700.D201570139@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9308 Modified Files: config.h.in configure configure.ac Log Message: Resolves: 207457 Summary: Convert counters to 64-bit capable Slapi_Counter type. Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- config.h.in 23 Oct 2008 22:48:02 -0000 1.23 +++ config.h.in 24 Oct 2008 22:36:57 -0000 1.24 @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* enabling atomic counter */ +#undef ATOMIC_64BIT_OPERATIONS + /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- configure 23 Oct 2008 22:48:02 -0000 1.95 +++ configure 24 Oct 2008 22:36:57 -0000 1.96 @@ -23394,6 +23394,11 @@ #define _GNU_SOURCE 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_64BIT_OPERATIONS 1 +_ACEOF + platform="linux" # relative to sysconfdir initdir=/rc.d/init.d @@ -23449,6 +23454,11 @@ #define _INCLUDE_STDC__SOURCE_199901 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_64BIT_OPERATIONS 1 +_ACEOF + # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -23505,6 +23515,11 @@ #define _INCLUDE_STDC__SOURCE_199901 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_64BIT_OPERATIONS 1 +_ACEOF + # assume 64 bit initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' @@ -23571,6 +23586,11 @@ #define NO_DOMAINNAME 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_64BIT_OPERATIONS 1 +_ACEOF + LIBSOCKET=-lsocket LIBSOCKET=$LIBSOCKET Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- configure.ac 23 Oct 2008 22:42:54 -0000 1.54 +++ configure.ac 24 Oct 2008 22:36:58 -0000 1.55 @@ -302,6 +302,7 @@ AC_DEFINE([LINUX2_2], [1], [Linux 2.2]) AC_DEFINE([LINUX2_4], [1], [Linux 2.4]) AC_DEFINE([_GNU_SOURCE], [1], [GNU Source]) + AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) platform="linux" # relative to sysconfdir initdir=/rc.d/init.d @@ -317,6 +318,7 @@ AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h]) + AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" @@ -333,6 +335,7 @@ AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h]) + AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) # assume 64 bit initconfigdir="/$PACKAGE_NAME/config" perlexec='/opt/perl_64/bin/perl' @@ -351,6 +354,7 @@ AC_DEFINE([OSVERSION], [509], [OS version]) AC_DEFINE([_REENTRANT], [1], [_REENTRANT]) AC_DEFINE([NO_DOMAINNAME], [1], [no getdomainname]) + AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) dnl socket nsl and dl are required to link several programs and libdb LIBSOCKET=-lsocket AC_SUBST([LIBSOCKET], [$LIBSOCKET]) From nhosoi at fedoraproject.org Fri Oct 24 23:28:24 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Fri, 24 Oct 2008 23:28:24 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm proto-back-ldbm.h, 1.15, 1.16 Message-ID: <20081024232824.48D2970134@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15311 Modified Files: proto-back-ldbm.h Log Message: Resolves: 207457 Summary: Convert counters to 64-bit capable Slapi_Counter type. Index: proto-back-ldbm.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/proto-back-ldbm.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- proto-back-ldbm.h 9 Oct 2008 17:40:14 -0000 1.15 +++ proto-back-ldbm.h 24 Oct 2008 23:28:22 -0000 1.16 @@ -69,7 +69,7 @@ void cache_set_max_entries(struct cache *cache, long entries); size_t cache_get_max_size(struct cache *cache); long cache_get_max_entries(struct cache *cache); -void cache_get_stats(struct cache *cache, u_long *hits, u_long *tries, +void cache_get_stats(struct cache *cache, PRUint64 *hits, PRUint64 *tries, long *entries,long *maxentries, size_t *size, size_t *maxsize); void cache_debug_hash(struct cache *cache, char **out); From nhosoi at fedoraproject.org Sat Oct 25 17:22:54 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Sat, 25 Oct 2008 17:22:54 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi_counter.c, 1.2, 1.3 Message-ID: <20081025172254.B1DC37013A@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17904 Modified Files: slapi_counter.c Log Message: Fixed typos in the HP-UX code: slapi_counter_get => slapi_counter_get_value Index: slapi_counter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi_counter.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- slapi_counter.c 22 Oct 2008 20:24:37 -0000 1.2 +++ slapi_counter.c 25 Oct 2008 17:22:52 -0000 1.3 @@ -182,7 +182,7 @@ } else { /* For other values, we have to use cmpxchg. */ do { - prev = slapi_counter_get(counter); + prev = slapi_counter_get_value(counter); newvalue = prev + addvalue; /* Put prev in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, prev); @@ -239,7 +239,7 @@ } else { /* For other values, we have to use cmpxchg. */ do { - prev = slapi_counter_get(counter); + prev = slapi_counter_get_value(counter); newvalue = prev - subvalue; /* Put prev in a register for cmpxchg to compare against */ _Asm_mov_to_ar(_AREG_CCV, prev); From nhosoi at fedoraproject.org Sun Oct 26 04:04:59 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Sun, 26 Oct 2008 04:04:59 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.76, 1.77 Makefile.in, 1.100, 1.101 Message-ID: <20081026040459.A6B4470138@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17390 Modified Files: Makefile.am Makefile.in Log Message: Fixing the build on Solaris (ldap_agent_bin-main.o) Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- Makefile.am 23 Oct 2008 22:42:54 -0000 1.76 +++ Makefile.am 26 Oct 2008 04:04:56 -0000 1.77 @@ -970,6 +970,10 @@ ldap_agent_bin_CPPFLAGS = $(AM_CPPFLAGS) @netsnmp_inc@ @ldapsdk_inc@ @nss_inc@ @nspr_inc@ ldap_agent_bin_LDADD = $(LDAPSDK_LINK) $(SASL_LINK) $(NSS_LINK) $(NSPR_LINK) $(NETSNMP_LINK) +if SOLARIS +ldap_agent_bin_LDADD += -lrt +endif + #------------------------ # ldclt Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.100 retrieving revision 1.101 diff -u -r1.100 -r1.101 --- Makefile.in 23 Oct 2008 22:48:01 -0000 1.100 +++ Makefile.in 26 Oct 2008 04:04:56 -0000 1.101 @@ -47,7 +47,8 @@ pwdhash-bin$(EXEEXT) rsearch-bin$(EXEEXT) noinst_PROGRAMS = makstrdb$(EXEEXT) @SOLARIS_TRUE at am__append_1 = ldap/servers/slapd/slapi_counter_sunos_sparcv9.S - at SOLARIS_TRUE@am__append_2 = ldap/servers/slapd/tools/ldclt/opCheck.c + at SOLARIS_TRUE@am__append_2 = -lrt + at SOLARIS_TRUE@am__append_3 = ldap/servers/slapd/tools/ldclt/opCheck.c DIST_COMMON = $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure compile \ @@ -628,7 +629,8 @@ ldap_agent_bin_OBJECTS = $(am_ldap_agent_bin_OBJECTS) ldap_agent_bin_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__ldclt_bin_SOURCES_DIST = ldap/servers/slapd/tools/ldaptool-sasl.c \ ldap/servers/slapd/tools/ldclt/data.c \ ldap/servers/slapd/tools/ldclt/ldapfct.c \ @@ -1907,7 +1909,8 @@ ldap/servers/slapd/agtmmap.c ldap_agent_bin_CPPFLAGS = $(AM_CPPFLAGS) @netsnmp_inc@ @ldapsdk_inc@ @nss_inc@ @nspr_inc@ -ldap_agent_bin_LDADD = $(LDAPSDK_LINK) $(SASL_LINK) $(NSS_LINK) $(NSPR_LINK) $(NETSNMP_LINK) +ldap_agent_bin_LDADD = $(LDAPSDK_LINK) $(SASL_LINK) $(NSS_LINK) \ + $(NSPR_LINK) $(NETSNMP_LINK) $(am__append_2) #------------------------ # ldclt @@ -1923,7 +1926,7 @@ ldap/servers/slapd/tools/ldclt/threadMain.c \ ldap/servers/slapd/tools/ldclt/utils.c \ ldap/servers/slapd/tools/ldclt/version.c \ - ldap/servers/slapd/tools/ldclt/workarounds.c $(am__append_2) + ldap/servers/slapd/tools/ldclt/workarounds.c $(am__append_3) ldclt_bin_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/ldap/servers/slapd/tools @ldapsdk_inc@ @sasl_inc@ @nss_inc@ @nspr_inc@ ldclt_bin_LDADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(LIBNSL) $(LIBSOCKET) $(LIBDL) From rmeggins at fedoraproject.org Mon Oct 27 17:04:33 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Mon, 27 Oct 2008 17:04:33 +0000 (UTC) Subject: [Fedora-directory-commits] CVSROOT loginfo,1.19,1.20 Message-ID: <20081027170433.DF2897013A@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/CVSROOT In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22461 Modified Files: loginfo Log Message: test commit filters Index: loginfo =================================================================== RCS file: /cvs/dirsec/CVSROOT/loginfo,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- loginfo 27 Oct 2008 16:53:04 -0000 1.19 +++ loginfo 27 Oct 2008 17:04:31 -0000 1.20 @@ -21,7 +21,7 @@ # v = new version number (post-checkin) # t = tag or branch name # -# test mail filtering2 +# test mail filtering3 # For example: #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or From rmeggins at fedoraproject.org Mon Oct 27 17:09:19 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Mon, 27 Oct 2008 17:09:19 +0000 (UTC) Subject: [Fedora-directory-commits] CVSROOT loginfo,1.20,1.21 Message-ID: <20081027170919.833237013A@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/CVSROOT In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23958 Modified Files: loginfo Log Message: test commit filters Index: loginfo =================================================================== RCS file: /cvs/dirsec/CVSROOT/loginfo,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- loginfo 27 Oct 2008 17:04:31 -0000 1.20 +++ loginfo 27 Oct 2008 17:09:17 -0000 1.21 @@ -21,7 +21,7 @@ # v = new version number (post-checkin) # t = tag or branch name # -# test mail filtering3 +# test mail filtering4 # For example: #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or From rich.megginson at gmail.com Mon Oct 27 17:09:30 2008 From: rich.megginson at gmail.com (Rich Megginson) Date: Mon, 27 Oct 2008 11:09:30 -0600 Subject: [Fedora-directory-commits] test spam filter Message-ID: <4905F5CA.9010701@gmail.com> test From rmeggins at fedoraproject.org Mon Oct 27 17:36:11 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Mon, 27 Oct 2008 17:36:11 +0000 (UTC) Subject: [Fedora-directory-commits] CVSROOT loginfo,1.23,1.24 Message-ID: <20081027173611.B3F1970139@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/CVSROOT In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2735 Modified Files: loginfo Log Message: test commit filters Index: loginfo =================================================================== RCS file: /cvs/dirsec/CVSROOT/loginfo,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- loginfo 27 Oct 2008 17:33:46 -0000 1.23 +++ loginfo 27 Oct 2008 17:36:09 -0000 1.24 @@ -21,7 +21,7 @@ # v = new version number (post-checkin) # t = tag or branch name # -# test mail filtering6 +# test mail filtering7 # For example: #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or From rmeggins at fedoraproject.org Mon Oct 27 17:22:58 2008 From: rmeggins at fedoraproject.org (Richard Allen Megginson) Date: Mon, 27 Oct 2008 17:22:58 +0000 (UTC) Subject: [Fedora-directory-commits] CVSROOT loginfo,1.21,1.22 Message-ID: <20081027172258.7B8B770139@cvs1.fedora.phx.redhat.com> Author: rmeggins Update of /cvs/dirsec/CVSROOT In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29267 Modified Files: loginfo Log Message: test commit filters Index: loginfo =================================================================== RCS file: /cvs/dirsec/CVSROOT/loginfo,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- loginfo 27 Oct 2008 17:09:17 -0000 1.21 +++ loginfo 27 Oct 2008 17:22:56 -0000 1.22 @@ -21,7 +21,7 @@ # v = new version number (post-checkin) # t = tag or branch name # -# test mail filtering4 +# test mail filtering5 # For example: #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or From nhosoi at fedoraproject.org Tue Oct 28 00:18:30 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Tue, 28 Oct 2008 00:18:30 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd snmp_collator.c, 1.16, 1.17 Message-ID: <20081028001830.6027670138@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8774 Modified Files: snmp_collator.c Log Message: Resolves: #207457 Summary: rhds 7.1 - server stats use 32-bit integers - entrycachehitratio 1503% Description: added '/' at the head of the semaphore name. Index: snmp_collator.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- snmp_collator.c 24 Oct 2008 22:36:58 -0000 1.16 +++ snmp_collator.c 28 Oct 2008 00:18:27 -0000 1.17 @@ -429,7 +429,7 @@ } PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s%s", statspath, instname, AGT_STATS_EXTENSION); - PR_snprintf(stats_sem_name, sizeof(stats_sem_name), "%s%s", + PR_snprintf(stats_sem_name, sizeof(stats_sem_name), "/%s%s", instname, AGT_STATS_EXTENSION); tmpstatsfile = szStatsFile; slapi_ch_free_string(&statspath); From nkinder at fedoraproject.org Wed Oct 29 19:16:32 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Wed, 29 Oct 2008 19:16:32 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp ldap-agent.h, 1.11, 1.12 Message-ID: <20081029191632.2D76E7013B@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/snmp In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27022/ldap/servers/snmp Modified Files: ldap-agent.h Log Message: Resolves: 207457 Summary: Added 64-bit atomic functions for platforms lacking built-ins. Index: ldap-agent.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ldap-agent.h 24 Oct 2008 22:36:59 -0000 1.11 +++ ldap-agent.h 29 Oct 2008 19:16:29 -0000 1.12 @@ -79,7 +79,10 @@ #ifdef HPUX /* HP-UX doesn't define SEM_FAILED like other platforms, so - * * we define it ourselves. */ + * we define it ourselves. We make this define HP-UX specific + * since sem_open() doesn't seem to return the same value on + * all platforms in a failure case (it's 1 on some platforms, + * and 0 on others). */ #define SEM_FAILED ((sem_t *)(-1)) #endif From nkinder at fedoraproject.org Wed Oct 29 19:16:32 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Wed, 29 Oct 2008 19:16:32 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd result.c, 1.15, 1.16 slapi_counter.c, 1.3, 1.4 Message-ID: <20081029191632.216267013D@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27022/ldap/servers/slapd Modified Files: result.c slapi_counter.c Log Message: Resolves: 207457 Summary: Added 64-bit atomic functions for platforms lacking built-ins. Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- result.c 24 Oct 2008 22:36:58 -0000 1.15 +++ result.c 29 Oct 2008 19:16:29 -0000 1.16 @@ -60,8 +60,8 @@ #include -Slapi_Counter *num_entries_sent; -Slapi_Counter *num_bytes_sent; +static Slapi_Counter *num_entries_sent; +static Slapi_Counter *num_bytes_sent; static long current_conn_count; static PRLock *current_conn_count_mutex; Index: slapi_counter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi_counter.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- slapi_counter.c 25 Oct 2008 17:22:52 -0000 1.3 +++ slapi_counter.c 29 Oct 2008 19:16:29 -0000 1.4 @@ -52,6 +52,24 @@ #include #endif #endif + +#if defined LINUX && (defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH) +/* On systems that don't have the 64-bit GCC atomic builtins, we need to + * implement our own atomic functions using inline assembly code. */ +static PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval); +static PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval); +#endif + +#if defined LINUX && !HAVE_DECL___SYNC_ADD_AND_FETCH +/* Systems that have the atomic builtins defined, but don't have + * implementations for 64-bit values will automatically try to + * call the __sync_*_8 versions we provide. If the atomic builtins + * are not defined at all, we define them here to use our local + * functions. */ +#define __sync_add_and_fetch __sync_add_and_fetch_8 +#define __sync_sub_and_fetch __sync_sub_and_fetch_8 +#endif + /* * Counter Structure */ @@ -271,12 +289,49 @@ return newvalue; #else #ifdef LINUX +/* Use our own inline assembly for an atomic set if + * the builtins aren't available. */ +#if defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH + /* + * %0 = counter->value + * %1 = newvalue + */ + __asm__ __volatile__( +#ifdef CPU_x86 + /* Save the PIC register */ + " pushl %%ebx;" +#endif /* CPU_x86 */ + /* Put value of counter->value in EDX:EAX */ + "retryset: movl %0, %%eax;" + " movl 4%0, %%edx;" + /* Put newval in ECX:EBX */ + " movl %1, %%ebx;" + " movl 4%1, %%ecx;" + /* If EDX:EAX and counter-> are the same, + * replace *ptr with ECX:EBX */ + " lock; cmpxchg8b %0;" + " jnz retryset;" +#ifdef CPU_x86 + /* Restore the PIC register */ + " popl %%ebx" +#endif /* CPU_x86 */ + : "+o" (counter->value) + : "m" (newvalue) +#ifdef CPU_x86 + : "memory", "eax", "ecx", "edx", "cc"); +#else + : "memory", "eax", "ebx", "ecx", "edx", "cc"); +#endif + + return newvalue; +#else while (1) { value = counter->value; if (__sync_bool_compare_and_swap(&(counter->value), value, newvalue)) { return newvalue; } } +#endif /* CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH */ #elif defined(SOLARIS) _sparcv9_AtomicSet(&(counter->value), newvalue); return newvalue; @@ -310,12 +365,50 @@ slapi_unlock_mutex(counter->lock); #else #ifdef LINUX +/* Use our own inline assembly for an atomic get if + * the builtins aren't available. */ +#if defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH + /* + * %0 = counter->value + * %1 = value + */ + __asm__ __volatile__( +#ifdef CPU_x86 + /* Save the PIC register */ + " pushl %%ebx;" +#endif /* CPU_x86 */ + /* Put value of counter->value in EDX:EAX */ + "retryget: movl %0, %%eax;" + " movl 4%0, %%edx;" + /* Copy EDX:EAX to ECX:EBX */ + " movl %%eax, %%ebx;" + " movl %%edx, %%ecx;" + /* If EDX:EAX and counter->value are the same, + * replace *ptr with ECX:EBX */ + " lock; cmpxchg8b %0;" + " jnz retryget;" + /* Put retreived value into value */ + " movl %%ebx, %1;" + " movl %%ecx, 4%1;" +#ifdef CPU_x86 + /* Restore the PIC register */ + " popl %%ebx" +#endif /* CPU_x86 */ + : "+o" (counter->value), "=m" (value) + : +#ifdef CPU_x86 + : "memory", "eax", "ecx", "edx", "cc"); +#else + : "memory", "eax", "ebx", "ecx", "edx", "cc"); +#endif +#else while (1) { value = counter->value; if (__sync_bool_compare_and_swap(&(counter->value), value, value)) { break; } } +#endif /* CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH */ #elif defined(SOLARIS) while (1) { value = counter->value; @@ -334,3 +427,96 @@ return value; } + +#if defined LINUX && (defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH) +/* On systems that don't have the 64-bit GCC atomic builtins, we need to + * implement our own atomic add and subtract functions using inline + * assembly code. */ +static PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval) +{ + PRUint64 retval = 0; + + /* + * %0 = *ptr + * %1 = retval + * %2 = addval + */ + __asm__ __volatile__( +#ifdef CPU_x86 + /* Save the PIC register */ + " pushl %%ebx;" +#endif /* CPU_x86 */ + /* Put value of *ptr in EDX:EAX */ + "retryadd: movl %0, %%eax;" + " movl 4%0, %%edx;" + /* Put addval in ECX:EBX */ + " movl %2, %%ebx;" + " movl 4%2, %%ecx;" + /* Add value from EDX:EAX to value in ECX:EBX */ + " addl %%eax, %%ebx;" + " adcl %%edx, %%ecx;" + /* If EDX:EAX and *ptr are the same, replace ptr with ECX:EBX */ + " lock; cmpxchg8b %0;" + " jnz retryadd;" + /* Put new value into retval */ + " movl %%ebx, %1;" + " movl %%ecx, 4%1;" +#ifdef CPU_x86 + /* Restore the PIC register */ + " popl %%ebx" +#endif /* CPU_x86 */ + : "+o" (*ptr), "=m" (retval) + : "m" (addval) +#ifdef CPU_x86 + : "memory", "eax", "ecx", "edx", "cc"); +#else + : "memory", "eax", "ebx", "ecx", "edx", "cc"); +#endif + + return retval; +} + +static PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval) +{ + PRUint64 retval = 0; + + /* + * %0 = *ptr + * %1 = retval + * %2 = subval + */ + __asm__ __volatile__( +#ifdef CPU_x86 + /* Save the PIC register */ + " pushl %%ebx;" +#endif /* CPU_x86 */ + /* Put value of *ptr in EDX:EAX */ + "retrysub: movl %0, %%eax;" + " movl 4%0, %%edx;" + /* Copy EDX:EAX to ECX:EBX */ + " movl %%eax, %%ebx;" + " movl %%edx, %%ecx;" + /* Subtract subval from value in ECX:EBX */ + " subl %2, %%ebx;" + " sbbl 4%2, %%ecx;" + /* If EDX:EAX and ptr are the same, replace *ptr with ECX:EBX */ + " lock; cmpxchg8b %0;" + " jnz retrysub;" + /* Put new value into retval */ + " movl %%ebx, %1;" + " movl %%ecx, 4%1;" +#ifdef CPU_x86 + /* Restore the PIC register */ + " popl %%ebx" +#endif /* CPU_x86 */ + : "+o" (*ptr), "=m" (retval) + : "m" (subval) +#ifdef CPU_x86 + : "memory", "eax", "ecx", "edx", "cc"); +#else + : "memory", "eax", "ebx", "ecx", "edx", "cc"); +#endif + + return retval; +} +#endif /* LINUX && (defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH) */ From nkinder at fedoraproject.org Wed Oct 29 19:16:32 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Wed, 29 Oct 2008 19:16:32 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver config.h.in, 1.24, 1.25 configure, 1.96, 1.97 configure.ac, 1.55, 1.56 Message-ID: <20081029191632.389157013A@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27022 Modified Files: config.h.in configure configure.ac Log Message: Resolves: 207457 Summary: Added 64-bit atomic functions for platforms lacking built-ins. Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- config.h.in 24 Oct 2008 22:36:57 -0000 1.24 +++ config.h.in 29 Oct 2008 19:16:29 -0000 1.25 @@ -15,6 +15,12 @@ /* cpu type sparc */ #undef CPU_sparc +/* cpu type x86 */ +#undef CPU_x86 + +/* cpu type x86_64 */ +#undef CPU_x86_64 + /* enable ldapi auto bind support in the server */ #undef ENABLE_AUTOBIND @@ -43,6 +49,10 @@ don't. */ #undef HAVE_DECL_STRERROR_R +/* Define to 1 if you have the declaration of `__sync_add_and_fetch', and to 0 + if you don't. */ +#undef HAVE_DECL___SYNC_ADD_AND_FETCH + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- configure 24 Oct 2008 22:36:57 -0000 1.96 +++ configure 29 Oct 2008 19:16:29 -0000 1.97 @@ -23358,7 +23358,7 @@ # those with our 64 bit compiled product. perlexec='/usr/bin/env perl' case $host in - *-*-linux*) + i*86-*-linux*) cat >>confdefs.h <<\_ACEOF #define XP_UNIX 1 @@ -23391,6 +23391,133 @@ cat >>confdefs.h <<\_ACEOF +#define CPU_x86 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ATOMIC_64BIT_OPERATIONS 1 +_ACEOF + + echo "$as_me:$LINENO: checking whether __sync_add_and_fetch is declared" >&5 +echo $ECHO_N "checking whether __sync_add_and_fetch is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl___sync_add_and_fetch+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __sync_add_and_fetch + char *p = (char *) __sync_add_and_fetch; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl___sync_add_and_fetch=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl___sync_add_and_fetch=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl___sync_add_and_fetch" >&5 +echo "${ECHO_T}$ac_cv_have_decl___sync_add_and_fetch" >&6 +if test $ac_cv_have_decl___sync_add_and_fetch = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___SYNC_ADD_AND_FETCH 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___SYNC_ADD_AND_FETCH 0 +_ACEOF + + +fi + + + platform="linux" + # relative to sysconfdir + initdir=/rc.d/init.d + ;; + x86_64-*-linux*) + +cat >>confdefs.h <<\_ACEOF +#define XP_UNIX 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define Linux 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LINUX 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LINUX2_0 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LINUX2_2 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LINUX2_4 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define CPU_x86_64 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF @@ -23399,6 +23526,78 @@ #define ATOMIC_64BIT_OPERATIONS 1 _ACEOF + echo "$as_me:$LINENO: checking whether __sync_add_and_fetch is declared" >&5 +echo $ECHO_N "checking whether __sync_add_and_fetch is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl___sync_add_and_fetch+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __sync_add_and_fetch + char *p = (char *) __sync_add_and_fetch; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl___sync_add_and_fetch=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl___sync_add_and_fetch=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl___sync_add_and_fetch" >&5 +echo "${ECHO_T}$ac_cv_have_decl___sync_add_and_fetch" >&6 +if test $ac_cv_have_decl___sync_add_and_fetch = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___SYNC_ADD_AND_FETCH 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___SYNC_ADD_AND_FETCH 0 +_ACEOF + + +fi + + platform="linux" # relative to sysconfdir initdir=/rc.d/init.d Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- configure.ac 24 Oct 2008 22:36:58 -0000 1.55 +++ configure.ac 29 Oct 2008 19:16:29 -0000 1.56 @@ -294,15 +294,32 @@ # those with our 64 bit compiled product. perlexec='/usr/bin/env perl' case $host in - *-*-linux*) + i*86-*-linux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) AC_DEFINE([Linux], [1], [Linux]) AC_DEFINE([LINUX], [1], [Linux]) AC_DEFINE([LINUX2_0], [1], [Linux 2.0]) AC_DEFINE([LINUX2_2], [1], [Linux 2.2]) AC_DEFINE([LINUX2_4], [1], [Linux 2.4]) + AC_DEFINE([CPU_x86], [], [cpu type x86]) AC_DEFINE([_GNU_SOURCE], [1], [GNU Source]) AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) + AC_CHECK_DECLS([__sync_add_and_fetch]) + platform="linux" + # relative to sysconfdir + initdir=/rc.d/init.d + ;; + x86_64-*-linux*) + AC_DEFINE([XP_UNIX], [1], [UNIX]) + AC_DEFINE([Linux], [1], [Linux]) + AC_DEFINE([LINUX], [1], [Linux]) + AC_DEFINE([LINUX2_0], [1], [Linux 2.0]) + AC_DEFINE([LINUX2_2], [1], [Linux 2.2]) + AC_DEFINE([LINUX2_4], [1], [Linux 2.4]) + AC_DEFINE([CPU_x86_64], [], [cpu type x86_64]) + AC_DEFINE([_GNU_SOURCE], [1], [GNU Source]) + AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter]) + AC_CHECK_DECLS([__sync_add_and_fetch]) platform="linux" # relative to sysconfdir initdir=/rc.d/init.d From nkinder at fedoraproject.org Thu Oct 30 19:06:57 2008 From: nkinder at fedoraproject.org (Nathan Kinder) Date: Thu, 30 Oct 2008 19:06:57 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi_counter.c, 1.4, 1.5 Message-ID: <20081030190657.ED34770134@cvs1.fedora.phx.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18274/ldap/servers/slapd Modified Files: slapi_counter.c Log Message: Resolves: 207457 Summary: Removed static specifier from __sync_*_8 atomic functions. Index: slapi_counter.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi_counter.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- slapi_counter.c 29 Oct 2008 19:16:29 -0000 1.4 +++ slapi_counter.c 30 Oct 2008 19:06:55 -0000 1.5 @@ -56,8 +56,8 @@ #if defined LINUX && (defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH) /* On systems that don't have the 64-bit GCC atomic builtins, we need to * implement our own atomic functions using inline assembly code. */ -static PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval); -static PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval); +PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval); +PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval); #endif #if defined LINUX && !HAVE_DECL___SYNC_ADD_AND_FETCH @@ -432,7 +432,7 @@ /* On systems that don't have the 64-bit GCC atomic builtins, we need to * implement our own atomic add and subtract functions using inline * assembly code. */ -static PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval) +PRUint64 __sync_add_and_fetch_8(PRUint64 *ptr, PRUint64 addval) { PRUint64 retval = 0; @@ -476,7 +476,7 @@ return retval; } -static PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval) +PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval) { PRUint64 retval = 0; From nhosoi at fedoraproject.org Fri Oct 31 00:16:05 2008 From: nhosoi at fedoraproject.org (Noriko Hosoi) Date: Fri, 31 Oct 2008 00:16:05 +0000 (UTC) Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acllas.c, 1.11, 1.12 Message-ID: <20081031001605.536F27013A@cvs1.fedora.phx.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26759 Modified Files: acllas.c Log Message: Resolves: #469243 Summary: ACL: support group filter Description: extended userattr #GROUPDN value to support LDAPURL Index: acllas.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- acllas.c 24 Oct 2007 18:41:15 -0000 1.11 +++ acllas.c 31 Oct 2008 00:16:02 -0000 1.12 @@ -2355,36 +2355,90 @@ Slapi_Attr *attr; char *s, *p; - char *str, *s_str, *base, *groupattr; + char *str, *s_str, *base, *groupattr = NULL; int i,j,k,matched, enumerate_groups; aclUserGroup *u_group; char ebuf [ BUFSIZ ]; Slapi_Value *sval=NULL; const struct berval *attrVal; - - /* Parse the URL -- We can't use the ldap_url_parse() - ** we don't follow thw complete url naming scheme - */ + int qcnt = 0; + Slapi_PBlock *myPb = NULL; + Slapi_Entry **grpentries = NULL; + + /* Parse the URL -- getting the group attr and counting up '?'s. + * If there is no group attr and there are 3 '?' marks, + * we parse the URL with ldap_url_parse to get base dn and filter. + */ s_str = str = slapi_ch_strdup(attrName); while (str && ldap_utf8isspace(str)) LDAP_UTF8INC( str ); str +=8; s = strchr (str, '?'); if (s) { + qcnt++; p = s; p++; *s = '\0'; base = str; s = strchr (p, '?'); - if (s) *s = '\0'; + if (s) { + qcnt++; + *s = '\0'; + if (NULL != strchr (++s, '?')) { + qcnt++; + } + } groupattr = p; } else { slapi_ch_free ( (void **)&s_str ); return ACL_FALSE; } + + /* Full LDAPURL is given? */ + if ((NULL == groupattr || 0 == strlen(groupattr)) && 3 == qcnt) { + LDAPURLDesc *ludp = NULL; + int rval; + + if ( 0 != ldap_url_parse( attrName, &ludp) ) { + slapi_ch_free ( (void **)&s_str ); + return ACL_FALSE; + } + + /* Use new search internal API */ + myPb = slapi_pblock_new (); + slapi_search_internal_set_pb( + myPb, + ludp->lud_dn, + ludp->lud_scope, + ludp->lud_filter, + NULL, + 0, + NULL /* controls */, + NULL /* uniqueid */, + aclplugin_get_identity (ACL_PLUGIN_IDENTITY), + 0 ); + slapi_search_internal_pb(myPb); + ldap_free_urldesc( ludp ); + + slapi_pblock_get(myPb, SLAPI_PLUGIN_INTOP_RESULT, &rval); + if (rval != LDAP_SUCCESS) { + slapi_ch_free ( (void **)&s_str ); + slapi_free_search_results_internal(myPb); + slapi_pblock_destroy (myPb); + return ACL_FALSE; + } + slapi_pblock_get(myPb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &grpentries); + if ((grpentries == NULL) || (grpentries[0] == NULL)) { + slapi_ch_free ( (void **)&s_str ); + slapi_free_search_results_internal(myPb); + slapi_pblock_destroy (myPb); + return ACL_FALSE; + } + } + if ( (u_group = aclg_get_usersGroup ( aclpb , n_clientdn )) == NULL) { - slapi_log_error( SLAPI_LOG_ACL, plugin_name, + slapi_log_error( SLAPI_LOG_ACL, plugin_name, "Failed to find/allocate a usergroup--aborting evaluation\n", 0, 0); slapi_ch_free ( (void **)&s_str ); return(ACL_DONT_KNOW); @@ -2540,12 +2594,28 @@ j, ACL_ESCAPE_STRING_WITH_PUNCTUATION (u_group->aclug_member_groups[j], ebuf),0); matched = ACL_FALSE; - slapi_entry_attr_find( e, groupattr, &attr); - if (attr == NULL) { - slapi_ch_free ( (void **)&s_str ); - return ACL_FALSE; - } - { + if ((NULL == groupattr || 0 == strlen(groupattr)) && 3 == qcnt) { + /* Full LDAPURL case */ + for (k = 0; u_group->aclug_member_groups[k]; k++) { /* groups the bind + user belong to */ + Slapi_Entry **ep; + for (ep = grpentries; *ep; ep++) { /* groups having ACI */ + char *n_edn = slapi_entry_get_ndn(*ep); + if (slapi_utf8casecmp((ACLUCHP)u_group->aclug_member_groups[k], + (ACLUCHP)n_edn) == 0) { + matched = ACL_TRUE; + break; + } + } + } + slapi_free_search_results_internal(myPb); + slapi_pblock_destroy(myPb); + } else { + slapi_entry_attr_find( e, groupattr, &attr); + if (attr == NULL) { + slapi_ch_free ( (void **)&s_str ); + return ACL_FALSE; + } k = slapi_attr_first_value ( attr,&sval ); while ( k != -1 ) { char *n_attrval;