Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check endianness of build with autotools to enable md5 support on mor…

…e platforms.
  • Loading branch information...
commit 73e921b86299a9c0066f34e22ccf90f1b69b4589 1 parent 585113d
@ckolivas authored
Showing with 18 additions and 2 deletions.
  1. +2 −0  configure.ac
  2. +14 −1 lrzip_private.h
  3. +2 −1  md5.c
View
2  configure.ac
@@ -109,6 +109,8 @@ fi
AC_C_INLINE
+AC_C_BIGENDIAN
+
AC_CHECK_LIB(pthread, pthread_create, ,
AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
AC_CHECK_LIB(m, sqrt, ,
View
15 lrzip_private.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006-2011 Con Kolivas
+ Copyright (C) 2006-2012 Con Kolivas
Copyright (C) 2011 Peter Hyman
Copyright (C) 1998-2003 Andrew Tridgell
@@ -60,6 +60,19 @@ extern "C"
void *alloca (size_t);
#endif
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+#elif HAVE_SYS_ENDIAN_H
+# include <sys/endian.h>
+#endif
+#ifndef __BYTE_ORDER
+# ifdef WORDS_BIGENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
+# else
+# define __BYTE_ORDER __LITTLE_ENDIAN
+# endif
+#endif
+
#ifndef MD5_DIGEST_SIZE
# define MD5_DIGEST_SIZE 16
#endif
View
3  md5.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2011 Con Kolivas
+ Copyright (C) 2012 Con Kolivas
Copyright (C) 1995-2011 Ulrich Drepper.
Functions to compute MD5 message digest of files or memory blocks.
@@ -30,6 +30,7 @@
#include <stddef.h>
+#include "lrzip_private.h"
#include "md5.h"
#if USE_UNLOCKED_IO
Please sign in to comment.
Something went wrong with that request. Please try again.