[libcxx-commits] [PATCH] D118179: [SystemZ][z/OS] Localize runtime error messages in libc++
Sean via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 23 11:33:58 PST 2022
SeanP added inline comments.
================
Comment at: libcxxabi/src/abort_message.cpp:35
{
- fprintf(stderr, "libc++abi: ");
- va_list list;
- va_start(list, format);
- vfprintf(stderr, format, list);
- va_end(list);
- fprintf(stderr, "\n");
+#if defined(__MVS__)
+ if (__isASCII())
----------------
I suggest making a macro to wrap the function fprintf. That would simplify the this code. For example:
```
#ifdef __MVS__
#define fprintf(...) \
if (__isASCII()) __fprintf_a(__VA_ARGS__); \
else __fprintf_e(__VA_ARGS__)
#endif
```
Do the same for vfprintf() and we can remove the duplication in this code. Same for the snprintf system_error.cpp. Just confirm fprintf, etc aren't macros already on MVS.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118179/new/
https://reviews.llvm.org/D118179
More information about the libcxx-commits
mailing list