diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-12 16:51:15 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-12 16:51:15 +0100 |
commit | 2886cca8398f4c5a4d68368a19c0e6d0ff97c739 (patch) | |
tree | d6cd45115b52ff36fa55aa96dd87622de1bd5dfa /modules/error-h | |
parent | b95dc47291b5890653bc75169b1d38b5760ca1ea (diff) | |
download | gnulib-2886cca8398f4c5a4d68368a19c0e6d0ff97c739.tar.gz |
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.
Diffstat (limited to 'modules/error-h')
-rw-r--r-- | modules/error-h | 46 |
1 files changed, 46 insertions, 0 deletions
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 <error.h> 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 |