diff options
| author | cgd <cgd@NetBSD.org> | 1994-12-23 16:52:30 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1994-12-23 16:52:30 +0000 |
| commit | e08ec6db18e4702af4bf7aeef2abbeeaa8d7b308 (patch) | |
| tree | efdea7f4c1a9c3be03aa61fe1b8f07d56f23fed8 /usr.sbin/bootp/common | |
| parent | 7a5208fcc2b86fa60713da2a10f5f5f6e160e8e1 (diff) | |
play a bit safer with types.
Diffstat (limited to 'usr.sbin/bootp/common')
| -rw-r--r-- | usr.sbin/bootp/common/bootp.h | 6 | ||||
| -rw-r--r-- | usr.sbin/bootp/common/bootpd.h | 2 | ||||
| -rw-r--r-- | usr.sbin/bootp/common/bptypes.h | 10 | ||||
| -rw-r--r-- | usr.sbin/bootp/common/dumptab.c | 2 | ||||
| -rw-r--r-- | usr.sbin/bootp/common/tzone.c | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/usr.sbin/bootp/common/bootp.h b/usr.sbin/bootp/common/bootp.h index 990bf58838b..57fc3a90478 100644 --- a/usr.sbin/bootp/common/bootp.h +++ b/usr.sbin/bootp/common/bootp.h @@ -23,7 +23,7 @@ SOFTWARE. /* * Bootstrap Protocol (BOOTP). RFC951 and RFC1395. * - * $Id: bootp.h,v 1.2 1994/08/22 22:14:40 gwr Exp $ + * $Id: bootp.h,v 1.3 1994/12/23 16:52:30 cgd Exp $ * * * This file specifies the "implementation-independent" BOOTP protocol @@ -44,7 +44,7 @@ struct bootp { unsigned char bp_htype; /* hardware addr type */ unsigned char bp_hlen; /* hardware addr length */ unsigned char bp_hops; /* gateway hops */ - unsigned int32 bp_xid; /* transaction ID */ + u_int32 bp_xid; /* transaction ID */ unsigned short bp_secs; /* seconds since boot began */ unsigned short bp_flags; /* RFC1532 broadcast, etc. */ struct in_addr bp_ciaddr; /* client IP address */ @@ -133,7 +133,7 @@ struct bootp { struct cmu_vend { char v_magic[4]; /* magic number */ - unsigned int32 v_flags; /* flags/opcodes, etc. */ + u_int32 v_flags; /* flags/opcodes, etc. */ struct in_addr v_smask; /* Subnet mask */ struct in_addr v_dgate; /* Default gateway */ struct in_addr v_dns1, v_dns2; /* Domain name servers */ diff --git a/usr.sbin/bootp/common/bootpd.h b/usr.sbin/bootp/common/bootpd.h index e5ce3417c04..11c4a8b41d6 100644 --- a/usr.sbin/bootp/common/bootpd.h +++ b/usr.sbin/bootp/common/bootpd.h @@ -181,7 +181,7 @@ struct host { RFC951 only allocates 1 byte. . . */ haddr[MAXHADDRLEN]; int32 time_offset; - unsigned int32 bootsize, + u_int32 bootsize, msg_size, min_wait; struct in_addr bootserver, diff --git a/usr.sbin/bootp/common/bptypes.h b/usr.sbin/bootp/common/bptypes.h index 537da4e5e57..9fe00a8216c 100644 --- a/usr.sbin/bootp/common/bptypes.h +++ b/usr.sbin/bootp/common/bptypes.h @@ -5,12 +5,14 @@ /* * 32 bit integers are different types on various architectures + * XXX THE CORRECT WAY TO DO THIS IS: + * XXX (1) convert to _t form for all uses, + * XXX (2) define the _t's here (or somewhere) + * XXX if !defined(__BIT_TYPES_DEFINED__) */ -#ifndef int32 -#define int32 long -#endif -typedef unsigned int32 u_int32; +typedef int32_t int32; +typedef u_int32_t u_int32; /* * Nice typedefs. . . diff --git a/usr.sbin/bootp/common/dumptab.c b/usr.sbin/bootp/common/dumptab.c index 8c049b99deb..5893f6c4a23 100644 --- a/usr.sbin/bootp/common/dumptab.c +++ b/usr.sbin/bootp/common/dumptab.c @@ -59,7 +59,7 @@ dumptab(filename) int n; struct host *hp; FILE *fp; - long t; + time_t t; /* Print symbols in alphabetical order for reader's convenience. */ static char legend[] = "#\n# Legend:\t(see bootptab.5)\n\ #\tfirst field -- hostname (not indented)\n\ diff --git a/usr.sbin/bootp/common/tzone.c b/usr.sbin/bootp/common/tzone.c index 4adc4ae25c6..526764e5bae 100644 --- a/usr.sbin/bootp/common/tzone.c +++ b/usr.sbin/bootp/common/tzone.c @@ -4,6 +4,8 @@ * This is shared by bootpd and bootpef */ +#include <sys/types.h> + #ifdef SVR4 /* XXX - Is this really SunOS specific? -gwr */ /* This is in <time.h> but only visible if (__STDC__ == 1). */ |
