]> Savannah Git Hosting - gnulib.git/commitdiff
getloadavg: Return 0 on Windows without Cygwin.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Jun 2018 20:29:54 +0000 (22:29 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 17 Jun 2018 20:29:54 +0000 (22:29 +0200)
* lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined.

ChangeLog
lib/getloadavg.c

index a8a74190ba79b471f04966e2655bc7339cb2da78..dd0f58d8ee1f2e2ea44b893052e7b31f57290a72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 4ce40517a3d33b111102190b0622df311f15c5fb..435d10a6b101132585157e4177196e1a2ae6fc35 100644 (file)
@@ -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.
 
 # include "intprops.h"
 
+# if defined _WIN32 && ! defined __CYGWIN__
+#  define WINDOWS32
+# endif
+
 # if !defined (BSD) && defined (ultrix)
 /* Ultrix behaves like BSD on Vaxen.  */
 #  define BSD