From:     Digestifier <Linux-Development-Request@senator-bedfellow.mit.edu>
To:       Linux-Development@senator-bedfellow.mit.edu
Reply-To: Linux-Development@senator-bedfellow.mit.edu
Date:     Tue, 28 Sep 93 14:18:49 EDT
Subject:  Linux-Development Digest #133

Linux-Development Digest #133, Volume #1         Tue, 28 Sep 93 14:18:49 EDT

Contents:
  Re: Pascal compiler. (Byron A Jeff)
  Re: MFM + IDE (Delman Lee)
  Re: Lpmud on Linux. Alarm Clock. (Matthias Urlichs)
  Re: xcalentool, xview, and /usr/include/sys/ucontext.h (Kenneth Osterberg)
  Re: Please no /config. (Harald T. Alvestrand)
  Re: MFM + IDE (Drew Eckhardt)
  Re: linux scheduler alternatives??? (Linus Torvalds)
  Opening a deleted file though /proc (revisited). (Brian McCauley)
  Re: Opening a deleted file though /proc (revisited). (Linus Torvalds)
  Bug in Xfree with tvga9000? (Liefting W)
  Driver for 3c507 anyone? (Steve Starck)
  Re: Pascal compiler. (Masami Ogoshi)
  MIT Scheme? (Theodore A. Serreyn)
  Re: Whence 1.0? (K J MacDonald)
  ASM I/O (Hugo Eide Gunnarsen)
  Re: Net-2 Patches are GREAT
  Re: ASM I/O (Mahesh Neelakanta)

----------------------------------------------------------------------------

From: byron@cc.gatech.edu (Byron A Jeff)
Subject: Re: Pascal compiler.
Date: Tue, 28 Sep 1993 04:11:47 GMT

In article <287tc9$pjq@mtu.edu>,
STEVEN J. KANGAS <sjkangas@major.cs.mtu.edu> wrote:
>       Has anyone ported a pascal compiler to linux yet?  It seems like
>all the compilers (p4, etc.) I can find are all written in pascal.  If I
>had a pascal compiler to compiler the compiler I wouldn't need a stupid
>compiler now would I?  Any info would be appreciated.

How about using p2c to break the chain? It's not a true pascal compiler. It
translates Pascal to C code which can be compiled and linked with the p2c
library producing a working program. 

So maybe you can bootstrap a compiler using p2c.

BAJ
---
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel!
Georgia Tech, Atlanta GA 30332   Internet: byron@cc.gatech.edu

------------------------------

From: delman@mipg.upenn.edu (Delman Lee)
Subject: Re: MFM + IDE
Date: 28 Sep 93 03:30:47 GMT

In article <1993Sep27.191815.24389@mnemosyne.cs.du.edu> dsharp@nyx.cs.du.edu (Dave Sharp) writes:

   angelos@scus1.ctstateu.edu (Angelos Karageorgiou Greek and Macedon the only combination) writes:


   >    Is it possible to have both IDE and MFM controllers on the same
   >machine ?
   >    I know that the bios try to boot from both controllers so it
   >locks up. Is there a work around ? like disabling some roms ?
   >    Just curious

   MFM and IDE can not coexist on the same machine.  I understand that
   you can get IDE and SCSI -or- MFM and SCSI to work together, tho.


Yes, the clean distributed Linux kernel does not support the
co-existence of MFM and IDE drives. However, there is a patch to the
kernel that allows Linux to run with two AT-type controllers, one such
example would be an IDE and MFM controller. In fact, that's what I am
running --- I have two MFM drives and 1 IDE drive. 

The patch is in, for example,
sunsite.unc.edu:pub/Linux/kernel/misc-patches/atdisk*

Hope this helps.

Delman.
--
______________________________________________________________________

  Delman Lee                                 Tel.: +1-215-662-6780
  Medical Image Processing Group,            Fax.: +1-215-898-9145
  University of Pennsylvania,
  4/F Blockley Hall, 418 Service Drive,                         
  Philadelphia, PA 19104-6021,
  U.S.A..                            Internet: delman@mipg.upenn.edu
