summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-27 12:03:50 +0000
committerbrian <brian@FreeBSD.org>1998-06-27 12:03:50 +0000
commit6a5332c7c79dd1e6809f85f057a351c5f861749e (patch)
treea386301ec5dd09bbb7f26f0a6d1a58af9f87d614
parent0e8196a1ea13c1cc385e349ebf8dde5e70b1b7aa (diff)
downloadFreeBSD-src-6a5332c7c79dd1e6809f85f057a351c5f861749e.zip
FreeBSD-src-6a5332c7c79dd1e6809f85f057a351c5f861749e.tar.gz
Don't assume ``sizeof(u_long) == 4''
Submitted by: Theo
-rw-r--r--usr.sbin/ppp/async.h6
-rw-r--r--usr.sbin/ppp/filter.c4
-rw-r--r--usr.sbin/ppp/route.c6
-rw-r--r--usr.sbin/ppp/slcompress.c10
4 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/ppp/async.h b/usr.sbin/ppp/async.h
index 4925807..4bd30a9 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 b65eace..3437d11 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 7fd0475..644e557 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 503f470..c6dfe62 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++); \
} \
}
OpenPOWER on IntegriCloud