From: Jeremy Harris Date: Thu, 25 Jul 2019 19:09:18 +0000 (+0100) Subject: Build: workaround inlining problems on Solaris X-Git-Tag: exim-4.93-RC0~126 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=aaabfafe3fb76b1e09a68317ef4b3d5bc94fa9be Build: workaround inlining problems on Solaris --- diff --git a/src/src/mytypes.h b/src/src/mytypes.h index aaa6e9052..de2371c7d 100644 --- a/src/src/mytypes.h +++ b/src/src/mytypes.h @@ -134,8 +134,12 @@ By extension, a variable pointing to this address is tainted. static inline BOOL is_tainted(const void * p) { +#ifdef MACRO_PREDEF +return FALSE; +#else extern void * tainted_base, * tainted_top; return p >= tainted_base && p < tainted_top; +#endif } static inline uschar * __Ustrcat(uschar * dst, const uschar * src, const char * func, int line) diff --git a/src/src/store.c b/src/src/store.c index 41ca43d65..b7cf4cdee 100644 --- a/src/src/store.c +++ b/src/src/store.c @@ -710,8 +710,10 @@ int pool = tainted ? store_pool + POOL_TAINT_BASE : store_pool; BOOL release_ok = !tainted && store_last_get[pool] == block; uschar * newtext; +#ifndef MACRO_PREDEF if (is_tainted(block) != tainted) die_tainted(US"store_newblock", CUS func, linenumber); +#endif newtext = store_get(newsize, tainted); memcpy(newtext, block, len); diff --git a/src/src/string.c b/src/src/string.c index 8cc34a077..288466113 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -1277,8 +1277,10 @@ else if (!(flags & SVFMT_TAINT_NOCHK)) dest_tainted = is_tainted(g->s); if (!(flags & SVFMT_TAINT_NOCHK) && !dest_tainted && is_tainted(format)) { +#ifndef MACRO_PREDEF if (!(flags & SVFMT_REBUFFER)) die_tainted(US"string_vformat", func, line); +#endif gstring_rebuffer(g); dest_tainted = TRUE; } @@ -1507,8 +1509,10 @@ while (*fp) gp = CS g->s + g->ptr; dest_tainted = TRUE; } +#ifndef MACRO_PREDEF else die_tainted(US"string_vformat", func, line); +#endif INSERT_STRING: /* Come to from %D or %M above */