From a991a07e7b672ab2d437451a7242a67f2cba207e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Tue, 20 Sep 2022 15:14:03 +0200 Subject: [PATCH] Add HAVE_STRERROR_R_CHAR_P (GH PR #53) --- .../libbuild2/autoconf/checks/STRERROR_R_CHAR_P.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/STRERROR_R_CHAR_P.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/STRERROR_R_CHAR_P.h b/libbuild2-autoconf/libbuild2/autoconf/checks/STRERROR_R_CHAR_P.h new file mode 100644 index 0000000..559537e --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/STRERROR_R_CHAR_P.h @@ -0,0 +1,15 @@ +// STRERROR_R_CHAR_P + +#undef STRERROR_R_CHAR_P + +/* GNU-specific. + * + * Note that while the HAVE_STRERROR_R_CHAR_P would have been the better + * name (since we are testing for presence/absence), this name is used by + * the autoconf's AC_FUNC_STRERROR_R test. + */ +#ifdef __GLIBC__ +# if defined(_GNU_SOURCE) || (_POSIX_C_SOURCE < 200112L) +# define STRERROR_R_CHAR_P 1 +# endif +#endif