aboutsummaryrefslogtreecommitdiffstats
path: root/include/termios.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-05-24 09:25:13 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-05-24 09:25:13 +0000
commita07c3aeb73123a9282d528ad8a1afba2f0b1a0dd (patch)
treee2c9059361a59e9ffd2e97aa6ff0ec84ceb6b3f5 /include/termios.h
parent27bdfd5a8a63488364453d873673630948bc5a41 (diff)
downloadsrc-a07c3aeb73123a9282d528ad8a1afba2f0b1a0dd.tar.gz
src-a07c3aeb73123a9282d528ad8a1afba2f0b1a0dd.zip
Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE.
The Termios headers <termios.h> and <sys/_termios.h> used sometimes _POSIX_SOURCE directly to determine if a thing should be exposed to the user. This circumvented the feature mechanisms of <sys/cdefs.h>. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=318780
Diffstat (limited to 'include/termios.h')
-rw-r--r--include/termios.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/termios.h b/include/termios.h
index ed8e328d7fd9..333ab1cd6cc5 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -42,12 +42,12 @@ typedef __pid_t pid_t;
#define _PID_T_DECLARED
#endif
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define OXTABS TAB3
#define MDMBUF CCAR_OFLOW
#endif
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
#endif
@@ -57,7 +57,7 @@ typedef __pid_t pid_t;
#define TCSANOW 0 /* make change immediate */
#define TCSADRAIN 1 /* drain output, then change */
#define TCSAFLUSH 2 /* drain output, flush input */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define TCSASOFT 0x10 /* flag - don't alter h.w. state */
#endif
@@ -95,7 +95,7 @@ __END_DECLS
#endif /* !_TERMIOS_H_ */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#include <sys/ttycom.h>
#include <sys/ttydefaults.h>
#endif