Subject: Linux-Development Digest #909
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, 12 Jul 94 09:13:21 EDT

Linux-Development Digest #909, Volume #1         Tue, 12 Jul 94 09:13:21 EDT

Contents:
  Re: HELP with creating shared lib (Mitchum DSouza)
  Re: What is this error? (Mitchum DSouza)
  Re: What is this error? (Mitchum DSouza)
  Re: Q: a better "last" utility? (Paul Makeev)
  Re: Parallel printer speed? (Christopher Etz)
  Forex SCSI driver? (Howard P. Henson)
  Re: Linux Performance Enhance ? (Matthias Urlichs)
  Re: List of programs which need shadow changes (Matthias Urlichs)
  Re: Adaptec 2842 VL SCSI controller support (Harald Milz)
  VESA spec/pinout needed (Philip A Zimmermann)
  Re: Linux CDROM (Paul Tomblin)
  Re: <q> kernel tweek for TCP keepalive ?? (Alan Cox)
  Re: Bug in patch 27 NFS include (Alan Cox)
  XFree86 mach32 server hangs: any help? (Yves Arrouye)
  Re: [ANSWER] Linux seems to perform terrib (Tor Arntsen)

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

From: Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
Subject: Re: HELP with creating shared lib
Date: 12 Jul 1994 05:21:52 -0400
Reply-To: m.dsouza@mrc-apu.cam.ac.uk

|         Does anyone know how to create a shared lib? I have searched
| everywhere, and not found any clue. Can somebody point me to some
| documentation. Thanks in advance.

Question #5 from the GCC-FAQ on sunsite.unc.edu /pub/linux/docs/faqs

        5) How do I build a shared DLL library for Linux ?

Mitch

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

From: Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
Subject: Re: What is this error?
Date: 12 Jul 1994 05:26:03 -0400
Reply-To: m.dsouza@mrc-apu.cam.ac.uk

Peter Hoffman wrote:
| I have a BBS system that does an "execl(quit,NULL);" where "quit"
| is this code:
| 
|         #include <stdio.h>
|         #include <stdlib.h>
|         #include <unistd.h>
|         #include "cbbs.h"
|         
|         int main(void) {
|         
|           system(CLEAR);
|           printf("Thanks for visiting %s,\n", BBS);
|           printf("  --  Call again soon!\n");
|           sleep(5);
|           exit(0);
|         }
| 
| In "cbbs.h" :
| 
|         #define CLEAR "/usr/bin/clear"
|         #define quit  "/home/peter/cbbs/bin/quit" 
| 
| This produces this error message (?) instead of doing the printf()s:
| 
|         libc.so.4 (DLL Jump 4.5pl24) => /lib/libc.so.4.5.24
| 
| Does anyone know what this means?

Yes. it means you have misunderstood the execl() call. I quote:

     Two interfaces are available.   execl()  is  useful  when  a
     known  file  with known arguments is being called; the argu-
     ments to execl() are the character strings constituting  the
     file and the arguments; the first argument is conventionally
     the same as the file name (or its last component).  A  (char
     *)0  argument  must end the argument list.  The cast to type
     char * insures portability.

So your execl() command should infact be

        execl(quit,quit,NULL);

The single argument execl() command is reserved for the use of identifying
the executable dependencies (i.e. its shared libraries) or whether it is
static.

Mitch

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

From: Mitchum DSouza <m.dsouza@mrc-apu.cam.ac.uk>
Subject: Re: What is this error?
Date: 12 Jul 1994 05:26:13 -0400
Reply-To: m.dsouza@mrc-apu.cam.ac.uk


Peter Hoffman wrote:
| I have a BBS system that does an "execl(quit,NULL);" where "quit"
| is this code:
| 
|         #include <stdio.h>
|         #include <stdlib.h>
|         #include <unistd.h>
|         #include "cbbs.h"
|         
|         int main(void) {
|         
|           system(CLEAR);
|           printf("Thanks for visiting %s,\n", BBS);
|           printf("  --  Call again soon!\n");
|           sleep(5);
|           exit(0);
|         }
| 
| In "cbbs.h" :
| 
|         #define CLEAR "/usr/bin/clear"
|         #define quit  "/home/peter/cbbs/bin/quit" 
| 
| This produces this error message (?) instead of doing the printf()s:
| 
|         libc.so.4 (DLL Jump 4.5pl24) => /lib/libc.so.4.5.24
| 
| Does anyone know what this means?

Yes. it means you have misunderstood the execl() call. I quote:

     Two interfaces are available.   execl()  is  useful  when  a
     known  file  with known arguments is being called; the argu-
     ments to execl() are the character strings constituting  the
     file and the arguments; the first argument is conventionally
     the same as the file name (or its last component).  A  (char
     *)0  argument  must end the argument list.  The cast to type
     char * insures portability.

