From owner-freebsd-hackers Mon Nov 4 12:35:16 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA25669 for hackers-outgoing; Mon, 4 Nov 1996 12:35:16 -0800 (PST) Received: from gateway.cybernet.com (gateway.cybernet.com [192.245.33.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA25652 for ; Mon, 4 Nov 1996 12:35:07 -0800 (PST) Received: from spiffy.cybernet.com (spiffy.cybernet.com [192.245.33.55]) by gateway.cybernet.com (8.7.6/8.7.3) with SMTP id PAA19310; Mon, 4 Nov 1996 15:41:07 -0500 (EST) Message-ID: X-Mailer: XFMail 0.5-beta [p0] on FreeBSD MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_=XFMail.0.5-beta.p0.FreeBSD:961104153310:416=_" In-Reply-To: <199611032111.NAA10511@rah.star-gate.com> Date: Mon, 04 Nov 1996 15:22:19 -0500 (EST) Organization: Cybernet Systems Corporation From: Mark Taylor To: Amancio Hasty Subject: RE: Geomview, Mbone and FreeBSD... Cc: hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk This message is in MIME format --_=XFMail.0.5-beta.p0.FreeBSD:961104153310:416=_ Content-Type: text/plain; charset=us-ascii Already done. I've submitted the patches to the Geometry Center. They were developed with the help of one of their workers. The Geometry Center, last I heard (a few months ago), had lost its funding source. The patch is simple, and can be found at: ftp://ftp.cybernet.com/pub/outgoing/FreeBSD/Geomview-1.5.patch or included in this email. On 18:11:20 Amancio Hasty wrote: >>Are there any stdio experts which can lend a hand in porting Geomview? > >Bill and a couple of people have develop a cool interface to track >mbone traffic using a 3d map of the world showing off the tunnels >as ballistic trajectories. > >At any rate, the file giving us a problem is futil.c . It likes to >manipulate the stdio data structures and does seeks on stdio. > >Here is the file and if requested I can give out a pointer to the >Geomview tar file: > > -------------------------------------------------------------------- Mark J. Taylor Network R&D Engineer Cybernet Systems mtaylor@cybernet.com 727 Airport Blvd. PHONE (313) 668-2567 Ann Arbor, MI 48108 FAX (313) 668-8780 -------------------------------------------------------------------- --_=XFMail.0.5-beta.p0.FreeBSD:961104153310:416=_ Content-Type: application/octet-stream; name=Geomview-1.5.patch; SizeOnDisk=5704 Content-Description: Geomview-1.5.patch Content-Transfer-Encoding: none Content-Disposition: attachment; filename="Geomview-1.5.patch" diff -N -c -r Geomview.orig/INSTALL Geomview/INSTALL *** Geomview.orig/INSTALL Fri Dec 2 15:03:13 1994 --- Geomview/INSTALL Sat Aug 10 19:20:28 1996 *************** *** 90,95 **** --- 90,96 ---- Sun Sparc, SunOS 4.1.x sun4 sun4 gcc Sun Sparc, Solaris 2.x solaris sun4 gcc Linux linux linux gcc + FreeBSD FreeBSD x11 gcc HP Risc hp x11 gcc Dec Alpha alpha x11 cc RS/6000 rs6000 x11 cc diff -N -c -r Geomview.orig/makefiles/mk.FreeBSD Geomview/makefiles/mk.FreeBSD *** Geomview.orig/makefiles/mk.FreeBSD Wed Dec 31 19:00:00 1969 --- Geomview/makefiles/mk.FreeBSD Wed Jul 24 17:19:29 1996 *************** *** 0 **** --- 1,25 ---- + # + # Makefile that sets machine-specific variables and rules + # for FreeBSD. + # + # + # A machine-specific makefile is included by all other makefiles. + # + + CPU = FreeBSD + MACHTYPE = x11 + RANLIB = ranlib + CC = gcc -pipe -DBSD -Dalloca=alloca + INSTALL = ${GEOM}/tools/install.bsd + AR = /usr/bin/ar + MKDEPFLAGS = + + # Add the location of the Motif (Xm/*.h) include files to the path. + # (Or, add a /usr/include/Xm sym-link and remove this -I option.) + SYSCOPTS = -I/usr/include/X11 + + SYSXLIBS = -L/usr/X11R6/lib -lXm -lXt -lXext -lX11 + + # Uncomment one of the SYSLIBS definitions according to your version of Linux: + + SYSLIBS = diff -c -r Geomview.orig/src/bin/geomview/x11/gvmain.c Geomview/src/bin/geomview /x11/gvmain.c *** Geomview.orig/src/bin/geomview/x11/gvmain.c Thu Nov 17 18:45:03 1994 --- Geomview/src/bin/geomview/x11/gvmain.c Wed Jul 24 16:19:58 1996 *************** *** 10,18 **** #ifdef __linux__ #include #endif ! #ifdef __osf__ #include #endif /* xgv main - global variables */ /***************************************************************************** / --- 10,21 ---- #ifdef __linux__ #include #endif ! #if defined(__osf__) || defined(__FreeBSD__) #include #endif + #ifdef __FreeBSD__ + #include + #endif /* xgv main - global variables */ /***************************************************************************** / *************** *** 40,46 **** __setfpucw(_FPU_IEEE); #endif ! #ifdef __osf__ signal(SIGFPE, SIG_IGN); /* Ignore e.g. divide-by-zero traps */ #endif --- 43,53 ---- __setfpucw(_FPU_IEEE); #endif ! #ifdef __FreeBSD__ ! fpsetmask(fpgetmask()&(~FP_X_DZ)); ! #endif ! ! #if defined(__osf__) || defined(__FreeBSD__) signal(SIGFPE, SIG_IGN); /* Ignore e.g. divide-by-zero traps */ #endif diff -c -r Geomview.orig/src/lib/oogl/refcomm/streampool.c Geomview/src/lib/oogl /refcomm/streampool.c *** Geomview.orig/src/lib/oogl/refcomm/streampool.c Sun Oct 16 19:11:55 1994 --- Geomview/src/lib/oogl/refcomm/streampool.c Thu Jul 11 22:39:50 1996 *************** *** 218,227 **** --- 218,235 ---- p->otype = PO_ALL; p->next = NULL; p->mode = rw; + #ifndef __FreeBSD__ p->seekable = (p->inf && tell(fileno(p->inf)) != -1 && + #else + p->seekable = (p->inf && ftell(p->inf) != -1 && + #endif !isatty(fileno(p->inf))); p->softEOF = !p->seekable; + #ifndef __FreeBSD__ p->level = (p->outf && tell(fileno(p->outf)) != -1 && + #else + p->level = (p->outf && ftell(p->outf) != -1 && + #endif !isatty(fileno(p->outf))) ? 0 : 1; p->flags = PF_TEMP; *************** *** 325,331 **** --- 333,343 ---- if(p->inf != NULL) { if(isatty(fileno(p->inf))) { p->softEOF = 1; + #ifndef __FreeBSD__ } else if(tell(fileno(p->inf)) != -1) { + #else + } else if(ftell(p->inf) != -1) { + #endif p->seekable = 1; } if(fstat(fileno(p->inf), &st) < 0 || (st.st_mode & S_IFMT) == S_IFIFO) *************** *** 335,341 **** --- 347,357 ---- watchfd(fileno(p->inf)); } if(p->level == 0 && p->outf && + #ifndef __FreeBSD__ (tell(fileno(p->outf)) == -1 || isatty(fileno(p->outf)))) + #else + (ftell(p->outf) == -1 || isatty(fileno(p->outf)))) + #endif p->level = 1; return p; } diff -c -r Geomview.orig/src/lib/oogl/util/error.c Geomview/src/lib/oogl/util/er ror.c *** Geomview.orig/src/lib/oogl/util/error.c Mon May 2 21:04:17 1994 --- Geomview/src/lib/oogl/util/error.c Tue Jul 9 11:19:38 1996 *************** *** 81,88 **** --- 81,90 ---- char * sperrno(unsigned int err) { + #if !defined(__FreeBSD__) extern int sys_nerr; extern char *sys_errlist[]; + #endif static char errstr[16]; if(err < sys_nerr) diff -c -r Geomview.orig/src/lib/oogl/util/futil.c Geomview/src/lib/oogl/util/fu til.c *** Geomview.orig/src/lib/oogl/util/futil.c Fri Aug 26 00:11:27 1994 --- Geomview/src/lib/oogl/util/futil.c Thu Jul 11 22:23:37 1996 *************** *** 154,159 **** --- 154,164 ---- #define _IO_read_ptr _gptr #define _IO_read_end _egptr #endif + #ifdef __FreeBSD__ + #define _base _bf._base + #define _ptr _p + #define _cnt _r + #endif /* Peer into a stdio buffer, check whether it has data available * for reading. Almost portable given the common stdio ancestry. *************** *** 800,806 **** #else /* Roughly vanilla stdio */ ! #if defined(AIX) || defined(__osf__) /* The stdio-buf-hacking code below doesn't work on some systems, so * just ship the data through a pipe. Small (8K?) size limit. --- 805,811 ---- #else /* Roughly vanilla stdio */ ! #if defined(AIX) || defined(__osf__) || defined(__FreeBSD__) /* The stdio-buf-hacking code below doesn't work on some systems, so * just ship the data through a pipe. Small (8K?) size limit. --_=XFMail.0.5-beta.p0.FreeBSD:961104153310:416=_-- End of MIME message