emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: importing getloadavg from gnulib


From: Paul Eggert
Subject: Re: importing getloadavg from gnulib
Date: Tue, 08 Feb 2011 01:28:34 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]