diff --git a/gb.xml/src/gb.xml.h b/gb.xml/src/gb.xml.h index 42f2b8e90..8f8566af3 100644 --- a/gb.xml/src/gb.xml.h +++ b/gb.xml/src/gb.xml.h @@ -192,7 +192,7 @@ typedef struct void (*ThrowXMLParseException)(const char* nerror, const char *text, const size_t lenText, const char *posFailed); -#if defined(OS_MACOSX) || defined(__APPLE__) || defined(__CYGWIN__) +#if defined(OS_MACOSX) || defined(__APPLE__) void* (*memrchr)(const char *s, int c, size_t n); #endif diff --git a/gb.xml/src/html/htmlmain.h b/gb.xml/src/html/htmlmain.h index 98de76e13..47f68c014 100644 --- a/gb.xml/src/html/htmlmain.h +++ b/gb.xml/src/html/htmlmain.h @@ -28,7 +28,7 @@ extern "C" XML_INTERFACE XML; #endif -#if defined(OS_MACOSX) || defined(__APPLE__) || defined(__CYGWIN__) +#if defined(OS_MACOSX) || defined(__APPLE__) #define memrchr(s, c, n) XML.memrchr(s, c, n) #endif diff --git a/gb.xml/src/main.cpp b/gb.xml/src/main.cpp index 425dcbc19..56f8fbfae 100644 --- a/gb.xml/src/main.cpp +++ b/gb.xml/src/main.cpp @@ -104,7 +104,7 @@ extern "C" (void *)ThrowXMLParseException, - #if defined(OS_MACOSX) || defined(__APPLE__) || defined(__CYGWIN__) + #if defined(OS_MACOSX) || defined(__APPLE__) (void*)memrchr, #endif diff --git a/gb.xml/src/utils.cpp b/gb.xml/src/utils.cpp index 61e54f153..216a5bd99 100644 --- a/gb.xml/src/utils.cpp +++ b/gb.xml/src/utils.cpp @@ -28,7 +28,7 @@ #include #include -#if defined(OS_MACOSX) || defined(__CYGWIN__) +#if defined(OS_MACOSX) void *memrchr(const char *s, int c, size_t n) { const char *start=s,*end=(s+n-1); diff --git a/gb.xml/src/utils.h b/gb.xml/src/utils.h index ea807aaa4..277098500 100644 --- a/gb.xml/src/utils.h +++ b/gb.xml/src/utils.h @@ -26,7 +26,7 @@ #define CHAR_ERROR 0xFFFD // � -#if defined(OS_MACOSX) || defined(__CYGWIN__) +#if defined(OS_MACOSX) #include void *memrchr(const char *s, int c, size_t n); #endif diff --git a/main/lib/term/cterm.c b/main/lib/term/cterm.c index c14d301be..d5356bdcc 100644 --- a/main/lib/term/cterm.c +++ b/main/lib/term/cterm.c @@ -185,25 +185,28 @@ IMPLEMENT_TSP(PARENB, c_cflag) IMPLEMENT_TSP(PARODD, c_cflag) IMPLEMENT_TSP(HUPCL, c_cflag) IMPLEMENT_TSP(CLOCAL, c_cflag) -IMPLEMENT_TSP(CMSPAR, c_cflag) IMPLEMENT_TSP(CRTSCTS, c_cflag) IMPLEMENT_TSP(ISIG, c_lflag) IMPLEMENT_TSP(ICANON, c_lflag) -IMPLEMENT_TSP(XCASE, c_lflag) IMPLEMENT_TSP(ECHO, c_lflag) IMPLEMENT_TSP(ECHOE, c_lflag) IMPLEMENT_TSP(ECHOK, c_lflag) IMPLEMENT_TSP(ECHONL, c_lflag) IMPLEMENT_TSP(ECHOCTL, c_lflag) -IMPLEMENT_TSP(ECHOPRT, c_lflag) IMPLEMENT_TSP(ECHOKE, c_lflag) IMPLEMENT_TSP(FLUSHO, c_lflag) IMPLEMENT_TSP(NOFLSH, c_lflag) IMPLEMENT_TSP(TOSTOP, c_lflag) -IMPLEMENT_TSP(PENDIN, c_lflag) IMPLEMENT_TSP(IEXTEN, c_lflag) +#ifndef OS_CYGWIN +IMPLEMENT_TSP(CMSPAR, c_cflag) +IMPLEMENT_TSP(XCASE, c_lflag) +IMPLEMENT_TSP(ECHOPRT, c_lflag) +IMPLEMENT_TSP(PENDIN, c_lflag) +#endif + IMPLEMENT_TSP_C(VDISCARD) IMPLEMENT_TSP_C(VEOF) IMPLEMENT_TSP_C(VEOL) @@ -326,7 +329,10 @@ GB_DESC TermDesc[] = GB_CONSTANT("VDISABLE", "i", _POSIX_VDISABLE), - __TC(B0), __TC(B50), __TC(B75), __TC(B110), __TC(B134), __TC(B150), __TC(B200), __TC(B300), __TC(B600), __TC(B1200), __TC(B1800), __TC(B2400), __TC(B4800), __TC(B9600), __TC(B19200), __TC(B38400), __TC(B57600), __TC(B115200), __TC(B230400), __TC(B460800), __TC(B500000), __TC(B576000), __TC(B921600), __TC(B1000000), __TC(B1152000), __TC(B1500000), __TC(B2000000), __TC(B2500000), __TC(B3000000), __TC(B3500000), __TC(B4000000), + __TC(B0), __TC(B50), __TC(B75), __TC(B110), __TC(B134), __TC(B150), __TC(B200), __TC(B300), __TC(B600), __TC(B1200), __TC(B1800), __TC(B2400), __TC(B4800), __TC(B9600), __TC(B19200), __TC(B38400), __TC(B57600), __TC(B115200), __TC(B230400), __TC(B460800), __TC(B500000), __TC(B576000), __TC(B921600), __TC(B1000000), __TC(B1152000), __TC(B1500000), __TC(B2000000), __TC(B2500000), __TC(B3000000), +#ifndef OS_CYGWIN +__TC(B3500000), __TC(B4000000), +#endif GB_END_DECLARE }; @@ -376,25 +382,28 @@ GB_DESC TerminalSettingsDesc[] = __TSP(PARODD), __TSP(HUPCL), __TSP(CLOCAL), - __TSP(CMSPAR), __TSP(CRTSCTS), __TSP(ISIG), __TSP(ICANON), - __TSP(XCASE), __TSP(ECHO), __TSP(ECHOE), __TSP(ECHOK), __TSP(ECHONL), __TSP(ECHOCTL), - __TSP(ECHOPRT), __TSP(ECHOKE), __TSP(FLUSHO), __TSP(NOFLSH), __TSP(TOSTOP), - __TSP(PENDIN), __TSP(IEXTEN), +#ifndef OS_CYGWIN + __TSP(CMSPAR), + __TSP(XCASE), + __TSP(ECHOPRT), + __TSP(PENDIN), +#endif + __TSP_I(VDISCARD), __TSP_I(VEOF), __TSP_I(VEOL),