From 3175ee907c1cd4d3fa9848fb59ca8195c82dc332 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 13 Jul 1999 18:00:22 +0000 Subject: Changes to make builds work on HP-UX with ANSI compiler. --- common/print.c | 4 ++-- common/tree.c | 4 ++-- includes/auth.h | 4 ++-- includes/cf/hpux.h | 8 ++++++++ includes/osdep.h | 2 +- includes/tree.h | 1 - server/dhcp.c | 4 ++-- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/common/print.c b/common/print.c index 9ffefb7b..0942df5b 100644 --- a/common/print.c +++ b/common/print.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: print.c,v 1.22 1999/04/05 16:18:22 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: print.c,v 1.23 1999/07/13 18:00:12 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -446,7 +446,7 @@ static int print_subexpression (expr, buf, len) rv += expr -> data.encapsulate.len; if (rv + 2 > len) rv = len - 2; - strncpy (buf, expr -> data.encapsulate.data, rv - 13); + strncpy (buf, (char *)expr -> data.encapsulate.data, rv - 13); buf [rv++] = ')'; buf [rv++] = 0; break; diff --git a/common/tree.c b/common/tree.c index 437a8364..6a247fca 100644 --- a/common/tree.c +++ b/common/tree.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: tree.c,v 1.31 1999/07/06 17:04:31 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: tree.c,v 1.32 1999/07/13 18:00:12 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -272,7 +272,7 @@ int option_cache (oc, dp, expr, option) return 1; } -int do_host_lookup (result, dns) +static int do_host_lookup (result, dns) struct data_string *result; struct dns_host_entry *dns; { diff --git a/includes/auth.h b/includes/auth.h index 5437ebec..5bc61f92 100644 --- a/includes/auth.h +++ b/includes/auth.h @@ -27,8 +27,8 @@ struct signature_state { u_int8_t *algorithm_state; u_int8_t *output; int output_len; - void (*update) (u_int8_t *, u_int8_t *, u_int8_t *); - void (*final) (u_int8_t *, u_int8_t *); + void (*update) PROTO ((u_int8_t *, u_int8_t *, u_int8_t *)); + void (*final) PROTO ((u_int8_t *, u_int8_t *)); }; struct auth_key { diff --git a/includes/cf/hpux.h b/includes/cf/hpux.h index e4820fd4..f7cdaffb 100644 --- a/includes/cf/hpux.h +++ b/includes/cf/hpux.h @@ -52,9 +52,17 @@ extern int h_errno; #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid" #endif +#if !defined (__ANSI__) +/* Varargs stuff: use stdarg.h instead ... */ +#include +#define VA_DOTDOTDOT ... +#define VA_start(list, last) va_start (list, last) +#define va_dcl +#else #include #define VA_DOTDOTDOT va_alist #define VA_start(list, last) va_start (list) +#endif #define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list) #define NO_SNPRINTF diff --git a/includes/osdep.h b/includes/osdep.h index d84412a3..ba45d54a 100644 --- a/includes/osdep.h +++ b/includes/osdep.h @@ -94,7 +94,7 @@ # include "cf/sco.h" #endif -#ifdef hpux +#if defined (hpux) || defined (__hpux) # include "cf/hpux.h" #endif diff --git a/includes/tree.h b/includes/tree.h index 5a44e1f3..964565bd 100644 --- a/includes/tree.h +++ b/includes/tree.h @@ -143,7 +143,6 @@ struct dns_host_entry { }; struct option_cache; /* forward */ -struct data_string; /* forward */ struct packet; /* forward */ struct option_state; /* forward */ struct decoded_option_state; /* forward */ diff --git a/server/dhcp.c b/server/dhcp.c index 35625f0c..68626ad9 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: dhcp.c,v 1.100 1999/07/06 20:35:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcp.c,v 1.101 1999/07/13 18:00:22 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -348,7 +348,7 @@ void dhcpinform (packet) struct option_state *options = (struct option_state *)0; struct dhcp_packet raw; struct packet outgoing; - char dhcpack = DHCPACK; + unsigned char dhcpack = DHCPACK; struct subnet *subnet; struct iaddr cip; int i, j, nulltp; -- cgit v1.2.1