From owner-freebsd-questions@FreeBSD.ORG Sat Jan 17 01:58:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE51016A4CE for ; Sat, 17 Jan 2004 01:58:28 -0800 (PST) Received: from smtp.hispeed.ch (mxout.hispeed.ch [62.2.95.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D0A43D5F for ; Sat, 17 Jan 2004 01:58:25 -0800 (PST) (envelope-from hampi@rootshell.be) Received: from gicco.homeip.net (80-218-76-109.dclient.hispeed.ch [80.218.76.109])i0H9wNwa021391 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 17 Jan 2004 10:58:24 +0100 Received: from localhost.here (idefix@gicco.homeip.net [127.0.0.1]) by gicco.homeip.net (8.12.8p2/8.12.8) with ESMTP id i0H9wMpq000805 for ; Sat, 17 Jan 2004 10:58:23 +0100 (CET) (envelope-from hampi@rootshell.be) Received: (from idefix@localhost) by localhost.here (8.12.8p2/8.12.8/Submit) id i0H9wMiU000804 for freebsd-questions@freebsd.org; Sat, 17 Jan 2004 10:58:22 +0100 (CET) X-Authentication-Warning: localhost.here: idefix set sender to hampi@rootshell.be using -f Date: Sat, 17 Jan 2004 10:58:22 +0100 From: Hanspeter Roth To: freebsd-questions@freebsd.org Message-ID: <20040117095822.GA469@gicco.homeip.net> Mail-Followup-To: freebsd-questions@freebsd.org References: <20040116185112.GA3424@gicco.homeip.net> <200401170029.01307.freebsd-questions@webteckies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401170029.01307.freebsd-questions@webteckies.org> User-Agent: Mutt/1.4.1i Subject: Re: configure/autoconf is missing getloadavg on 5.2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2004 09:58:28 -0000 On Jan 17 at 00:29, Melvyn Sopacua spoke: > On Friday 16 January 2004 19:51, Hanspeter Roth wrote: > > > in icewm-1.2.14pre8 configure on FreeBSD 5.2 claims that > > getloadavg() be not available: > > > > > > configure:6804: checking for getloadavg > > configure:6847: gcc -o conftest -fpermissive -Wall -Wpointer-arith > > -Wconversion -Wwrite-strings -Winline -Woverloaded-virtual -W > > -fno-exceptions -fno-rtti -I/usr/local/include -I/usr/local/include > > -L/usr/local/lib conftest.cc >&5 configure:6819: error: declaration of C > > function `char getloadavg()' conflicts with > > /usr/include/stdlib.h:258: error: previous declaration `int > > getloadavg(double*, int)' here > > [...] > > > > However when trying a tiny configure.in getloadavg() is found: > > > > AC_INIT(configure.in) > > AC_PREREQ([2.50]) > > Insert here: > > AC_LANG(C++) > > > AC_CHECK_FUNCS(failed getloadavg sysctlbyname) > > AC_OUTPUT(Makefile) > > Then try again. > I think this is the gcc 3.x compiler getting stricter about types (char and > int conflict, but gcc 2.9x which is in -STABLE doesn't care). Yes AC_LANG(C++) makes the difference. After inserting this getloadavg() is no more found. The same result is achieved with AC_LANG_CPLUSPLUS. So is getloadavg() useless in a gcc 3.x environment? Or else how does one check for/use getloadavg() with gcc 3.x? -Hanspeter