Module Name: src
Committed By: pooka
Date: Mon Jan 14 21:04:15 UTC 2013
Modified Files:
src/lib/librumpuser: rumpuser.c
Log Message:
Use the /proc way for counting host cores on Cygwin.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/librumpuser/rumpuser.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.27 src/lib/librumpuser/rumpuser.c:1.28
--- src/lib/librumpuser/rumpuser.c:1.27 Thu Jan 10 19:14:12 2013
+++ src/lib/librumpuser/rumpuser.c Mon Jan 14 21:04:15 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.c,v 1.27 2013/01/10 19:14:12 pooka Exp $ */
+/* $NetBSD: rumpuser.c,v 1.28 2013/01/14 21:04:15 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.27 2013/01/10 19:14:12 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.28 2013/01/14 21:04:15 pooka Exp $");
#endif /* !lint */
#include <sys/ioctl.h>
@@ -765,7 +765,7 @@ rumpuser_getnhostcpu(void)
size_t sz = sizeof(ncpu);
sysctlbyname("hw.ncpu", &ncpu, &sz, NULL, 0);
-#elif __linux__
+#elif defined(__linux__) || defined(__CYGWIN__)
FILE *fp;
char *line = NULL;
size_t n = 0;