Subject: Linux-Development Digest #973
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:     Mon, 1 Aug 94 17:13:11 EDT

Linux-Development Digest #973, Volume #1          Mon, 1 Aug 94 17:13:11 EDT

Contents:
  xfishtank make errors...help! (Thomas Kagle)
  HELP: console locking feature for kernel (Soeren Unruh)
  XFree86 Source Code (First M. Last)
  Re: APC UPS owners or potential buyers, trying to show user base (Michael K. Johnson)
  Re: Fatal Signal 11 - reproduceable ! (Bernd Mielke)
  Re: xfishtank make errors...help! (Mitchum DSouza)
  Re: Large malloc problems (Lawrence Foard)
  pci2memory-posting enabled ? (Andreas Joppich)
  Re: No Free Inode on 1GB harddisk!! (Remy CARD)
  Problems with NET-3 Code (todd huss)
  Re: lint on linux? (Ron Smits)
  Teletext adaptor driver? (Mark Turner)
  Re: threads in kernel (Matthias Urlichs)

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

From: thomas@intermed.com (Thomas Kagle)
Subject: xfishtank make errors...help!
Date: Mon, 1 Aug 94 09:25:08 CDT

I have been using the xfishtank binary, but want to change the fish displayed.
When I try to compile it (after xmkmf), this is what I get.  Any suggestions
appreciated...BTW, I have successfully changed and recompiled xfishtank on the
Sparc 10 I have at work, but no luck on the home Linux machine.

