From c450bf0ae9e581be06d8964151362611951ca585 Mon Sep 17 00:00:00 2001 From: sf-exg Date: Wed, 21 Dec 2011 11:13:43 +0000 Subject: Use the correct macro to detect linux. --- src/init.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/init.h (limited to 'src') diff --git a/src/init.h b/src/init.h new file mode 100644 index 0000000..42d9726 --- /dev/null +++ b/src/init.h @@ -0,0 +1,92 @@ +#ifndef INIT_H_ +#define INIT_H_ + +/* use the fastest baud-rate */ +//#if defined(B4000000) +//# define BAUDRATE B4000000 +//#elif defined(B921600) +//# define BAUDRATE B921600 +//#elif defined(B115200) +//# define BAUDRATE B115200 +//#elif defined(B38400) +#if defined(B38400) +# define BAUDRATE B38400 +#elif defined(B19200) +# define BAUDRATE B19200 +#else +# define BAUDRATE B9600 +#endif + +/* Disable special character functions */ +#ifdef _POSIX_VDISABLE +# define VDISABLE _POSIX_VDISABLE +#else +# define VDISABLE 255 +#endif + +/*----------------------------------------------------------------------* + * system default characters if defined and reasonable + */ +#ifndef CINTR +# define CINTR '\003' /* ^C */ +#endif +#ifndef CQUIT +# define CQUIT '\034' /* ^\ */ +#endif +#ifndef CERASE +# ifdef __linux__ +# define CERASE '\177' /* ^? */ +# else +# define CERASE '\010' /* ^H */ +# endif +#endif +#ifndef CKILL +# define CKILL '\025' /* ^U */ +#endif +#ifndef CEOF +# define CEOF '\004' /* ^D */ +#endif +#ifndef CSTART +# define CSTART '\021' /* ^Q */ +#endif +#ifndef CSTOP +# define CSTOP '\023' /* ^S */ +#endif +#ifndef CSUSP +# define CSUSP '\032' /* ^Z */ +#endif +#ifndef CDSUSP +# define CDSUSP '\031' /* ^Y */ +#endif +#ifndef CRPRNT +# define CRPRNT '\022' /* ^R */ +#endif +#ifndef CFLUSH +# define CFLUSH '\017' /* ^O */ +#endif +#ifndef CWERASE +# define CWERASE '\027' /* ^W */ +#endif +#ifndef CLNEXT +# define CLNEXT '\026' /* ^V */ +#endif + +#ifndef VDISCRD +# ifdef VDISCARD +# define VDISCRD VDISCARD +# endif +#endif + +#ifndef VWERSE +# ifdef VWERASE +# define VWERSE VWERASE +# endif +#endif + +#ifndef ONLCR +# define ONLCR 0 +#endif + +#define CONSOLE "/dev/console" /* console device */ + +#endif /* _INIT_H_ */ -- cgit v1.2.3