Linux-Misc Digest #151, Volume #20 Tue, 11 May 99 09:13:15 EDT
Contents:
Re: ipfwadm and RedHat 6.0 (Paul Rusty Russell)
Re: Burn MP3 files to CDA Cdrom? (Brandon)
Re: File system for NT and Linux (Len Huppe)
Re: Ken Thompson on Linux (Rob Fisher)
Re: 16bpp vs 8bpp ("Chris Dahler")
Re: Can't see more than 64.8MB of ram.... (Brandon)
File system help. (Ju Wang)
How do I configure Super Sound32? (Frank Gallo)
Re: GNU reeks of Communism (returning to %252522GNU Communism%252522) ("FM")
Re: Don't Have LDCONFIG? (Steffen Wagner)
Re: Bizarre memory problem (Jon Skeet)
HOSTNAME: I don;t get it (not_here)
Re: glibc & libc ("David Z. Maze")
Linux: Printing problem on VAIO PCG808 (Alexej Jerschow)
Re: HELP I can't connect to my ISP! ("Snoopy :-))")
Re: Long file names in Linux? (Bruce Schultz)
Re: Whats a Path? (Paul Kimoto)
resume HTTP downloads (ben)
man anything gives a blank screen and END (John Allman)
Re: SiS graphics chips & XFree86 ([EMAIL PROTECTED])
Re: Kernel bug or my stupidity? linux 2.2.6 ext2 problem? (Itai Nahshon)
Re: glibc & libc (Marco Anglesio)
Re: glibc & libc (Paul Kimoto)
Re: random number generator (Lew Pitcher)
----------------------------------------------------------------------------
Crossposted-To: comp.os.linux.networking
Subject: Re: ipfwadm and RedHat 6.0
From: Paul Rusty Russell <[EMAIL PROTECTED]>
Date: 09 May 1999 06:40:41 +0930
root <[EMAIL PROTECTED]> writes:
> I put some detector code in my firewall script and use a variable for either
> IPFWADM or IPFWADM-WRAPPER.
> My fragment looks like this:
> if [ -e /proc/net/ipfw-chains ] # detect IPCHAINS in use
> then
> set IPFW = "/usr/sbin/ipfwadm-wrapper"
> else
> set IPFW = "/sbin/ipfwadm"
> fi
>
> Then you can use $IPFW in the rest of your firewall script.
FYI:
1) You means /proc/net/ip_fwchains?
2) You can simply move /sbin/ipfwadm to /sbin/ipfwadm.real, and
ipfwadm-wrapper will do this for you.
Rusty.
--
Tridge, Raster, DaveM, Cort, maddog... Where will you be 9-11 July 1999?
http://www.linux.org.au/projects/calu
------------------------------
Date: Tue, 11 May 1999 07:18:43 -0400
From: Brandon <[EMAIL PROTECTED]>
Subject: Re: Burn MP3 files to CDA Cdrom?
Mark Moran wrote:
>
> I've got XCDROAST, CDROM burner and a bunch of MP3 files I want to
> put onto audio CD's. What's the easiest way to getting the MP3 into
> CDA format and onto to the CD's. I don't see any MP3 -> CDA format
> utilities for linux. Will XCDROAST automatically convert WAV files to
> the proper format for an audio cd?
you dont read much do ya? Mp3s need to be converted (decompressed) to
Wavs before being put onto a CD IF you want them to be played thru
regular cd players. If you dont care if they cant be then go ahead and
leave them in mp3 format. You dont convert Wav files into ANYTHING.
That's the format audio has to be in for it to be played thru a cd
player. Wav IS the proper format. Each song has to be in its own
track. You put 10 songs on a cd, then cd will have 10 tracks. And an
audio cd has no filesystem so no mounting ( coudlnt do it anyway) is
needed to play a cd in Linux. To convert an mp3 to wav u have to get a
decoder program to decode the mp3 and decompress into a wav. Being a
Wav and in CDA format is the same thing, just for clarification.
and an audio cd isn't an audio cd until it has audio on it, before then
its just a cd. Only until you put some kind of information on it does
the CD become a specialized cd such as an audio cd, a data cd, etc. So
when u want to put mp3s on an audio cd, u should say u want to put them
onto a cd to create an audio cd. Just another hint on clarification.
Brandon
>
> Mark Moran
> [EMAIL PROTECTED]
> http://www.mmoran.com/
--
"Bill Gates?, I dont know any Bill Gates. Oh, you mean 'by putting
every conceivable
feature into an OPERATING SYSTEM, whether you want it or not, is
innovation' Bill
Gates? Yeah, I know the monopolizer"
http://web.mountain.net/~brandon/main.htm
For Beginners in Linux, Emulation, Midis, Playstation Info, and
Virii.
------------------------------
From: Len Huppe <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: File system for NT and Linux
Date: Mon, 10 May 1999 22:59:57 -0500
I'm running kernel 2.2.7 and it has read-only support for NTFS partitions.
I can copy files from my NTFS drives while booted up into Linux. Support
for read and write operations is hopefully being developed.
Wolfgang Ganzert wrote:
> Hello,
>
> I want to use WinNT 4.0 and Linux to share the same data partition on a
> disk. (size 9GB). The problem is that Linux does not support NTFS in the
> "normal" distribution of the Kernel 2.036. On the other side WinNT does
> not recognize ext2fs from Linux.
> For FAT32 a special driver for WinNT is needed. Also the file attributes
> rwx from Linux ar not supported on the FAT32. This is a problem when
> running shell scripts from FAT32 on Linux.
>
> What would be the best solution to share the large data?
>
> Any suggestions?
>
> Thank You!
>
> Sincerely
>
> Wolfgang
>
> P.S.:Since sometimes I have problems accessing the news-server I would
> be thankfull for a direct e-mail to me.
------------------------------
From: Rob Fisher <[EMAIL PROTECTED]>
Subject: Re: Ken Thompson on Linux
Date: Tue, 11 May 1999 11:30:08 +0100
Reply-To: [EMAIL PROTECTED]
> Hrumph. I wonder if Ken Thompson (if and when he does post and/or
> scan the web) uses a Windows environment as does Dennis M. Ritchie.
If it's company policy, as it is at most places I've worked, to have
Windows on your desktop, then they will have no choice.
Rob
------------------------------
From: "Chris Dahler" <[EMAIL PROTECTED]>
Subject: Re: 16bpp vs 8bpp
Date: Tue, 11 May 1999 04:01:08 GMT
Peter T. Breuer <[EMAIL PROTECTED]> wrote in message
> Come off it fellers. Just read the damn manual.
>
> Talk about making a meal ...
> Peter
Ooooohh. I'm so impressed. Nice 'tude there, dude. And to think people
said Linux users could be boorish and rude. Nah, couldn't be, could it?
------------------------------
Date: Tue, 11 May 1999 07:24:41 -0400
From: Brandon <[EMAIL PROTECTED]>
Subject: Re: Can't see more than 64.8MB of ram....
Paul Thomas wrote:
>
> Hi,
>
> I have added 128MB of ram to a new machine. The computer
> sees the ram during the memory test during the boot of
> the machine (it shows 131340k).
>
> I have a small interim Linux install and will be moving
> another Linux server I have running to this new machine.
> This kernel I am running for testing and such is the
> older 1.0.27 kernel and I believe it is compiled for
> more than 16MB of ram.
>
You have to pass special parameters to the kernel to tell it u have more
than 64 megs of RAM. I forget the technical problem that causes this
but I can tell u the solution. In your lilo.conf file you have to add
teh line 'append "mem=128M"' . I believe that is the correct format.
Add that before the info that describes your partitions. If 128 doesnt
work u will have to try say 126 b/c if u tell linux it has more ram to
work with than u really have then it can stop booting like mine did. I
have 96 megs of RAM but in the boot sequence it shows 98***Kbytes but in
the lilo.conf file i had to put 96M so u should put 128M and see what
happens. And dont forget to run 'lilo' to put the new settings into
effect, then reboot. That should do it for ya.
> When I run top, the memory shows 64640 av. While booting
> Linux, the boot info echoed to the screen shows
> 'Memory: 64844k/66496k (available)'. Those two figures
> when added equal the 131340k that the machine tests during
> boot.
>
> Does Linux divide memory into 64MB blocks and can only
> see one at a time? Do I need to recompile the kernel?
>
> Any info on what is going on would be appreciated. Please
> direct any replies to my email address as my news is
> spotty and I will forward the replies and conclusion
> back here to the newsgroup.
>
> Thanks,
Brandon
>
> --Paul T.
>
> **** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
--
"Bill Gates?, I dont know any Bill Gates. Oh, you mean 'by putting
every conceivable
feature into an OPERATING SYSTEM, whether you want it or not, is
innovation' Bill
Gates? Yeah, I know the monopolizer"
http://web.mountain.net/~brandon/main.htm
For Beginners in Linux, Emulation, Midis, Playstation Info, and
Virii.
------------------------------
From: Ju Wang <[EMAIL PROTECTED]>
Subject: File system help.
Date: Mon, 10 May 1999 20:13:01 -0700
Reply-To: [EMAIL PROTECTED]
Hi
All, I am recently working on linux file system, the main purpose is to
support large file(over 2G) and provide parallel read/write, any help
will be appreciated.
Thanks,
-Feng
mailto: [EMAIL PROTECTED]
------------------------------
From: Frank Gallo <[EMAIL PROTECTED]>
Subject: How do I configure Super Sound32?
Date: Mon, 10 May 1999 22:20:54 -0400
Reply-To: [EMAIL PROTECTED]
To -
Trying to get Super Sound32 Card (SIC Resource Inc.) to work on Linux
partition. Linux 2.0.34, Slackware version 3.5.
Dmesg yields:
Sound initialization started
<Sound Blaster (2.1)> at 0x220 irq 5 dma1, 5
Sound initialization complete
but "cat door_open.au > /dev/dsp (or audio)" says nothing. The
settings match the Windows 95 values. If I boot-up Windows
to "wake-up" the card then boot linux via an icon, I get error
in dmesg:
sb: Interrupt test no IRQ5 failed - device disabled.
Frank G
[EMAIL PROTECTED]
------------------------------
From: "FM" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.advocacy,comp.os.linux.advocacy,gnu.misc.discuss
Subject: Re: GNU reeks of Communism (returning to %252522GNU Communism%252522)
Date: Mon, 10 May 1999 22:02:40 -0700
Ed Avis wrote:
>I expect that almost all companies benefit greatly from increased
>literacy. That doesn't mean, however, that companies would start free
>schooling if the government stopped.
Of course not. Corporation action does require profit
motives. It's more like prisoner's dilemma/social dilemma
situation where each individual (corporation) has no
rational motive to provide service, whereas cooperation
by everyone would result in everyone's benefit.
>The only way that any company
>could afford it is to get together with hundreds of others, and they
>all contribute a little.
This, incidentally is the exact role that government plays
in economy.
Dan.
------------------------------
From: Steffen Wagner <[EMAIL PROTECTED]>
Subject: Re: Don't Have LDCONFIG?
Date: Tue, 11 May 1999 09:25:57 +0200
Jim McCusker wrote:
> Coy A Hile wrote:
> >
> > In article <[EMAIL PROTECTED]>,
> > Jason Bond <[EMAIL PROTECTED]> wrote:
> > >Apparantely, I need the program ldconfig in the process
> > >of installing GTK and GLIB but I get:
> > >
> > >(root@blah: ~) ldconfig
> > >bash: ldconfig: command not found
> > >
> > >when running as root....any suggestions as to the problem?
> > >Thanks,
> > >
> > > Jason
> > >
> > >
> > is wherever ldconfig exists on your system in $PATH?
> > if not, put it there.
>
> If you've su'ed to root, then it is common for the paths to not be set
> properly. ldconfig is usually found at /sbin/ldconfig. Just type that in
> and it should run.
If you change to root type su - and not only su. to find out where
files are, try
whereis filename or locate filename ( for locate first start updatedb
once as root ).
Bye,
Steffen
------------------------------
From: [EMAIL PROTECTED] (Jon Skeet)
Subject: Re: Bizarre memory problem
Date: Tue, 11 May 1999 12:38:00 +0100
[EMAIL PROTECTED] wrote:
> Jon Skeet wrote:
> > Now, fair enough, it's using too much buffering/caching... <snip>
>
> Says who?
Well, I think it should have freed up a few of those buffers and caches
in order to allow me to run "free" for instance...
After going to 2.2.7, things seem to be okay - it gives me enough memory
to do things when I need to. I got about 3Mb into swap before reaching
max load...
> > I've tried running mkswap again on the partition, and giving it a
> > reasonable priority (rather than the negative ones it gets with just
> > a straight swapon -a) but I'm having no joy.
>
> Remember that a negative nice value (which is what it is) is of higher
> importance than a positive one.
Aha... cheers. The swapon(8) man page says that the priority given should
be between 0 and 32767, hence my confusion :)
--
Jon Skeet - [EMAIL PROTECTED]
http://www.pobox.com/~skeet/
------------------------------
From: not_here <[EMAIL PROTECTED]>
Subject: HOSTNAME: I don;t get it
Date: Mon, 10 May 1999 21:49:00 -0500
I have the following in a rh52 w/k 2.2.5 and all updates:
In /etc/rc.d/rc.sysinit an entry like:
====================================================
# Read in config data.
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
else
NETWORKING=no
HOSTNAME=localhost
fi
====================================================
In /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=no
HOSTNAME=candle.linux.org
GATEWAYDEV=
GATEWAY=
====================================================
In /etc/HOSTNAME
candle.linux.org
====================================================
And in /etc/hosts
127.0.0.1 localhost
0.0.0.0 candle.linux.org candle
I can ping, ftp, telnet, etc... localhost, candle, or my dynamic ip...
but if I try to type at the prompt:
mail [EMAIL PROTECTED]
the mail gets bounced... with a "server domain must exist," or "service
unavailable."
candle = username
linux.org = my domain
work w/dynamic ip
Can someone point out what I am doing wrong... I have been trying all
kinds of combos... switching candle and candle.linux.org in /etc/hosts,
saying "yes" and "candle.linux.org" in the above section of
/etc/rc.d/rc.sysinit... even putting candle.linux.org in quotes in
/etc/sysconfig/network.
Also when I use the gnome-panel... it complaints about not being able to
locate candle.linux.org and it stops only when i add :
127.0.0.1 localhost candle
in /etc/hosts
Could someone also please post his/her sections I mentioned for:
/etc/rc.d/rc.sysinit
/etc/sysconfig/network
/etc/HOSTNAME
/etc/hosts
for a dial up connection
THanks a lot....
------------------------------
From: "David Z. Maze" <[EMAIL PROTECTED]>
Subject: Re: glibc & libc
Date: 11 May 1999 08:07:15 -0400
Elliott Paiken <[EMAIL PROTECTED]> writes:
EP> what is the difference between these, and what functions do each
EP> do for linux?
They provide equivalent functionality (from the source level, at
least). GNU libc is actively maintained, is more portable between
machines, and has transparent support for things like NIS and Hesiod.
Linux libc (libc5) doesn't face the political challenges that GNU libc
has, but also hasn't seen a release for two years.
Most current distributions use some form of GNU libc. This includes
Debian 2.0 and later and Red Hat 5.0 and later. AFAIK Slackware is
the lone holdout for the Linux libc.
--
David Maze [EMAIL PROTECTED] http://donut.mit.edu/dmaze/
"Hey, Doug, do you mind if I push the Emergency Booth Self-Destruct Button?"
"Oh, sure, Dave, whatever...you _do_ know what that does, right?"
------------------------------
From: Alexej Jerschow <[EMAIL PROTECTED]>
Crossposted-To:
comp.sys.laptops,comp.os.linux.setup,comp.os.linux,linux.dev.laptop,comp.os.linux.hardware,com.os.linux.admin,comp.os.linux.portable
Subject: Linux: Printing problem on VAIO PCG808
Date: Mon, 10 May 1999 15:00:02 -0700
Hi,
The printer port /dev/lp0 is not recognized on my RH 5.2 Linux system on
a SONY VAIO PCG 808 notebook. Do you have any suggestions on why this
might be so and where I could read more about this sort of problem ? I
jsut don't know what to do. I checked out the FAQ, dejanews and the
Printing-HOWTO, but it did not help me further.
Thank you
Alexej Jerschow
------------------------------
From: "Snoopy :-))" <[EMAIL PROTECTED]>
Crossposted-To:
alt.comp.linux.isp,alt.os.linux,comp.os.linux.networking,nl.comp.os.linux,worldonline.linux
Subject: Re: HELP I can't connect to my ISP!
Date: Tue, 11 May 1999 00:54:59 -0400
You should say which Linux distibution you are using!!!
I am using RedHat 5.2 and I've had the same kind of problem.
If the modem doesn't respond and your com-port (cua#) is set correctly?
Then it's sounds like your irq# is incorectly set in Linux.
First check your Irq# setting in Windows (Hope you know how)
Then in linux (I am assuming you are using RedHat 5.2) check The "rc.local"
File-settings (You must be "root")
First read the file : "less /etc/rc.d/rc.local"
Or
Use the command "setserial -a /dev/ttyS2" (or /dev/cua2)
If the irq# is not the same as in windows then you will have to change to
the same as the one in windows. (You can also find your modem's irq setting
in the modem's manual)
Editing the "rc.local" file in emacs is quite easy. you can put the full
"setserial command" in your "rc.local" file or just modify the irq#
If you can connect to your Isp but cant connect to the web the probobly
your DNS is incorect which you can get from your ISP.
Hope it works
Snoopy :-))
van Leur wrote in message <7h4o6p$l9d$[EMAIL PROTECTED]>...
>I have problems setting up an PPP-Conection to my ISP. When I try to
connect
>to my ISP, PPPD returns code 2 (???) or some other programs say the modem
>doesn't respond or can't initialize.
>My modem is connected to COM3 in DOS/WINDOWS and works fine in Windows.
>Linux should recognize my modem, because it once connected but the
>connection was broke after 2 minutes (I wasn't able to surf on the WWW). I
>used the programs KPPP (from The K Desktop Environment) and X-ISP. I'm new
>to linux so please help me!!!
>
>Thanks
>
>Bram van Leur
>
>P.S. Sorry for my bad English. I'm from Holland
>
>
------------------------------
From: [EMAIL PROTECTED] (Bruce Schultz)
Subject: Re: Long file names in Linux?
Date: Mon, 10 May 1999 23:12:00 -04-59
Reply-To: [EMAIL PROTECTED]
On 10 May 1999 01:36:07 GMT, brian moore <[EMAIL PROTECTED]> wrote:
>On Mon, 10 May 1999 00:06:20 GMT,
> Russell Tanton <[EMAIL PROTECTED]> wrote:
>> Thanks, I think that's what I was confusing. I was reading a gzip
>> file off of my shared FAT16 partition (since I still haven't been able
>> to get my ppp connection quite working properly). The partition in
>> question was mounted as a DOS fs. I'll try remounting it as a VFAT,
>> and I'm guessing that that ought to solve it.
>
>You will need to upgrade your kernel, though. VFAT was added around
>2.0.34 or so as I recall.
No, that was FAT32 support. VFAT support was there years ago in my
Slackware 3.0 installation which used the 2.0.0 kernel.
>You'll want to do this anyway, as there are some nasty DOS attacks
>against systems earlier than 2.0.35.
I won't argue that that at all.
--
Bruce Schultz
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Whats a Path?
Date: 11 May 1999 01:08:09 -0500
Reply-To: [EMAIL PROTECTED]
In article <WKOZ2.6119$[EMAIL PROTECTED]>, mikerego wrote:
> I have installed a couple of programs on my RedHat 5.2 ( I am very new to
> Linux ) and in the README file it says to put the programs in my path. First
> where do I find out where it is, and what exactly do they mean by that and
> how do I do that?
The PATH variable specifies a list of directories that your shell uses
to find programs to run. If your shell is bash, zsh, or ksh -- type
"echo $SHELL" to find out which -- the PATH has the form
/path/to/directory1:/path/to/directory2:/path/to/directory3 (etc.)
You alter it by typing something like
$ PATH=$PATH:/path/to/another/directory
at the prompt, or do it "automatically" (upon each invocation) by
putting such a line (without prompt) in the appropriate startup
file in your home directory, which should have a suggestive name
like ".bashrc" or ".zshrc" ("rc" = "run commands" or something like
that). (Oh, files with names starting with "." are hidden by
default by the "ls" command.) Consult your shell's documentation
for further details.
(If your shell is csh or tcsh, the syntax is slightly different.
See its documentation, or change your shell.)
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: ben <[EMAIL PROTECTED]>
Subject: resume HTTP downloads
Date: Tue, 11 May 1999 13:01:41 +0800
hi,
I am looking for a linux program that can resume http downloads,
something like GetRight for windows. Does anyone knows where I can find
it?
thank
ben
------------------------------
From: John Allman <[EMAIL PROTECTED]>
Subject: man anything gives a blank screen and END
Date: 11 May 1999 12:32:37 GMT
i'm a bit of a novice here - a friend of a friend installed linux for me
and the man pages used to work fine, but now i type man i just get a pause
and it shows nothing and then goes END. not very helpful. any ideas?
================== Posted via SearchLinux ==================
http://www.searchlinux.com
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: alt.os.linux
Subject: Re: SiS graphics chips & XFree86
Date: 11 May 1999 10:33:12 +0200
Reply-To: [EMAIL PROTECTED]
In <vYoZ2.12136$[EMAIL PROTECTED]> hat
"J" <[EMAIL PROTECTED]> geschrieben:
> likewise i have a SiS 6326 and at 320X200 it just showed me lines the rest
> didn't even work..
Put 'option "no_bitblt"' in the device-section of your XF86config.
worked for me (SiS 6326 AGP) / XF86 3.3.3.
dpi
------------------------------
From: Itai Nahshon <[EMAIL PROTECTED]>
Subject: Re: Kernel bug or my stupidity? linux 2.2.6 ext2 problem?
Date: Fri, 07 May 1999 01:23:16 +0300
Moritz Moeller-Herrmann wrote:
>
> Hi,
>
> I just had a weird experience when playing around with my PC...
>
> I had a program crash (Lyx1.0) when importing a Tex file and failing
> miserably.
>
> It filled my /home ext2 partition on an IDE drive by filling the log file
> ~/.xsession-errors(120M). When I noticed this (my bash prompt shows free space
> in /home) I removed the offending file and killed the hung Lyx process.
Unix files remain there for as long as they are open by any process for
reading or writing. If you remove the file you just remove it's name
from the
directory but the file itself is not removed until it is not referenced
by
any process. This is a useful feature. A program can create a temporary
file
and immediately remove it, but keepa handle to the file. Then use the
file
for readin/writing or even inherit the handle to other program. The file
is
actually deleted only when the last reference to it is closed.
You did not have to unmount. Terminating the program that had the file
open
was enough to actually delete it. Since the file is open by your X
session, logging out would be enough.
One easier way to regain that space would be not to remove the file but
to
empty it by eg.:
cat /dev/null > ~/.xsession-errors
Off course, that would not work if you already tried to remove that
file.
Itai
--
Itai Nahshon [EMAIL PROTECTED]
Also [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Marco Anglesio)
Subject: Re: glibc & libc
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 May 1999 05:21:14 GMT
On Tue, 11 May 1999 00:09:44 -0400, Elliott Paiken <[EMAIL PROTECTED]> wrote:
>what is the difference between these, and what functions do each do for
>linux?
They are both standard c libraries. glibc (variously glibc2 or libc6) is
the GNU C Library, version 2, or the 6th linux c library. Libc (variously
libc5) is the 5th linux c library. glibc supercedes libc5, fixing some
bugs and linux-specific behaviour. It also brings all versions of linux
onto the same C library; non-intel versions have consistently used glibc
rather than attempting to port libc5 to whichever platform.
Ongoing linux devel is almost exclusively oriented to developing with
glibc rather than libc5; libc5 development is more or less halted (I
believe that the last bugfix has been released and the team disbanded and
moved on), although you can always pick up sources and continue.
marco
--
,--------------------------------------------------------------------------.
> | Absence diminishes small loves <
> Marco Anglesio | and increases great ones, <
> [EMAIL PROTECTED] | as the wind blows out the candle <
> http://www.the-wire.com/~mpa | and blows up the bonfire. <
> | --La Rochefoucauld <
`--------------------------------------------------------------------------'
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: glibc & libc
Date: 11 May 1999 01:22:22 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, Elliott Paiken wrote:
> what is the difference between these, and what functions do each do for
> linux?
"glibc" is a particular Linux libc. A "libc" is a "C library",
a collection of useful functions collected for the convenience
of programmers. These functions do such things as manage memory,
manipulate strings, perform sorting, calculate higher mathematical
functions, ask for services from the underlying operating system,
and do input and output. Every nontrivial program will use some
of these functions.
On Linux (like all modern unixes), the libc is a shared dynamic
library. "Dynamic" means that these functions need not be copied
into each executable program's binary file, but rather are loaded
from the library at run time. "Shared" means that things are
arranged so that when the same functions are needed by more than
one program, only one copy need be loaded into memory.
The Linux system has gone through several different libc's.
The current generation is called "libc6", "glibc" (for "GNU libc"),
or "glibc2", and is available in either 2.0.x or 2.1.x flavors.
Many programs and systems still use the preceding generation,
known as "libc5", "libc" (as opposed to "glibc"), or occasionally
"glibc1" (upon which it was based).
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: random number generator
Reply-To: [EMAIL PROTECTED]
Date: Thu, 06 May 1999 17:39:29 GMT
man setstate gives...
> The initstate() function allows a state array state to be
> initialized for use by random(). The size of the state
> array n is used by initstate() to decide how sophisticated
> a random number generator it should use -- the larger the
> state array, the better the random numbers will be. seed
> is the seed for the initialization, which specifies a
> starting point for the random number sequence, and pro-
> vides for restarting at the same point.
> The setstate() function changes the state array used by
> the random() function. The state array state is used for
> random number generation until the next call to init-
> state() or setstate(). state must first have been ini-
> tialized using initstate().
I believe that your code should look more like...
#include <stdlib.h>
main() /* implicit int */
{
long int x; /* you had double x; */
char state[8];
initstate(6,state, sizeof state); /* state is an array */
setstate(state); /* that's modifyed by initstate/setstate */
x = random(); /* random() returns long int */
printf("%.15ld/n", x); /* format corrected for long int */
return 0; /* always return completioncode to os */
/* above could have been exit(0); */
}
On Thu, 6 May 1999 09:45:35 -0400, mark <[EMAIL PROTECTED]> wrote:
>I am trying to use the random number generator random() with initstaet() =
>and
>setstate(). Why doesn't this code give any output at all?
>
>#include <stdlib.h>=20
>main()
>{
> double x;
>
> initstate(6, "state", 8);
> setstate("state");
> x =3D random();
> printf("%.15g/n", x);
>}
>
>Thanks for any help.
>
Lew Pitcher
System Consultant, Integration Solutions Architecture
Toronto Dominion Bank
([EMAIL PROTECTED])
(Opinions expressed are my own, not my employer's.)
------------------------------
** 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: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.misc) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************