Subject: Linux-Development Digest #935
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:     Fri, 22 Jul 94 08:13:06 EDT

Linux-Development Digest #935, Volume #1         Fri, 22 Jul 94 08:13:06 EDT

Contents:
  gcc-2.6.0: help w/asm (Caleb Epstein)
  Re: Driver for Dialogic D4x ? (Russell Nelson)
  Driver for Dialogic D4x ? (Lars Gustavsson)
  Re: gcc and Linux (compiling)... (Bill C. Riemers)
  Re: IN2000, 1540cf support?? (Jerod Tufte)
  Project: Wine or SCSI-PCI (Michael Veksler)
  Stacker driver? (H.C.W. Kwok)
  Re: Ooops! SCSI CD-Rom broken in 1.1.33 (Matt Day)
  Linux wish list?  (John Paul Morrison)
  Re: GOTO haters ..Re: Linux Performance Enhance ? (Gareth Newfield)
  Looking for BTX package... (Egbert Hinzen)
  Re: Anyone else lust for threads? (Richard Underwood)
  Re: GOTO haters ..Re: Linux Performance Enhance ? (David Kastrup)
  Re: link() system call (Harald Milz)
  [ANSWER] module problems? (Bjorn Ekwall)
  dot clocks (Holger Burde)
  Re: Stacker driver? (Janne Kukonlehto)
  Re: GOTO haters ..Re: Linux Performance Enhance ? (David Kastrup)
  Re: gcc and Linux (compiling)... (David Kastrup)
  tzsetwall() ??? ("Stephen Davies")
  Re: link() system call (Bruce Evans)

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

From: cae@aww.ny.jpmorgan.com (Caleb Epstein)
Crossposted-To: gnu.gcc.help
Subject: gcc-2.6.0: help w/asm
Date: 21 Jul 1994 20:11:30 GMT

        I tried posting this to the linux-activists mailing list, but
have received no response.

        It seems that the semantics of asm() have changed somewhat