make install
gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE    -Dlinux  -DFUNCPROTO=11 -DNARROWPROTO     makeh.c   -lm  -o makeh
./makeh > xfishy.h
gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE    -Dlinux  -DFUNCPROTO=11 -DNARROWPROTO    -c xfish.c -o xfish.o
xfish.c: In function `parse':
xfish.c:178: warning: passing arg 2 of `strcpy' makes pointer from integer without a cast
xfish.c: In function `init_colormap':
xfish.c:989: warning: comparison between pointer and integer
xfish.c: In function `MakeImage':
xfish.c:1167: warning: type mismatch with previous external decl
xfish.c:985: warning: previous external decl of `malloc'
xfish.c: In function `init_pixmap':
xfish.c:1221: warning: type mismatch with previous implicit
declaration
xfish.c:1167: warning: previous implicit declaration of `malloc'
xfish.c: In function `initialize':
xfish.c:1508: warning: type mismatch with previous implicit declaration
xfish.c:1167: warning: previous implicit declaration of `malloc'
xfish.c:1538: warning: comparison between pointer and integer
xfish.c: In function `high_res_sleep':
xfish.c:1973: warning: passing arg 2 of `select' from incompatible pointer type
xfish.c:1973: warning: passing arg 3 of `select' from incompatible pointer type
xfish.c:1973: warning: passing arg 4 of `select' from incompatible pointer type
gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE    -Dlinux  -DFUNCPROTO=11 -DNARROWPROTO    -c medcut.c -o medcut.o
gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
-I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE        -Dlinux  -DFUNCPROTO=11 -DNARROWPROTO    -c read.c -o read.o
gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE    -Dlinux  -DFUNCPROTO=11 -DNARROWPROTO    -c gifread.c -o gifread.o
rm -f xfishtank
gcc -o xfishtank xfish.o medcut.o read.o gifread.o  -g -m486 -DNO_ASM -fwritable-strings  -L/usr/X386/lib  -lXext -lX11  -lm  
ld: No such file or directory for libXext
make: *** [xfishtank] Error 1

I have also seen a similar error trying to get cbzone_sound to compile on the
Linux box...if anyone knows how to fix THAT, or where I could get a Linux
binary for cbzone_sound, I'd be interested in that, too.  Thanks again,

thomas@intermed.com

"** Love is just a thing called Linux **"


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

From: soeren@gyfvs.gondor.sub.org (Soeren Unruh)
Subject: HELP: console locking feature for kernel
Date: Sun, 31 Jul 1994 14:00:10 GMT

Hi!
  I have started to program a locking feature into the kernel, which
displays a message to enter the user's password, if the time between
the current and the previous keyboard-interrupt (saved in tty-struct)
is greater than a specified value (done in kbd_bh(); if this routine
is not called after every kbd interrupt, please tell me). After this,
kbd_bh() it stops output on the tty via stop_tty() and returns.
  Now my problem:
  I want to get every character typed afterwards, but do not want
to stay in a routine (and probably can not, since this is going to
be kernel code). My read-request should be put on the top of the
read-queue. This means: I want exclusive keyboard access. The read-
routine will be (as I have planned by now) called from kbd_bh().
The routine should read all characters in the queue, do some work
and return. Other processes should under no circomstences be allowed
to get access to the typed chars (security).

  If somebody knows how to solve my problem or has any other comments,
or, if somebody is already working, or has finished working, on such
a feature, please contact me via this newsgroup or NM.

Thanx,

Soeren.

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

From: First_Last@brown.edu (First M. Last)
Subject: XFree86 Source Code
Date: Sat, 30 Jul 1994 11:59:45

        I am curious about the XFree86 server implementation. Can anyone tell
me where I can find the source code? Thanks.

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

From: johnsonm@calypso-2.oit.unc.ed (Michael K. Johnson)
Crossposted-To: comp.unix.bsd
Subject: Re: APC UPS owners or potential buyers, trying to show user base
Date: 01 Aug 1994 01:03:00 GMT


In article <31ffqk$9l6@sndsu1.sinet.slb.com> michael@starbase.neosoft.com writes:
   As I recall (from my last job -- a Sun shop), upon loss of power being
   reported by the UPS (SmartUPS) a script is run.  The SysAdmin has 
   complete control of the script.  

Do you know if their program has to run suid root?

michaelkjohnson

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

From: mielke@omega.physik.fu-berlin.de (Bernd Mielke)
Subject: Re: Fatal Signal 11 - reproduceable !
Date: Mon, 1 Aug 1994 16:00:44 GMT

iwj10@cus.cam.ac.uk (Ian Jackson) writes:

>In article <31e3t7$gp9@rs18.hrz.th-darmstadt.de>,
>olav woelfelschneider <wosch@rbg.informatik.th-darmstadt.de> wrote:
>[quoting normalised, lines reformatted to <75 characters - iwj]
>>Ian Jackson (iwj10@cus.cam.ac.uk) wrote:
>>>In article <1994Jul7.193105.20509@kbbs.kiel.sub.org>,
>>>Holger Petersen <hp@kbbs.kiel.sub.org> wrote:
>>>> The following small C-program gives the Message "Fatal signal 11"
>>>> [ further description and listing deleted ]
>>>> cc: Internal compiler error: program cc1 got fatal signal 11
>>>
>>> 1. This is answered in the FAQ.
>>> 2. You're posting to completely the wrong group.
>>
>>[stuff deleted]
>>
>>This is not neccessarily the wrong group, since I have lots of cases
>>when I got this signal 11 (SIGSEGV, btw.) under kernel 1.1.37 (my
>>hackers paradise), while everything runs fine with 1.1.9(which I
>>think is very stable).

>You've had *repeatable* fatal signals (ie, ones that always happen at
>the same point) appear just by changing kernel version ?  That sounds
>unlikely to me.  Perhaps you should have read what you deleted.

>>So you can not be absolutely sure wether this is a compiler bug or a
>>linux bug.

>You can't be absolutely sure of anything.  However, the entry in the
>FAQ, which you deleted, is correct.  It says:
> If the fault is repeatable (ie, it always happens at the same place in the
> same file) you have discovered a bug in GCC.
>This is almost certainly true.  Furthermore, it also says what to do
>if the problem isn't repeatable:
> If the problem is not repeatable you are very probably experiencing memory
> corruption --- see Q7.7 `make says Error 139'.

>Anybody using a kernel that's so unstable that it repeatably causes
>GCC to fall over should know what they're doing, and in particular
>make sure that the problem occurs with a known good kernel.

