From owner-freebsd-ports Thu Sep 30 9:39:20 1999 Delivered-To: freebsd-ports@freebsd.org Received: from mail.datais.com (mail.datais.com [207.245.246.3]) by hub.freebsd.org (Postfix) with ESMTP id BEBAA159F9; Thu, 30 Sep 1999 09:38:49 -0700 (PDT) (envelope-from james@targetnet.com) Received: from james by mail.datais.com with local (Exim 3.02 #1) id 11WjEG-0007Ac-00; Thu, 30 Sep 1999 12:38:48 -0400 Date: Thu, 30 Sep 1999 12:38:48 -0400 From: James FitzGibbon To: gnats-admin@FreeBSD.org, freebsd-ports@FreeBSD.org Cc: james@targetnet.com Subject: Re: ports/14057: New port: net/libunp Message-ID: <19990930123848.H65478@datais.com> References: <199909301630.JAA17745@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i In-Reply-To: <199909301630.JAA17745@freefall.freebsd.org> Organization: Targetnet.com Inc. Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * gnats-admin@FreeBSD.org (gnats-admin@FreeBSD.org) [990930 12:30]: There was a small typo in the original port shar submission. Please use the following shar instead: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # libunp # libunp/Makefile # libunp/pkg # libunp/pkg/COMMENT # libunp/pkg/DESCR # libunp/pkg/PLIST # libunp/files # libunp/files/md5 # libunp/patches # libunp/patches/patch-aa # libunp/patches/patch-ab # libunp/patches/patch-ac # libunp/patches/patch-ad # libunp/patches/patch-ae # libunp/patches/patch-af # libunp/patches/patch-ag # libunp/patches/patch-ah # libunp/patches/patch-ai # libunp/patches/patch-aj # libunp/patches/patch-ak # libunp/patches/patch-al # libunp/patches/patch-am # libunp/patches/patch-an # libunp/patches/patch-ao # libunp/patches/patch-ap # libunp/patches/patch-aq # echo c - libunp mkdir -p libunp > /dev/null 2>&1 echo x - libunp/Makefile sed 's/^X//' >libunp/Makefile << 'END-of-libunp/Makefile' X# Ports collection makefile for: libunp X# Version required: 1.0 X# Date created: Sept 28, 1999 X# Whom: james@targetnet.com X# X# $FreeBSD$ X# X XDISTNAME= unpv12e XPKGNAME= libunp-1.0 XCATEGORIES= net XMASTER_SITES= ftp://ftp.kohala.com/pub/rstevens/ \ X http://www.cs.columbia.edu/networks98/stevens/ X XMAINTAINER= james@targetnet.com X XGNU_CONFIGURE= yes XUSE_GMAKE= yes X X.include X Xpre-patch: X @ ${CP} ${WRKSRC}/lib/wrapsock.c ${WRKSRC}/lib/wrapsock_r.c X Xpost-configure: X @ ${MKDIR} ${WRKSRC}/unp X @ ${LN} -s ${WRKSRC}/config.h ${WRKSRC}/unp/config.h X @ ${LN} -s ${WRKSRC}/lib/addrinfo.h ${WRKSRC}/unp/addrinfo.h X Xdo-install: X ${INSTALL_DATA} ${WRKSRC}/libunp.a ${PREFIX}/lib X ${INSTALL_DATA} ${WRKSRC}/libunp_r.a ${PREFIX}/lib X ${MKDIR} ${PREFIX}/include/unp X ${INSTALL_DATA} ${WRKSRC}/lib/unp.h ${PREFIX}/include X ${INSTALL_DATA} ${WRKSRC}/lib/addrinfo.h ${PREFIX}/include/unp X ${INSTALL_DATA} ${WRKSRC}/config.h ${PREFIX}/include/unp X X.include END-of-libunp/Makefile echo c - libunp/pkg mkdir -p libunp/pkg > /dev/null 2>&1 echo x - libunp/pkg/COMMENT sed 's/^X//' >libunp/pkg/COMMENT << 'END-of-libunp/pkg/COMMENT' XThe networking library used in UNIX Network Programming Volume 1 2e END-of-libunp/pkg/COMMENT echo x - libunp/pkg/DESCR sed 's/^X//' >libunp/pkg/DESCR << 'END-of-libunp/pkg/DESCR' Xlibunp is the library used in W. Richard Steven's book "UNIX Network XProgramming Volume 1, 2nd Edition". It contains the library and headers Xused in the examples as well as all programs from the text that compile on XFreeBSD systems. X XFor more information on the book, see X Xhttp://www.phptr.com/ptrbooks/ptr_013490012X.html X XFor more info on W. Richard Stevens, see X Xhttp://www.kohala.com/~rstevens/ END-of-libunp/pkg/DESCR echo x - libunp/pkg/PLIST sed 's/^X//' >libunp/pkg/PLIST << 'END-of-libunp/pkg/PLIST' Xinclude/unp.h Xinclude/unp/config.h Xinclude/unp/addrinfo.h Xlib/libunp.a Xlib/libunp_r.a END-of-libunp/pkg/PLIST echo c - libunp/files mkdir -p libunp/files > /dev/null 2>&1 echo x - libunp/files/md5 sed 's/^X//' >libunp/files/md5 << 'END-of-libunp/files/md5' XMD5 (unpv12e.tar.gz) = 701818c1be87de9680a3f3867bc47c8c END-of-libunp/files/md5 echo c - libunp/patches mkdir -p libunp/patches > /dev/null 2>&1 echo x - libunp/patches/patch-aa sed 's/^X//' >libunp/patches/patch-aa << 'END-of-libunp/patches/patch-aa' X--- Makefile.in.orig Fri Apr 11 18:42:26 1997 X+++ Makefile.in Thu Sep 30 09:51:16 1999 X@@ -1,8 +1,13 @@ X include ./Make.defines X X+SUBDIRS = lib libfree libgai libroute X+ X all: X- @echo "Nothing to make in this directory" X- @echo "Please read the README file" X+ PWD=`pwd`; \ X+ for dir in $(SUBDIRS) ; \ X+ do \ X+ cd $$PWD/$$dir && $(MAKE) && cd .. ;\ X+ done X X clean: X rm -f $(CLEANFILES) END-of-libunp/patches/patch-aa echo x - libunp/patches/patch-ab sed 's/^X//' >libunp/patches/patch-ab << 'END-of-libunp/patches/patch-ab' X--- intro/Makefile.orig Tue Sep 28 11:39:20 1999 X+++ intro/Makefile Tue Sep 28 11:39:35 1999 X@@ -2,7 +2,6 @@ X X PROGS = daytimetcpcli daytimetcpcli1 daytimetcpcli2 daytimetcpcli3 \ X daytimetcpsrv daytimetcpsrv1 daytimetcpsrv2 daytimetcpsrv3 \ X- daytimetcpcliv6 daytimetcpsrvv6 \ X byteorder X X all: ${PROGS} END-of-libunp/patches/patch-ab echo x - libunp/patches/patch-ac sed 's/^X//' >libunp/patches/patch-ac << 'END-of-libunp/patches/patch-ac' X--- icmpd/Makefile.orig Tue Sep 28 11:40:21 1999 X+++ icmpd/Makefile Tue Sep 28 11:40:24 1999 X@@ -1,6 +1,6 @@ X include ../Make.defines X X-OBJS = icmpd.o readable_listen.o readable_conn.o readable_v4.o readable_v6.o X+OBJS = icmpd.o readable_listen.o readable_conn.o readable_v4.o X X PROGS = icmpd udpcli01 X END-of-libunp/patches/patch-ac echo x - libunp/patches/patch-ad sed 's/^X//' >libunp/patches/patch-ad << 'END-of-libunp/patches/patch-ad' X--- ping/Makefile.orig Tue Sep 28 11:40:42 1999 X+++ ping/Makefile Tue Sep 28 11:40:53 1999 X@@ -1,7 +1,7 @@ X include ../Make.defines X X-OBJS = main.o proc_v4.o proc_v6.o readloop.o \ X- send_v4.o send_v6.o sig_alrm.o tv_sub.o X+OBJS = main.o proc_v4.o readloop.o \ X+ send_v4.o sig_alrm.o tv_sub.o X PROGS = ping X X all: ${PROGS} END-of-libunp/patches/patch-ad echo x - libunp/patches/patch-ae sed 's/^X//' >libunp/patches/patch-ae << 'END-of-libunp/patches/patch-ae' X--- traceroute/Makefile.orig Tue Sep 28 11:41:09 1999 X+++ traceroute/Makefile Tue Sep 28 11:41:17 1999 X@@ -1,6 +1,6 @@ X include ../Make.defines X X-OBJS = main.o icmpcode_v4.o icmpcode_v6.o recv_v4.o recv_v6.o \ X+OBJS = main.o icmpcode_v4.o recv_v4.o \ X sig_alrm.o traceloop.o tv_sub.o X PROGS = traceroute X END-of-libunp/patches/patch-ae echo x - libunp/patches/patch-af sed 's/^X//' >libunp/patches/patch-af << 'END-of-libunp/patches/patch-af' X--- configure.orig Thu Jul 10 11:19:39 1997 X+++ configure Thu Sep 30 12:29:28 1999 X@@ -1101,10 +1101,12 @@ X echo "$ac_t""yes" 1>&6 X LIBUNP="$HOME/libunp.a" X LIBUNP_NAME=$HOME/libunp.a X+ LIBUNP_THREADSAFE_NAME=$HOME/libunp_r.a X else X echo "$ac_t""no" 1>&6 X LIBUNP="../libunp.a" X LIBUNP_NAME=../libunp.a X+ LIBUNP_THREADSAFE_NAME=../libunp_r.a X fi X X echo $ac_n "checking for $HOME/libunpxti.a""... $ac_c" 1>&6 X@@ -4288,7 +4290,6 @@ X LIB_OBJS="$LIB_OBJS udp_connect.o" X LIB_OBJS="$LIB_OBJS udp_server.o" X LIB_OBJS="$LIB_OBJS wraplib.o" X-LIB_OBJS="$LIB_OBJS wrapsock.o" X LIB_OBJS="$LIB_OBJS wrapstdio.o" X if test "$ac_cv_header_pthread_h" = yes ; then X LIB_OBJS="$LIB_OBJS wrappthread.o" X@@ -4297,6 +4298,8 @@ X LIB_OBJS="$LIB_OBJS write_fd.o" X LIB_OBJS="$LIB_OBJS writen.o" X LIB_OBJS="$LIB_OBJS writable_timeo.o" X+LIB_THREADSAFE_OBJS="$LIB_OBJS wrapsock_r.o" X+LIB_OBJS="$LIB_OBJS wrapsock.o" X X LIBFREE_OBJS= X X@@ -4514,6 +4517,7 @@ X s%@RANLIB@%$RANLIB%g X s%@CPP@%$CPP%g X s%@LIB_OBJS@%$LIB_OBJS%g X+s%@LIB_THREADSAFE_OBJS@%$LIB_THREADSAFE_OBJS%g X s%@LIBFREE_OBJS@%$LIBFREE_OBJS%g X s%@LIBGAI_OBJS@%$LIBGAI_OBJS%g X s%@LIBROUTE_OBJS@%$LIBROUTE_OBJS%g X@@ -4522,6 +4526,7 @@ X s%@LIBUNP@%$LIBUNP%g X s%@LIBUNPXTI@%$LIBUNPXTI%g X s%@LIBUNP_NAME@%$LIBUNP_NAME%g X+s%@LIBUNP_THREADSAFE_NAME@%$LIBUNP_THREADSAFE_NAME%g X s%@LIBUNPXTI_NAME@%$LIBUNPXTI_NAME%g X X CEOF END-of-libunp/patches/patch-af echo x - libunp/patches/patch-ag sed 's/^X//' >libunp/patches/patch-ag << 'END-of-libunp/patches/patch-ag' X--- lib/Makefile.orig Fri Apr 11 17:38:27 1997 X+++ lib/Makefile Thu Sep 30 11:34:21 1999 X@@ -1,8 +1,16 @@ X include ../Make.defines X X-all: ${LIB_OBJS} X+CFLAGS += -I.. -I. X+ X+all: libunp.a libunp_r.a X+ X+libunp.a: ${LIB_OBJS} X ar rv ${LIBUNP_NAME} $? X ${RANLIB} ${LIBUNP_NAME} X+ X+libunp_r.a: ${LIB_THREADSAFE_OBJS} X+ ar rv ${LIBUNP_THREADSAFE_NAME} $? X+ ${RANLIB} ${LIBUNP_THREADSAFE_NAME} X X clean: X rm -f ${PROGS} ${CLEANFILES} END-of-libunp/patches/patch-ag echo x - libunp/patches/patch-ah sed 's/^X//' >libunp/patches/patch-ah << 'END-of-libunp/patches/patch-ah' X--- Make.defines.in.orig Thu Jun 12 16:20:21 1997 X+++ Make.defines.in Thu Sep 30 10:13:57 1999 X@@ -17,6 +17,7 @@ X # Following is the main library, built from all the object files X # in the lib/ and libfree/ directories. X LIBUNP_NAME = @LIBUNP_NAME@ X+LIBUNP_THREADSAFE_NAME = @LIBUNP_THREADSAFE_NAME@ X X # Following is the XTI library, built from all the object files X # in the libxti/ directory. X@@ -24,6 +25,7 @@ X X # Following are all the object files to create in the lib/ directory. X LIB_OBJS = @LIB_OBJS@ X+LIB_THREADSAFE_OBJS = @LIB_THREADSAFE_OBJS@ X X # Following are all the object files to create in the libfree/ directory. X LIBFREE_OBJS = @LIBFREE_OBJS@ END-of-libunp/patches/patch-ah echo x - libunp/patches/patch-ai sed 's/^X//' >libunp/patches/patch-ai << 'END-of-libunp/patches/patch-ai' X--- libfree/Makefile.orig Fri Oct 3 12:52:41 1997 X+++ libfree/Makefile Thu Sep 30 11:34:21 1999 X@@ -1,8 +1,12 @@ X include ../Make.defines X X+CFLAGS += -I.. X+ X all: ${LIBFREE_OBJS} X ar rv ${LIBUNP_NAME} $? X ${RANLIB} ${LIBUNP_NAME} X+ ar rv ${LIBUNP_THREADSAFE_NAME} $? X+ ${RANLIB} ${LIBUNP_THREADSAFE_NAME} X X clean: X rm -f ${PROGS} ${CLEANFILES} END-of-libunp/patches/patch-ai echo x - libunp/patches/patch-aj sed 's/^X//' >libunp/patches/patch-aj << 'END-of-libunp/patches/patch-aj' X--- libgai/Makefile.orig Mon Jun 2 18:03:30 1997 X+++ libgai/Makefile Thu Sep 30 11:34:11 1999 X@@ -6,9 +6,13 @@ X # appear in the book (too much clutter, given the amount of conditional X # testing for all the code in this directory). X X+CFLAGS += -I.. X+ X all: ${LIBGAI_OBJS} X ar rv ${LIBUNP_NAME} $? X ${RANLIB} ${LIBUNP_NAME} X+ ar rv ${LIBUNP_THREADSAFE_NAME} $? X+ ${RANLIB} ${LIBUNP_THREADSAFE_NAME} X X PROGS = testga test1 X END-of-libunp/patches/patch-aj echo x - libunp/patches/patch-ak sed 's/^X//' >libunp/patches/patch-ak << 'END-of-libunp/patches/patch-ak' X--- libroute/Makefile.orig Thu Jun 12 16:16:47 1997 X+++ libroute/Makefile Thu Sep 30 11:34:21 1999 X@@ -1,8 +1,12 @@ X include ../Make.defines X X+CFLAGS += -I.. X+ X all: ${LIBROUTE_OBJS} X ar rv ${LIBUNP_NAME} $? X ${RANLIB} ${LIBUNP_NAME} X+ ar rv ${LIBUNP_THREADSAFE_NAME} $? X+ ${RANLIB} ${LIBUNP_THREADSAFE_NAME} X X clean: X rm -f ${PROGS} ${CLEANFILES} END-of-libunp/patches/patch-ak echo x - libunp/patches/patch-al sed 's/^X//' >libunp/patches/patch-al << 'END-of-libunp/patches/patch-al' X--- lib/unp.h.orig Sun Sep 14 15:49:59 1997 X+++ lib/unp.h Thu Sep 30 11:12:55 1999 X@@ -4,7 +4,7 @@ X #ifndef __unp_h X #define __unp_h X X-#include "../config.h" /* configuration options for current OS */ X+#include /* configuration options for current OS */ X /* "../config.h" is generated by configure */ X X /* If anything changes in the following list of #includes, must change X@@ -197,7 +197,7 @@ X #define max(a,b) ((a) > (b) ? (a) : (b)) X X #ifndef HAVE_ADDRINFO_STRUCT X-# include "../lib/addrinfo.h" X+# include X #endif X X #ifndef HAVE_IF_NAMEINDEX_STRUCT END-of-libunp/patches/patch-al echo x - libunp/patches/patch-am sed 's/^X//' >libunp/patches/patch-am << 'END-of-libunp/patches/patch-am' X--- lib/wrappthread.c.orig Thu Sep 30 11:06:22 1999 X+++ lib/wrappthread.c Thu Sep 30 11:06:34 1999 X@@ -40,17 +40,6 @@ X } X X void X-Pthread_kill(pthread_t tid, int signo) X-{ X- int n; X- X- if ( (n = pthread_kill(tid, signo)) == 0) X- return; X- errno = n; X- err_sys("pthread_kill error"); X-} X- X-void X Pthread_mutexattr_init(pthread_mutexattr_t *attr) X { X int n; END-of-libunp/patches/patch-am echo x - libunp/patches/patch-an sed 's/^X//' >libunp/patches/patch-an << 'END-of-libunp/patches/patch-an' X--- lib/unpifi.h.orig Thu Sep 30 11:13:10 1999 X+++ lib/unpifi.h Thu Sep 30 11:13:43 1999 X@@ -4,7 +4,7 @@ X #ifndef __unp_ifi_h X #define __unp_ifi_h X X-#include "unp.h" X+#include X #include X X #define IFI_NAME 16 /* same as IFNAMSIZ in */ END-of-libunp/patches/patch-an echo x - libunp/patches/patch-ao sed 's/^X//' >libunp/patches/patch-ao << 'END-of-libunp/patches/patch-ao' X--- lib/unprtt.h.orig Thu Sep 30 11:13:16 1999 X+++ lib/unprtt.h Thu Sep 30 11:13:37 1999 X@@ -1,7 +1,7 @@ X #ifndef __unp_rtt_h X #define __unp_rtt_h X X-#include "unp.h" X+#include X X struct rtt_info { X float rtt_rtt; /* most recent measured RTT, seconds */ END-of-libunp/patches/patch-ao echo x - libunp/patches/patch-ap sed 's/^X//' >libunp/patches/patch-ap << 'END-of-libunp/patches/patch-ap' X--- lib/unpthread.h.orig Thu Sep 30 11:13:20 1999 X+++ lib/unpthread.h Thu Sep 30 11:13:41 1999 X@@ -4,7 +4,7 @@ X #ifndef __unp_pthread_h X #define __unp_pthread_h X X-#include "unp.h" X+#include X X void Pthread_create(pthread_t *, const pthread_attr_t *, X void * (*)(void *), void *); END-of-libunp/patches/patch-ap echo x - libunp/patches/patch-aq sed 's/^X//' >libunp/patches/patch-aq << 'END-of-libunp/patches/patch-aq' X--- lib/wrapsock_r.c.orig Thu Sep 30 12:04:02 1999 X+++ lib/wrapsock_r.c Thu Sep 30 12:04:10 1999 X@@ -97,19 +97,6 @@ X } X /* end Listen */ X X-#ifdef HAVE_POLL X-int X-Poll(struct pollfd *fdarray, unsigned long nfds, int timeout) X-{ X- int n; X- X- if ( (n = poll(fdarray, nfds, timeout)) < 0) X- err_sys("poll error"); X- X- return(n); X-} X-#endif X- X ssize_t X Recv(int fd, void *ptr, size_t nbytes, int flags) X { END-of-libunp/patches/patch-aq exit -- j. James FitzGibbon james@targetnet.com Targetnet.com Inc. Voice/Fax +1 416 306-0466 x908 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message