(swap_u_int32_t): only define when used

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6246 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-05-14 15:23:19 +00:00
parent 8a1964dc7b
commit 38294ebfae
3 changed files with 6 additions and 12 deletions

View File

@@ -159,10 +159,10 @@ calc (struct md4 *m, u_int32_t *data)
* From `Performance analysis of MD5' by Joseph D. Touch <touch@isi.edu>
*/
#if defined(WORDS_BIGENDIAN)
static inline u_int32_t
swap_u_int32_t (u_int32_t t)
{
#if defined(WORDS_BIGENDIAN)
u_int32_t temp1, temp2;
temp1 = cshift(t, 16);
@@ -171,10 +171,8 @@ swap_u_int32_t (u_int32_t t)
temp2 &= 0x00ff00ff;
temp1 <<= 8;
return temp1 | temp2;
#else
return t;
#endif
}
#endif
struct x32{
unsigned int a:32;

View File

@@ -183,10 +183,10 @@ calc (struct md5 *m, u_int32_t *data)
* From `Performance analysis of MD5' by Joseph D. Touch <touch@isi.edu>
*/
#if defined(WORDS_BIGENDIAN)
static inline u_int32_t
swap_u_int32_t (u_int32_t t)
{
#if defined(WORDS_BIGENDIAN)
u_int32_t temp1, temp2;
temp1 = cshift(t, 16);
@@ -195,10 +195,8 @@ swap_u_int32_t (u_int32_t t)
temp2 &= 0x00ff00ff;
temp1 <<= 8;
return temp1 | temp2;
#else
return t;
#endif
}
#endif
struct x32{
unsigned int a:32;

View File

@@ -208,10 +208,10 @@ calc (struct sha *m, u_int32_t *in)
* From `Performance analysis of MD5' by Joseph D. Touch <touch@isi.edu>
*/
#if !defined(WORDS_BIGENDIAN)
static inline u_int32_t
swap_u_int32_t (u_int32_t t)
{
#if !defined(WORDS_BIGENDIAN)
#define ROL(x,n) ((x)<<(n))|((x)>>(32-(n)))
u_int32_t temp1, temp2;
@@ -221,10 +221,8 @@ swap_u_int32_t (u_int32_t t)
temp2 &= 0x00ff00ff;
temp1 <<= 8;
return temp1 | temp2;
#else
return t;
#endif
}
#endif
struct x32{
unsigned int a:32;