From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: importing getloadavg from gnulib Date: Tue, 08 Feb 2011 01:28:34 -0800 Organization: UCLA Computer Science Department Message-ID: <4D510CC2.6080207@cs.ucla.edu> References: <4D50EF1F.60200@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297157347 10382 80.91.229.12 (8 Feb 2011 09:29:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2011 09:29:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 08 10:29:03 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pmjsd-0001tr-86 for ged-emacs-devel@m.gmane.org; Tue, 08 Feb 2011 10:29:03 +0100 Original-Received: from localhost ([127.0.0.1]:33964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pmjsc-00056p-J2 for ged-emacs-devel@m.gmane.org; Tue, 08 Feb 2011 04:29:02 -0500 Original-Received: from [140.186.70.92] (port=48412 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmjsM-00055y-98 for emacs-devel@gnu.org; Tue, 08 Feb 2011 04:28:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmjsL-0006vD-0W for emacs-devel@gnu.org; Tue, 08 Feb 2011 04:28:46 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:46813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmjsJ-0006uo-K7; Tue, 08 Feb 2011 04:28:43 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7930139E80F0; Tue, 8 Feb 2011 01:28:42 -0800 (PST) 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 iW-tMyMObRJo; Tue, 8 Feb 2011 01:28:42 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EF39039E80DB; Tue, 8 Feb 2011 01:28:41 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135736 Archived-At: On 02/08/2011 01:02 AM, Eli Zaretskii wrote: > However, this change in src/lisp.h: > >> -#ifndef HAVE_GETLOADAVG >> -/* Defined in getloadavg.c */ >> -extern int getloadavg (double *, int); >> -#endif > > will cause the prototype of getloadavg to become unavailable in the > Windows build, because the Windows stdlib.h obviously does not declare > it. So I think we should leave the declaration in place for the > Windows build at the least. Since only Windows needs it now, how about if we move it to src/s/ms-w32.h? That way, it's clearly localized to the Windows port. > I can either change the MS-DOS build to use the new > version in lib/, or provide the same trivial stub in MS-DOS specific > source files, like Windows does. What would you suggest? I'd do whatever's easier for MS-DOS and Windows, since the mainstream source is unaffected by this decision. > the *_CANONICALIZE_FILE_NAME macros, the *_UNSETENV macros, etc. -- these > aren't used anywhere in getloadavg.c, it seems, they are there just > because gnulib's stdlib.h needs them. Yes, they're there only because stdlib.h declares them (on GNU platforms), and gnulib's stdlib.h substitute has placeholders for them in case you also want to use the modules canonicalize, unsetenv, etc. I expect it's not worth removing those placeholders, at least partly because Emacs can use some of them in the future.