From: <pk...@us...> - 2007-12-31 00:00:40
|
Revision: 993 http://conky.svn.sourceforge.net/conky/?rev=993&view=rev Author: pkovacs Date: 2007-12-30 16:00:35 -0800 (Sun, 30 Dec 2007) Log Message: ----------- applied submitted patches for get_ibm_acpi_volume bug, realtime clock bug and kFreeBSD support (thanks KPH). Modified Paths: -------------- trunk/conky1/AUTHORS trunk/conky1/ChangeLog trunk/conky1/configure.ac.in trunk/conky1/src/conky.c trunk/conky1/src/conky.h trunk/conky1/src/freebsd.c trunk/conky1/src/linux.c trunk/conky1/src/timed_thread.c Modified: trunk/conky1/AUTHORS =================================================================== --- trunk/conky1/AUTHORS 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/AUTHORS 2007-12-31 00:00:35 UTC (rev 993) @@ -143,8 +143,10 @@ Some cleaning and commenting apparently :) SIGHUP config file reload -Kapil Hari Paranjape +Kapil Hari Paranjape <ka...@im...> ibm_volume patch + kFreeBSD support patch + realtime clock patck killfire fs_used_perc and fs_bar_free patch Modified: trunk/conky1/ChangeLog =================================================================== --- trunk/conky1/ChangeLog 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/ChangeLog 2007-12-31 00:00:35 UTC (rev 993) @@ -1,5 +1,12 @@ # $Id$ +2007-12-31 + * Applied submitted patches: + 1) to suport Debian's kFreeBSD; + 2) to use realtime clock in timed threads and + 3) to fix get_ibm_acpi_volume zero value bug + (thanks Kapil Hari Paranjape). + 2007-11-22 * Conky 1.4.9 released. Modified: trunk/conky1/configure.ac.in =================================================================== --- trunk/conky1/configure.ac.in 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/configure.ac.in 2007-12-31 00:00:35 UTC (rev 993) @@ -2,9 +2,9 @@ dnl major, minor and micro version macros. m4_define([conky_version_major], [1]) -m4_define([conky_version_minor], [4]) -m4_define([conky_version_micro], [9]) -m4_define([conky_version_tag], []) dnl [] for releases +m4_define([conky_version_minor], [5]) +m4_define([conky_version_micro], [0]) +m4_define([conky_version_tag], [svn]) dnl [] for releases m4_define([conky_version_revision],[r@REVISION@]) m4_define([conky_version], [conky_version_major().conky_version_minor().conky_version_micro()ifelse( @@ -51,7 +51,7 @@ Linux*) WANT_SYSINFO=yes ;; - FreeBSD*) + FreeBSD*|GNU/kFreeBSD*) WANT_KVM=yes WANT_DEVSTAT=yes ;; @@ -79,7 +79,7 @@ AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux) #AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS) -AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD) +AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD -o x$uname = xGNU/kFreeBSD) #AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD) AM_CONDITIONAL(BUILD_OPENBSD, test x$uname = xOpenBSD) Modified: trunk/conky1/src/conky.c =================================================================== --- trunk/conky1/src/conky.c 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/src/conky.c 2007-12-31 00:00:35 UTC (rev 993) @@ -1058,7 +1058,7 @@ OBJ_pop3, OBJ_pop3_unseen, OBJ_pop3_used, -#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) OBJ_apm_adapter, OBJ_apm_battery_time, OBJ_apm_battery_life, @@ -3122,7 +3122,7 @@ #ifndef __OpenBSD__ OBJ(adt746xcpu, 0) END OBJ(adt746xfan, 0) END #endif /* !__OpenBSD__ */ -#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) OBJ(apm_adapter, 0) END OBJ(apm_battery_life, 0) END OBJ(apm_battery_time, 0) END @@ -4966,7 +4966,7 @@ format_seconds(p, p_max_size, (int) cur->uptime); } -#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) OBJ(apm_adapter) { char *msg; msg = get_apm_adapter(); @@ -7773,7 +7773,7 @@ optind = 0; #endif -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open")) == NULL) CRIT_ERR( "cannot read kvm"); @@ -7935,7 +7935,7 @@ */ main_loop(); -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) kvm_close(kd); #endif Modified: trunk/conky1/src/conky.h =================================================================== --- trunk/conky1/src/conky.h 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/src/conky.h 2007-12-31 00:00:35 UTC (rev 993) @@ -41,14 +41,14 @@ #include <langinfo.h> #include <wchar.h> #include <sys/param.h> -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include <sys/mount.h> #include <sys/ucred.h> #include <fcntl.h> #include <kvm.h> #endif /* __FreeBSD__ */ -#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__)) #include <machine/apm_bios.h> #endif /* __FreeBSD__ */ @@ -613,11 +613,11 @@ void update_mail_count(); /* in freebsd.c */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) kvm_t *kd; #endif -#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__)) #ifdef __OpenBSD__ typedef struct apm_power_info *apm_info_t; #endif Modified: trunk/conky1/src/freebsd.c =================================================================== --- trunk/conky1/src/freebsd.c 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/src/freebsd.c 2007-12-31 00:00:35 UTC (rev 993) @@ -270,7 +270,7 @@ p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes); for (i = 0; i < n_processes; i++) { -#if __FreeBSD__ < 5 +#if (__FreeBSD__ < 5) && (__FreeBSD_kernel__ < 5) if (p[i].kp_proc.p_stat == SRUN) #else if (p[i].ki_stat == SRUN) Modified: trunk/conky1/src/linux.c =================================================================== --- trunk/conky1/src/linux.c 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/src/linux.c 2007-12-31 00:00:35 UTC (rev 993) @@ -1925,7 +1925,6 @@ vol = read_vol; continue; } - if (sscanf(line, "level: %d", &vol)) continue; if (sscanf(line, "mute: %s", mute)) break; } } Modified: trunk/conky1/src/timed_thread.c =================================================================== --- trunk/conky1/src/timed_thread.c 2007-11-22 20:22:11 UTC (rev 992) +++ trunk/conky1/src/timed_thread.c 2007-12-31 00:00:35 UTC (rev 993) @@ -22,6 +22,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <pthread.h> #include <assert.h> #include <errno.h> @@ -67,7 +71,7 @@ return (-1); #ifdef HAVE_CLOCK_GETTIME - return clock_gettime (CLOCK_REALTIME, &abstime); + return clock_gettime (CLOCK_REALTIME, abstime); #else /* fallback to gettimeofday () */ struct timeval tv; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |