From 5ba37a99241332c6cf44a9acdca1f38d590d4a6f Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 10 May 2015 16:05:56 +0200 Subject: [PATCH] Honor feature macros in . --- libc/include/termios.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/libc/include/termios.h b/libc/include/termios.h index e6019b54..f32afdc4 100644 --- a/libc/include/termios.h +++ b/libc/include/termios.h @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2012, 2013, 2014. + Copyright(C) Jonas 'Sortie' Termansen 2012, 2013, 2014, 2015. This file is part of the Sortix C Library. @@ -31,21 +31,32 @@ #include -#include - +#if __USE_SORTIX #include +#endif __BEGIN_DECLS +#if __USE_SORTIX +#ifndef __size_t_defined +#define __size_t_defined +#define __need_size_t +#include +#endif + #ifndef __ssize_t_defined #define __ssize_t_defined typedef __ssize_t ssize_t; #endif +#endif -ssize_t tcgetblob(int fd, const char* name, void* buffer, size_t count); -ssize_t tcsetblob(int fd, const char* name, const void* buffer, size_t count); -int tcgetwincurpos(int fd, struct wincurpos* wcp); -int tcgetwinsize(int fd, struct winsize* ws); +/* Functions that are Sortix extensions. */ +#if __USE_SORTIX +ssize_t tcgetblob(int, const char*, void*, size_t); +ssize_t tcsetblob(int, const char*, const void*, size_t); +int tcgetwincurpos(int, struct wincurpos*); +int tcgetwinsize(int, struct winsize*); +#endif __END_DECLS