diff --git a/configure.ac b/configure.ac index 67fdfed..95d5571 100644 --- a/configure.ac +++ b/configure.ac @@ -36,10 +36,10 @@ AC_PROG_INSTALL AC_CHECK_HEADERS([endian.h sys/endian.h]) AC_CHECK_DECLS([be32enc, be32dec, le32enc, le32dec, be64enc, be64dec, le64enc, le64dec], [], [], [[ -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #include #endif ]]) @@ -48,7 +48,7 @@ AC_CHECK_FUNCS([strlcat strlcmp strlcpy]) # For tracing allocations in unit tests AC_CHECK_HEADERS([sys/uio.h sys/ktrace.h], [], [], [[ #include -#ifdef HAVE_SYS_UIO_H +#if HAVE_SYS_UIO_H #include #endif ]]) diff --git a/include/cryb/endian.h b/include/cryb/endian.h index 52ef8bb..d5ee47b 100644 --- a/include/cryb/endian.h +++ b/include/cryb/endian.h @@ -30,36 +30,36 @@ #ifndef CRYB_ENDIAN_H_INCLUDED #define CRYB_ENDIAN_H_INCLUDED -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #include #endif -#ifndef HAVE_DECL_BE32ENC +#if !HAVE_DECL_BE32ENC #define be32enc cryb_be32enc #endif -#ifndef HAVE_DECL_BE32DEC +#if !HAVE_DECL_BE32DEC #define be32dec cryb_be32dec #endif -#ifndef HAVE_DECL_BE64ENC +#if !HAVE_DECL_BE64ENC #define be64enc cryb_be64enc #endif -#ifndef HAVE_DECL_BE64DEC +#if !HAVE_DECL_BE64DEC #define be64dec cryb_be64dec #endif -#ifndef HAVE_DECL_LE32ENC +#if !HAVE_DECL_LE32ENC #define le32enc cryb_le32enc #endif -#ifndef HAVE_DECL_LE32DEC +#if !HAVE_DECL_LE32DEC #define le32dec cryb_le32dec #endif -#ifndef HAVE_DECL_LE64ENC +#if !HAVE_DECL_LE64ENC #define le64enc cryb_le64enc #endif -#ifndef HAVE_DECL_LE64DEC +#if !HAVE_DECL_LE64DEC #define le64dec cryb_le64dec #endif diff --git a/include/cryb/impl.h b/include/cryb/impl.h index 614e659..ca3d925 100644 --- a/include/cryb/impl.h +++ b/include/cryb/impl.h @@ -30,7 +30,7 @@ #ifndef CRYB_IMPL_H_INCLUDED #define CRYB_IMPL_H_INCLUDED -#ifdef HAVE_CONFIG_H +#if HAVE_CONFIG_H # include "config.h" #endif diff --git a/include/cryb/strlcat.h b/include/cryb/strlcat.h index 6f1fac2..64a3a7f 100644 --- a/include/cryb/strlcat.h +++ b/include/cryb/strlcat.h @@ -32,7 +32,7 @@ size_t cryb_strlcat(char *, const char *, size_t); -#ifndef HAVE_STRLCAT +#if !HAVE_STRLCAT #undef strlcat #define strlcat(arg, ...) cryb_strlcat(arg, __VA_ARGS__) #endif diff --git a/include/cryb/strlcmp.h b/include/cryb/strlcmp.h index a8dff11..22b08b7 100644 --- a/include/cryb/strlcmp.h +++ b/include/cryb/strlcmp.h @@ -32,7 +32,7 @@ int cryb_strlcmp(const char *, const char *, size_t); -#ifndef HAVE_STRLCMP +#if !HAVE_STRLCMP #undef strlcmp #define strlcmp(...) cryb_strlcmp(__VA_ARGS__) #endif diff --git a/include/cryb/strlcpy.h b/include/cryb/strlcpy.h index 8c17081..ee80bd2 100644 --- a/include/cryb/strlcpy.h +++ b/include/cryb/strlcpy.h @@ -32,7 +32,7 @@ size_t cryb_strlcpy(char *, const char *, size_t); -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #undef strlcpy #define strlcpy(arg, ...) cryb_strlcpy(arg, __VA_ARGS__) #endif diff --git a/lib/digest/sha1.c b/lib/digest/sha1.c index a65d960..e5277de 100644 --- a/lib/digest/sha1.c +++ b/lib/digest/sha1.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/lib/mac/hmac_sha1.c b/lib/mac/hmac_sha1.c index 9db040d..c768154 100644 --- a/lib/mac/hmac_sha1.c +++ b/lib/mac/hmac_sha1.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/lib/mac/hmac_sha224.c b/lib/mac/hmac_sha224.c index 936bd17..0c043c7 100644 --- a/lib/mac/hmac_sha224.c +++ b/lib/mac/hmac_sha224.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/lib/mac/hmac_sha256.c b/lib/mac/hmac_sha256.c index 1b45c49..2947676 100644 --- a/lib/mac/hmac_sha256.c +++ b/lib/mac/hmac_sha256.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/lib/mac/hmac_sha384.c b/lib/mac/hmac_sha384.c index 8864c6f..22a94c3 100644 --- a/lib/mac/hmac_sha384.c +++ b/lib/mac/hmac_sha384.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/lib/mac/hmac_sha512.c b/lib/mac/hmac_sha512.c index 3d7f0a4..7308fde 100644 --- a/lib/mac/hmac_sha512.c +++ b/lib/mac/hmac_sha512.c @@ -30,11 +30,11 @@ #include "cryb/impl.h" -#ifdef HAVE_SYS_ENDIAN_H +#if HAVE_SYS_ENDIAN_H #include #endif -#ifdef HAVE_ENDIAN_H +#if HAVE_ENDIAN_H #define _BSD_SOURCE #include #endif diff --git a/t/t_malloc.c b/t/t_malloc.c index 4a0f952..f1851f6 100644 --- a/t/t_malloc.c +++ b/t/t_malloc.c @@ -40,9 +40,9 @@ #define MAP_NOSYNC 0 #endif -#ifdef HAVE_UTRACE -#ifdef HAVE_SYS_KTRACE_H -#ifdef HAVE_SYS_UIO_H +#if HAVE_UTRACE +#if HAVE_SYS_KTRACE_H +#if HAVE_SYS_UIO_H #include #endif #include