>The point of the FAQ is precisely to tell people like Holger Petersen
>where to get assistance for their problem.  This is of course defeated
>if they don't bother to read it.

>It's also defeated if people post misinformation.

Some days ago I had similar problem compiling the pl34 with gcc2.6.0. I
got the fatal signal 11 while compiling aha152x.c. The problem vanished 
with pl37 as I believe. My todays understanding of the whole problem, is that
the gcc has some problems with inline assembler instruction's. So the question
is only wether to change some code in the kernel to use gcc-2.6.0 or to
use gcc-2.5.8.

Bernd


mielke@omega.physik.fu-berlin.de

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

From: Mitchum.DSouza@mrc-apu.cam.ac.uk (Mitchum DSouza)
Subject: Re: xfishtank make errors...help!
Date: 1 Aug 1994 16:13:18 GMT

In article <9408011425.AA02199@intermed.com>, thomas@intermed.com (Thomas Kagle)
writes:
|> I have been using the xfishtank binary, but want to change the fish
|> displayed.
|> When I try to compile it (after xmkmf), this is what I get.  Any suggestions
|> appreciated...BTW, I have successfully changed and recompiled xfishtank on
|> the
|> Sparc 10 I have at work, but no luck on the home Linux machine.
|> 
|> make install
|> gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
|> -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE     -Dlinux 
|> -DFUNCPROTO=11 -DNARROWPROTO     makeh.c   -lm  -o makeh
|> ./makeh > xfishy.h
|> gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
|> -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE     -Dlinux 
|> -DFUNCPROTO=11 -DNARROWPROTO    -c xfish.c -o xfish.o
|> xfish.c: In function `parse':
|> xfish.c:178: warning: passing arg 2 of `strcpy' makes pointer from integer
|> without a cast
|> xfish.c: In function `init_colormap':
|> xfish.c:989: warning: comparison between pointer and integer
|> xfish.c: In function `MakeImage':
|> xfish.c:1167: warning: type mismatch with previous external decl
|> xfish.c:985: warning: previous external decl of `malloc'
|> xfish.c: In function `init_pixmap':
|> xfish.c:1221: warning: type mismatch with previous implicit
|> declaration
|> xfish.c:1167: warning: previous implicit declaration of `malloc'
|> xfish.c: In function `initialize':
|> xfish.c:1508: warning: type mismatch with previous implicit declaration
|> xfish.c:1167: warning: previous implicit declaration of `malloc'
|> xfish.c:1538: warning: comparison between pointer and integer
|> xfish.c: In function `high_res_sleep':
|> xfish.c:1973: warning: passing arg 2 of `select' from incompatible pointer
|> type
|> xfish.c:1973: warning: passing arg 3 of `select' from incompatible pointer
|> type
|> xfish.c:1973: warning: passing arg 4 of `select' from incompatible pointer
|> type
|> gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
|> -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE     -Dlinux 
|> -DFUNCPROTO=11 -DNARROWPROTO    -c medcut.c -o medcut.o
|> gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
|> -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE     -Dlinux 
|> -DFUNCPROTO=11 -DNARROWPROTO    -c read.c -o read.o
|> gcc  -g -m486 -DNO_ASM -fwritable-strings  -I. -I./fishmaps
|> -I/usr/X386/include  -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE     -Dlinux 
|> -DFUNCPROTO=11 -DNARROWPROTO    -c gifread.c -o gifread.o
|> rm -f xfishtank
|> gcc -o xfishtank xfish.o medcut.o read.o gifread.o  -g -m486 -DNO_ASM
|> -fwritable-strings  -L/usr/X386/lib  -lXext -lX11  -lm  
|> ld: No such file or directory for libXext
|> make: *** [xfishtank] Error 1
|> 
|> I have also seen a similar error trying to get cbzone_sound to compile on
|> the
|> Linux box...if anyone knows how to fix THAT, or where I could get a Linux
|> binary for cbzone_sound, I'd be interested in that, too.  Thanks again,

Take the -g flag out from the Makefile and try again. I assume no more 
explanation required ??

Mitch

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

From: entropy@world.std.com (Lawrence Foard)
Subject: Re: Large malloc problems
Date: Mon, 1 Aug 1994 19:18:51 GMT

In article <Ctt99u.MI6@square.nl>, Kim Hendrikse <kim@square.nl> wrote:
>Anyone know why I can malloc 1000000 byte of memory but accessing it at
>indexes greater than about 250800 causes a Memory fault, I have 12 MEGS of
>ram.
>
>Test program
>
>#include <stdio.h>
>#include <stdarg.h>
>#include <stddef.h>
>#include <malloc.h>
>
>main( int argc, char *argv[] )
>{
>    int *p;
>    int i;
>
>    if ( !( p = ( int * ) malloc( ( size_t ) 1000000 ) ) )
>       exit( 1 );
>
>    setbuf( stdout, NULL );
>    for ( i = 0; i < 1000000; i++ ) {
>       if ( i % 100 == 0 )
>           printf( "%d\n", i );
>       p[ i ] = 255;
>    }
>}

The problem is that integers are 4 bytes long each, so your trying to
use 4megs of ram and only allocating 1meg. Instead do:
p=(int *) malloc(sizeof(int)*1000000)

-- 
====== Call the skeptic hotline 1=900=666=5555 talk to your own personal . 
\    / skeptic 24 hours/day.     Just say no to victimless crimes.      . .
 \  / High quality Linux application development available.            . . .
  \/ Violence is a lousy substitute for sex and drugs.                . . . .

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

From: aj@z2-db11.ms.DeTeMobil.de (Andreas Joppich)
Crossposted-To: comp.os.linux.misc,comp.os.linux.help
Subject: pci2memory-posting enabled ?
Date: 1 Aug 1994 16:15:27 GMT
Reply-To: aj@ms.DeTeMobil.de


Hi there !

A few days ago someone posted a little patch to c.o.l.?. The patch was 
a little extension to linux/boot/setup.s and should enable the
pci2memory-posting for pci-motherboards. Unfortunately I forgot to
save it.

If there's somebody remembering to that little thing, please could 
you post it here or send me an email ?

-- 
_______________________________________________________________
Andreas Joppich                              aj@ms.DeTeMobil.de
DeTeMobil GmbH                        
D-48153 Muenster                         Phone +49-251-977-2943              
Germany                                  Fax   +49-251-977-2949
===============================================================
   The above statements are my privat and personal opinions 
       and not represantive for the DeTeMobil company !  

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

From: card@masi.ibp.fr (Remy CARD)
Subject: Re: No Free Inode on 1GB harddisk!!
Date: 1 Aug 1994 16:10:03 GMT

In article <4167@win.or.jp>, Barry Yip kam-wa <g609296@win.or.jp> wrote:
] We have a 1GB scsi harddisk used for storing a full newsfeed. After
] getting about one week of news, there is no more free inode space left
] and I think the only solution is to get another bigger one harddisk even
] we still have enough harddisk space. Is there any way to increase the
] available inodes in this situation. Also, will it be better if the ext2
] filesystem can have a bigger limit on the max. no. of inodes allocated.
] Any suggestion and comments welcome.

        ext2fs uses 4KB as the default blocks/inode ratio.  This means that
an inode is created per 4kb of data blocks.  News articles are generally
small (around 2KB) and the ext2fs default is too big for a news spool.
mke2fs accepts the `-i bytes-per-inode' option which can be used to change
the blocks/inode ratio.  Unfortunately, there is no way to change this ratio
on an existing filesystem.  You have to re-create the FS to change this ratio.

] --
] Barry Yip
] g609296@win.or.jp