So your execl() command should infact be

        execl(quit,quit,NULL);

The single argument execl() command is reserved for the use of identifying
the executable dependencies (i.e. its shared libraries) or whether it is
static.

Mitch

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

From: Paul Makeev <mac@glas.apc.org>
Date: 11 Jul 94 09:27 GMT+0400
Subject: Re: Q: a better "last" utility?

Yes, i'm also interested in it. BTW, is the source code of "gmtime"
function available anywhere? I write my accounting program in Mocka
Modula-2, and don't want to link giant library.

SY, Paul.

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

Crossposted-To: comp.os.linux.help
From: cetz@cetz.rhein-main.de (Christopher Etz)
Subject: Re: Parallel printer speed?
Date: Tue, 12 Jul 1994 08:04:48 GMT

John Ackermann (jra@lawdept.daytonOH.ncr.com) wrote:
: I'm still having serious speed problems when printing via the parallel port in 
: Linux.  It takes nearly 5 minutes to output a single page of graphics from an 
: 8ppm laser printer, and nearly all that time appears to be in the data 
: transfer part of the process.

: I used the "tiger.ps" file from /usr/lib/ghostview/examples as my test case.  
: It's a 78,519 byte postscript file that prints a single, full page image.

: My hardware is a 486DX2/66 MHz with 16MB RAM and a fairly ordinary parallel 
: port.  The printer is an older NCR 6436, which has an 8ppm Ricoh engine.

After quite a long time of dissatisfaction, I got acceptable printer throughput
by the following steps:

1. The printer language of my printer (Canon LBP-4PLUS) is not supported by
   ghostscript. So, I had to write my own printer driver for ghostscript.
   First, I built the whole bitmap in memory and sent it to the printer on
   "showpage".  The performance got a lot better after analyzing the bitmap
   and sending only those small rectangles that have a lot of pixels set.
   The work to find such rectangles was worth it.

2. Somebody supposed a small change to the interrupt code (function
   lp_char_interrupt in .../linux/drivers/char/lp.c) for printers with a
   longer interval between sending acknowledge (which causes the interrupt)
   and clearing the busy signal.

   The original driver does three sequential tests.  I changed it into a
   normal loop and used one of the lptune parameters as the count of iterations.
   This change almost doubles my printer throughput.  I'll append the
   differences to this article.

: Thanks...

: John Ackermann   AG9V
: jra@lawdept.daytonOH.ncr.com

Hope this helps,
        Christopher

