summaryrefslogtreecommitdiffstats
path: root/contrib/bind/port/freebsd
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-30 02:43:11 +0000
committerpeter <peter@FreeBSD.org>1999-11-30 02:43:11 +0000
commit9716636318d4160418baceabe7ba05ce065692fc (patch)
tree486664278b935f789477f5f876359d7b1f743529 /contrib/bind/port/freebsd
parentdc618593bdb400692edd72ab5a4296a7e33ed5e2 (diff)
parent4ef23ce6957fc75fc005885496d605fed48213e1 (diff)
downloadFreeBSD-src-9716636318d4160418baceabe7ba05ce065692fc.zip
FreeBSD-src-9716636318d4160418baceabe7ba05ce065692fc.tar.gz
This commit was generated by cvs2svn to compensate for changes in r53910,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bind/port/freebsd')
-rw-r--r--contrib/bind/port/freebsd/Makefile6
-rwxr-xr-xcontrib/bind/port/freebsd/bin/probe_ipv655
-rw-r--r--contrib/bind/port/freebsd/include/Makefile4
-rw-r--r--contrib/bind/port/freebsd/include/port_before.h8
-rw-r--r--contrib/bind/port/freebsd/include/prand_conf.h43
-rw-r--r--contrib/bind/port/freebsd/include/sys/bitypes.h2
6 files changed, 114 insertions, 4 deletions
diff --git a/contrib/bind/port/freebsd/Makefile b/contrib/bind/port/freebsd/Makefile
index 966cd56..2f5b121 100644
--- a/contrib/bind/port/freebsd/Makefile
+++ b/contrib/bind/port/freebsd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 1996 by Internet Software Consortium
+# Copyright (c) 1996,1999 by Internet Software Consortium
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +13,7 @@
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
-# $Id: Makefile,v 1.6 1997/06/19 03:22:25 halley Exp $
+# $Id: Makefile,v 1.8 1999/02/22 02:48:01 vixie Exp $
# these are only appropriate for BSD 4.4 or derivatives, and are used in
# development. normal builds will be done in the top level directory and
@@ -33,7 +33,7 @@ PORTINCL = ${TOP}/port/${SYSTYPE}/include
LIBBIND = ${TOP}/lib/libbind.${A}
CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
LD_LIBFLAGS= -x -r
-AR= ar cruv
+AR= ar cru
RANLIB= ranlib
INSTALL= install
diff --git a/contrib/bind/port/freebsd/bin/probe_ipv6 b/contrib/bind/port/freebsd/bin/probe_ipv6
new file mode 100755
index 0000000..ba7135d
--- /dev/null
+++ b/contrib/bind/port/freebsd/bin/probe_ipv6
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+PATH=/bin:/usr/bin:$PATH; export PATH
+trap "rm -f tmp$$a.c tmp$$b.c tmp$$a.o tmp$$b.o" 0
+target=port_ipv6
+new=new_${target}.h
+old=${target}.h
+
+cat > tmp$$a.c <<EOF
+#include <sys/types.h>
+#include <netinet/in.h>
+struct sockaddr_in6 xx;
+EOF
+
+cat > tmp$$b.c <<EOF
+#include <sys/types.h>
+#include <netinet/in.h>
+struct in6_addr xx;
+EOF
+
+cat > ${new} <<EOF
+
+/* This file is automatically generated. Do Not Edit. */
+
+#ifndef ${target}_h
+#define ${target}_h
+
+EOF
+
+if ${CC} -c tmp$$a.c > /dev/null 2>&1
+then
+ echo "#define HAS_INET6_STRUCTS" >> ${new}
+ if ${CC} -c tmp$$b.c > /dev/null 2>&1
+ then
+ :
+ else
+ echo "#define in6_addr in_addr6" >> ${new}
+ fi
+else
+ echo "#undef HAS_INET6_STRUCTS" >> ${new}
+fi
+echo >> ${new}
+echo "#endif" >> ${new}
+if [ -f ${old} ]; then
+ if cmp -s ${new} ${old} ; then
+ rm -f ${new}
+ else
+ rm -f ${old}
+ mv ${new} ${old}
+ fi
+else
+ mv ${new} ${old}
+fi
+exit 0
diff --git a/contrib/bind/port/freebsd/include/Makefile b/contrib/bind/port/freebsd/include/Makefile
index dd8b4e9..40fe3f8 100644
--- a/contrib/bind/port/freebsd/include/Makefile
+++ b/contrib/bind/port/freebsd/include/Makefile
@@ -65,10 +65,14 @@ all depend clean distclean install::
(cd $$x; pwd; ${MAKE} ${MARGS} $@); \
done
+all depend::
+ probe_ipv6
+
distclean:: clean
clean::
rm -f *~ *.BAK *.CKP *.orig
+ rm -f port_ipv6.h new_port_ipv6.h
links: FRC
@set -e; ln -s SRC/*.h .
diff --git a/contrib/bind/port/freebsd/include/port_before.h b/contrib/bind/port/freebsd/include/port_before.h
index bc6b89c..d713050 100644
--- a/contrib/bind/port/freebsd/include/port_before.h
+++ b/contrib/bind/port/freebsd/include/port_before.h
@@ -4,3 +4,11 @@
#define SIG_FN void
#define ts_sec tv_sec
#define ts_nsec tv_nsec
+
+#if defined(HAS_PTHREADS) && defined(_REENTRANT)
+#define DO_PTHREADS
+#endif
+
+#if defined (__FreeBSD__) && __FreeBSD__>=3
+#define SETPWENT_VOID
+#endif
diff --git a/contrib/bind/port/freebsd/include/prand_conf.h b/contrib/bind/port/freebsd/include/prand_conf.h
new file mode 100644
index 0000000..7244282
--- /dev/null
+++ b/contrib/bind/port/freebsd/include/prand_conf.h
@@ -0,0 +1,43 @@
+#ifndef _PRAND_CMD_H_
+#define _PRAND_CMD_H_
+
+
+#ifndef HAVE_DEV_RANDOM
+ # define HAVE_DEV_RANDOM 1
+ #endif /* HAVE_DEV_RANDOM */
+
+const char *cmds[] = {
+ "/bin/ps -axlw 2>&1",
+ "/usr/sbin/arp -an 2>&1",
+ "/usr/bin/netstat -an 2>&1",
+ "/bin/df 2>&1",
+ "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
+ "/usr/bin/netstat -an 2>&1",
+ "/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
+ "/usr/sbin/iostat 2>&1",
+ "/usr/bin/vmstat 2>&1",
+ "/usr/bin/w 2>&1",
+ NULL
+};
+
+const char *dirs[] = {
+ "/tmp",
+ "/usr/tmp",
+ ".",
+ "/",
+ "/var/spool",
+ "/dev",
+ "/var/mail",
+ "/home",
+ "/usr/home",
+ NULL
+};
+
+const char *files[] = {
+ "/var/log/messages",
+ "/var/log/wtmp",
+ "/var/log/lastlog",
+ NULL
+};
+
+#endif /* _PRAND_CMD_H_ */
diff --git a/contrib/bind/port/freebsd/include/sys/bitypes.h b/contrib/bind/port/freebsd/include/sys/bitypes.h
index ad0dfcb..361156a 100644
--- a/contrib/bind/port/freebsd/include/sys/bitypes.h
+++ b/contrib/bind/port/freebsd/include/sys/bitypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996 by Internet Software Consortium.
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
OpenPOWER on IntegriCloud