From 5308ef2ff826b1e9a02de38e0cc7ac03f8bf4b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkovsky@mmg.fjfi.cvut.cz> Date: Wed, 5 Feb 2020 10:32:50 +0100 Subject: [PATCH] Define non-standard macro __STRING for platforms which don't use glibc Fixes #58 --- src/TNL/Assert.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/TNL/Assert.h b/src/TNL/Assert.h index df86295621..dc4ba7cf43 100644 --- a/src/TNL/Assert.h +++ b/src/TNL/Assert.h @@ -376,6 +376,12 @@ TNL_IMPL_CMP_HELPER_( GT, > ); #define __TNL_PRETTY_FUNCTION __PRETTY_FUNCTION__ #endif +// On Linux, __STRING is defined in glibc's sys/cdefs.h, but there is no such +// header on Windows and possibly other platforms. +#ifndef __STRING + #define __STRING(arg) #arg +#endif + // Internal macro to compose the string representing the assertion. // We can't do it easily at runtime, because we have to support assertions // in CUDA kernels, which can't use std::string objects. Instead, we do it -- GitLab