summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bootp/bootpd/bootpd.c6
-rw-r--r--usr.sbin/bootp/common/bootp.h6
-rw-r--r--usr.sbin/bootp/common/bootpd.h2
-rw-r--r--usr.sbin/bootp/common/bptypes.h10
-rw-r--r--usr.sbin/bootp/common/dumptab.c2
-rw-r--r--usr.sbin/bootp/common/tzone.c2
-rw-r--r--usr.sbin/bootpd/bootp.h6
-rw-r--r--usr.sbin/bootpd/bootpd.c6
-rw-r--r--usr.sbin/bootpd/bootpd.h2
-rw-r--r--usr.sbin/bootpd/bptypes.h10
-rw-r--r--usr.sbin/bootpd/dumptab.c2
-rw-r--r--usr.sbin/bootpd/tzone.c2
12 files changed, 32 insertions, 24 deletions
diff --git a/usr.sbin/bootp/bootpd/bootpd.c b/usr.sbin/bootp/bootpd/bootpd.c
index fc7a5dd5195..dc07370b74a 100644
--- a/usr.sbin/bootp/bootpd/bootpd.c
+++ b/usr.sbin/bootp/bootpd/bootpd.c
@@ -21,7 +21,7 @@ SOFTWARE.
************************************************************************/
#ifndef lint
-static char rcsid[] = "$Id: bootpd.c,v 1.4 1994/08/24 18:14:44 gwr Exp $";
+static char rcsid[] = "$Id: bootpd.c,v 1.5 1994/12/23 16:52:31 cgd Exp $";
#endif
/*
@@ -481,11 +481,11 @@ main(argc, argv)
/*
* Set up signals to read or dump the table.
*/
- if ((int) signal(SIGHUP, catcher) < 0) {
+ if ((long) signal(SIGHUP, catcher) < 0) {
report(LOG_ERR, "signal: %s", get_errmsg());
exit(1);
}
- if ((int) signal(SIGUSR1, catcher) < 0) {
+ if ((long) signal(SIGUSR1, catcher) < 0) {
report(LOG_ERR, "signal: %s", get_errmsg());
exit(1);
}
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). */
diff --git a/usr.sbin/bootpd/bootp.h b/usr.sbin/bootpd/bootp.h
index 990bf58838b..57fc3a90478 100644
--- a/usr.sbin/bootpd/bootp.h
+++ b/usr.sbin/bootpd/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/bootpd/bootpd.c b/usr.sbin/bootpd/bootpd.c
index fc7a5dd5195..dc07370b74a 100644
--- a/usr.sbin/bootpd/bootpd.c
+++ b/usr.sbin/bootpd/bootpd.c
@@ -21,7 +21,7 @@ SOFTWARE.
************************************************************************/
#ifndef lint
-static char rcsid[] = "$Id: bootpd.c,v 1.4 1994/08/24 18:14:44 gwr Exp $";
+static char rcsid[] = "$Id: bootpd.c,v 1.5 1994/12/23 16:52:31 cgd Exp $";
#endif
/*
@@ -481,11 +481,11 @@ main(argc, argv)
/*
* Set up signals to read or dump the table.
*/
- if ((int) signal(SIGHUP, catcher) < 0) {
+ if ((long) signal(SIGHUP, catcher) < 0) {
report(LOG_ERR, "signal: %s", get_errmsg());
exit(1);
}
- if ((int) signal(SIGUSR1, catcher) < 0) {
+ if ((long) signal(SIGUSR1, catcher) < 0) {
report(LOG_ERR, "signal: %s", get_errmsg());
exit(1);
}
diff --git a/usr.sbin/bootpd/bootpd.h b/usr.sbin/bootpd/bootpd.h
index e5ce3417c04..11c4a8b41d6 100644
--- a/usr.sbin/bootpd/bootpd.h
+++ b/usr.sbin/bootpd/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/bootpd/bptypes.h b/usr.sbin/bootpd/bptypes.h
index 537da4e5e57..9fe00a8216c 100644
--- a/usr.sbin/bootpd/bptypes.h
+++ b/usr.sbin/bootpd/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/bootpd/dumptab.c b/usr.sbin/bootpd/dumptab.c
index 8c049b99deb..5893f6c4a23 100644
--- a/usr.sbin/bootpd/dumptab.c
+++ b/usr.sbin/bootpd/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/bootpd/tzone.c b/usr.sbin/bootpd/tzone.c
index 4adc4ae25c6..526764e5bae 100644
--- a/usr.sbin/bootpd/tzone.c
+++ b/usr.sbin/bootpd/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). */