mirror of https://github.com/mirror/busybox.git
Handle endian-ness. Patch from Paul J.Y. Lahaie <pjlahaie@linuxcare.com>
-Erik1_00_stable_10817
parent
0f50bca9aa
commit
4a2e463525
|
@ -181,7 +181,14 @@ extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
|
|||
//--------end of md5.h
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/* Handle endian-ness */
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define SWAP(n) (n)
|
||||
#else
|
||||
#define SWAP(n) ((n << 24) | ((n&65280)<<8) | ((n&16711680)>>8) | (n>>24))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* This array contains the bytes used to pad the buffer to the next
|
||||
64-byte boundary. (RFC 1321, 3.1: Step 1) */
|
||||
|
|
7
md5sum.c
7
md5sum.c
|
@ -181,7 +181,14 @@ extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
|
|||
//--------end of md5.h
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/* Handle endian-ness */
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define SWAP(n) (n)
|
||||
#else
|
||||
#define SWAP(n) ((n << 24) | ((n&65280)<<8) | ((n&16711680)>>8) | (n>>24))
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* This array contains the bytes used to pad the buffer to the next
|
||||
64-byte boundary. (RFC 1321, 3.1: Step 1) */
|
||||
|
|
Loading…
Reference in New Issue