diff options
| author | Tomas Zeman | 2018-03-02 14:39:01 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2018-03-07 10:35:32 +0100 |
| commit | 95c849f613a79cb3c7f59aa0589304513688aba1 (patch) | |
| tree | b63f326f3e0d08dc787a18ab34dd18439138aeaa /include | |
| parent | 352853ed7e2592f224fc9e9f01e1314660e906e1 (diff) | |
| download | catch3-95c849f613a79cb3c7f59aa0589304513688aba1.tar.gz | |
Introduce support for DJGPP cross compiler
DJGPP cross compiler is targeting DOS which does not support POSIX
signals. Probably for the same reason (targeting DOS) this compiler
does not support wide characters.
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_compiler_capabilities.h | 9 | ||||
| -rw-r--r-- | include/internal/catch_console_colour.cpp | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index b1acf99d..2bbba4f0 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -67,7 +67,7 @@ //////////////////////////////////////////////////////////////////////////////// // We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) # if !defined(CATCH_CONFIG_POSIX_SIGNALS) # define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS @@ -111,6 +111,13 @@ //////////////////////////////////////////////////////////////////////////////// +// DJGPP +#ifdef __DJGPP__ +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// + // Use of __COUNTER__ is suppressed during code analysis in // CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly // handled by it. diff --git a/include/internal/catch_console_colour.cpp b/include/internal/catch_console_colour.cpp index f692b5c5..5fb1d07f 100644 --- a/include/internal/catch_console_colour.cpp +++ b/include/internal/catch_console_colour.cpp @@ -169,7 +169,12 @@ namespace { #ifdef CATCH_PLATFORM_MAC !isDebuggerActive() && #endif - isatty(STDOUT_FILENO); +#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__)) + isatty(STDOUT_FILENO) +#else + false +#endif + ; } IColourImpl* platformColourInstance() { ErrnoGuard guard; |