octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DLD-FUNCTIONS/nprocs.cc:29:25: error: sys/sysinfo.h: No such file or


From: Kai Habel
Subject: Re: DLD-FUNCTIONS/nprocs.cc:29:25: error: sys/sysinfo.h: No such file or directory
Date: Sat, 19 Mar 2011 18:12:40 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

Am 17.03.2011 22:08, schrieb Rik:
On 03/17/2011 11:29 AM, Ben Abbott wrote:
On Mar 17, 2011, at 8:25 AM, Iain Murray wrote:

On Thu, Mar 17, 2011 at 04:17:27AM -0400, Ben Abbott wrote:
On Mar 16, 2011, at 10:19 PM, Rik wrote:
On 03/16/2011 06:12 PM, Ben Abbott wrote:
After the changset below ...

        http://hg.savannah.gnu.org/hgweb/octave/rev/a1b2da4967ac

... I encounter an error ...
...
This is sort of a drag as the whole point was to have access to the
underlying gnulib module which should be portable.
I'm not familiar with this either, but I infer that we should be using the 
gnulib nproc module.

I assume there is some problem with that?
No, I just messed up. Sorry. I had misread the gnulib manual and thought
that it magically provided drop-in replacements of nprocs and
nprocs_conf. In fact, as I think Ben already knew, its nproc module
provides similar functionality through its function called
"num_processors".

I have updated nprocs.cc. It no longer provides `nprocs' and
`nprocs_conf', as we can't actually call native system routines of these
names across different platforms. Instead it provides `nproc', which
like the newish coreutils program of the same name, uses gnulib's
`num_processors' function. The new function takes an optional argument
to access the functionality available in the underlying gnulib routine.

An hg changeset is attached to this email. I don't know if that makes it
through the mailing list, so I'll attach it to the patch queue item at:
   http://savannah.gnu.org/patch/index.php?7504
as well.

If Ben could see if this works in Mac OS that would be great. I only
have access to GNU/Linux here.

Iain.
<nproc_gnulib.diff>
Works for me!
3/17/11

I made a few minor mods and checked in the changeset.  Hopefully it will
also work on mingw...

--Rik

Yes, it compiles on MinGW again.

octave.exe:1> nproc
ans =  2

And the answer is correct for my dual-core CPU.

Kai


reply via email to

[Prev in Thread] Current Thread [Next in Thread]