projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup unneeded code and definitions. Add MIT/X11 license header to file. Code submi...
[mono.git]
/
mono
/
io-layer
/
system.c
diff --git
a/mono/io-layer/system.c
b/mono/io-layer/system.c
index 9fe870bddc77eb6fead93b48f0e9f44fca11dd06..3a336ce2cef01900d3fb83eddf3235c52bac392a 100644
(file)
--- a/
mono/io-layer/system.c
+++ b/
mono/io-layer/system.c
@@
-20,8
+20,10
@@
void GetSystemInfo(WapiSystemInfo *info)
info->dwPageSize=getpagesize();
/* Fill in the rest of this junk. Maybe with libgtop */
info->dwPageSize=getpagesize();
/* Fill in the rest of this junk. Maybe with libgtop */
-#ifdef _SC_NPROCESSORS_CONF
- info->dwNumberOfProcessors = sysconf (_SC_NPROCESSORS_CONF);
+#ifdef _SC_NPROCESSORS_ONLN
+ info->dwNumberOfProcessors = sysconf (_SC_NPROCESSORS_ONLN);
+ if (info->dwNumberOfProcessors <= 0)
+ info->dwNumberOfProcessors = 1;
#else
info->dwNumberOfProcessors = 1;
#endif
#else
info->dwNumberOfProcessors = 1;
#endif