Branch
Hash :
cedffa9f
Author :
Date :
2024-12-28T16:47:16
endian: Fix compilation error on NetBSD 7.1. * m4/endian_h.m4 (gl_ENDIAN_H): Test for <sys/endian.h>. Set HAVE_SYS_ENDIAN_H. * lib/endian.in.h: Test HAVE_SYS_ENDIAN_H as an alternative to HAVE_ENDIAN_H. * modules/endian (Makefile.am): Substitute HAVE_SYS_ENDIAN_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 52 53 54
Description:
A POSIX-like <endian.h>.
Files:
lib/endian.in.h
lib/endian.c
m4/endian_h.m4
Depends-on:
gen-header
include_next
extern-inline [$GL_GENERATE_ENDIAN_H && test $ENDIAN_H_JUST_MISSING_STDINT = 0]
byteswap [$GL_GENERATE_ENDIAN_H && test $ENDIAN_H_JUST_MISSING_STDINT = 0]
stdint-h [$GL_GENERATE_ENDIAN_H]
configure.ac:
gl_ENDIAN_H
gl_CONDITIONAL_HEADER([endian.h])
AC_PROG_MKDIR_P
Makefile.am:
BUILT_SOURCES += $(ENDIAN_H)
# We need the following in order to create <endian.h> when the system
# doesn't have one.
if GL_GENERATE_ENDIAN_H
endian.h: endian.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|@''HAVE_ENDIAN_H''@|$(HAVE_ENDIAN_H)|g' \
-e 's|@''NEXT_ENDIAN_H''@|$(NEXT_ENDIAN_H)|g' \
-e 's|@''HAVE_SYS_ENDIAN_H''@|$(HAVE_SYS_ENDIAN_H)|g' \
-e 's|@''ENDIAN_H_JUST_MISSING_STDINT''@|$(ENDIAN_H_JUST_MISSING_STDINT)|g' \
$(srcdir)/endian.in.h > $@-t
$(AM_V_at)mv $@-t $@
lib_SOURCES += endian.c
else
endian.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += endian.h endian.h-t
Include:
<endian.h>
License:
LGPLv2+
Maintainer:
all