X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/9f6f48455f7d25e5cc2d50485d98ff3af43946a2..51721edc6ba92f9c7cb6a2daab45bb538a696f3d:/lib/md5.c diff --git a/lib/md5.c b/lib/md5.c index 30b7e50e3a..ece24ac9e0 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -1,6 +1,6 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2012 Free Software + Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -21,6 +21,9 @@ #include +#if HAVE_OPENSSL_MD5 +# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE +#endif #include "md5.h" #include @@ -61,6 +64,7 @@ # error "invalid BLOCKSIZE" #endif +#if ! HAVE_OPENSSL_MD5 /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; @@ -83,7 +87,7 @@ md5_init_ctx (struct md5_ctx *ctx) /* Copy the 4 byte value from v into the memory location pointed to by *cp, If your architecture allows unaligned access this is equivalent to * (uint32_t *) cp = v */ -static inline void +static void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); @@ -128,6 +132,7 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) return md5_read_ctx (ctx, resbuf); } +#endif /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes @@ -202,6 +207,7 @@ process_partial_block: return 0; } +#if ! HAVE_OPENSSL_MD5 /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message @@ -459,3 +465,4 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) ctx->C = C; ctx->D = D; } +#endif