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

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

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 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 Ngie Cooper freebsd_committer 2015-11-10 13:06:14 UTC
This will need an exp-run.
Comment 2 John Baldwin freebsd_committer 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 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

  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

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