Mercurial > gnulib
changeset 39407:dc8498340591
getloadavg: Return 0 on Windows without Cygwin.
* lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 17 Jun 2018 22:29:54 +0200 |
parents | 92552e95e19a |
children | 2522cd333723 |
files | ChangeLog lib/getloadavg.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jun 17 11:22:18 2018 -0700 +++ b/ChangeLog Sun Jun 17 22:29:54 2018 +0200 @@ -1,3 +1,8 @@ +2018-06-17 Bruno Haible <bruno@clisp.org> + + getloadavg: Return 0 on Windows without Cygwin. + * lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined. + 2018-06-17 Paul Smith <psmith@gnu.org> getloadavg: Allow building on Windows without Cygwin
--- a/lib/getloadavg.c Sun Jun 17 11:22:18 2018 -0700 +++ b/lib/getloadavg.c Sun Jun 17 22:29:54 2018 +0200 @@ -68,7 +68,7 @@ UMAX UMAX4_3 VMS - WINDOWS32 No-op for Windows95/NT. + _WIN32 Native Windows (possibly also defined on Cygwin) __linux__ Linux: assumes /proc file system mounted. Support from Michael K. Johnson. __CYGWIN__ Cygwin emulates linux /proc/loadavg. @@ -97,6 +97,10 @@ # include "intprops.h" +# if defined _WIN32 && ! defined __CYGWIN__ +# define WINDOWS32 +# endif + # if !defined (BSD) && defined (ultrix) /* Ultrix behaves like BSD on Vaxen. */ # define BSD