Skip to content

Commit

Permalink
Fix broken autoconf tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
landonf committed Dec 23, 2014
1 parent aa1c3a7 commit a61a4bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
24 changes: 12 additions & 12 deletions compat/endian_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/* Alignment-agnostic encode/decode bytestream to/from little/big endian. */

#if !HAVE_BE16DEC
#if defined(HAVE_DECL_BE16DEC) && !HAVE_DECL_BE16DEC
static __inline uint16_t
be16dec(const void *pp)
{
Expand All @@ -46,7 +46,7 @@ be16dec(const void *pp)
}
#endif

#if !HAVE_BE32DEC
#if defined(HAVE_DECL_BE32DEC) && !HAVE_DECL_BE32DEC
static __inline uint32_t
be32dec(const void *pp)
{
Expand All @@ -56,7 +56,7 @@ be32dec(const void *pp)
}
#endif

#if !HAVE_BE64DEC
#if defined(HAVE_DECL_BE64DEC) && !HAVE_DECL_BE64DEC
static __inline uint64_t
be64dec(const void *pp)
{
Expand All @@ -66,7 +66,7 @@ be64dec(const void *pp)
}
#endif

#if !HAVE_LE16DEC
#if defined(HAVE_DECL_LE16DEC) && !HAVE_DECL_LE16DEC
static __inline uint16_t
le16dec(const void *pp)
{
Expand All @@ -76,7 +76,7 @@ le16dec(const void *pp)
}
#endif

#if !HAVE_LE32DEC
#if defined(HAVE_DECL_LE32DEC) && !HAVE_DECL_LE32DEC
static __inline uint32_t
le32dec(const void *pp)
{
Expand All @@ -86,7 +86,7 @@ le32dec(const void *pp)
}
#endif

#if !HAVE_LE64DEC
#if defined(HAVE_DECL_LE64DEC) && !HAVE_DECL_LE64DEC
static __inline uint64_t
le64dec(const void *pp)
{
Expand All @@ -96,7 +96,7 @@ le64dec(const void *pp)
}
#endif

#if !HAVE_BE16ENC
#if defined(HAVE_DECL_BE16ENC) && !HAVE_DECL_BE16ENC
static __inline void
be16enc(void *pp, uint16_t u)
{
Expand All @@ -107,7 +107,7 @@ be16enc(void *pp, uint16_t u)
}
#endif

#if !HAVE_BE32ENC
#if defined(HAVE_DECL_BE32ENC) && !HAVE_DECL_BE32ENC
static __inline void
be32enc(void *pp, uint32_t u)
{
Expand All @@ -120,7 +120,7 @@ be32enc(void *pp, uint32_t u)
}
#endif

#if !HAVE_BE64ENC
#if defined(HAVE_DECL_BE64ENC) && !HAVE_DECL_BE64ENC
static __inline void
be64enc(void *pp, uint64_t u)
{
Expand All @@ -131,7 +131,7 @@ be64enc(void *pp, uint64_t u)
}
#endif

#if !HAVE_LE16ENC
#if defined(HAVE_DECL_LE16ENC) && !HAVE_DECL_LE16ENC
static __inline void
le16enc(void *pp, uint16_t u)
{
Expand All @@ -142,7 +142,7 @@ le16enc(void *pp, uint16_t u)
}
#endif

#if !HAVE_LE32ENC
#if defined(HAVE_DECL_LE32ENC) && !HAVE_DECL_LE32ENC
static __inline void
le32enc(void *pp, uint32_t u)
{
Expand All @@ -155,7 +155,7 @@ le32enc(void *pp, uint32_t u)
}
#endif

#if !HAVE_LE64ENC
#if defined(HAVE_DECL_LE64ENC) && !HAVE_DECL_LE64ENC
static __inline void
le64enc(void *pp, uint64_t u)
{
Expand Down
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ AC_CHECK_FUNCS_ONCE([gmtime_r])
AC_CHECK_FUNCS_ONCE([strerror_r])
AC_CHECK_FUNCS_ONCE([strtonum])
AC_CHECK_FUNCS_ONCE([fstatat], [openat], [unlinkat], [readlinkat], [faccessat])
AC_CHECK_FUNCS_ONCE([be16dec], [be32dec], [be64dec], [le16dec], [le32dec], [le64dec],
[be16enc], [be32enc], [be64enc], [le16enc], [le32enc], [le64enc])
AC_CHECK_DECLS(
[[be16dec], [be32dec], [be64dec], [le16dec], [le32dec], [le64dec],
[be16enc], [be32enc], [be64enc], [le16enc], [le32enc], [le64enc]],
[], [], [#include <sys/endian.h>]
)
AC_CHECK_FUNCS_ONCE([flopen])
AC_CHECK_FUNCS_ONCE([eaccess])
AC_CHECK_FUNCS_ONCE([closefrom])
Expand Down

0 comments on commit a61a4bb

Please sign in to comment.