from gcc-2.5.8 to gcc-2.6.0 and as a result parts of the Linux kernel
need to be changed.  Some of these changes were addressed in patch 30
to kernel version 1.1, but there's still a problem with the UltraStor
SCSI driver.

        When building this module, I get the following:

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes \
-O2 -fomit-frame-pointer -pipe -m486   -c ultrastor.c -o ultrastor.o
ultrastor.c: In function `ultrastor_queuecommand':
ultrastor.c:309: inconsistent operand constraints in an `asm'
ultrastor.c:309: inconsistent operand constraints in an `asm'
ultrastor.c: In function `ultrastor_abort':
ultrastor.c:309: inconsistent operand constraints in an `asm'

        The offending code in ultrastor.c looks like this:

/* This asm is fragile: it doesn't work without the casts and it may
   not work without optimization.  Maybe I should add a swap builtin
   to gcc.  --jfc  */
static inline unsigned char xchgb(unsigned char reg,
                                  volatile unsigned char *mem)
{
  asm("xchgb %0,%1" :
      "=r" (reg), "=m" (*(unsigned char *)mem) :
      "0" (reg), "1" (*(unsigned char *)mem));          /* line 309 */
  return reg;
}

        The xchgb() C function is meant to be a more-or-less atomic
operation to return the value of a variable while setting it to
another value.  Unfortunately, my assembler skills are nonexistent: I
don't understand gcc asm() directives or the changes which happened
from 2.5.8 to 2.6.0.  Would any kind soul like to take a hack at
recoding this function so gcc-2.6.0 will accept it?

        Many thanks in advance,

--
[ cae@jpmorgan.com ][ Caleb Epstein ][ JP Morgan & Co. Incorporated ]

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

From: nelson@crynwr.crynwr.com (Russell Nelson)
Subject: Re: Driver for Dialogic D4x ?
Date: 21 Jul 1994 21:22:59 GMT

In article <d7larsg.774724662@dtek.chalmers.se> d7larsg@dtek.chalmers.se (Lars Gustavsson) writes:

   Does anybody know if there exist a Linux driver for Dialogic D4x ?

   (Dialogic corp. doesn't support Linux and wants approx. $1200/year
   & *NIX licence) 

They also don't document their hardware, so don't hold your breath
waiting for a Dialogic driver.  Much better to find a vendor of voice
hardware that sells open systems.

--
-russ <nelson@crynwr.com>    http://www.crynwr.com/crynwr/nelson.html
Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
11 Grant St.      | +1 315 268 1925 (9201 FAX)  | What is thee doing about it?
Potsdam, NY 13676 | LPF member - ask me about the harm software patents do.

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

From: d7larsg@dtek.chalmers.se (Lars Gustavsson)
Subject: Driver for Dialogic D4x ?
Date: 20 Jul 94 17:17:42 GMT

Does anybody know if there exist a Linux driver for Dialogic D4x ?

(Dialogic corp. doesn't support Linux and wants approx. $1200/year
& *NIX licence) 

Lars Gustavsson
d7larsg@dtek.chalmers.se

--
De { inte s} m}nga som k|ber dissel nomer.

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

From: bcr@k9.via.term.none (Bill C. Riemers)
Subject: Re: gcc and Linux (compiling)...
Date: 21 Jul 94 22:47:05 GMT
Reply-To: bcr@physics.purdue.edu

In article <30l3tu$hih@luxor.mch.sni.de> Reinhard.Schiedermeier@deejai.mch.sni.de (Reinhard Schiedermeier) writes:

>   Dwight M Evers (evers@plains.NoDak.edu) wrote:
>   : Dwight M Evers (evers@plains.NoDak.edu) wrote:
>   : :         I was wondering if when you ( I in this case ) compile a program 
>   : : under Linux if the statement:
>   : : #include        <stdio.h>
Hmmm, I thought
#include <stdlib.h>

is always required.  If not, it is still good programming style to
include it.

> :   main()
> : ^^^^^^^^^ Sorry, sorry, sorry...I typed the post by had and read off a 
> : listing. I DID include this in my program.

I don't know if it is required, but all unix programs I've ever
written or edited use:

  void main(int argc, char *argv[])

Not 

  main()

I immagin that

  void main(void)

would work fine in this case.

> : : {

Maybe this is just too edited down, but it looks like you forgot:
  int value1, value2, sum;

> : :   value1 = 10;
> : :   value2 = 20;
> : :   sum = value1 + value2;

> : :   printf(" the sum of %i and %i is equal to %i",value1,value2,sum);
> : :   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I bet you the compiler doesn't understand all those carrots. :-)

> : : }
> : :           is valid. I keep getting run errors. how do you compile 
> : : and use gcc under Linux? I looked in the FAQ and I did what was told. Not 
Hmm you might want to add a \n onto that.

> : : a thing happens. I works under all other compilers I use.

What do you mean by not a thing happens???  No compiler messages or
nothing?  Sounds like "gcc" isn't even installed to me.  With great
problem reports like that it looks like I'll have to just try it...

OK, to start with I typed it in exactly has it was listed above:

# gcc -Wall -c main.c -o just.testing
main.c:4: warning: return-type defaults to `int'
main.c: In function `main':
main.c:5: `value1' undeclared (first use this function)
main.c:5: (Each undeclared identifier is reported only once
main.c:5: for each function it appears in.)
main.c:6: `value2' undeclared (first use this function)
main.c:7: `sum' undeclared (first use this function)
main.c:8: warning: int format, different type arg (arg 2)
main.c:8: warning: int format, different type arg (arg 3)
main.c:8: warning: int format, different type arg (arg 4)
main.c:9: warning: control reaches end of non-void function

As predicted, gcc complains about the lack of variable declarations.
And gcc also complained about the missing word void.

So now I've added:

  int value1, value2, sum;

and changed:

  main()

to:

  void main()

This time I don't expect any errors or warnings so I just issue:

# gcc -Wall main.c -o just.testing

