diff options
author | Brian Somers <brian@FreeBSD.org> | 1998-06-27 12:03:50 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1998-06-27 12:03:50 +0000 |
commit | 3f06c5995f4e141c31d2250ed23d5ae664540ccf (patch) | |
tree | 2186e85f4b08ef140d46d17d7cf85b8f0d93dfd6 /usr.sbin | |
parent | 7d81ddf5bd94728dd7b400f6fb11bf70f052832a (diff) | |
download | src-3f06c5995f4e141c31d2250ed23d5ae664540ccf.tar.gz src-3f06c5995f4e141c31d2250ed23d5ae664540ccf.zip |
Don't assume ``sizeof(u_long) == 4''
Submitted by: Theo
Notes
Notes:
svn path=/head/; revision=37189
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/async.h | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/filter.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/route.c | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/slcompress.c | 10 |
4 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/ppp/async.h b/usr.sbin/ppp/async.h index 492580713fb2..4bd30a9c50a1 100644 --- a/usr.sbin/ppp/async.h +++ b/usr.sbin/ppp/async.h @@ -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]; diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c index b65eace5aeac..3437d11ae874 100644 --- a/usr.sbin/ppp/filter.c +++ b/usr.sbin/ppp/filter.c @@ -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, diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index 7fd047592fda..644e55765483 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -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; diff --git a/usr.sbin/ppp/slcompress.c b/usr.sbin/ppp/slcompress.c index 503f4707b724..c6dfe6224bfe 100644 --- a/usr.sbin/ppp/slcompress.c +++ b/usr.sbin/ppp/slcompress.c @@ -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++); \ } \ } |