From: wessels <> Date: Fri, 31 Oct 1997 12:15:06 +0000 (+0000) Subject: Adding SHA source code from Perl module source. X-Git-Tag: SQUID_3_0_PRE1~4603 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d57288d2bee141108d5ce55a77c65184d7684bcb;p=thirdparty%2Fsquid.git Adding SHA source code from Perl module source. Have configure check for endianness. use WORDS_BIGENDIAN instead of others --- diff --git a/configure.in b/configure.in index 04c753b617..35b9e6d11a 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.81 1997/10/22 19:20:07 wessels Exp $ +dnl $Id: configure.in,v 1.82 1997/10/31 05:15:06 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.81 $)dnl +AC_REVISION($Revision: 1.82 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -183,6 +183,7 @@ AC_CHECK_HEADERS( \ ) AC_C_CONST +AC_C_BIGENDIAN AC_MSG_CHECKING(if ANSI prototypes work) AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}], diff --git a/src/pinger.cc b/src/pinger.cc index 4d46cc5924..5688e53725 100644 --- a/src/pinger.cc +++ b/src/pinger.cc @@ -1,6 +1,6 @@ /* - * $Id: pinger.cc,v 1.27 1997/10/25 17:22:54 wessels Exp $ + * $Id: pinger.cc,v 1.28 1997/10/31 05:15:08 wessels Exp $ * * DEBUG: section 42 ICMP Pinger program * AUTHOR: Duane Wessels @@ -194,10 +194,9 @@ pingerRecv(void) #if HAVE_IP_HL iphdrlen = ip->ip_hl << 2; #else /* HAVE_IP_HL */ -#if BYTE_ORDER == BIG_ENDIAN +#if WORDS_BIGENDIAN iphdrlen = (ip->ip_vhl >> 4) << 2; -#endif -#if BYTE_ORDER == LITTLE_ENDIAN +#else iphdrlen = (ip->ip_vhl & 0xF) << 2; #endif #endif /* HAVE_IP_HL */