Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 1997 07:06:18 -0700
From:      Manfred Antar <mantar@netcom.com>
To:        Chuck Robey <chuckr@glue.umd.edu>, Jim Durham <durham@w2xo.pgh.pa.us>
Cc:        FreeBSD Ports <FreeBSD-Ports@FreeBSD.ORG>
Subject:   Re: netscape
Message-ID:  <3.0.3.32.19970729070618.00e4ba70@mantar.slip.netcom.com>
In-Reply-To: <Pine.BSF.3.96.970729012733.286B-100000@Journey2.mat.net>
References:  <33DD4409.794BDF32@w2xo.pgh.pa.us>

next in thread | previous in thread | raw e-mail | index | archive | help
--=====================_870210378==_
Content-Type: text/plain; charset="us-ascii"

At 01:28 AM 7/29/97 -0400, Chuck Robey wrote:
>On Mon, 28 Jul 1997, Jim Durham wrote:
>
>> Chuck Robey wrote:
>> > 
>> > I noted Rip Toren's post, and since my netscape is also timing
out, I went
>> > to look around at the netscape site.  In
>> > /pub/communicator/4.01/4.01b6/english/unix/other I found two
different
>> > files that might possibly be the next netscape:
>> > 
>> > communicator-v401b6-export.x86-bsdi-bsd.tar.gz    and
>> > communicator-v401b6-export.x86-bsdi-bsd2.tar.gz
>> > 
>> > Anybody know what the difference is?  My connection to the
internet isn't
>> > too high-speed, so I don't want to download the wrong guy if I
can avoid
>> > it.  Thanks.
>> > 
>> I downloaded and tried them both on 2.1.7 and they both bombed
with
>> a floating point exception.
>
>You'd really have to expect that with 2.1.7, that's a little aged.
I'll
>download and try them here.
>
Someone on comp.unix.freebsd.misc made a sort of fix so you can run
the new netscape.
Here it is:

--=====================_870210378==_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

# 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:
#
#	nofpe.1
#	nofpe.c
#	Makefile
#	netscape4
#
echo x - nofpe.1
sed 's/^X//' >nofpe.1 << 'END-of-nofpe.1'
X.\" $Id: nofpe.1,v 1.0 1997/07/27 20:12:38 gordon Exp $
X.TH NOFPE 1
X.SH NAME
Xnofpe - run a command with a different floating-point mask
X.SH SYNOPSIS
Xnofpe [-m mask] command command-args
X.SH DESCRIPTION
Xnofpe runs a command with the floating-point control register set
Xto a specified value, usually to mask or unmask certain types
Xof floating-point exceptions.  The default mask is equivalent to -m=
 0x37f,
