Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2019 18:17:26 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345016 - stable/12/usr.bin/getconf
Message-ID:  <201903111817.x2BIHQEI027243@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Mon Mar 11 18:17:26 2019
New Revision: 345016
URL: https://svnweb.freebsd.org/changeset/base/345016

Log:
  MFC r342952:
  
  Add Linux compatibility support for `SC_NPROCESSORS_{CONF,ONLN}` as `_SC_NPROCESSORS_{CONF,ONLN}`
  
  The goal of this change is to make it easier to use getconf to query
  the number of available processors.
  
  Sadly it's unclear per POSIX, which form (with a preceding _ or
  lacking it) is correct. I will bring this up on the Austin Group list so
  this point is clarified for implementors that might rely on this getconf
  variable in future POSIX spec versions.
  
  This is something I noticed when trying to import GoogleTest to FreeBSD
  as one of the CI scripts uses this variable on Linux.
  
  Approved by:    emaste (mentor; implicit: https://reviews.freebsd.org/D19527)
  Differential Revision: https://reviews.freebsd.org/D19528

Modified:
  stable/12/usr.bin/getconf/sysconf.gperf
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/getconf/sysconf.gperf
==============================================================================
--- stable/12/usr.bin/getconf/sysconf.gperf	Mon Mar 11 18:17:12 2019	(r345015)
+++ stable/12/usr.bin/getconf/sysconf.gperf	Mon Mar 11 18:17:26 2019	(r345016)
@@ -63,6 +63,8 @@ SYMLOOP_MAX, _SC_SYMLOOP_MAX
 TIMER_MAX, _SC_TIMER_MAX
 TTY_NAME_MAX, _SC_TTY_NAME_MAX 
 TZNAME_MAX, _SC_TZNAME_MAX
+_NPROCESSORS_CONF, _SC_NPROCESSORS_CONF
+_NPROCESSORS_ONLN, _SC_NPROCESSORS_ONLN
 _POSIX2_CHAR_TERM, _SC_2_CHAR_TERM
 _POSIX2_C_BIND, _SC_2_C_BIND
 _POSIX2_C_DEV, _SC_2_C_DEV



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903111817.x2BIHQEI027243>