-# Strerror_r
-# Inputs: conf
-
-prog = '''
-#include <string.h>
-int main () {
- char error_string[256];
- char *ptr = strerror_r(-2, error_string, 256);
- char c = *strerror_r(-2, error_string, 256);
- return c != 0 && ptr != (void*) 0L;
-}
-'''
-
have_strerror_r_decl = cxx.has_header_symbol('string.h', 'strerror_r')
have_strerror_r = cxx.has_function('strerror_r', prefix: '#include <string.h>')
strerror_r_returns_charp = have_strerror_r and cxx.compiles(prog, name: 'strerror_r() returns char *')
-conf.set10('HAVE_DECL_STRERROR_R', have_strerror_r_decl, description: 'Whether strerror_r is declared')
-conf.set10('HAVE_STRERROR_R', have_strerror_r, description: 'Whether strerror_r is available')
-conf.set10('STRERROR_R_CHAR_P', strerror_r_returns_charp, description: 'Whether strerror_r returns char *')
+conf.set('HAVE_DECL_STRERROR_R', have_strerror_r_decl, description: 'Whether strerror_r is declared')
+conf.set('HAVE_STRERROR_R', have_strerror_r, description: 'Whether strerror_r is available')
+conf.set('STRERROR_R_CHAR_P', strerror_r_returns_charp, description: 'Whether strerror_r returns char *')
-summary('strerror_r decl', have_strerror_r_decl, section: 'System')
-summary('strerror_r', have_strerror_r, section: 'System')
-summary('strerror_r returns char *', strerror_r_returns_charp, section: 'System')
+summary('Symbol', have_strerror_r_decl, bool_yn: true, section: 'Function strerror_r')
+summary('Declaration', have_strerror_r, bool_yn: true, section: 'Function strerror_r')
+summary('Returns char *', strerror_r_returns_charp, bool_yn: true, section: 'Function strerror_r')