From 2886cca8398f4c5a4d68368a19c0e6d0ff97c739 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 12 Jan 2023 16:51:15 +0100 Subject: error: Work around an Android problem. * lib/error.in.h: Renamed from lib/error.h. (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro. (error): Consider HAVE_ERROR and REPLACE_ERROR. (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE. * m4/error_h.m4: New file, partially based on m4/error.m4. * m4/error.m4 (gl_ERROR): Remove the test for error_at_line. * modules/error-h: New file. * modules/error (Files): Remove lib/error.h. (Depends-on): Add error-h. Update conditions. (configure.ac): Require gl_ERROR_H. Update condition. * doc/glibc-headers/error.texi: Mention the 'error-h' module. * doc/glibc-functions/error.texi: Mention the Android problem. * config/srclist.txt: Add comment regarding error.h. --- modules/error-h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 modules/error-h (limited to 'modules/error-h') diff --git a/modules/error-h b/modules/error-h new file mode 100644 index 0000000000..80bc06194b --- /dev/null +++ b/modules/error-h @@ -0,0 +1,46 @@ +Description: +Functions for error reporting. + +Files: +lib/error.in.h +m4/error_h.m4 + +Depends-on: +gen-header +snippet/c++defs + +configure.ac: +gl_ERROR_H +gl_CONDITIONAL_HEADER([error.h]) +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += $(ERROR_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_ERROR_H +error.h: error.in.h $(top_builddir)/config.status $(CXXDEFS_H) +@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%' + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_ERROR''@|$(HAVE_ERROR)|g' \ + -e 's|@''HAVE_ERROR_AT_LINE''@|$(HAVE_ERROR_AT_LINE)|g' \ + -e 's|@''REPLACE_ERROR''@|$(REPLACE_ERROR)|g' \ + -e 's|@''REPLACE_ERROR_AT_LINE''@|$(REPLACE_ERROR_AT_LINE)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + $(srcdir)/error.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +error.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += error.h error.h-t + +Include: +"error.h" + +License: +LGPLv2+ + +Maintainer: +all -- cgit v1.2.1