Hash :
8e3b4ac3
Author :
Date :
2023-02-11T21:12:00
error-h: Make less fragile. * lib/error.in.h: Use #include_next if the system has an <error.h>. Use a split double-inclusion guard. * m4/error_h.m4 (gl_ERROR_H): Invoke gl_CHECK_NEXT_HEADERS. Set HAVE_ERROR_H. * modules/error-h (Makefile.am): Substitute GUARD_PREFIX, HAVE_ERROR_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_ERROR_H.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
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|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''HAVE_ERROR_H''@|$(HAVE_ERROR_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_ERROR_H''@|$(NEXT_ERROR_H)|g' \
-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