X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/f7845ef1698291a23975052a100c12bf38a0664d..ac9f1d42b0caa9411e4e8e493c9919c1aaa9ac4f:/t/nls/gettext.h diff --git a/t/nls/gettext.h b/t/nls/gettext.h index 8392992..95bdf14 100644 --- a/t/nls/gettext.h +++ b/t/nls/gettext.h @@ -14,9 +14,6 @@ #include #include -#define gettext(s) (s) -#define pgettext_expr(a, s) (s) - /* * We don't need a real snprintf for testing help functionality; substitute * using vsprintf to ease testing on C89 implementations. @@ -34,4 +31,11 @@ static inline int help_do_snprintf(char *buf, size_t n, const char *fmt, ...) return ret; } +/* + * Do nothing, but try to tickle a crash if a bogus string argument is + * passed as the real functions dereference the provided pointers. + */ +#define gettext(s) (*(volatile char *)s, s) +#define pgettext_expr(c, s) (*(volatile char *)c + *(volatile char *)s, s) + #endif