Article View: comp.windows.misc
Article #1322Re: MGR installation
From: Rob Robertson
Date: Sat, 28 Jan 1989 01:12
Date: Sat, 28 Jan 1989 01:12
98 lines
3723 bytes
3723 bytes
In article <3647@uoregon.uoregon.edu> markv@drizzle.UUCP (Mark VandeWettering) writes:
>
> MGR also coredumps on me, with a similar system (SUN 3/60 with
> SUNOS4). The coredump appears in mem_rop, in the blitlib
> library. I managed to build the version that uses pixrect, but
> it too has problems (doesn't notice font changes)
>
The fix is that SUN changed the mmap() call between 3.X and 4.0.
Besides the new semantics, it now gives you exactly what you ask of
it. Under 3.X when one specified PROT_WRITE (ie I wanna write on
these pages), the kernel also gave you read access. Under 4.0 it
don't, and any attempt to read core dumps.
A coworker found the problem (thanks Bob!). The patch below fixes the
problem, along with several others. They should at least get the
system up under 4.0.
All in all I think that MGR (or MunGeR as it has been affectionately
dubbed) is pretty nifty. Nice, small, and easy to work in. Next best
thing to a Blit.
Maybe it'll make SunOS 4.0 bearable on a 3/50.
rob
william robertson
rob@violet.berkeley.edu
diff -c kbd.c.orig kbd.c
*** kbd.c.orig Tue Jan 24 12:12:35 1989
--- kbd.c Fri Jan 27 16:52:21 1989
***************
*** 20,26 ****
# include <sys/types.h>
# include <sundev/kbio.h>
# ifndef TIOCCONS /* definiton moved in rel. 4.0 */
! # include "<sys/termios.h>"
# endif
#endif KBD
#endif
--- 20,26 ----
# include <sys/types.h>
# include <sundev/kbio.h>
# ifndef TIOCCONS /* definiton moved in rel. 4.0 */
! # include <sys/termios.h>
# endif
#endif KBD
#endif
diff -c blit/bitmap.c.orig blit/bitmap.c
*** blit/bitmap.c.orig Thu Jan 26 22:18:10 1989
--- blit/bitmap.c Thu Jan 26 22:22:48 1989
***************
*** 66,76 ****
#ifdef _MAP_NEW /* New semantics for mmap in Sun release 4.0 */
addr = (DATA) mmap(addr, _s_len=buff.fb_size,
! PROT_WRITE, _MAP_NEW|MAP_SHARED, fd, 0);
if ((int)addr == -1)
return (BIT_NULL);
#else
! if (mmap(addr, _s_len = buff.fb_size, PROT_WRITE, MAP_SHARED, fd, 0) < 0)
return (BIT_NULL);
#endif
--- 66,76 ----
#ifdef _MAP_NEW /* New semantics for mmap in Sun release 4.0 */
addr = (DATA) mmap(addr, _s_len=buff.fb_size,
! PROT_WRITE|PROT_READ, _MAP_NEW|MAP_SHARED,
fd, 0);
if ((int)addr == -1)
return (BIT_NULL);
#else
! if (mmap(addr, _s_len = buff.fb_size, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0) < 0)
return (BIT_NULL);
#endif
diff -c blit/sym.c.orig blit/sym.c
*** blit/sym.c.orig Fri Jan 27 16:53:38 1989
--- blit/sym.c Fri Jan 27 16:54:02 1989
***************
*** 158,163 ****
is_reg(name)
char *name;
{
! return( (name[0]=='d' || name[1] == 'a') &&
(name[1] >= '0' && name[1] <= '7'));
}
--- 158,163 ----
is_reg(name)
char *name;
{
! return( (name[0]=='d' || name[0] == 'a') &&
(name[1] >= '0' && name[1] <= '7'));
}
william robertson
rob@violet.berkeley.edu
Technical Details
Message-ID:
<19607@agate.BERKELEY.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!violet.berkeley.edu!robReferences:
<484@ubc-cs.UUCP> <3647@uoregon.uoregon.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!violet.berkeley.edu!rob From: rob@violet.berkeley.edu (Rob Robertson) Newsgroups: comp.windows.misc,comp.sources.bugs Subject: Re: MGR installation Message-ID: <19607@agate.BERKELEY.EDU> Date: 28 Jan 89 01:12:29 GMT References: <484@ubc-cs.UUCP> <3647@uoregon.uoregon.edu> Sender: usenet@agate.BERKELEY.EDU Distribution: na Organization: University of California, Berkeley Lines: 98