1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00
Files
gnulib/modules/stdckdint-h
Collin Funk e331531a77 stdckdint-h: Don't generate header if it is not needed.
Suggested by Paul Eggert in:
<https://lists.gnu.org/archive/html/bug-gnulib/2025-05/msg00216.html>.

* m4/stdckdint_h.m4: New file.
* modules/stdckdint-h (Files): Add m4/stdckdint_h.m4.
(configure.ac): Remove checks and just invoke gl_STDCKDINT_H.
(Makefile.am): Replace variables set by ./configure.
* lib/stdckdint.in.h: Include the compilers header if it exists.  Add
comment mentioning expected future standardization in C++26.
(ckd_add, ckd_sub, ckd_mul): Only define if the compilers definitions do
not work.
2025-05-22 19:33:05 -07:00

52 lines
1.4 KiB
Plaintext

Description:
An <stdckdint.h> that is like C23.
Files:
m4/stdckdint_h.m4
lib/stdckdint.in.h
lib/intprops-internal.h
Depends-on:
gen-header
bool
configure.ac:
gl_STDCKDINT_H
gl_CONDITIONAL_HEADER([stdckdint.h])
AC_PROG_MKDIR_P
Makefile.am:
BUILT_SOURCES += $(STDCKDINT_H)
# We need the following in order to create <stdckdint.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDCKDINT_H
stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDCKDINT_H''@|$(NEXT_STDCKDINT_H)|g' \
-e 's|@''HAVE_C_STDCKDINT_H''@|$(HAVE_C_STDCKDINT_H)|g' \
-e 's|@''HAVE_WORKING_C_STDCKDINT_H''@|$(HAVE_WORKING_C_STDCKDINT_H)|g' \
-e 's|@''HAVE_CXX_STDCKDINT_H''@|$(HAVE_CXX_STDCKDINT_H)|g' \
-e 's|@''HAVE_WORKING_CXX_STDCKDINT_H''@|$(HAVE_WORKING_CXX_STDCKDINT_H)|g' \
$(srcdir)/stdckdint.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
stdckdint.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t
Include:
<stdckdint.h>
License:
LGPLv2+
Maintainer:
Paul Eggert