From 6b857758ebb5bc34c294ed42f9b85d96f7d2bd05 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Sat, 25 Mar 2006 14:28:40 +0000 Subject: [PATCH] - Minor change to ${top} stuff to fix a possible race condition (Petr Holub) - Make autogen.sh a little bit more configurable. Now it calls 'automake', 'autoconf' etc by default. To match your disto name conventions for autotools, you can run it like: "AUTOCONF=autoconf-2.59 AUTOMAKE=automake18 ./autogen.sh" git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@610 7f574dfc-610e-0410-a909-a81674777703 --- autogen.sh | 24 +++++++++++------------- src/freebsd.c | 4 ++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/autogen.sh b/autogen.sh index 18808bb8..3067c037 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,16 +1,14 @@ #!/bin/sh # $Id$ -if [ `uname -s` = FreeBSD ]; then - aclocal19 - libtoolize15 --force - autoheader259 - automake19 -a - autoconf259 -else - aclocal-1.9 - libtoolize --force - autoheader-2.59 - automake-1.9 -a - autoconf-2.59 -fi +AUTOCONF=${AUTOCONF:-autoconf} +AUTOMAKE=${AUTOMAKE:-automake} +ACLOCAL=${ACLOCAL:-aclocal} +AUTOHEADER=${AUTOHEADER:-autoheader} +LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} + +$ACLOCAL +$LIBTOOLIZE --force +$AUTOHEADER +$AUTOMAKE -a +$AUTOCONF diff --git a/src/freebsd.c b/src/freebsd.c index 8786af8f..5265065c 100644 --- a/src/freebsd.c +++ b/src/freebsd.c @@ -612,11 +612,11 @@ proc_find_top(struct process **cpu, struct process **mem) tmp->name = strdup(processes[i].name); ttmp = mem[i]; + mem[i] = tmp; if (ttmp != NULL) { free(ttmp->name); free(ttmp); } - mem[i] = tmp; } qsort(processes, j - 1, sizeof (struct process), comparecpu); @@ -630,11 +630,11 @@ proc_find_top(struct process **cpu, struct process **mem) tmp->name = strdup(processes[i].name); ttmp = cpu[i]; + cpu[i] = tmp; if (ttmp != NULL) { free(ttmp->name); free(ttmp); } - cpu[i] = tmp; } #if defined(FREEBSD_DEBUG)