--
Remy Card
card@masi.ibp.fr

I am not a number, I am not a slave, I am a free programmer and my own God

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

From: thuss@nyx10.cs.du.edu (todd huss)
Subject: Problems with NET-3 Code
Date: 1 Aug 1994 10:49:04 -0600

Since I installed the NetTools 1.1.29 I can't get any of my network stuff working anymore. When I use the hostname command it gives me back the error : address family "inet" unknown. When I try to re-install my old net-2 stuff that doesn't work anymore either. I was wondering if anyone who has worked with the Net3 Code could explain to me why the address family inet is no longer valid with Net3 and how I can change it to work with TCP/IP addressing scheme? Also, any help in 
directing me towards any articles that go into the new Net-3 code so I can get a better understanding would be appreciated! Thanks.

                                                        -Toddd

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

From: ron@draconia.hacktic.nl (Ron Smits)
Subject: Re: lint on linux?
Date: 31 Jul 1994 19:50:29 GMT

>>>>> "David" == David Fox <fox@graphics.cs.nyu.edu> writes:

    David> ] > <sigh> This question comes up every two weeks. No there
    David> is no ] >lint for Linux. 'gcc -Wall' should do everything
    David> you need though.  ]  ] Or if you really want fun: gcc -Wall
    David> -pedantic

    David> Turning on the optimizer causes additional flow analysis,
    David> and thus even more messages are generated.  -- David Fox
    David> xoF divaD NYU Media Research Lab baL hcraeseR aideM UYN


