- (djm) [configure.ac umac.c] If platform doesn't provide swap32(3), then
fallback to provided bit-swizzing functions
This commit is contained in:
parent
22b7b49331
commit
34a176995f
|
@ -24,6 +24,8 @@
|
||||||
[sshd_config.5]
|
[sshd_config.5]
|
||||||
oops, here too: put the MAC list into a display, like we do for
|
oops, here too: put the MAC list into a display, like we do for
|
||||||
ciphers, since groff has trouble with wide lines;
|
ciphers, since groff has trouble with wide lines;
|
||||||
|
- (djm) [configure.ac umac.c] If platform doesn't provide swap32(3), then
|
||||||
|
fallback to provided bit-swizzing functions
|
||||||
|
|
||||||
20070605
|
20070605
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
@ -2999,4 +3001,4 @@
|
||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4684 2007/06/11 04:07:12 djm Exp $
|
$Id: ChangeLog,v 1.4685 2007/06/11 04:15:42 djm Exp $
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: configure.ac,v 1.380 2007/05/09 22:57:43 tim Exp $
|
# $Id: configure.ac,v 1.381 2007/06/11 04:15:43 djm Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 1999-2004 Damien Miller
|
# Copyright (c) 1999-2004 Damien Miller
|
||||||
#
|
#
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
|
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
|
||||||
AC_REVISION($Revision: 1.380 $)
|
AC_REVISION($Revision: 1.381 $)
|
||||||
AC_CONFIG_SRCDIR([ssh.c])
|
AC_CONFIG_SRCDIR([ssh.c])
|
||||||
|
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
@ -1300,6 +1300,7 @@ AC_CHECK_FUNCS( \
|
||||||
strtonum \
|
strtonum \
|
||||||
strtoll \
|
strtoll \
|
||||||
strtoul \
|
strtoul \
|
||||||
|
swap32 \
|
||||||
sysconf \
|
sysconf \
|
||||||
tcgetpgrp \
|
tcgetpgrp \
|
||||||
truncate \
|
truncate \
|
||||||
|
|
13
umac.c
13
umac.c
|
@ -122,7 +122,11 @@ typedef unsigned int UWORD; /* Register */
|
||||||
/* --- Endian Conversion --- Forcing assembly on some platforms */
|
/* --- Endian Conversion --- Forcing assembly on some platforms */
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if 0
|
#if HAVE_SWAP32
|
||||||
|
#define LOAD_UINT32_REVERSED(p) (swap32(*(UINT32 *)(p)))
|
||||||
|
#define STORE_UINT32_REVERSED(p,v) (*(UINT32 *)(p) = swap32(v))
|
||||||
|
#else /* HAVE_SWAP32 */
|
||||||
|
|
||||||
static UINT32 LOAD_UINT32_REVERSED(void *ptr)
|
static UINT32 LOAD_UINT32_REVERSED(void *ptr)
|
||||||
{
|
{
|
||||||
UINT32 temp = *(UINT32 *)ptr;
|
UINT32 temp = *(UINT32 *)ptr;
|
||||||
|
@ -137,15 +141,12 @@ static void STORE_UINT32_REVERSED(void *ptr, UINT32 x)
|
||||||
*(UINT32 *)ptr = (i >> 24) | ((i & 0x00FF0000) >> 8 )
|
*(UINT32 *)ptr = (i >> 24) | ((i & 0x00FF0000) >> 8 )
|
||||||
| ((i & 0x0000FF00) << 8 ) | (i << 24);
|
| ((i & 0x0000FF00) << 8 ) | (i << 24);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* HAVE_SWAP32 */
|
||||||
|
|
||||||
/* The following definitions use the above reversal-primitives to do the right
|
/* The following definitions use the above reversal-primitives to do the right
|
||||||
* thing on endian specific load and stores.
|
* thing on endian specific load and stores.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOAD_UINT32_REVERSED(p) (swap32(*(UINT32 *)(p)))
|
|
||||||
#define STORE_UINT32_REVERSED(p,v) (*(UINT32 *)(p) = swap32(v))
|
|
||||||
|
|
||||||
#if (__LITTLE_ENDIAN__)
|
#if (__LITTLE_ENDIAN__)
|
||||||
#define LOAD_UINT32_LITTLE(ptr) (*(UINT32 *)(ptr))
|
#define LOAD_UINT32_LITTLE(ptr) (*(UINT32 *)(ptr))
|
||||||
#define STORE_UINT32_BIG(ptr,x) STORE_UINT32_REVERSED(ptr,x)
|
#define STORE_UINT32_BIG(ptr,x) STORE_UINT32_REVERSED(ptr,x)
|
||||||
|
@ -154,8 +155,6 @@ static void STORE_UINT32_REVERSED(void *ptr, UINT32 x)
|
||||||
#define STORE_UINT32_BIG(ptr,x) (*(UINT32 *)(ptr) = (UINT32)(x))
|
#define STORE_UINT32_BIG(ptr,x) (*(UINT32 *)(ptr) = (UINT32)(x))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
/* ----- Begin KDF & PDF Section ---------------------------------------- */
|
/* ----- Begin KDF & PDF Section ---------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue