Don't assume ``sizeof(u_long) == 4''
Submitted by: Theo
This commit is contained in:
parent
7d81ddf5bd
commit
3f06c5995f
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: async.h,v 1.2.4.7 1998/04/07 00:53:17 brian Exp $
|
||||
* $Id: async.h,v 1.3 1998/05/21 21:43:57 brian Exp $
|
||||
*/
|
||||
|
||||
#define HDLCSIZE (MAX_MRU*2+6)
|
||||
@ -33,8 +33,8 @@ struct async {
|
||||
int length;
|
||||
u_char hbuff[HDLCSIZE]; /* recv buffer */
|
||||
u_char xbuff[HDLCSIZE]; /* xmit buffer */
|
||||
u_long my_accmap;
|
||||
u_long his_accmap;
|
||||
u_int32_t my_accmap;
|
||||
u_int32_t his_accmap;
|
||||
|
||||
struct {
|
||||
u_char EscMap[33];
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: filter.c,v 1.23 1998/05/21 21:45:13 brian Exp $
|
||||
* $Id: filter.c,v 1.24 1998/06/15 19:06:07 brian Exp $
|
||||
*
|
||||
* TODO: Shoud send ICMP error message when we discard packets.
|
||||
*/
|
||||
@ -59,7 +59,7 @@
|
||||
static int filter_Nam2Proto(int, char const *const *);
|
||||
static int filter_Nam2Op(const char *);
|
||||
|
||||
static const u_long netmasks[33] = {
|
||||
static const u_int32_t netmasks[33] = {
|
||||
0x00000000,
|
||||
0x80000000, 0xC0000000, 0xE0000000, 0xF0000000,
|
||||
0xF8000000, 0xFC000000, 0xFE000000, 0xFF000000,
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: route.c,v 1.48 1998/06/15 19:06:55 brian Exp $
|
||||
* $Id: route.c,v 1.49 1998/06/16 19:40:40 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -139,7 +139,7 @@ p_sockaddr(struct prompt *prompt, struct sockaddr *phost,
|
||||
}
|
||||
|
||||
static struct bits {
|
||||
u_long b_mask;
|
||||
u_int32_t b_mask;
|
||||
char b_val;
|
||||
} bits[] = {
|
||||
{ RTF_UP, 'U' },
|
||||
@ -176,7 +176,7 @@ static struct bits {
|
||||
#endif
|
||||
|
||||
static void
|
||||
p_flags(struct prompt *prompt, u_long f, int max)
|
||||
p_flags(struct prompt *prompt, u_int32_t f, int max)
|
||||
{
|
||||
char name[33], *flags;
|
||||
register struct bits *p = bits;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: slcompress.c,v 1.17 1998/06/14 00:56:11 brian Exp $
|
||||
* $Id: slcompress.c,v 1.18 1998/06/15 19:06:24 brian Exp $
|
||||
*
|
||||
* Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
|
||||
* - Initial distribution.
|
||||
@ -76,7 +76,7 @@ sl_compress_init(struct slcompress * comp, int max_state)
|
||||
|
||||
|
||||
/* ENCODE encodes a number that is known to be non-zero. ENCODEZ
|
||||
* checks for zero (since zero has to be encoded in the long, 3 byte
|
||||
* checks for zero (since zero has to be encoded in the 32-bit, 3 byte
|
||||
* form).
|
||||
*/
|
||||
#define ENCODE(n) { \
|
||||
@ -105,7 +105,7 @@ sl_compress_init(struct slcompress * comp, int max_state)
|
||||
(f) = htonl(ntohl(f) + ((cp[1] << 8) | cp[2])); \
|
||||
cp += 3; \
|
||||
} else { \
|
||||
(f) = htonl(ntohl(f) + (u_long)*cp++); \
|
||||
(f) = htonl(ntohl(f) + (u_int32_t)*cp++); \
|
||||
} \
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ sl_compress_init(struct slcompress * comp, int max_state)
|
||||
(f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
|
||||
cp += 3; \
|
||||
} else { \
|
||||
(f) = htons(ntohs(f) + (u_long)*cp++); \
|
||||
(f) = htons(ntohs(f) + (u_int32_t)*cp++); \
|
||||
} \
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ sl_compress_init(struct slcompress * comp, int max_state)
|
||||
(f) = htons((cp[1] << 8) | cp[2]); \
|
||||
cp += 3; \
|
||||
} else { \
|
||||
(f) = htons((u_long)*cp++); \
|
||||
(f) = htons((u_int32_t)*cp++); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user