Why is _POSIX_SOURCE used instead of __BSD_VISIBLE in <termios.h>?
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue May 23 07:33:37 UTC 2017
Hello,
the Termios header <termios.h>, <sys/_termios.h>, etc. use sometimes
_POSIX_SOURCE directly to determine if a thing should be exposed to the
user, e.g.
#ifndef _POSIX_SOURCE
#define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */
#define TABDLY 0x00000004 /* tab delay mask */
#define TAB0 0x00000000 /* no tab delay and
expansion */
#define TAB3 0x00000004 /* expand tabs to spaces */
#define ONOEOT 0x00000008 /* discard EOT's (^D) on output) */
#define OCRNL 0x00000010 /* map CR to NL on output */
#define ONOCR 0x00000020 /* no CR output at column 0 */
#define ONLRET 0x00000040 /* NL performs CR function */
#endif /*_POSIX_SOURCE */
This circumvents the feature mechanisms of <sys/cdefs.h>. Why is
__BSD_VISIBLE not used for this?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the freebsd-hackers
mailing list