#LIBS = -lresolv -lsocket -lnsl -lgen
#CC=gcc
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
-# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror
+# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror \
+# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION)
#CF = cf/sunos5-5.h
#ADMMANDIR = /usr/share/man/cat1m
#ADMMANEXT = .1m
#MANINSTALL=/usr/ucb/install
#LIBS = -lresolv -lsocket -lnsl -lgen
#CC=cc
-#COPTS = -D__svr4__ $(BINDDEF)
+#COPTS = -D__svr4__ $(BINDDEF) \
+# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION)
#CF = cf/sunos5-5.h
#ADMMANDIR = /usr/share/man/cat1m
#ADMMANEXT = .1m
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.94 2000/01/28 20:30:26 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.95 2000/02/02 20:01:39 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* XXX inelegant hack to prove concept */
char command[1024];
+#if !defined (NO_SNPRINTF)
+ snprintf (command, "kill `cat %s`", path_dhclient_pid);
+#else
snprintf (command, 1024, "kill `cat %s`",
path_dhclient_pid);
+#endif
system (command);
}
#ifndef lint
static char copyright[] =
-"$Id: execute.c,v 1.27 2000/02/02 08:01:45 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.28 2000/02/02 20:01:41 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (status) {
if (nut -> r_data) {
dfree (nut -> r_data, MDL);
- nut -> r_data = (char *)0;
+ nut -> r_data =
+ (unsigned char *)0;
}
if (nut -> r_dname) {
dfree (nut -> r_dname, MDL);
#ifndef lint
static char copyright[] =
-"$Id: print.c,v 1.34 2000/02/02 07:22:33 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.35 2000/02/02 20:01:41 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (s + 1 < end)
*s++ = '"';
}
- if (s + strlen (u -> r_data) < end) {
- strcpy (s, u -> r_data);
+ if (s + strlen ((char *)u -> r_data) < end) {
+ strcpy (s, (char *)u -> r_data);
s += strlen (s);
if (u -> r_type == T_TXT) {
if (s + 1 < end)
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.73 2000/02/02 08:01:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.74 2000/02/02 20:01:41 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
(*result) -> r_data = dmalloc (16, MDL);
if (!(*result) -> r_data)
goto dpngood;
- sprintf ((*result) -> r_data,
+ sprintf ((char *)(*result) -> r_data,
"%d.%d.%d.%d",
data.data [0], data.data [1],
data.data [2], data.data [3]);
(*result) -> r_size =
- strlen ((*result) -> r_data);
+ strlen ((char *)
+ (*result) -> r_data);
} else {
(*result) -> r_size = data.len;
(*result) -> r_data = dmalloc (data.len,
ISC_LIST_UNLINK (uq, tmp, r_link);
if (tmp -> r_data) {
dfree (tmp -> r_data, MDL);
- tmp -> r_data = (char *)0;
+ tmp -> r_data = (unsigned char *)0;
}
minires_freeupdrec (tmp);
}
esac;;
esac;;
SunOS)
- case `uname -r` in
- 4*) sysname=sunos4;;
- 5*)
+ release=`uname -r`
+ minor=`echo $release |sed -e 's/.*[0-9]*\.\([0-9][0-9]*\).*$/\1/'`
+ major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
+ case $major in
+ 4) sysname=sunos4;;
+ 5)
set `which gcc`
if [ $# = 1 ]; then
sysname=sunos5-gcc
#include <setjmp.h>
#include <limits.h>
+#if !defined (h_errno) /* It's a macro on newer instances of AIX. */
extern int h_errno;
+#endif
#include <net/if.h>
#include <net/if_arp.h>
/* Solaris prior to 2.5 didn't have random(). Rather than being clever and
using random() only on versions >2.5, always use rand() and srand(). */
+#if SOLARIS_MAJOR == 5 && SOLARIS_MINOR < 5
#define random() rand()
#define srandom(x) srand(x)
+#endif
/* Solaris doesn't provide an endian.h, so we have to do it. */
#define ALIAS_NAMES_PERMUTED
+#if SOLARIS_MAJOR == 5 && SOLARIS_MINOR < 7
+typedef int socklen_t;
+#endif
+
#ifdef NEED_PRAND_CONF
const char *cmds[] = {
"/bin/ps -ef 2>&1",
int dk_key_size; /* this is the size of the key in bits */
int dk_proto; /* what protocols this key can be used for */
int dk_alg; /* algorithm number from key record */
- u_int32_t dk_flags; /* and the flags of the public key */
+ unsigned dk_flags; /* and the flags of the public key */
unsigned dk_id; /* identifier of the key */
} DST_KEY;
#endif /* HAS_DST_KEY */
ns_class, ns_type, unsigned char *, unsigned);
const char *res_hostalias (const res_state, const char *, char *, size_t);
int res_nquerydomain(res_state, const char *, const char *,
- ns_class class, ns_class type, unsigned char *, unsigned);
+ ns_class class, ns_type type, unsigned char *, unsigned);
int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
int dn_skipname (const unsigned char *, const unsigned char *);