vanitygen
vanitygen copied to clipboard
Use sysconf on macOS to determine number of CPUs
Added #if defined(__APPLE__)
wrapper for count_processors, using sysconf
(in libc, include unistd.h which is already indirectly included).
sysconf(_SC_NPROCESSORS_ONLN)
returns the number of processors currently online or -1 if there was an error, this function uses -1 to denote an error so this works fine.