summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <unknown@redhat.com>2009-04-21 17:22:34 +0000
committerunknown <unknown@redhat.com>2009-04-21 17:22:34 +0000
commitd1777690e9f7bbba14f5c77ef0b21cf2da539a91 (patch)
tree7899f089a095515250da18d15969533347fb7b2a
parentd826a46b4825ae9e31eca6f8798ea2eefc832d90 (diff)
parentdae349b7ede0239668fc05899c5f98bfc32b0c62 (diff)
downloadds-d1777690e9f7bbba14f5c77ef0b21cf2da539a91.tar.gz
ds-d1777690e9f7bbba14f5c77ef0b21cf2da539a91.tar.xz
ds-d1777690e9f7bbba14f5c77ef0b21cf2da539a91.zip
This commit was manufactured by cvs2git to create tagFedoraDirSvr_1_2_0_RC1
'FedoraDirSvr_1_2_0_RC1'.
-rwxr-xr-xconfigure63
-rw-r--r--configure.ac33
-rw-r--r--ldap/servers/slapd/log.c36
-rw-r--r--ldap/servers/slapd/slapi_counter.c5
-rw-r--r--ldap/servers/snmp/main.c6
-rw-r--r--wrappers/initscript.in1
6 files changed, 77 insertions, 67 deletions
diff --git a/configure b/configure
index c4209b18..099f5285 100755
--- a/configure
+++ b/configure
@@ -23381,7 +23381,7 @@ initdir=/rc.d
# 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
@@ -23414,18 +23414,12 @@ _ACEOF
cat >>confdefs.h <<\_ACEOF
-#define _GNU_SOURCE 1
+#define CPU_x86
_ACEOF
- platform="linux"
- # relative to sysconfdir
- initdir=/rc.d/init.d
- # do arch specific linux stuff here
- case $host in
- i*86-*-linux*)
cat >>confdefs.h <<\_ACEOF
-#define CPU_x86
+#define _GNU_SOURCE 1
_ACEOF
@@ -23433,7 +23427,7 @@ cat >>confdefs.h <<\_ACEOF
#define ATOMIC_64BIT_OPERATIONS 1
_ACEOF
- echo "$as_me:$LINENO: checking whether __sync_add_and_fetch is declared" >&5
+ 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
@@ -23505,8 +23499,41 @@ _ACEOF
fi
- ;;
- x86_64-*-linux*)
+ 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
@@ -23514,10 +23541,15 @@ _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 "$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
@@ -23589,8 +23621,9 @@ _ACEOF
fi
- ;;
- esac
+ platform="linux"
+ # relative to sysconfdir
+ initdir=/rc.d/init.d
;;
ia64-hp-hpux*)
diff --git a/configure.ac b/configure.ac
index 96261729..17b400ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,30 +296,35 @@ initdir=/rc.d
# 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
- # do arch specific linux stuff here
- case $host in
- i*86-*-linux*)
- AC_DEFINE([CPU_x86], [], [cpu type x86])
- AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
- AC_CHECK_DECLS([__sync_add_and_fetch])
- ;;
- x86_64-*-linux*)
- AC_DEFINE([CPU_x86_64], [], [cpu type x86_64])
- AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
- AC_CHECK_DECLS([__sync_add_and_fetch])
- ;;
- esac
;;
ia64-hp-hpux*)
AC_DEFINE([XP_UNIX], [1], [UNIX])
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index 7241129f..cb23748c 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -124,7 +124,6 @@ static int log__audit_rotationinfof(char *pathname);
static int log__extract_logheader (FILE *fp, long *f_ctime, PRInt64 *f_size);
static int log__check_prevlogs (FILE *fp, char *filename);
static PRInt64 log__getfilesize(LOGFD fp);
-static PRInt64 log__getfilesize_with_filename(char *filename);
static int log__enough_freespace(char *path);
static int vslapd_log_error(LOGFD fp, char *subsystem, char *fmt, va_list ap, int locked );
@@ -2516,8 +2515,6 @@ log__fix_rotationinfof(char *pathname)
int log_type_id;
int rval = LOG_ERROR;
char *p;
- char *rotated_log = NULL;
- int rotated_log_len = 0;
/* rotation info file is broken; can't trust the contents */
time (&now);
@@ -2560,10 +2557,6 @@ log__fix_rotationinfof(char *pathname)
loginfo.log_audit_logchain = NULL;
break;
}
- /* length of (pathname + .YYYYMMDD-hhmmss)
- * pathname includes ".rotationinfo", but that's fine. */
- rotated_log_len = strlen(pathname) + 17;
- rotated_log = (char *)slapi_ch_malloc(rotated_log_len);
/* read the directory entries into a linked list */
for (dirent = PR_ReadDir(dirptr, dirflags); dirent ;
dirent = PR_ReadDir(dirptr, dirflags)) {
@@ -2596,24 +2589,21 @@ log__fix_rotationinfof(char *pathname)
logp = (struct logfileinfo *) slapi_ch_malloc (sizeof (struct logfileinfo));
logp->l_ctime = log_reverse_convert_time(p);
-
- PR_snprintf(rotated_log, rotated_log_len, "%s/%s",
- logsdir, dirent->name);
switch (log_type_id) {
case ERRORSLOG:
- logp->l_size = log__getfilesize_with_filename(rotated_log);
+ logp->l_size = loginfo.log_error_maxlogsize; /* dummy */
logp->l_next = loginfo.log_error_logchain;
loginfo.log_error_logchain = logp;
loginfo.log_numof_error_logs++;
break;
case ACCESSLOG:
- logp->l_size = log__getfilesize_with_filename(rotated_log);
+ logp->l_size = loginfo.log_access_maxlogsize;
logp->l_next = loginfo.log_access_logchain;
loginfo.log_access_logchain = logp;
loginfo.log_numof_access_logs++;
break;
case AUDITLOG:
- logp->l_size = log__getfilesize_with_filename(rotated_log);
+ logp->l_size =loginfo.log_audit_maxlogsize;
logp->l_next = loginfo.log_audit_logchain;
loginfo.log_audit_logchain = logp;
loginfo.log_numof_audit_logs++;
@@ -2626,7 +2616,6 @@ done:
if (NULL != dirptr)
PR_CloseDir(dirptr);
slapi_ch_free_string(&logsdir);
- slapi_ch_free_string(&rotated_log);
return rval;
}
#undef ERRORSLOG
@@ -2901,23 +2890,12 @@ log__getfilesize(LOGFD fp)
static PRInt64
log__getfilesize(LOGFD fp)
{
- PRFileInfo64 info;
-
- if (PR_GetOpenFileInfo64 (fp, &info) == PR_FAILURE) {
- return -1;
- }
- return (PRInt64)info.size; /* type of size is PROffset64 */
-}
-
-static PRInt64
-log__getfilesize_with_filename(char *filename)
-{
- PRFileInfo64 info;
+ PRFileInfo info;
- if (PR_GetFileInfo64 ((const char *)filename, &info) == PR_FAILURE) {
+ if (PR_GetOpenFileInfo (fp, &info) == PR_FAILURE) {
return -1;
}
- return (PRInt64)info.size; /* type of size is PROffset64 */
+ return (PRInt64)info.size; /* type of size is off_t */
}
#endif
@@ -4077,7 +4055,7 @@ log_reverse_convert_time(char *tbuf)
} else {
return 0;
}
- tm.tm_isdst = -1;
+
return mktime(&tm);
}
diff --git a/ldap/servers/slapd/slapi_counter.c b/ldap/servers/slapd/slapi_counter.c
index 0f56c8ac..c9930d59 100644
--- a/ldap/servers/slapd/slapi_counter.c
+++ b/ldap/servers/slapd/slapi_counter.c
@@ -53,7 +53,6 @@ PRUint64 _sparcv9_AtomicSub_il(PRUint64 *address, PRUint64 val);
#endif
#endif
-#ifdef ATOMIC_64BIT_OPERATIONS
#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. */
@@ -70,8 +69,6 @@ PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval);
#define __sync_add_and_fetch __sync_add_and_fetch_8
#define __sync_sub_and_fetch __sync_sub_and_fetch_8
#endif
-#endif /* ATOMIC_64BIT_OPERATIONS */
-
/*
* Counter Structure
@@ -431,7 +428,6 @@ PRUint64 slapi_counter_get_value(Slapi_Counter *counter)
return value;
}
-#ifdef ATOMIC_64BIT_OPERATIONS
#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
@@ -524,4 +520,3 @@ PRUint64 __sync_sub_and_fetch_8(PRUint64 *ptr, PRUint64 subval)
return retval;
}
#endif /* LINUX && (defined CPU_x86 || !HAVE_DECL___SYNC_ADD_AND_FETCH) */
-#endif /* ATOMIC_64BIT_OPERATIONS */
diff --git a/ldap/servers/snmp/main.c b/ldap/servers/snmp/main.c
index 89732faf..4e249f53 100644
--- a/ldap/servers/snmp/main.c
+++ b/ldap/servers/snmp/main.c
@@ -357,10 +357,10 @@ load_config(char *conf_path)
}
/* set the semaphore name */
- /* "/" + ".stats" + \0 = 8 */
- serv_p->stats_sem_name = malloc(strlen(p) + 8);
+ /* ".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) + 8, "/%s.stats", p);
+ snprintf(serv_p->stats_sem_name, strlen(p) + 7, "%s.stats", p);
} else {
printf("ldap-agent: malloc error processing config file\n");
error = 1;
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 9a7835c0..9223ebac 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -312,7 +312,6 @@ status() {
ret=3
fi
done
- exit $ret
}