Add C89 stdint compatibility

This commit is contained in:
Nishi 2026-06-18 08:33:32 +09:00
commit 27224cdd4c
4 changed files with 100 additions and 9 deletions

5
configure vendored
View file

@ -221,6 +221,7 @@ HAVE_B64_NTOP=
HAVE_CAPSICUM=
HAVE_CRYPT=
HAVE_CRYPT_NEWHASH=
HAVE_C99_STDINT=
HAVE_ENDIAN_H=
HAVE_ERR=
HAVE_EXPLICIT_BZERO=
@ -391,6 +392,7 @@ runtest b64_ntop B64_NTOP "" "" "-lresolv" || true
runtest capsicum CAPSICUM || true
runtest crypt CRYPT "" "" "-lcrypt" || true
runtest crypt_newhash CRYPT_NEWHASH || true
runtest c99_stdint C99_STDINT || true
runtest endian_h ENDIAN_H || true
runtest err ERR || true
runtest explicit_bzero EXPLICIT_BZERO || true
@ -513,7 +515,7 @@ fi
if [ ${HAVE_MD5} -eq 0 -o \
${HAVE_SHA2} -eq 0 ]
then
echo "#include <stdint.h> /* C99 [u]int[nn]_t types */"
echo "#include \"sj_stdint.h\" /* C99 stdint.h or C89 fallback types */"
echo
fi
@ -555,6 +557,7 @@ cat << __HEREDOC__
#define HAVE_CAPSICUM ${HAVE_CAPSICUM}
#define HAVE_CRYPT ${HAVE_CRYPT}
#define HAVE_CRYPT_NEWHASH ${HAVE_CRYPT_NEWHASH}
#define HAVE_C99_STDINT ${HAVE_C99_STDINT}
#define HAVE_ENDIAN_H ${HAVE_ENDIAN_H}
#define HAVE_ERR ${HAVE_ERR}
#define HAVE_EXPLICIT_BZERO ${HAVE_EXPLICIT_BZERO}