summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-05-16 07:21:45 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-05-16 07:21:45 (GMT)
commitb7d82a478eafbde7dbe7b6bfb1630becfed49f39 (patch)
tree6beafd96a78dee9b8b15bbaae1efe572b674a2c3
parent70a4c1665fae925e7fb75ed1d9f1e2153b998ed7 (diff)
Attempt to fix compilations in MSVS.
Check if compiling on Windows. Use __inline instead of inline.
-rw-r--r--include/md5.h6
-rw-r--r--src/lib/md5.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/include/md5.h b/include/md5.h
index 15719fd..3652594 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -49,6 +49,12 @@
#ifndef md5_INCLUDED
# define md5_INCLUDED
+#ifndef USE_WINDOWS
+#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
+#define USE_WINDOWS
+#endif /* win32... */
+#endif /* not defined USE_WINDOWS */
+
/*
* This package supports both compile-time and run-time determination of CPU
* byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
diff --git a/src/lib/md5.c b/src/lib/md5.c
index 8bbde52..57c2138 100644
--- a/src/lib/md5.c
+++ b/src/lib/md5.c
@@ -169,8 +169,11 @@
#define T63 0x2ad7d2bb
#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
-
+#ifdef USE_WINDOWS
static inline void
+#else
+static __inline void
+#endif
md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
{
md5_word_t
contact: Jan Huwald // Impressum