Bug 196226 - s/#ifdef __BSD_VISIBLE/#if __BSD_VISIBLE/
Summary: s/#ifdef __BSD_VISIBLE/#if __BSD_VISIBLE/
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: John Baldwin
URL:
Keywords: patch
Depends on: 223481
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-23 10:20 UTC by Sergey Kandaurov
Modified: 2018-01-23 18:23 UTC (History)
2 users (show)

See Also:
jhb: mfc-stable11+
jhb: mfc-stable10+


Attachments
sigh, bugzilla wants this field filed in (616 bytes, patch)
2014-12-23 10:20 UTC, Sergey Kandaurov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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