Ultrix patches version 3 for bind 8.2.2-p5
Simon Burge
simonb at telstra.com.au
Thu Nov 18 04:03:08 UTC 1999
Here's the third version of my Ultrix patches. Changes since the last
version:
o Patched against 8.2.2-p5 (this was a no-brainer).
o Cleaned up "threaded" directory checking during lib builds.
o Change to port/systype so that 'cd ...' isn't redirected to
/dev/null - "make SH=sh5" no longer required, but may impact
some systems where cd is verbose.
o Put __isc_sprintf() in it's own .c file in port/ultrix, and
remove noop.c. __isc_sprintf() is from Mark Andrews and uses
vsprintf() instead of directly frobbing with _doprnt().
o Change "#ifdef ICKY_YUCKY_ULTRIX_STUFF" to "#ifdef ultrix" and
add a comment as to why the glue is needed.
o Change C compiler options back to -YPOSIX, but we don't need
the -Dconst= anymore.
Simon.
--
diff -urN ../src-DIST/bin/named/ns_glue.c ./bin/named/ns_glue.c
--- ../src-DIST/bin/named/ns_glue.c Tue Oct 19 12:06:26 1999
+++ ./bin/named/ns_glue.c Thu Nov 18 11:36:08 1999
@@ -448,3 +448,20 @@
return (rename(oldname, newname));
}
#endif
+
+#ifdef ultrix
+/*
+ * Some library routines in libc need to be able to see the res_send
+ * and res_close symbols with out __ prefix otherwise we get multiply
+ * defined symbol errors when linking named.
+ */
+
+#undef res_send
+int res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
+ return __res_send(buf, buflen, ans, anssiz);
+}
+#undef _res_close
+void _res_close(void) {
+ __res_close();
+}
+#endif
diff -urN ../src-DIST/bin/named-xfer/named-xfer.c ./bin/named-xfer/named-xfer.c
--- ../src-DIST/bin/named-xfer/named-xfer.c Wed Nov 10 07:36:54 1999
+++ ./bin/named-xfer/named-xfer.c Wed Nov 17 23:05:53 1999
@@ -1151,7 +1151,7 @@
*/
if (hp->rcode != NOERROR || !hp->aa || qdcount != 1 ||
(ancount < 1 && aucount < 1)) {
-#ifndef ultrix /*XXX*/
+#ifndef SYSLOG_42BSD
syslog(LOG_NOTICE,
"[%s] %s for %s, SOA query got rcode %d, aa %d, ancount %d, aucount %d",
inet_ntoa(sin.sin_addr),
diff -urN ../src-DIST/lib/bsd/Makefile ./lib/bsd/Makefile
--- ../src-DIST/lib/bsd/Makefile Mon Feb 22 13:47:57 1999
+++ ./lib/bsd/Makefile Wed Nov 17 23:05:53 1999
@@ -61,7 +61,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/lib/cylink/Makefile ./lib/cylink/Makefile
--- ../src-DIST/lib/cylink/Makefile Mon Feb 22 13:47:57 1999
+++ ./lib/cylink/Makefile Wed Nov 17 23:05:53 1999
@@ -60,7 +60,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/lib/dnssafe/Makefile ./lib/dnssafe/Makefile
--- ../src-DIST/lib/dnssafe/Makefile Tue Feb 23 16:26:59 1999
+++ ./lib/dnssafe/Makefile Wed Nov 17 23:05:53 1999
@@ -81,7 +81,7 @@
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} && \
diff -urN ../src-DIST/lib/dst/Makefile ./lib/dst/Makefile
--- ../src-DIST/lib/dst/Makefile Sun Mar 7 20:33:47 1999
+++ ./lib/dst/Makefile Wed Nov 17 23:05:53 1999
@@ -63,7 +63,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} ${CRYPTINCL} ${CRYPTFLAGS} -c $*.c -o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
${LDS} mv a.out ${THREADED}/$*.${O}
diff -urN ../src-DIST/lib/inet/Makefile ./lib/inet/Makefile
--- ../src-DIST/lib/inet/Makefile Wed Mar 3 19:07:16 1999
+++ ./lib/inet/Makefile Wed Nov 17 23:05:53 1999
@@ -61,7 +61,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/lib/irs/Makefile ./lib/irs/Makefile
--- ../src-DIST/lib/irs/Makefile Mon Feb 22 13:47:58 1999
+++ ./lib/irs/Makefile Wed Nov 17 23:05:53 1999
@@ -82,7 +82,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
-(${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O} ; \
${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} && \
diff -urN ../src-DIST/lib/isc/Makefile ./lib/isc/Makefile
--- ../src-DIST/lib/isc/Makefile Mon Feb 22 13:47:58 1999
+++ ./lib/isc/Makefile Wed Nov 17 23:05:53 1999
@@ -64,7 +64,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/lib/nameser/Makefile ./lib/nameser/Makefile
--- ../src-DIST/lib/nameser/Makefile Tue Sep 7 18:47:28 1999
+++ ./lib/nameser/Makefile Wed Nov 17 23:05:53 1999
@@ -59,7 +59,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/lib/resolv/Makefile ./lib/resolv/Makefile
--- ../src-DIST/lib/resolv/Makefile Thu Oct 7 18:24:15 1999
+++ ./lib/resolv/Makefile Wed Nov 17 23:05:53 1999
@@ -62,7 +62,7 @@
${RANLIB} ${LIBBIND}
.c.${O}:
- if test ! -d ${THREADED} ; then mkdir ${THREADED} ; fi
+ if test ! -d ${THREADED} ; then mkdir ${THREADED} ; else true ; fi
${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} ${REENTRANT} -c $*.c \
-o ${THREADED}/$*.${O}
-${LDS} ${LD} ${LD_LIBFLAGS} ${THREADED}/$*.${O} -o a.out && \
diff -urN ../src-DIST/port/systype ./port/systype
--- ../src-DIST/port/systype Fri Oct 8 06:31:39 1999
+++ ./port/systype Wed Nov 17 23:05:53 1999
@@ -12,7 +12,7 @@
*) cachefile=`pwd`/$cachefile ;;
esac
-cd `dirname $0` > /dev/null
+cd `dirname $0`
for systype in [a-z]*; do
if [ -f $systype/probe ]; then
if sh $systype/probe; then
diff -urN ../src-DIST/port/ultrix/Makefile ./port/ultrix/Makefile
--- ../src-DIST/port/ultrix/Makefile Mon Feb 22 13:48:08 1999
+++ ./port/ultrix/Makefile Wed Nov 17 23:05:53 1999
@@ -39,9 +39,9 @@
SUBDIRS= include
-SRCS= noop.c
+SRCS= isc_sprintf.c
-OBJS= noop.${O}
+OBJS= isc_sprintf.${O}
MARGS= DESTDIR="${DESTDIR}" DESTINC="${DESTINC}" INSTALL="${INSTALL}"
diff -urN ../src-DIST/port/ultrix/Makefile.set ./port/ultrix/Makefile.set
--- ../src-DIST/port/ultrix/Makefile.set Fri Mar 20 06:50:35 1998
+++ ./port/ultrix/Makefile.set Wed Nov 17 23:05:53 1999
@@ -1,4 +1,4 @@
-'CC=cc -YPOSIX -Dconst='
+'CC=cc -YPOSIX'
'CDEBUG=-g2 -O1 -Olimit 2000'
'DESTBIN=/usr/bin'
'DESTSBIN=/usr/etc'
diff -urN ../src-DIST/port/ultrix/include/port_after.h ./port/ultrix/include/port_after.h
--- ../src-DIST/port/ultrix/include/port_after.h Sun Sep 5 16:23:21 1999
+++ ./port/ultrix/include/port_after.h Wed Nov 17 23:05:53 1999
@@ -71,6 +71,13 @@
u_int32_t sin6_scope_id; /* set of interfaces for a scope */
};
#endif /* HAS_INET6_STRUCTS */
+
+/* ULTRIX has two different sprintf's depending on the compile options!
+ * We'll provide one that returns what we want it to.
+ */
+#define sprintf __isc_sprintf
+int __isc_sprintf(char *__s, const char *__format, ... );
+
#define NEED_STRSEP
extern char *strsep(char **, const char *);
diff -urN ../src-DIST/port/ultrix/include/port_before.h ./port/ultrix/include/port_before.h
--- ../src-DIST/port/ultrix/include/port_before.h Sun Sep 5 16:23:22 1999
+++ ./port/ultrix/include/port_before.h Wed Nov 17 23:05:53 1999
@@ -14,6 +14,7 @@
#define WANT_IRS_NIS
#undef WANT_IRS_PW
#undef WANT_IRS_GR
+#define SIG_FN void
#include <time.h>
struct timespec {
@@ -24,5 +25,8 @@
#if defined(HAS_PTHREADS) && defined(_REENTRANT)
#define DO_PTHREADS
#endif
+
+#define LITTLE_ENDIAN 1234
+#define BYTE_ORDER LITTLE_ENDIAN
#endif /*PORT_BEFORE_H*/
diff -urN ../src-DIST/port/ultrix/include/prand_conf.h ./port/ultrix/include/prand_conf.h
--- ../src-DIST/port/ultrix/include/prand_conf.h Sun Sep 5 17:04:07 1999
+++ ./port/ultrix/include/prand_conf.h Wed Nov 17 23:05:53 1999
@@ -2,13 +2,15 @@
#define _PRAND_CMD_H_
const char *cmds[] = {
- "/bin/ps -aux 2>&1",
+ "/bin/ps -alwx 2>&1",
"/usr/etc/arp -an 2>&1",
"/usr/ucb/netstat -an 2>&1",
"/usr/bin/df 2>&1",
"/usr/ucb/uptime 2>&1",
- "/usr/ucb/netstat -an 2>&1",
+ "/usr/ucb/netstat -s 2>&1",
"/usr/bin/iostat 2>&1",
+ "/usr/ucb/vmstat 2>&1",
+ "/usr/ucb/w 2>&1",
NULL
};
diff -urN ../src-DIST/port/ultrix/isc_sprintf.c ./port/ultrix/isc_sprintf.c
--- ../src-DIST/port/ultrix/isc_sprintf.c Thu Jan 1 10:00:00 1970
+++ ./port/ultrix/isc_sprintf.c Thu Nov 18 11:56:32 1999
@@ -0,0 +1,19 @@
+#include <stdio.h>
+#include <stdarg.h>
+
+/*
+ * An implementation of sprintf() that always returns an int regardless
+ * of the compile environment. The Ultrix vsprintf() _always_ returns
+ * an int. Code from Mark Andrews.
+ */
+int
+__isc_sprintf(char *str, const char *format, ...)
+{
+ va_list ap;
+ int len;
+
+ va_start(ap, format);
+ len = vsprintf(str, format, ap);
+ va_end(va_list ap);
+ return(len);
+}
diff -urN ../src-DIST/port/ultrix/noop.c ./port/ultrix/noop.c
--- ../src-DIST/port/ultrix/noop.c Thu Nov 21 21:28:34 1996
+++ ./port/ultrix/noop.c Thu Jan 1 10:00:00 1970
@@ -1,4 +0,0 @@
-void
-__bind_noop() {
- /* NOOP */
-}
More information about the bind-workers
mailing list