From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#11905: Unnecessary '#define unix' in src/s/aix4-2.h Date: Tue, 10 Jul 2012 16:52:23 -0700 Organization: UCLA Computer Science Department Message-ID: <4FFCC037.3050801__35944.3891597495$1341964371$gmane$org@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341964370 30994 80.91.229.3 (10 Jul 2012 23:52:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2012 23:52:50 +0000 (UTC) Cc: bug-gnulib , 11905@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 11 01:52:49 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SokEY-00056i-8i for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Jul 2012 01:52:46 +0200 Original-Received: from localhost ([::1]:51835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SokEX-0005CE-DH for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Jul 2012 19:52:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SokET-0005BY-Fu for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2012 19:52:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SokER-0003Lr-K1 for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2012 19:52:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SokER-0003Ll-GL for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2012 19:52:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SokJd-000505-Vd for bug-gnu-emacs@gnu.org; Tue, 10 Jul 2012 19:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Jul 2012 23:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11905 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11905-submit@debbugs.gnu.org id=B11905.134196467019204 (code B ref 11905); Tue, 10 Jul 2012 23:58:01 +0000 Original-Received: (at 11905) by debbugs.gnu.org; 10 Jul 2012 23:57:50 +0000 Original-Received: from localhost ([127.0.0.1]:60929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SokJS-0004zg-DA for submit@debbugs.gnu.org; Tue, 10 Jul 2012 19:57:50 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52017) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SokJQ-0004zZ-3J for 11905@debbugs.gnu.org; Tue, 10 Jul 2012 19:57:49 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 792D8A60001; Tue, 10 Jul 2012 16:52:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SpBEjxaRz53Z; Tue, 10 Jul 2012 16:52:22 -0700 (PDT) Original-Received: from [192.168.1.4] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D871339E8007; Tue, 10 Jul 2012 16:52:22 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61804 Archived-At: On 07/10/2012 04:25 PM, Glenn Morris wrote: > I suspect that Gnulib already has the AIX > case covered (via "__unix"?), so that src/s/aix4-2.h no longer needs to > define "unix". Yes, that sounds right. I have started to fix this by installing the following patch into gnulib, and will propagate this into Emacs shortly. --- ChangeLog | 9 +++++++++ lib/getloadavg.c | 28 +++------------------------- m4/getloadavg.m4 | 2 ++ 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index d94f7b1..b27ef8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-07-10 Paul Eggert + + getloadavg: clean out old Emacs and Autoconf cruft + See Glenn Morris in . + * lib/getloadavg.c: Include , always. + Include if HAVE_SYS_PARAM_H, not if unix or __unix. + (LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook. + * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for . + 2012-07-10 Akim Demaille bootstrap: let warn be like tests/init.sh's warn_ diff --git a/lib/getloadavg.c b/lib/getloadavg.c index 79ea717..a8ffefe 100644 --- a/lib/getloadavg.c +++ b/lib/getloadavg.c @@ -80,45 +80,23 @@ We also #define LDAV_PRIVILEGED if a program will require special installation to be able to call getloadavg. */ -/* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems - with partially-configured source directories. */ - -#ifndef CONFIGURING_GETLOADAVG -# include -# include -#endif +#include /* Specification. */ #include #include +#include #include # include -/* Both the Emacs and non-Emacs sections want this. Some - configuration files' definitions for the LOAD_AVE_CVT macro (like - sparc.h's) use macros like FSCALE, defined here. */ -# if defined (unix) || defined (__unix) +# if HAVE_SYS_PARAM_H # include # endif # include "intprops.h" -/* The existing Emacs configuration files define a macro called - LOAD_AVE_CVT, which accepts a value of type LOAD_AVE_TYPE, and - returns the load average multiplied by 100. What we actually want - is a macro called LDAV_CVT, which returns the load average as an - unmultiplied double. - - For backwards compatibility, we'll define LDAV_CVT in terms of - LOAD_AVE_CVT, but future machine config files should just define - LDAV_CVT directly. */ - -# if !defined (LDAV_CVT) && defined (LOAD_AVE_CVT) -# define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) -# endif - # if !defined (BSD) && defined (ultrix) /* Ultrix behaves like BSD on Vaxen. */ # define BSD diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 029da44..7738d2f 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -105,6 +105,8 @@ AC_DEFUN([gl_PREREQ_GETLOADAVG], [ # Figure out what our getloadavg.c needs. +AC_CHECK_HEADERS_ONCE([sys/param.h]) + # On HPUX9, an unprivileged user can get load averages this way. if test $gl_func_getloadavg_done = no; then AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes]) -- 1.7.6.5