Bug 196226

Summary: s/#ifdef __BSD_VISIBLE/#if __BSD_VISIBLE/
Product: Base System Reporter: Sergey Kandaurov <pluknet>
Component: kernAssignee: John Baldwin <jhb>
Status: Closed FIXED    
Severity: Affects Only Me CC: asomers, jhb
Priority: --- Keywords: patch
Version: CURRENTFlags: jhb: mfc-stable11+
jhb: mfc-stable10+
Hardware: Any   
OS: Any   
Bug Depends on: 223481    
Bug Blocks:    
Attachments:
Description Flags
sigh, bugzilla wants this field filed in none

Description Sergey Kandaurov freebsd_committer freebsd_triage 2014-12-23 10:20:28 UTC
Created attachment 150906 [details]
sigh, bugzilla wants this field filed in

__BSD_VISIBLE is always defined from sys/cdefs.h
As such, it should be fixed in several places.

$ grep -r '^#ifdef __BSD_VISIBLE' sys/
sys/aio.h:#ifdef __BSD_VISIBLE
sys/shm.h:#ifdef __BSD_VISIBLE
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 13:06:14 UTC
This will need an exp-run.
Comment 2 John Baldwin freebsd_committer freebsd_triage 2017-11-06 19:11:54 UTC
Ironically, commit r189814 for shm.h used #ifdef for shm.h and #if for sem.h.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-11-14 23:51:02 UTC
A commit references this bug:

Author: jhb
Date: Tue Nov 14 23:50:31 UTC 2017
New revision: 325835
URL: https://svnweb.freebsd.org/changeset/base/325835

Log:
  Use #if instead of #ifdef for __BSD_VISIBLE tests.

  __BSD_VISIBLE is always defined and it's value instead needs to be
  tested via #if to determine if FreeBSD-specific APIs should be
  exposed.

  PR:		196226, 223481 (exp-run)
  Submitted by:	pluknet
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D12977

Changes:
  head/sys/sys/aio.h
  head/sys/sys/shm.h
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-01-23 18:23:28 UTC
A commit references this bug:

Author: jhb
Date: Tue Jan 23 18:22:42 UTC 2018
New revision: 328294
URL: https://svnweb.freebsd.org/changeset/base/328294

Log:
  MFC 325835: Use #if instead of #ifdef for __BSD_VISIBLE tests.

  __BSD_VISIBLE is always defined and it's value instead needs to be
  tested via #if to determine if FreeBSD-specific APIs should be
  exposed.

  PR:		196226

Changes:
_U  stable/10/
  stable/10/sys/sys/aio.h
  stable/10/sys/sys/shm.h
_U  stable/11/
  stable/11/sys/sys/aio.h
  stable/11/sys/sys/shm.h