Ticket #54068: patch_js_src_jsgc.cpp.diff

File patch_js_src_jsgc.cpp.diff, 696 bytes (added by ballapete (Peter "Pete" Dyballa), 8 years ago)

Proposed patch for Tiger to allow determination of # of CPUs

  • js/src/jsgc.cpp

    old new  
    9797# include "jswin.h"
    9898#else
    9999# include <unistd.h>
     100# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
     101# include <sys/sysctl.h>
     102# endif
    100103#endif
    101104
    102105using namespace mozilla;
     
    28642867        SYSTEM_INFO sysinfo;
    28652868        GetSystemInfo(&sysinfo);
    28662869        ncpus = unsigned(sysinfo.dwNumberOfProcessors);
     2870# elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
     2871        long n = sysconf(HW_NCPU);
     2872        ncpus = (n > 0) ? unsigned(n) : 1;
    28672873# else
    28682874        long n = sysconf(_SC_NPROCESSORS_ONLN);
    28692875        ncpus = (n > 0) ? unsigned(n) : 1;