From: octo Date: Sat, 8 Apr 2006 16:54:34 +0000 (+0000) Subject: `KERNEL_LINUX' and `KERNEL_SOLARIS' is now defined to `1' instead of , so... X-Git-Tag: collectd-3.8.6^2~64 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=256810b68f32879f279d8aef6ffae9135a766ce8;p=collectd.git `KERNEL_LINUX' and `KERNEL_SOLARIS' is now defined to `1' instead of , so it can be used as `#if KERNEL_LINUX' Unify the define-handling in processes.c --- diff --git a/configure.in b/configure.in index 0aeb0223..6a33174d 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(collectd, 3.9.0) +AC_INIT(collectd, 3.9.0-alpha1) AC_CONFIG_SRCDIR(src/collectd.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) @@ -255,6 +255,9 @@ AC_CHECK_FUNCS(statfs statvfs) # For load module AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"]) +# For the `processes' plugin +AC_CHECK_FUNCS(thread_info) + # For users module AC_CHECK_FUNCS(getutent getutxent) @@ -357,11 +360,11 @@ AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_b AC_MSG_CHECKING([for kernel type ($host_os)]) case $host_os in *linux*) - AC_DEFINE([KERNEL_LINUX], [], [True if program is to be compiled for a Linux kernel]) + AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel]) ac_system="Linux" ;; *solaris*) - AC_DEFINE([KERNEL_SOLARIS], [], [True if program is to be compiled for a Solaris kernel]) + AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel]) ac_system="Solaris" ;; *) diff --git a/src/processes.c b/src/processes.c index 22d8c045..8c8b702d 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1,6 +1,7 @@ /** * collectd - src/processes.c * Copyright (C) 2005 Lyonel Vincent + * Copyright (C) 2006 Florian Forster (Mach code) * * 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 @@ -69,7 +70,7 @@ #define MODULE_NAME "processes" -#if HAVE_THREAD_INFO || defined(KERNEL_LINUX) +#if HAVE_THREAD_INFO || KERNEL_LINUX # define PROCESSES_HAVE_READ 1 #else # define PROCESSES_HAVE_READ 0