Xwhich masks all exceptions.  You will usually want to specify the
Xmask in hex, with a leading 0x.
X.SH BUGS
Xnofpe just sets the initial floating-point control register.
XIf the running program changes it to something else, nofpe
Xwill be ineffective beyond that point.
X.P
XThis program is hopelessly dependent on the i386 floating-point
Xhardware, the layout of the registers in the U page, and
Xdetails of the ptrace(2) system call.
X.P
XIf you've got source code to the program in question, it is
Xmuch easier and faster to just call fpsetmask(3) (or
Xfpsetround(3)) from within the program.
X.SH STANDARDS
XYou gotta be kidding!!
X.SH AUTHOR
XGordon L. Burditt
END-of-nofpe.1
echo x - nofpe.c
sed 's/^X//' >nofpe.c << 'END-of-nofpe.c'
X/*
X * $Id: nofpe.c,v 1.0 1997/07/27 20:12:38 gordon Exp $
X */
X# include <stdio.h>
X# include <stdlib.h>
X# include <sys/types.h>
X# include <sys/wait.h>
X# include <machine/reg.h>
X# include <sys/ptrace.h>
X
Xint
Xmain(int argc, char **argv)
X{
X    int             pid;		/* process id of child */
X    int             status;		/* child termination/stop status */
X    struct fpreg    fpreg;		/* floating point register set */
X    int             ret;
X    int             c;			/* flag character */
X    unsigned long   controlreg =3D 0x37f;	/* fp control register */
X    int             error =3D 0;		/* bad option */
X
X    while ((c =3D getopt(argc, argv, "m:")) !=3D EOF)
X	switch (c)
X	{
X	case 'm':
X	    controlreg =3D strtol(optarg, NULL, 0);
X	    break;
X	default:
X	    error =3D 1;
X	    break;
X	}
X
X    if (error || (argc - optind) < 1)
X    {
X	fprintf(stderr, "Usage: nofpe [-m mask] command-path command-args=
 ..\n");
X	exit(1);
X    }
X
X    pid =3D fork();
X    switch (pid)
X    {
X    case -1:				/* cannot fork */
X	perror("fork");
X	exit(1);
X
X    case 0:				/* child */
X	ptrace(PT_TRACE_ME, 0, 0, 0);	/* set up tracing */
X	execvp(argv[optind], &argv[optind]);	/* exec command */
X	exit(1);			/* oops, something bombed */
X
X    default:				/* parent */
X	ret =3D wait4(pid, &status, 0, NULL);	/* breakpoint at start of prog=
 */
X	if (WIFSTOPPED(status))
X	{
X	    ptrace(PT_GETFPREGS, pid, (caddr_t) & fpreg, 0);	/* get fp regs */
X	    /* warning, this is very dependent on register */
X	    /* layout in the U page */
X	    fpreg.fpr_env[0] =3D controlreg;	/* fix control register */
X	    ptrace(PT_SETFPREGS, pid, (caddr_t) & fpreg, 0);	/* set fp regs */
X	    ptrace(PT_CONTINUE, pid, (caddr_t) 1, 0);	/* continue=
 */
X	}
X	else
X	{
X	    fprintf(stderr, "Huh? Process didn't stop\n");
X	    exit(1);
X	}
X	while (1)
X	{
X	    ret =3D wait4(pid, &status, 0, NULL);
X	    if (WIFSTOPPED(status))
X	    {
X# ifdef DEBUG
X		fprintf(stderr, "Stopped on signal %d\n", WSTOPSIG(status));
X# endif
X		/* hand it back the signal, let it handle it */
X		ptrace(PT_CONTINUE, pid, (caddr_t) 1, WSTOPSIG(status));
X	    }
X	    else if (WIFSIGNALED(status))
X	    {
X# ifdef DEBUG
X		fprintf(stderr, "Process died on signal %d\n", WTERMSIG(status));
X# endif
X		kill(getpid(), WTERMSIG(status));
X		break;
X	    }
X	    else if (WIFEXITED(status))
X	    {
X# ifdef DEBUG
X		fprintf(stderr, "Exit %d\n", WEXITSTATUS(status));
X# endif
X		exit(WEXITSTATUS(status));
X	    }
X	}
X	break;
X    }
X    exit(0);
X}
END-of-nofpe.c
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X#
X#	$Id: Makefile,v 1.0 1997/07/27 20:12:38 gordon Exp=
 $
X#
XPROG=3Dnofpe
XSRCS=3Dnofpe.c
X
X.include <bsd.prog.mk>
X
XLIST =3D nofpe.1 nofpe.c Makefile netscape4
Xshar:
X	shar ${LIST} > nofpe.shar 
END-of-Makefile
echo x - netscape4
sed 's/^X//' >netscape4 << 'END-of-netscape4'
X#!/bin/sh
X#
X# $Id$
X#
X
XMOZILLA_HOME=3D/usr/local/netscape ; export MOZILLA_HOME
Xexec nofpe ${MOZILLA_HOME}/netscape "$@"
END-of-netscape4
exit


--=====================_870210378==_
Content-Type: text/plain; charset="us-ascii"


|==============================|
|    mantar@netcom.com         |
|    Ph. (415) 681-6235        |
|==============================|
--=====================_870210378==_--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.3.32.19970729070618.00e4ba70>