______________________________________________________________________

------------------------------

From: urlichs@smurf.sub.org (Matthias Urlichs)
Subject: Re: Lpmud on Linux. Alarm Clock.
Date: 27 Sep 1993 22:48:02 +0100

In comp.os.linux.development, article <286nsvINN3uq@mailhost.uni-koblenz.de>,
  hodgen@ozzy.uni-koblenz.de (Wayne Hodgen) writes:
> 
> I'm having problems getting the driver for our Lpmud working under Linux. On
> a Sun, no problem. Under Linux (Slackware 1.0.2) it keeps crashing with an
> Alarm clock.
> 
Use BSD signals or re-signal() your alarm handler at its end.

-- 
The price of seeking to force our beliefs on others is that someday
they might force their beliefs on us.
                                        -- Mario Cuomo
-- 
Matthias Urlichs        \ XLink-POP Nürnberg   | EMail: urlichs@smurf.sub.org
Schleiermacherstraße 12  \  Unix+Linux+Mac     | Phone: ...please use email.
90491 Nürnberg (Germany)  \   Consulting+Networking+Programming+etc'ing      42

------------------------------

From: lmfken@lmf.ericsson.se (Kenneth Osterberg)
Subject: Re: xcalentool, xview, and /usr/include/sys/ucontext.h
Date: Tue, 28 Sep 1993 07:56:12 GMT

"Eric Jeschke" <jeschke@cs.indiana.edu> writes:

>I am trying to compile a version of calentool 2.2X using Ken
>Osterberg's Linux XView port.  I grabbed the stock sources off
>of sunsite (/pub/X11/contrib), configured a makefile and tried
>to build.  It bombs trying to include <sys/ucontext.h> 
>which is nowhere to be found on my box.  I'm running .99p12

Yes it is, you just haven't looked closely enough.

>upgraded periodically from back to .99p6 or so.  I looked at
>the openwin/include/xview files and it looks like it assumes
>sys/ucontext.h to be in "standard" Linux.

This is a kludge I did in the port. Take a look in xview3L5/patches, and
you'll see ucontext.h. Copy this to /usr/include/sys as described in the
README.

Others have pointed out that a better solution is to #undef SYSV_UCONTEXT
in base.h in the xview header files. By doing this, you won't need the
dummy ucontext.h while compiling the xview library. Either way should work.

>Q: has this file been added to the default distributions at some
>point and I have missed it?   Anybody else compiled calentool for
>Linux?  If you have could you drop me a line about how you did it?

Kenneth

--
Kenneth Osterberg      lmfken@lmf.ericsson.se or lmfken@bluese1.ericsson.fi

------------------------------

From: hta@uninett.no (Harald T. Alvestrand)
Subject: Re: Please no /config.
Date: 28 Sep 1993 10:41:14 GMT

A not uncommon practice for both keeping the configuration files
with the packages they belong to and keeping them in /etc is to make
(for instance) /usr/lib/X11/xdm-config be a symlink to /etc/xdm-config.

This puts the name in the "standard" place, and the content in some place
that changes by CPU.
-- 
                   Harald Tveit Alvestrand
                Harald.T.Alvestrand@uninett.no
      G=Harald;I=T;S=Alvestrand;O=uninett;P=uninett;C=no
                      +47 7 59 70 94
My son's name is Torbjørn. The letter between "j" and "r" is o with a slash.

------------------------------

From: drew@pipkin.cs.colorado.edu (Drew Eckhardt)
Subject: Re: MFM + IDE
Date: Tue, 28 Sep 1993 09:35:33 GMT