--- snip ----- snip ----- snip ----- snip ----- snip ----- snip ----- snip ---
*** linux/drivers/char/lp.c~    Wed Dec  1 13:44:15 1993
--- linux/drivers/char/lp.c     Fri May 27 22:55:13 1994
***************
*** 80,93 ****
  
  static int lp_char_interrupt(char lpchar, int minor)
  {
!       int wait = 0;
        unsigned char status;
  
  
!       if (!((status = LP_S(minor)) & LP_PACK) || (status & LP_PBUSY)
!       || !((status = LP_S(minor)) & LP_PACK) || (status & LP_PBUSY)
!       || !((status = LP_S(minor)) & LP_PACK) || (status & LP_PBUSY)) {
  
                outb_p(lpchar, LP_B(minor));
                /* must wait before taking strobe high, and after taking strobe
                   low, according spec.  Some printers need it, others don't. */
--- 80,97 ----
  
  static int lp_char_interrupt(char lpchar, int minor)
  {
!       int wait;
        unsigned char status;
  
  
!         for (wait = LP_CHAR(minor); wait; -- wait)
!               if (!((status = LP_S(minor)) & LP_PACK) || (status & LP_PBUSY))
!                       break;
!               else if (need_resched)
!                       schedule ();
  
+       if (wait) {
+               wait = 0;
                outb_p(lpchar, LP_B(minor));
                /* must wait before taking strobe high, and after taking strobe
                   low, according spec.  Some printers need it, others don't. */
--- snip ----- snip ----- snip ----- snip ----- snip ----- snip ----- snip ---
-- 
____________________________________________________________________________
Christopher Etz            Kopernikusstr. 28          D-65929 Frankfurt/Main
cetz@cetz.rhein-main.de    Tel.: +49 69 318091        Telefax: +49 69 318091

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

From: hhenson@inyanga.cs.wits.ac.za (Howard P. Henson)
Subject: Forex SCSI driver?
Date: 12 Jul 1994 14:21:59 GMT

Hi
  I have a Forex VL bus controller but I cannot get it to work :-( as I 
do not have the required drivers. Is there anything available?

Thanks
Howard

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                   Rotating the object by                                 ~
~          Howard Henson <hhenson@inyanga.cs.wits.ac.za>                   ~
~           mans quest for object orientaion ends here!                    ~
~                                                                          ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: Linux Performance Enhance ?
Date: 12 Jul 1994 08:22:52 +0200

In comp.os.linux.development, article <CsMtGn.BxD@pe1chl.ampr.org>,
  pe1chl@rabo.nl writes:
> 
> Aside from the functionality of the above example (which I have not yet
> tested), let me teach you a bit about C programming:
> 
Your code may look better, but unfortunately it doesn't work right.

The idea is to try each memory-freeing call, but start with a different
call every time through the loop. Your code will not try to free buffer
space if "what" happens to be 2, as it reduces to:

>   while (i--) {
>           switch (what) {
>       case 2:
>           if (swap_out(i)) {
>                what = 0;
>                return 1;
>               }
>       }
>   }
> 
> At least this does the same as your code without those ugly goto's.
> 
Not really...

It's possible to restart the loop, of course, by setting "what" to zero at
the end, but the generated code is worse. I hate suboptimal code even more
than code with gotos. ;-)

-- 
I was reading the dictionary.  I thought it was a poem about everything.
                -- unknown 
-- 
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>.

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

From: urlichs@smurf.noris.de (Matthias Urlichs)
Subject: Re: List of programs which need shadow changes
Date: 12 Jul 1994 08:38:19 +0200

In comp.os.linux.development, article <DHOLLAND.94Jul10133815@husc7.harvard.edu>,
  dholland@husc7.harvard.edu (David Holland) writes:
> 
> That's because it wasn't done right. You can't try to cram it into
> getpwent() and its related functions. You need a separate set of
> functions for retrieving the password(s). Whatever it is has to be
> sufficiently general to allow for multiple challenge/response pairs...
> or conceivably none, in some cases.
> 
> If none of the commercial unix vendors have come up with an interface
> of this sort, I propose we design our own and get it adopted.
> 
Hmmm...how about this:
int auth_user(struct pwent *pwd,
                          int send_prompt(char *),
              int get_response(char *buf, int len));

Returns zero if the user authenticates, some Unix error if not, perhaps a
positive number to tell how long the login is to be considered valid.
getpass() is used to read a response from the user, sendprompt() prints a
challenge string if necessary.
With protocols like FTP, you can't just print "Password:" to stdout and
call getpass() to get the user's response...

Anything else can be safely hidden inside auth_user().
-- 
Swipple Rule of Order
   He who shouts loudest has the floor.
-- 
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>.

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

From: hm@seneca.ix.de (Harald Milz)
Subject: Re: Adaptec 2842 VL SCSI controller support
Date: Tue, 12 Jul 1994 06:04:50 GMT
Reply-To: hm@seneca.ix.de

Jay Raman (raman@jay.EBay.Sun.COM) wrote:
: > Does Linux support adaptec 2842 VL SCSI controller?  

-> SCSI-HOWTO
-> Projects-FAQ

: > If so can any one point me where I can find the driver.
: > If one doesn't exist can some one give me pointers as to
: > how to modify the one for 154x series to 2842 VL?

Uh, you'd better forget about that. The respective chips are totally 
different. 


-- 
Harald Milz                             office: hm@ix.de
iX Multiuser Multitasking Magazine      home:   hm@seneca.ix.de
Opinions are mine, not my employer's -- the answer is Forty-two


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

From: paz@world.std.com (Philip A Zimmermann)
Subject: VESA spec/pinout needed
Date: Tue, 12 Jul 1994 12:07:31 GMT

I need to obtain a copy of the VESA spec for local bus
cards as used in PCs, especially the pinout. Any leads
(phone numbers, addresses) appreciated.
 
=Philip=
philip zimmermann     paz@world.std.com

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

From: ptomblin@gandalf.ca (Paul Tomblin)
Crossposted-To: alt.fan.warlord
Subject: Re: Linux CDROM
Date: 12 Jul 1994 08:22:00 -0400
Reply-To: ptomblin@gandalf.ca

mick@jtec.com.au (Mick J Hellstrom) writes:
>I was just wondering where I could get my hands on a Linux CDROM?

>Mail to the below address if you have one for sale or know of someplace where 
>I could get one as I don't read this news group often.

>Thanks in advance.

>Mick.

This message was reposted to at least two comp.os.linux.* groups, not
x-posted.  And it's asking a question that is answered in the
Distribution-HOWTO.

>--
>FROM:  Mick J Hellstrom  -  Email: mick@jtec.com.au
>                Cruci dum spiro fido
>+------------------------+------------------------+
>|__________Work__________|__________Home__________|
>| Ph: +61 2 390 0188     | Ph: +61 2 416 9073     |
>| Jtec Pty Ltd           | Mick J Hellstrom       |
>| 118-122 Bowden St.     | P.O. Box 235           |
>| Meadowbank, NSW 2114   | Gordon, NSW 2072       |
>| Australia              | Australia              |
>+------------------------+------------------------+
>DISCLAIMER:Any resemblance between the above views
>and those of my employer, my terminal, or the view
>out my window are purely coincidental.

Any resemblance between this posting, and that of a cluefull person, are
purely non-existant.

Paul [Is there a Discount Tropical Fish in New South Wales?]
-- 
Paul Tomblin, Head - Automation Design Group.
Gandalf Canada Limited
This is not an official statement of Gandalf, or of Vicki Robinson.
"Hello, this is Linus Torvalds, and I pronounce Linux as Linux"

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

From: iialan@iifeak (Alan Cox)
Subject: Re: <q> kernel tweek for TCP keepalive ??
Date: Tue, 12 Jul 1994 10:53:03 GMT

In article <2vlj2h$lf4@urmel.informatik.rwth-aachen.de> dak@tschil.informatik.rwth-aachen.de (David Kastrup) writes:
>As far as I remember, keepalive packets are explicitly forbidden in
>the TCP specification. This is because they lead to less
>correctly transferred data (if a keepalive fails, and an error is produced)
>while causing more network load. Even snowballing effects could occur.

Keepalives are allowed, but the _minimum_ poll time is 2 HOURS.

>Especially, the system should guess a mean transfer time of a link,
>and its standard deviation, and do retries using exponential backoff.
>Non-arriving packets must not influence the estimation parameters.
>See the TCP specs for more. This should (theoretically) cause
>performance to be about as good as could be expected at least
>network congestion.

It implements SWS avoidance, Nagle and the various other deviation/backoff
bits. Its not quite perfect in its estimates as far as I can ascertain and
it doesn't implement a couple of oddments perfectly just yet, but it is
close.

Alan


-- 
Alan Cox: gw4pts@gw4pts.ampr.org      \\  //          GW4PTS@GB7SWN
=======================================\\//===================================
<<<<<<     Toolkits are for WIMPS :::: //\\Lib :::: the only way to fly >>>>>>
======================================//==\\==================================

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

From: iialan@iifeak (Alan Cox)
Subject: Re: Bug in patch 27 NFS include
Date: Tue, 12 Jul 1994 10:55:32 GMT

In article <1994Jul10.054247.10778@unlv.edu> ftlofaro@unlv.edu (Frank Lofaro) writes:
>Notice the 16834 above. Shouldn't that be 16384? :)

Noted, and harmless. You can set it to about 62K if you really want but I
doubt anything on your network would be too impressed.

Alan


-- 
Alan Cox: gw4pts@gw4pts.ampr.org      \\  //          GW4PTS@GB7SWN
=======================================\\//===================================
<<<<<<     Toolkits are for WIMPS :::: //\\Lib :::: the only way to fly >>>>>>
======================================//==\\==================================

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

From: arrouye@petole.imag.fr (Yves Arrouye)
Crossposted-To: comp.os.linux.help
Subject: XFree86 mach32 server hangs: any help?
Date: 12 Jul 1994 11:31:42 GMT

Hi,

I tried the XFree86 mach32 server with an ATI Ultra Pro card. Everything is  
fine except when one has windows with different color palettes in them: if one  
switches windows something like 10 times, the server suddenly hangs and the  
machine has to be rebooted.

Do you know if there is a recent mach32 server without this problem (I am  
using the server from a recent Slackware)?

Thanks for any help,
Yves.

--
Advocates for the C++ school claim that a well designed           Yves Arrouye
    program does not need the extra flexibility (a lie),  Yves.Arrouye@imag.fr
while advocates for the Objective-C school claim that         (33) 76 57 48 64
    the errors are no problem in practice (another lie).             NeXT Mail

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

From: tor@spacetec.no (Tor Arntsen)
Subject: Re: [ANSWER] Linux seems to perform terrib
Date: 12 Jul 1994 11:43:08 GMT
Reply-To: tor@spacetec.no

In article 95j@sun0.urz.uni-heidelberg.de, andreas@orion.mgen.uni-heidelberg.de (Andreas Helke) writes:
>Tor Arntsen (tor@spacetec.no) wrote:
[...]
>: Sounds like something that should go into the 1.0x kernel as well..
>
>You did not understand what a stable kernel is. Nothing will change in

Please don't tell me what I understand or not.
As far as Linux kernels are concerned I have been running them on several machines 
(in my job) since the spring of '92, and I *think* I have an idea of what a stable
kernel is and is not.. 
Not that it matters much in this case, the point is that an appropriate response to
suggestions like the one I came up with should really be 
"I don't agree with you, because of..", which, of course, is fair enough.

>Andreas Helke
>
>Institut fuer molekulare Genetik, Universitaet Heidelberg
>Im Neuenheimer Feld 230 
>69122 Heidelberg, Germany

Regards,
Tor (tor@spacetec.no)



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


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