We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 924 - No _SC_NPROCESSORS_ONLN on OSX 10.4
Summary: No _SC_NPROCESSORS_ONLN on OSX 10.4
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: PowerPC Mac OS X 10.4 (PPC)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-05 10:04 UTC by Kai Sterker
Modified: 2010-01-05 20:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Sterker 2010-01-05 10:04:05 UTC
Build of SDL 1.3 rev 5441 broken on OSX 10.4.11. I get

libtool: compile:  gcc -g -O2 -I./include -maltivec -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -MMD -MT build/SDL_cpuinfo.lo -c src/cpuinfo/SDL_cpuinfo.c  -fno-common -DPIC -o build/.libs/SDL_cpuinfo.o
src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetCPUCount':
src/cpuinfo/SDL_cpuinfo.c:313: error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function)
src/cpuinfo/SDL_cpuinfo.c:313: error: (Each undeclared identifier is reported only once
src/cpuinfo/SDL_cpuinfo.c:313: error: for each function it appears in.)
make: *** [build/SDL_cpuinfo.lo] Error 1

Unlike 'man 3 sysconf' suggests, there is no such definition in unistd.h. Haven't digged much, but Google seems to confirm that.

I guess configure.in needs a special check for this case, so that HAVE_SYSCONF will not be set when it shouldn't be. (manually changing include/SDL_config.h accordingly got me over this issue)
Comment 1 Sam Lantinga 2010-01-05 20:33:41 UTC
This is fixed in revision 5443, thanks!