projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c681514
)
Please the -Wall police by moving a variable declaration; really FIX getNumberOfProce...
author
Austin Seipp
<mad.one@gmail.com>
Fri, 20 Mar 2009 12:48:46 +0000
(12:48 +0000)
committer
Austin Seipp
<mad.one@gmail.com>
Fri, 20 Mar 2009 12:48:46 +0000
(12:48 +0000)
rts/posix/OSThreads.c
patch
|
blob
|
history
diff --git
a/rts/posix/OSThreads.c
b/rts/posix/OSThreads.c
index
d4d4382
..
324701d
100644
(file)
--- a/
rts/posix/OSThreads.c
+++ b/
rts/posix/OSThreads.c
@@
-201,7
+201,6
@@
nat
getNumberOfProcessors (void)
{
static nat nproc = 0;
- size_t size = sizeof(nat);
if (nproc == 0) {
#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
@@
-209,6
+208,7
@@
getNumberOfProcessors (void)
#elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF)
nproc = sysconf(_SC_NPROCESSORS_CONF);
#elif defined(darwin_HOST_OS)
+ size_t size = sizeof(nat);
if(0 != sysctlbyname("hw.ncpu",&nproc,&size,NULL,0))
nproc = 1;
#else