X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fnproc.c;h=6fdaea0d09aa4ff2337cea6b7ee456b09775eca0;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=7ebf497a5819784d6e56786783fba52c7fad6053;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/nproc.c b/lib/nproc.c index 7ebf497a5..6fdaea0d0 100644 --- a/lib/nproc.c +++ b/lib/nproc.c @@ -1,6 +1,6 @@ /* Detect the number of processors. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Glen Lenker and Bruno Haible. */ @@ -257,7 +256,7 @@ num_processors (enum nproc_query query) } #if defined _SC_NPROCESSORS_ONLN - { /* This works on glibc, MacOS X 10.5, FreeBSD, AIX, OSF/1, Solaris, + { /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris, Cygwin, Haiku. */ long int nprocs = sysconf (_SC_NPROCESSORS_ONLN); if (nprocs > 0) @@ -268,7 +267,7 @@ num_processors (enum nproc_query query) else /* query == NPROC_ALL */ { #if defined _SC_NPROCESSORS_CONF - { /* This works on glibc, MacOS X 10.5, FreeBSD, AIX, OSF/1, Solaris, + { /* This works on glibc, Mac OS X 10.5, FreeBSD, AIX, OSF/1, Solaris, Cygwin, Haiku. */ long int nprocs = sysconf (_SC_NPROCESSORS_CONF); @@ -333,7 +332,7 @@ num_processors (enum nproc_query query) NPROC_CURRENT and NPROC_ALL. */ #if HAVE_SYSCTL && defined HW_NCPU - { /* This works on MacOS X, FreeBSD, NetBSD, OpenBSD. */ + { /* This works on Mac OS X, FreeBSD, NetBSD, OpenBSD. */ int nprocs; size_t len = sizeof (nprocs); static int mib[2] = { CTL_HW, HW_NCPU };