Date: Tue, 23 May 2017 09:33:25 +0200 From: Sebastian Huber <sebastian.huber@embedded-brains.de> To: FreeBSD <freebsd-hackers@freebsd.org> Subject: Why is _POSIX_SOURCE used instead of __BSD_VISIBLE in <termios.h>? Message-ID: <742294fc-99db-3f9c-17a6-9aee7f42b066@embedded-brains.de>
index | next in thread | raw e-mail
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@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?742294fc-99db-3f9c-17a6-9aee7f42b066>
