[clang] [clang][Sema] Add support for OpenBSD's syslog format attribute (PR #97366)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 13:00:13 PDT 2024


https://github.com/Sirraide commented:

Hmm, this function also seems to exist on Linux, though. Additionally, from my `man syslog` docs:
> The remaining arguments are a format, as in `printf(3)`, and any arguments required by the format, except that the two-character sequence `%m` will be replaced by the error message string `strerror(errno)`.

I also know next to nothing about BSD and how its `syslog()` works, but we should support that extra `%m` specifier (if we don’t already do that because it’s apparently also a glibc extension for  `printf()`...). If the two of them differ, we might need two different format styles for BSD `syslog()` vs Linux `syslog()`.

https://github.com/llvm/llvm-project/pull/97366


More information about the cfe-commits mailing list