(Note: I didn't bother with the -c option...)

Now I excute it:
# ./just.testing
 the sum of 10 and 20 is equal to 30#

And it works exactly as I it should.  So my guess either you copied
your example very carefully, and really had all these syntex errors,
or you used the "-c" option when you where trying to make an
executable.

> What is "%i"? I always use "%d" to output integers.

I just checked the man 2 printf(), and it looks like "%i" is fine even
if it isn't commonly used...

                              Bill

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

From: jet@b62528.student.cwru.edu (Jerod Tufte)
Subject: Re: IN2000, 1540cf support??
Date: 21 Jul 1994 15:24:11 GMT

Scott Mckinsey (mckinsey@rmii.com) wrote:
: I am getting an Always IN2000 and Adaptec 1540CF soon and was
: wondering if they will work reliably.  I have seen a lot about about
: the 1542CF but nothing on the 1540, what's the difference?

: I got the IN2000 driver code from sunsite and integrated it into the 1.1.18
: kernel, is this the latest, and does it work?

: Any answers appreciated,
: Scott

I'm not sure which one you got, but there have been two unstable releases
of the IN2000 driver since the last (slow) stable one.  I do not think that
it will be fixed anytime soon, as noone seems to be playing with it anymore.
I've held out for about a year now, hoping something would come along, and
even tried messing with it myself, but with no luck.  the version .3
will work reliably with kernels up to 1.0.9, but it's slow.  here are some
numbers from iozone:  (in k/sec)
write   read
55      238
56      217
55      256
56      222

this is on a 386/33, but I'm quite sure I didn't get much better performance
when it was in my 486/66.

I'm ready to try to sell it and buy something that works, but adaptec
cards seem pretty pricey.  Anyone have any performance comparisons of
supported cards?

Jerod
-- 
       WARNING:  In case of rapture, this computer will be manned.
Drink Jolt!, All the sugar and twice the caffeine.   PopUlating the World
Check out BruceNet at http://b62528.student.cwru.edu/   "Groovy!" --Ash
****jet@b62528.student.cwru.edu  <<< finger me for PGP2.5 public key*****

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

From: s1678223@techst02.technion.ac.il (Michael Veksler)
Subject: Project: Wine or SCSI-PCI
Date: Thu, 21 Jul 1994 14:02:58 GMT

I am going to do a project under Linux for my B.Sc. degree.
I am thinking of two options:

  1. Write SCSI-PCI driver for Linux
  2. Enhance "Wine" (windows emulator).

I was thinking of investing 100-200 hours.
What will be my best choice ?
What is more interesting ?
What is more urgent to the Linux community ?
Is there a SCSI-PCI driver being written these days?

Any suggestions will be appreciated.

P.S.  It will be due at the end of the next semester (this one is already
      finished) - i.e. beginning of 1995 (perhaps before so it will run
      beta for some time before I submit the project).

Please Send Email response (I rarely read this newsgroup - at least 
before the project has started moment).

Thanks

  Michael

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

From: cwhk@ic.ac.uk (H.C.W. Kwok)
Subject: Stacker driver?
Date: Thu, 21 Jul 94 16:27:02 BST

Just wounder whether it is possible to write a fs driver for
a stacked drive. 

I know it is patented. But are there any effort to bring stacked
drives into linux as well?

This strikes me when I was reading the wine newsgroup
that my drive where WINDOWS resides is stacked. So, I would
have troubles to try wine out.

-- 
|==========================================================| 
|   Hansel Kwok < h.kwok@ic.ac.uk >                        |
|   Imperial College of Science, Technology and Medicine   |
|==========================================================|

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

From: mday@park.uvsc.edu (Matt Day)
Subject: Re: Ooops! SCSI CD-Rom broken in 1.1.33
Date: Fri, 22 Jul 1994 04:47:48 GMT

In article <cjsCtBLE4.EJG@netcom.com> cjs@netcom.com (Christopher Shaulis) writes:
>Error:
>root:/home/cjs# mount /dev/cdrom /system_cd/ -t iso9660
>mount: block device /dev/cdrom is not permitted on its filesystem
>root:/home/cjs#

The driver isn't broken--you are the victim of a misleading error
message (as I was).  1.1.33 prohibits the mounting of a CD-ROM in
read-write mode.  So, make sure that you give mount the "ro" option,
either on the command line or in /etc/fstab.

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

From: jmorriso@bogomips.ee.ubc.ca (John Paul Morrison)
Subject: Linux wish list? 
Date: Fri, 22 Jul 1994 04:44:44 GMT


Maybe this could get appended to the "Linux Projects-FAQ". 
I can think of a few kernel features that Linux doesn't have,
maybe if they are distributed in a 'wish list', more people might
see it and get inspired to add these features.

Here's a few (kernel) examples:


Feature:
  Swapping on NFS disks (so you could create truly diskless Linux
  workstations)
Status:
  unknown

Feature:
  Token Ring driver
Status:
  rumors of people working on it

Feature:
  Parallel port SCSI/tape backup/modem/whatever drivers

etc.


This is Linux specific (remember: comp.os.linux.development!). Stuff
like video drivers would be Xfree86 stuff and not confined to Linux.
'Free, quality, (l)user friendly word processing package', again,
that's not Linux specific.

-- 
===========================================================================
BogoMIPS Research Labs  --  bogosity research & simulation  --  VE7JPM  -- 
jmorriso@bogomips.ee.ubc.ca ve7jpm@ve7jpm.ampr.org jmorriso@rflab.ee.ubc.ca
===========================================================================

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

From: gareth@metl.chi.il.us (Gareth Newfield)
Subject: Re: GOTO haters ..Re: Linux Performance Enhance ?
Date: 22 Jul 1994 05:36:32 GMT

cairnss (cairnss@ucsu.Colorado.EDU) wrote:
: Maybe it's the FORTRAN in me but I prefer 
:       start:
:       if (cond)
:          {
:            stat;
:            goto start;
:          }
: to the "top-down" invention 
:       while (cond) {
:         stat;
:       }
: IF I was a compiler I would have much less difficulty
: generating efficient code from the first example.

I doubt this. No compiler I use has any more difficulty with the while than
the if/goto construct. In fact the opposite is true if the if/goto gets very
complex.
        Keeping the program as highly abstracted as possible allows the program
to run on a variety of different architectures. Not all cpus have to execute
the above examples using a goto. In fact intel x86 processors have instructions
that can be used by a compiler ( human or machine) to execute some while loops
without using a "goto". If you want to do "stat" while the condition "cond" is
true, then why not just say "while (cond) { stat }" ? Converting this to
run on multiple processors is usually simpler with a while loop.
        Why specify the linear mode of execution if it is not necesary?
: Just because performance doesn't mean anything in our MS-DOS
: laden world, doesn't mean the GOTO is inappropriate or
: not useful.   If the CPU can use them, I can use them.
        Just because most of the programming, languages, and cpu architecture is
designed in a linear single threaded sequential manner doesn't mean we should
think that way. In the real world we use while loops more than if/gotos,
imagine if recipes said "stir, check if boiling, if not go back to stir".
Usually they say stir until boiling.

I think that the apparent need for a goto, usually indicates a design flaw
somewhere higher up, often as in the case of the original memory swapping
code, it seems to be functions or procedures whose semantics differ
unecesarily, making a parameter driven design difficult or impossible.
such that they are difficult to 

Gareth


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

From: egbert@garfy.dinoco.de (Egbert Hinzen)
Subject: Looking for BTX package...
Date: Thu, 21 Jul 1994 00:45:15 GMT

I'm looking for a package which allows to use the German BTX under LINUX...

Does such a package exist and where can I download it?

TIA

--
Egbert Hinzen ...speaking for himself... 
Email: egbert@garfy.dinoco.de (preferred) *** 100113.1011@compuserve.com

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

From: Richard Underwood <wreu@uk.ac.soton.ecs>
Subject: Re: Anyone else lust for threads?
Date: 22 Jul 1994 11:25:32 +0100

In <9407220808.AA02340@idcube.idsoftware.com> ddt@idcube.idsoftware.com (David Taylor) writes:

>I may have missed something in the FAQ's, but assuming that there
>is no thread support in Linux, are there plans to add or document
>it?  I'm saddened by the fact that our next generation sound code
>can be developed under NEXTSTEP, Irix, Solaris, etc., but apparently
>not Linux because of a lack of threads.  Am I wrong?  *hope, hope*

>       =-ddt->

:(
-- 
Richard Underwood                       wreu@ecs.soton.ac.uk
Microcosm Support & Development


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

From: dak@messua.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: GOTO haters ..Re: Linux Performance Enhance ?
Date: 22 Jul 1994 08:19:10 GMT

dholland@husc7.harvard.edu (David Holland) writes:



>Btw, it's fairly trivial to take a construct like

>label:
>if (a) { b; goto label; }

>and turn it into 

>while (a) b;

>...so there.

For you it is. In this simple case, but not quite for a compiler. As the
compiler has a much harder time making proper data flow analysis and
variable definition/use analysis with goto-meshs, there are papers about
how to translate goto-meshes into loop and if-structures. You guess it,
it is for optimizing Fortran compilers. These algorithms have running times
of about O(n^4), where n is the number of jumps (or was it that of the
targets?).

Conversion from structured programming constructs to goto-meshes is about
O(n). As even humans like you might be taught to program loops, even if
they are thinking "goto" inside, it is a better choice to let the human
program structured than the computer figure it out.

If you never want your compiler to optimize, well, a goto-language might
be right for you.

But I consider gotos inpractical for another reason: the label. You have
to invent a label (including name choice) when programming, and you have
to recognize and locate the label again when reading.

Now you might say that finding a label two pages back is easier for you
than following indentation levels two pages back.

So this is where literate programming jumps in, and I recommend reading
the comp.programming.literate FAQ for this new exciting manner of
hacking code into manageable pieces without needing extra subroutine
calls (including call interfaces), and without having to think up labels.
Strictly speaking, of course, this is not true, as you need names for your
code chunks, but they are likely to be called something like
<<Iterate through [[a[i]]] until you find [[a[i]=x]]>>
But those need typing (and copy operations of your editor), and not much
thinking.

I had made a program, which had to integrate certain Integrals with
partial integration rules, and recursion. It had about 12 or so loops
nested inside each other. Using WEB and Pascal, it was easily possible
to represent every of these loops as a small, manageable entity in the
source, without needing subroutine calls or such.

I'm deviating, but I do not think Literate Programming is irrelevant in
this thread.
-- 
 David Kastrup        dak@pool.informatik.rwth-aachen.de          
 Tel: +49-241-72419 Fax: +49-241-79502
 Goethestr. 20, D-52064 Aachen

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

From: hm@seneca.ix.de (Harald Milz)
Subject: Re: link() system call
Date: Fri, 22 Jul 1994 05:56:29 GMT
Reply-To: hm@seneca.ix.de

A N Burton (anb@doc.ic.ac.uk) wrote:
: > Would anyone know if any of the file systems available under linux allow
: > 'root' to create _HARD_ links to directories?

I assume you mean "loopback mounts" (that's at least what they are called 
under SunOS and AIX). No, I've been trying to convince several people
to implement this (me not being a kernel hacker), with no success yet. 

-- 
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
PS: I apologize for my bad return address - I hope this will be fixed soon.

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

From: bj0rn@blox.se (Bjorn Ekwall)
Subject: [ANSWER] module problems?
Date: 22 Jul 94 10:27:39 GMT

If you are having problems with insmod from "modules.tar.gz",
this is how you can make it work:


1. Use a kernel version from 1.1.23 and onwards.

2. Use gcc 2.5.8 (or later)


The "modules.tar.gz" package _needs_ the added functionality
in 1.1.23, since the newer kernels support stacked modules.
This means that a module can export symbols to the kernel
for use by modules loaded afterwards.

I took great pains to make the kernel support upwards compatible
with the "original" insmod, so the kernel will just gently tell
you that you are using a previous version of insmod.

It will still work, though!!!


Unfortunately (and unknowingly) I relied on a feature in gcc 2.5.8
that is not supported by gcc 2.4.5.
A fix for this exists, and hopefully it will be added to the kernel
before 1.2.0.  As a side-effect (:-( ) these changes will _break_
insmod from "modules.tar.gz"...
A new (enhanced) version of "modules..." will be available though :-)


Bjorn Ekwall == bj0rn@blox.se

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

From: lucy@p207.informatik.Uni-Bremen.DE (Holger Burde)
Subject: dot clocks
Date: 22 Jul 1994 10:44:17 GMT

hi,
I have a S3 Video Card (Spea Mirage V7 (VLB) - S3-86C805) and used the
dot clocks from the Accel File (XFree86 2.1.1). The Problem ... i can't get
more than 800x600. The Server 'gives up' because the dot clocks provided 
don"t match for a higher Resolution !

Any 'dot clocks' or other help available on this ?????


thanx in advance 

hb  (BTW: Linux runs great on my Pentium Box !)





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

From: jtklehto@stekt.oulu.fi (Janne Kukonlehto)
Subject: Re: Stacker driver?
Date: 22 Jul 1994 10:56:02 GMT

H.C.W. Kwok (cwhk@ic.ac.uk) wrote:
> Just wounder whether it is possible to write a fs driver for
> a stacked drive. 

I have an idea about this.

Dosemu can use Linux filesystems (by using emufs.sys-driver) and
Stacker works under dosemu. It should therefore be possible to make
Linux to be able to use dosemu filesystems including stacked drives.

It could be as simple as a little program which runs under dosemu and
copies files when requested from stacked drive to Linux filesystem and
deletes them when no longer used. It only needs to made really
transparent.


-- 
Janne Kukonlehto*jtklehto@stekt.oulu.fi*http://stekt.oulu.fi/~jtklehto

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

From: dak@messua.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: GOTO haters ..Re: Linux Performance Enhance ?
Date: 22 Jul 1994 08:26:35 GMT

bcr@k9.via.term.none (Bill C. Riemers) writes:

>In article <cairnss.774748222@ucsu.Colorado.EDU> cairnss@ucsu.Colorado.EDU (cairnss) writes:
>   What have they been telling you kids in school?
>   There seems to be a group of upstarts who want to defeat the GOTO.
>          "NO Top-Down with GOTO."
>   What about the simple relationship between GOTO and your machine's
>   assembly language?

If you want a simple relationship, why the heck are you programming in
higher languages? Program in assembler, for crying out loud!

If you do not want your compiler to optimize, go ahead, use gotos.

>   Maybe it's the FORTRAN in me but I prefer 
>          start:
>          if (cond)
>             {
>               stat;
>               goto start;
>             }
>   to the "top-down" invention 
>          while (cond) {
>            stat;
>          }

>Not that I hate goto's, but in general I would consider both of these
>examples bad programming?  Why?  Because a goto loop, or a while()
>loop should only be used when you are willing to face the possability
>of an infinite loop.  (Very rarely the case.)  Otherwise you should
>use a for() loop (or the equivlent of it) so you have a counter to 
>insure even if something in your code is broken, eventually the
>program will exit the loop.

Oh no. A conditional exit of the loop is still a structured construct,
and very compiler-understandable, manageable, and no problem for
optimization.

And using a counter to check if your code is broken is desparate, and at
most for temporary debugging purposes useful, or where you are dealing
with possible numerical instabilities or such.
-- 
 David Kastrup        dak@pool.informatik.rwth-aachen.de          
 Tel: +49-241-72419 Fax: +49-241-79502
 Goethestr. 20, D-52064 Aachen

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

From: dak@messua.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: gcc and Linux (compiling)...
Date: 22 Jul 1994 08:32:51 GMT

bcr@k9.via.term.none (Bill C. Riemers) writes:


>I don't know if it is required, but all unix programs I've ever
>written or edited use:

>  void main(int argc, char *argv[])

Then all unix programs you've ever written or used do not return a proper
exit value. Or do they all abort prematurely with exit(int) or abort()
or core dump or whatever, instead of running to the end of main?

Really, if main returns, it should return a proper exit value (int) so that
you can check for failures.

Usually 0 means that the program performed a certain function, 1 that the
function needed not to be performed, and greater values that something went
wrong.
-- 
 David Kastrup        dak@pool.informatik.rwth-aachen.de          
 Tel: +49-241-72419 Fax: +49-241-79502
 Goethestr. 20, D-52064 Aachen

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

From: "Stephen Davies" <scldad@sdc.com.au>
Subject: tzsetwall() ???
Date: Fri, 22 Jul 94 12:53:11 PDT

If I compile and link with a -g flag on gcc, the resulting static
load successfully links in _tzsetwall(). If, however, I remove the -g
so that I can get a dynamic load, tzsetwall is unsatisfied.

I have tried forcing libc.a into the library list to no avail.
What am I doing wrong?

I have no documentation on any of the tz routines.
What is the difference between tzset() and tzsetwall()?

Thanks in anticipation,
Steve.

========================================================================
Stephen Davies Consulting                              scldad@sdc.com.au
Adelaide, South Australia.                           Voice: 61-8-2728863
Computing & Network solutions.                       Fax  : 61-8-2741015

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

From: bde@kralizec.zeta.org.au (Bruce Evans)
Subject: Re: link() system call
Date: 22 Jul 1994 21:06:48 +1000

In article <jqbCtA2zu.GMn@netcom.com>, Jim Balter <jqb@netcom.com> wrote:
>In article <30dq7q$o8f@frigate.doc.ic.ac.uk>,
>A N Burton <anb@doc.ic.ac.uk> wrote:
>>Would anyone know if any of the file systems available under linux allow
>>'root' to create _HARD_ links to directories?

They didn't last time I checked (about a year ago).

>For reasons shrouded in (pre-symbolic link) history, UN*X directories are not
>allowed any links other than ".", the ".."s of its children, and one link from
>its (unique) parent.

Actually, this was probably enforced more by the ln utility than the link()
syscall.  Old versions of UN*X didn't have mkdir() so mkdir() had to be
implemented by link()ing "." and "..".  link() probably didn't go to the
trouble of refusing to allow more than the standard links to directories.

In FreeBSD-1.1 and apparantly in BSD4.4-lite, link() allows root to
link to directories but ln doesn't.  FreeBSD-1.1.5 has about 2 lines of
code to stop even root from link()ing directories.  Perhaps you can
remove a couple of lines from the linux file system(s) to allow it.

Don't use this feature for anything important!  I use it mainly to
repair directories that are missing "." and ".." entries after I have
damaged the directories using unlink() in order to test the robustness
of utilities on damaged directories.  The last time I checked, Linux
filesystems did not allow even root to unlink directories.

>We took advantage of this fact when writing "Norton
>Change Directory", and I was amused to note that the trick was independently
>invented for GNU find (the trick is that the link count - 2 gives the number
>of subdirectories, so when traversing a directory tree you can stop stat'ing
>entries once you reach the count; for a directory like bin, with many entries
>but no subdirectories, the speed advantage can be quite significant).

The trick must be quite old.  It should work even if there are linked
directories.  Then the count will be larger and you will never reach it.
The trick in that form is not so useful because the last directory might
be stat'ed near the end (I guess Norton sorts the directories so that
this doesn't normally happen).  I think gnu find mostly exploits the
variant that if a directory has precisely 2 links, then it contains no
subdirectories, so the directory entries don't need to be stat'ed just
for traversing the tree.  It's important that it checks for precisely
2 links and not > 2.  Some file systems, such as Linux's isofs, support
this by pretending that directories have 1 link.
-- 
Bruce Evans  bde@kralizec.zeta.org.au

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


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