In article <1993Sep27.191815.24389@mnemosyne.cs.du.edu> dsharp@nyx.cs.du.edu (Dave Sharp) writes:
>angelos@scus1.ctstateu.edu (Angelos Karageorgiou Greek and Macedon the only combination) writes:
>
>
>>      Is it possible to have both IDE and MFM controllers on the same
>>machine ?
>>      I know that the bios try to boot from both controllers so it
>>locks up. Is there a work around ? like disabling some roms ?
>>      Just curious
>
>MFM and IDE can not coexist on the same machine.  I understand that
>you can get IDE and SCSI -or- MFM and SCSI to work together, tho.

I have IDE, MFM, and SCSI disks in my system (two SCSI boards), 
and it does work.

With the IDE/MFM boards, you need to jumper one at a secondary 
address, or use an XT MFM board.  You also need to jumper one for 
a different IRQ - if this is not possible, you'll have to perform
some corrective surgery on the board, I used an exacto knife and 
conductive pen to change the IRQ to 15.
-- 
Boycott USL/Novell for their absurd anti-BSDI lawsuit. | Drew Eckhardt, 
Condemn Colorado for Amendment Two.                    | Professional Linux 
Use Linux, the fast, flexible, and free 386 unix       | Consultant
Will administer Unix for food                          | drew@cs.Colorado.EDU

------------------------------

From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Subject: Re: linux scheduler alternatives???
Date: 28 Sep 1993 13:18:01 +0200

In article <286i88INN9rh@fstgds15.tu-graz.ac.at>,
Klaus ZLOEBL <zloebl@piis10.joanneum.ac.at> wrote:
>I found some time last weekend and read the khg
>after looking around in the kernel sources i had to notice
>that i don't fine the place where the timeout timer is set.
>So could somebody be so nice and tell me where to find it.

It's not there.  Linux just uses the normal timer to keep the heartbeat:
after all, we don't allow just anybody to mess with interrupts, so the
timeout timer (I assume you meant the one that sends an NMI) isn't
needed. 

Actually, I've been thinking of using it for a better kernel profiler,
as the current profiler doesn't work too well in interrupt handlers
(understatement of the week), and one based on NMI would work.  I've
never bothered to find out how it works, though. 

>Also i'd like to write a new scheduler (multilevel feedback queue)

There has been one that used something like this, and reportedly worked
better under heavy load.  I have to admit to liking the current one,
though: simple and reasonably well-behaved. 

>What algorithm is use for paging?

It's essentially a modified "clock" algorithm, which seems to work
reasonably well.  I once tried a NRU-like thing, but it was so good at
finding pages that belonged to programs that were waiting for user input
that I gave up on it.  I could probably have tuned it to give better
performance, but the clock algorithm is reasonably fair, needs no
tuning, and doesn't give *too* bad results. 

                        Linus

------------------------------

From: bam@wcl-l.bham.ac.uk (Brian McCauley)
Subject: Opening a deleted file though /proc (revisited).
Date: 28 Sep 1993 12:50:44 GMT
Reply-To: B.A.McCauley@bham.ac.uk

A while pack I posted to c.o.l.help to find out if anyone knew why:

$cat /dev/stdin <<X
> X
cat: /dev/stdin: Permission denied

(Note /dev/stdin -> /proc/self/fd/0)

Linus said the reason was in linux/fs/namei.c:

