Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _SC_NPROCESSORS_ONLN constants for linux and macos #24374

Closed
oh-its-jimjam opened this issue Apr 13, 2015 · 0 comments · Fixed by #24376
Closed

Add _SC_NPROCESSORS_ONLN constants for linux and macos #24374

oh-its-jimjam opened this issue Apr 13, 2015 · 0 comments · Fixed by #24376

Comments

@oh-its-jimjam
Copy link
Contributor

There is a bug in num_cpu where the call to sysconf is hard-coded to 84 so doesn't work when on Mac OS X; which consequently brakes a lot of libraries when used on Mac OS X.

We need to add constants to numcpu so this type of bug doesn't occur again.

seanmonstar/num_cpus#2

alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 14, 2015
Values for `_SC_*` are not the same value between `macos` and `linux` so I've added specific target constants for Mac OS X and added `_SC_NPROCESSORS_ONLN` for `linux` and `macos`.

Closes rust-lang#24374
Ms2ger added a commit to Ms2ger/rust that referenced this issue May 4, 2015
…ang#24374 for mac).

These constants were added in 6f54ce9 and
e8fbd1c to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.
Ms2ger added a commit to Ms2ger/rust that referenced this issue May 5, 2015
…ang#24374 for mac).

These constants were added in 6f54ce9 and
e8fbd1c to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.

It appears that some of the constants may actually belong in a POSIX module,
but I didn't make these changes here because I don't have access to the POSIX
standard.
Ms2ger added a commit to Ms2ger/rust that referenced this issue May 6, 2015
…ang#24374 for mac).

These constants were added in 6f54ce9 and
e8fbd1c to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.

It appears that some of the constants may actually belong in a POSIX module,
but I didn't make these changes here because I don't have access to the POSIX
standard.
Ms2ger added a commit to Ms2ger/rust that referenced this issue May 6, 2015
…ang#24374 for mac).

These constants were added in 6f54ce9 and
e8fbd1c to a consts module that is behind a
gate.

I have not confirmed that these constants do indeed work on either OSX or iOS.

It appears that some of the constants may actually belong in a POSIX module,
but I didn't make these changes here because I don't have access to the POSIX
standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants