.
This commit is contained in:
parent
033063befc
commit
b206e4a30f
23
src/md5.c
23
src/md5.c
@ -26,31 +26,18 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if STDC_HEADERS || defined _LIBC
|
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#else
|
|
||||||
# ifndef HAVE_MEMCPY
|
|
||||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef BSD
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
# if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
# define WORDS_BIGENDIAN 1
|
|
||||||
#endif
|
#endif
|
||||||
/* We need to keep the namespace clean so define the MD5 function
|
# if _BYTE_ORDER == _BIG_ENDIAN
|
||||||
protected using leading __ . */
|
# define WORDS_BIGENDIAN 1
|
||||||
# define md5_init_ctx __md5_init_ctx
|
|
||||||
# define md5_process_block __md5_process_block
|
|
||||||
# define md5_process_bytes __md5_process_bytes
|
|
||||||
# define md5_finish_ctx __md5_finish_ctx
|
|
||||||
# define md5_read_ctx __md5_read_ctx
|
|
||||||
# define md5_stream __md5_stream
|
|
||||||
# define md5_buffer __md5_buffer
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
Loading…
Reference in New Issue
Block a user