int permission(struct inode * inode,int mask)
{
        int mode = inode->i_mode;

/* special case: not even root can read/write a deleted file */
        if (inode->i_dev && !inode->i_nlink)
                return 0;

But he also said he couldn't remember why this was there. I've
commented it out in my kernel now - anyone got any ideas why this
could be a bad idea. The most obvious reason (the possiblity of
someone else deleting your pwd) seems not to be a problem. What others
can people think of?
--
    \\   ( )   No Bullshit!   | Email: B.A.McCauley@bham.ac.uk
 .  _\\__[oo       from       | Voice: +44 21 471 3789 (home)
.__/  \\ /\@  /~)  /~[   /\/[ |        +44 21 627 2171 (work)
.  l___\\    /~~) /~~[  /   [ |   Fax: +44 21 627 2175 (work)
 # ll  l\\  ~~~~ ~   ~ ~    ~ | Snail: 197 Harborne Lane, B29 6SS, UK
###LL  LL\\ (Brian McCauley)  |  ICBM: 52.5N 1.9W

------------------------------

From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Subject: Re: Opening a deleted file though /proc (revisited).
Date: 28 Sep 1993 16:22:46 +0200

In article <BAM.93Sep28135044@wcl-l.bham.ac.uk>,
Brian McCauley <B.A.McCauley@bham.ac.uk> wrote:
>A while pack I posted to c.o.l.help to find out if anyone knew why:
>
>$cat /dev/stdin <<X
>> X
>cat: /dev/stdin: Permission denied
>
>(Note /dev/stdin -> /proc/self/fd/0)
>
>Linus said the reason was in linux/fs/namei.c:
>
>int permission(struct inode * inode,int mask)
>{
>       int mode = inode->i_mode;
>
>/* special case: not even root can read/write a deleted file */
>       if (inode->i_dev && !inode->i_nlink)
>               return 0;
>
>But he also said he couldn't remember why this was there. I've
>commented it out in my kernel now - anyone got any ideas why this
>could be a bad idea. The most obvious reason (the possiblity of
>someone else deleting your pwd) seems not to be a problem. What others
>can people think of?

Actually, I thought about it, and as far as I can remember, the check is
actually there due to a *very* early kernel that wanted this to handle
deleted working directories gracefully.  We are talking version 0.10 or
something like that: deleting a directory from under a user resulted in
weird errors without this, I seem to remember. 

Note that my memory isn't what it used to be (and it has never really
been that good), but the above is kind of a hazy recollection of what
might have been the reason.  The test should be safe to remove now
(deleting a pwd should be checked elsewhere in the current kernels), and
I just did so in my kernel. 

                        Linus

------------------------------

From: wlieftin@cs.vu.nl (Liefting W)
Subject: Bug in Xfree with tvga9000?
Date: Tue, 28 Sep 1993 14:46:44 GMT

Hello.

I have just installed X on my system, and I have a funny problem.

640x480x256color no problem, but when I Ctrl-Alt-+ to 800x600x256color,
the screen gets messed up. But... not like it would when I had the wrong 
sync numbers. 

The screen _IS_ stable, but black spickles get all over it. And when I switch
back to 640x480, they stay so. I have to refresh the screen to get them away.

Also, after stopping X, some letters (in normal screen mode) seem to have some
parts missing.

I have a trident 9000 with 512K mem. Any solution (besides buying something like
an ET4000)?

Wouter.

------------------------------

From: sstarck@uswnvg.com (Steve Starck)
Crossposted-To: comp.os.linux.misc
Subject: Driver for 3c507 anyone?
Date: 28 Sep 93 14:39:43 GMT

Realizing that the Ethernet HOWTO contains the line:

                3c507 --
                        Not available at present.

I was wondering if anyone has been working on a driver for this Ethernet
card, since my PC at work has a 3c507-TP and I'd like to put Linux on it
and have it connected to our net.

I might end up rolling my own, but with my current project load, I don't
really have the time right now and was wondering if anyone was working on
something.  I might be able to provide some time to "alpha" or "beta" test
whatever is available.

Thanks In Advance

--
Steve Starck                            sstarck@uswnvg.com
Sr. Systems Administrator               
U S WEST NewVector Group, Inc.
(206)562-5024

------------------------------

From: ogochan@jh4tjwgw.jh4tjw.prug.or.jp (Masami Ogoshi)
Subject: Re: Pascal compiler.
Date: 28 Sep 93 11:04:04 GMT
Reply-To: ogochan@jh4tjwgw.jh4tjw.prug.or.jp (Masami Ogoshi)

In article <287tc9$pjq@mtu.edu>
        sjkangas@major.cs.mtu.edu (STEVEN J. KANGAS) writes:
>       Has anyone ported a pascal compiler to linux yet?  It seems like
>all the compilers (p4, etc.)

        I wrote a Pascal compiler on MS-DOS, which likes Pascal-P4. It was
written in C and it generates byte code, And It have little optimizer. 

        It is easy to port for Linux (I think).
-- 
ogochan@jh4tjw.prug.or.jp
Masami Ogoshi
109 Okudani-cho Matsue city Shimane pref 690 JAPAN

------------------------------

Crossposted-To: comp.os.linux.help
From: tserreyn@nyx.cs.du.edu (Theodore A. Serreyn)
Subject: MIT Scheme?
Date: Tue, 28 Sep 93 15:47:04 GMT

Has anyone ported the 7.1 or 7.2 versions of MIT Scheme to LINUX yet?

I'm looking for a decent version that doesn't respind #undefined when I define a procedure.

Any help or pointer to good scheme compilers would be much appreciated.

Ted Serreyn
tserreyn@nyx.cs.du.edu
serreyta@cnsvax.uwec.edu
serreyta@adam.cs.uwec.edu


------------------------------

From: kenny@festival.ed.ac.uk (K J MacDonald)
Subject: Re: Whence 1.0?
Date: Tue, 28 Sep 1993 16:44:05 GMT

Kevin Brown (kevin@frobozz.sccsi.com) wrote:
: In article <285l1d$4u6@senator-bedfellow.MIT.EDU> dthumim@athena.mit.edu (Daniel J Thumim) writes:
: >    It seems that the last few patchlevel releases have not been any more
: >stable than previous ones.  This is not good because people usually just
: >grab the latest kernel release, and if it's buggy that looks bad for
: >linux.  Maybe we can split the kernel into two "releases"...  one which
: >would have no new non-essential features added, but would only be debugged
: >    Just my two cents...
[stuff deleted]
: I basically agree, though I think it would work best overall if done this
: way:

:     There are two versions in each release.  One is a bug fix version.  One
:     is a "new features" version.

:     For each release, the "bug fix" version is the prior release's "new
:     features" version with bug fixes, and the "new features" version is

        Perhaps everybody should remember that Linux is BETA software
and if you don't want a new (buggier) kernel, then just wait for a week
or so before upgrading. It's all in the USERS hands as to which version
of the kernel he/she uses.

        Don't load Linus with extra stuff, he's doing a marvellous job
at the moment.

        This isn't a flame, just a reminder.

        Happy Linuxing,

                Kenny.
-- 
==============================================================================
Kenneth MacDonald                E-mail: kenny@ed
Dept. of Geology & Geophysics   "Allow me to introduce myself, Major Dennis
University of Edinburgh          Bloodnok, International Christmas Pudding

------------------------------

From: hugogu@slagg.met.sintef.no (Hugo Eide Gunnarsen)
Subject: ASM I/O
Date: Tue, 28 Sep 93 16:19:11 GMT

Hi.

I want to be able to write/read a word from a I/O port.
Now I'm using inb/outb, but what I need is inw/outw.
I tried to change the code for inb/outb, but it failed to
work.

SO it anybody know how to read/write a word (16b) from/to a
I/O port, pleas tell me.

Hugo E. Gunnarsen
hugogu@slagg.met.sintef.no


------------------------------

Crossposted-To: comp.os.linux.misc
From: dan@archimedes.lance.colostate.edu ()
Subject: Re: Net-2 Patches are GREAT
Date: Tue, 28 Sep 1993 17:30:12 GMT
Reply-To: dan@lance.colostate.edu



In article <CDuxG4.F41@swi.psy.uva.nl>, jan@swi.psy.uva.nl (Jan Wielemaker) writes:
|> jmorriso@rflab.ee.ubc.ca (John Paul Morrison) writes:
|> 
|> >OK, what's the secret? I can get pl13 with net-2e4 running, although
|> >it isnt very stable. I'm about to give up on net-2e, so I downloaded
|> >the newest pl13 source and followed the net2-debugged instructions. The
|> >instructions tell you to move your inet directory, then unpack the new
|> >code. No Makefile or CONFIG is included with net2-debugged, so I
|> >assume you are supposed to copy the old ones (from inet.old!).
|> 
|> >After compiled and booting, the new net2 stuff won't even detect my ethercard.
|> 
|> Tried exactly the same.  I've got no network at home, but we're trying to
|> get the network stuff going at the University.  Even using the loopback
|> net, just `rlogin myself' followed by logout crashed the system without
|> any message!?  At least that works on plain pl13.  Now I trust that the
|> inet-D package is debugged, but how does one get it *properly* linked
|> to the kernel?
|> 
|> The first thing I want are *reliable* remote running X11 applications.
|> The second thing I want is nfs.  NIS would be the greatest!
|> 
|>      Thanks --- Jan
 

Whats the deal?  I've install MCC pl10+  and XFee86-1.3.  I have a cheapo
NE200 clone card (Allied Telesis).  Within 20 minutes of installing the
base package and tcp/ip I was ftp'ing the X stuff.  Within an hour of 
installing X I was displaying remote X stuff with no problem (xrn, xmh, netrek ;)

I have no problems - none!  Except that the pl10+ memory management is kind
of sophomoric, but it works if I dont try to display a 2000x2000x256 jpeg.

I ftp, telnet and display remote X all the time - and I've only crashed once, due
to the memory management.  After reading messages like the above I'm in no big
hurry to update.  



===========================================================================

  Dan Doner
  College of Engineering
  Colorado State University
  dan@lance.colostate.edu



------------------------------

From: mahesh@cybernet.cse.fau.edu (Mahesh Neelakanta)
Subject: Re: ASM I/O
Date: Tue, 28 Sep 1993 17:29:42 GMT

In article <1993Sep28.161911.27630@ugle.unit.no> hugogu@slagg.met.sintef.no (Hugo Eide Gunnarsen) writes:
>I tried to change the code for inb/outb, but it failed to
>work.
>
>SO it anybody know how to read/write a word (16b) from/to a
>I/O port, pleas tell me.
>
>Hugo E. Gunnarsen
>hugogu@slagg.met.sintef.no
>

Here is what I use. I got this from both the XFree86 (1.3 I think) sources 
and the [s]vgalib packages. Linux provides two ways (that I know of) for
I/O privs..the iopl() command and the ioctl method (KDADDIO). The former
is quick-and-dirty but is more dangerous since it will allow access to
all io ports. 

/* inline.h */
#ifndef LNX_INLINE_H
#define LNX_INLINE_H

static __inline__ void
outb(port, val)
short port;
char val;
{
   __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));
}


static __inline__ void
outw(port, val)
short port;
short val;
{
   __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));
}

static __inline__ unsigned int
inb(port)
short port;
{
   unsigned char ret;
   __asm__ __volatile__("inb %1,%0" :
       "=a" (ret) :
       "d" (port));
   return ret;
}

static __inline__ unsigned int
inw(port)
short port;
{
   unsigned short ret;
   __asm__ __volatile__("inw %1,%0" :
       "=a" (ret) :
       "d" (port));
   return ret;
}

/* End of inline.h */
#endif LNX_INLINE_H


==============================================================================
  Metro Link Incorporated.  2213 W. McNab Rd. Pompano Beach,  Florida  33069
 X11.5 and OSF/Motif for QNX, SVR3, SVR4.[012], SCO, Linux, UnixWare, LynxOS, 
                  AT&T, Venix, ISC, Solaris, Pyramid, SunOS
 Voice: +1.305.970.7353    Fax: +1.305.970.7351  Email: mahesh@metrolink.com
==============================================================================

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
