diff options
author | Thomas Touhey <thomas@touhey.fr> | 2019-04-29 14:34:38 +0200 |
---|---|---|
committer | Thomas Touhey <thomas@touhey.fr> | 2019-04-29 14:34:38 +0200 |
commit | 06339feadeda7f0237cf3919d68d61439e5c15c2 (patch) | |
tree | fa4757026c86c9c21b60d44f0836a1c88cd8540b /include | |
parent | 751f742fc8b8be0746b54d45822b9351f8079a64 (diff) |
Fixed POSIX building
Diffstat (limited to 'include')
-rw-r--r-- | include/libtio/cdefs.h | 3 | ||||
-rw-r--r-- | include/libtio/io/serial.h | 4 | ||||
-rw-r--r-- | include/libtio/native.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/libtio/cdefs.h b/include/libtio/cdefs.h index b896fa7..416fea9 100644 --- a/include/libtio/cdefs.h +++ b/include/libtio/cdefs.h @@ -16,9 +16,6 @@ #ifndef LIBTIO_CDEFS_H # define LIBTIO_CDEFS_H 20180710 # include "config.h" - -# define _POSIX_C_SOURCE 200809L - # include <stddef.h> # include <time.h> diff --git a/include/libtio/io/serial.h b/include/libtio/io/serial.h index 12242f2..f659ae8 100644 --- a/include/libtio/io/serial.h +++ b/include/libtio/io/serial.h @@ -102,10 +102,12 @@ struct tio_serial_attrs { # define TIO_DTRDIS 0x0000 # define TIO_DTRENB 0x0008 # define TIO_DTRHAND 0x0018 +# define TIO_DTRNOHAND 0x0000 # define TIO_RTSDIS 0x0000 # define TIO_RTSENB 0x0020 # define TIO_RTSHAND 0x0060 +# define TIO_RTSNOHAND 0x0000 /* The XON/XOFF software control settings. * @@ -160,6 +162,8 @@ struct tio_serial_attrs { # define TIO_SERIALFLAG_XINOUT 6 # define TIO_SERIALFLAG_XOUTIN 6 +# define TIO_SERIALFLAG_DTRRTS 96 +# define TIO_SERIALFLAG_RTSDTR 96 # define TIO_SERIALFLAG_ALL 127 /* --- diff --git a/include/libtio/native.h b/include/libtio/native.h index f5600bc..eaffb01 100644 --- a/include/libtio/native.h +++ b/include/libtio/native.h @@ -21,7 +21,7 @@ TIO_BEGIN_DECLS * - `LIBTIO_DISABLED_WINDOWS`: disable Windows API support. * - `LIBTIO_DISABLED_MACOS`: disable MacOS (OS X) support. */ -# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L +# if defined(__unix__) && __unix__ # else # define LIBTIO_DISABLED_UNIX 1 # endif |