Try gcc -Wall -ansi -pedantic -O2
--



                Ron Smits
                ron@draconia.hacktic.nl
                Ron.Smits@Netherlands.NCR.COM

/*-( My opinions are my opinions, My boss's opinions are his opinions )-*/
/*-(                They might not be the same                        )-*/

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

From: mark@kram.org (Mark Turner)
Crossposted-To: demon.ip.support.unix
Subject: Teletext adaptor driver?
Date: 31 Jul 1994 12:51:46 +0100

I'd like to move my Optimum teletext adaptor from a DOS box to a Linux
box. One minor problem is the lack of a device driver. Optimum
Technology say that they don't have drivers for any flavour except Unix
and that they aren't willing to give me any interface spec. They did
offer to upgrade me to an external unit which communicates via serial
port but that is not an option I'd like to use.

So.... has anyone written a device driver for this beast? If not, I'd
welcome suggestions for PD PC disassemblers so that I can reverse
engineer their 4.5k driver and write my own.

Regards,

Mark.

--
Mark Turner                       Note: mark@demon.* is no longer me
mark@kram.org, renrut@linux.phl.cursci.com, mark@renrut.dircon.co.uk

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

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: threads in kernel
Date: 1 Aug 1994 19:48:44 +0200

In comp.os.linux.development, article <31ec4n$og7@times.stanford.edu>,
  lm@stanford.edu (Larry McVoy) writes:
> Matthias Urlichs (urlichs@smurf.noris.de) wrote:
> : 
> : A new stack at the same location means that you can't put things on the
> : stack if any other thread might need them. Ugly.
> 
> Yes, that is true, but I don't think that you should be putting stuff on the
> stack and passing a pointer to it anyway.  That seems inherently dangerous
> to me.
> 
Why not? People do use alloca(). Or pointers to local variables if they
want to get more than one value (or a struct) back.

Let's assume that the <whatever> library which uses its own thread for
speedup. If I, as the developer of the <whatever> library, require people
to never pass pointers to local data to any library function (or, almost as
bad, only to some library functions), people will have a _very_ hard time
using the library, much less debugging their program, if things start to go
wrong. Instead they'll blame the library author (me), which means that I,
anticipating this, won't release the code in the first place.

What's the problem with copying the stack, anyway? You don't have to
rethread everything; just let the child thread exit if it tries to return
from the function which called tfork(). (Anyway, I can't think of a good
reason to want to do that.)

>       if (tfork()) {
>               /* parent thread */
>       } else {
>               /* child thread */
>       }
> and have everything work.

So would you settle for "everything but 'return;' in the child thread"?

-- 
The number you have dialed is imaginary.  Please multiply by i and dial again.
-- 
Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstra_e 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 N|rnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42

Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

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


** 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
******************************
