Linux-Development-Sys Digest #748, Volume #8     Fri, 25 May 01 04:13:11 EDT

Contents:
  Version error when installing module (David Cheng)
  Re: looking for external modem driver ("Tom Reid")
  Re: thundering-herd vs wake-one ("Karl Heyes")
  Looking for help!!! ("Richard Anderson")
  Re: Formulating Compatibility Signature: (Nix)
  Re: looking for external modem driver ("Karl Heyes")
  Re: Preprocessor symbols automatically defined by gcc (Nix)
  Re: Preprocessor symbols automatically defined by gcc (Nix)
  Looking for help!!! Open Source project. ("Richard Anderson")
  Re: GNU_SOURCE (Kaelin Colclasure)
  Re: Win NT boot and Lilo boot ("Hugin")
  Re: Win NT boot and Lilo boot ("Hugin")
  Re: Does /sbin/dump in RedHat 7.1 ever hang for anyone? (jman8086)
  Re: Preprocessor symbols automatically defined by gcc (Paul Kimoto)
  recvfrom with PF_PACKET does not return actual packet size ([EMAIL PROTECTED])
  Netfilter Hacking (Julien Laganier)
  Re: question about fork() ("Wong Ka Chun")

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

From: David Cheng <[EMAIL PROTECTED]>
Subject: Version error when installing module
Date: Thu, 24 May 2001 15:48:03 -0700

Please help!  We are having an error that we can't get past:

We have been working on the linux scheduler and finished the code (and
successfully compiled), but when we try to install the module we keep
getting this error "*.o was compiled for version 2.4.0 while this
kernal is version 2.2.16". We are unable to get past this error and
need help.  As far as we can tell, we should only have version 2.2.16
of the kernel.  We can't figure out where 2.4.0 is coming from.  Any
help would be much appreciated.  Thank you!

David C.

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

From: "Tom Reid" <[EMAIL PROTECTED]>
Subject: Re: looking for external modem driver
Date: Thu, 24 May 2001 19:08:15 -0400

try www.drivers.com  They have a lot of drivers but I don't know if they
have any for linux.
gary zhu <[EMAIL PROTECTED]> wrote in message
news:r2VM6.2188$[EMAIL PROTECTED]...
> Is there anybody can tell me where can I get a external modem driver
source
> code, especially in kernel 2.4? Any help is very appreciated!
>
> Gary
>
>



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

From: "Karl Heyes" <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.bsd.freebsd.misc
Subject: Re: thundering-herd vs wake-one
Date: Fri, 25 May 2001 00:08:55 +0100

In article <[EMAIL PROTECTED]>, "Unknown"
<[EMAIL PROTECTED]> wrote:


> In comp.os.linux.development.system Karl Heyes
> <[EMAIL PROTECTED]> wrote: | In article
> <[EMAIL PROTECTED]>, "Unknown" | <[EMAIL PROTECTED]>
> wrote:
> |
> |> In comp.unix.bsd.freebsd.misc Karl Heyes |>
> <[EMAIL PROTECTED]> wrote:  | wake-one is whats |>
> implemented in 2.4 so that only one listener is awoken and | therefore the
> |> scaling is better.   There are better solutions to select/poll | as they
> |> suffer from the array scanning on large scale systems. |
> |> What better  solutions do you have or suggest? |
> | If I remember correctly TUX uses sigio to process requests, although there
> is | other things like zerocopy TCP being thrown in for good measure.  If
> there are 200 processes waiting for an incoming connection on a listening
> socket, how many of them will receive the SIGIO when one connection comes
> in?
>

Your streching my understanding of TUX but I don't think they'll be 200
processes, just one, or maybe O(number of processors).  The signals queue 
up.   The advantage I see is reduced context switch and none of the array
building for the select/poll.   I should really look at the TUX to be sure,
but off the top of my head thats what I think it's doing.

karl.

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

From: "Richard Anderson" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Looking for help!!!
Date: Thu, 24 May 2001 23:43:32 GMT

I am in the planning stages of an immense project aimed at creating as
paperless as can be, business software "suite". If you would like to hear a
little bit more about it, reply by news or email
[EMAIL PROTECTED]

Thank you,

Richard Anderson



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

From: Nix <$}xinix{[email protected]>
Subject: Re: Formulating Compatibility Signature:
Date: 25 May 2001 00:40:35 +0100

On Wed, 23 May 2001, Frank Ranner stated:
> Adam Shapira wrote:
>> Thanks a lot. I've tried this command on the RH6.x machine. But
>> though I haven't yet gotten to try it on the RH7 machine, my
>> intuition tells me that this command's behaviour is just as
>> non-standard as the Environment Variables (if not more so).
> 
> Your intuition is mistaken. uname -s produces 'Linux' under Redhat 7
> and Redhat 6.2.

Further, have a look at a copy of `config.guess'; it uses the output of
`uname -s' (and also -m, -r, and -v).

They're pretty portable, as these things go (although not totally; note
that config.guess has provision for some of them not working; but `uname
-s' is probably the most critical of them...)

-- 
`LARTing lusers is supposed to be satisfying. This is just tedious. The
 silly shite I'm doing now is like trying to toothpick to death a Black
 Knight made of jelly.' --- RDD

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

From: "Karl Heyes" <[EMAIL PROTECTED]>
Subject: Re: looking for external modem driver
Date: Fri, 25 May 2001 01:01:17 +0100

In article <r2VM6.2188$[EMAIL PROTECTED]>, "gary zhu"
<[EMAIL PROTECTED]> wrote:


> Is there anybody can tell me where can I get a external modem driver source
> code, especially in kernel 2.4? Any help is very appreciated!  Gary

As in one you plug into the serial port and use the serial driver?  or are
you talking of something different.

karl.

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Preprocessor symbols automatically defined by gcc
Date: 25 May 2001 01:04:36 +0100

On 23 May 2001, [EMAIL PROTECTED] stipulated:
> Is it safe to assume that the "__linux__" is automatically defined by the
> compiler on a Linux system ? Typing "gcc -dM -E - < /dev/null" shows

Yes.

>From gcc-2.95.3/gcc/config/i386/linux.h:

,----
| #undef CPP_PREDEFINES
| #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__i386__ -Dlinux -Asystem(posix)"
| 
| #undef CPP_SPEC
| #ifdef USE_GNULIBC_1
| #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} 
|%{posix:-D_POSIX_SOURCE}"
| #else
| #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} 
|%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
| #endif
`----

(GCC-3.0 loses the __i386__ crock, but not the others.)

The other platforms define `linux' similarly.

But this only allows for `linux', not `__linux', `__linux__' or anything
else. What about them?

Spec option `%P' is defined in gcc-2.95.3/gcc/gcc.c as follows (and
similarly in 3.0):

,----
|  %p   substitutes the standard macro predefinitions for the
|       current target machine.  Use this when running cpp.
|  %P   like %p, but puts `__' before and after the name of each macro.
|       (Except macros that already have __.)
`----

%P is used when cpp is run; see the preprocessing section of the monster
default_compilers[] builtin-specs initialization in gcc.c. So every
predefined `foo' option gets a `__foo' and `__foo__' copy automatically
created.

> Should I use __linux__ or linux or __linux ?

You should, IMHO, not use `linux', just `__linux__' or `__linux';
`linux' is in the user's namespace, so the user (or libc, or any header
file, or anything) may redefine it at will.

> What is the preferred (ie canonical) way of including platform-specific
> code when using gcc/g++ together with autoconf and automake ?

Don't. It is almost always a mistake; you should use feature tests
instead. (This is, after all, what autoconf is for.)

If you *must* do it --- if you've got platform-specific assembler to
build or something --- then it is best to split the system-specificities
out into separate files and build them separately, using
AC_CONFIG_LINKS() or something similar; see the node in the autoconf
manual `Using the System Type'.

If you *must*, you can use the system-specific #defines; a particularly
horrible example of this, to use as a reason to *avoid* this technique,
rather than as a source to emulate, is gcc-2.95.3/gcc/libgcc2.c...

-- 
`LARTing lusers is supposed to be satisfying. This is just tedious. The
 silly shite I'm doing now is like trying to toothpick to death a Black
 Knight made of jelly.' --- RDD

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

From: Nix <$}xinix{[email protected]>
Subject: Re: Preprocessor symbols automatically defined by gcc
Date: 25 May 2001 01:05:31 +0100

On Wed, 23 May 2001, Adam Fineman gibbered:
> You should be asking about this stuff on one of the gnu newsgroups, I

This is what the gcc-help mailing list is for (gcc-help at gcc.gnu.org).

> think.  Or, you can always look at the way it was done in the source for
> the compiler itself.  That should give you a pretty good example.

That's always best, yes :)

-- 
`LARTing lusers is supposed to be satisfying. This is just tedious. The
 silly shite I'm doing now is like trying to toothpick to death a Black
 Knight made of jelly.' --- RDD

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

From: "Richard Anderson" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Looking for help!!! Open Source project.
Date: Fri, 25 May 2001 00:21:30 GMT

I am looking interest from some people that would like to get involved in a
very ambitious project. This project is aimed at making business enviroments
as integrated and paperless as possible. This includes between business and
customer, and business and supplier.

If this seems at all interesting, let me know, or for more information on
the idea.

[EMAIL PROTECTED]

Thank you,
Richard Anderson
Point ONE Projects
www.point1projects.com
(early stages of development)



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

From: Kaelin Colclasure <[EMAIL PROTECTED]>
Subject: Re: GNU_SOURCE
Date: 24 May 2001 17:16:56 -0700

Martin von Loewis <[EMAIL PROTECTED]> writes:

[...]
> The __USE_* macros are not meant for direct use by the
> programmer. Instead, the programmer controls which library functions
> are available by defining a _SOURCE macro, e.g. _POSIX_SOURCE or
> _XOPEN_SOURCE. This, in turn, will set __USE macros. See
> /usr/include/features.h for a list of supported _SOURCE macros, and
> the resulting __USE_ macros.
> 
> The default is _GNU_SOURCE if no option is given to gcc, and
> __STRICT_ANSI__ if -ansi is given.

Hmmm, is this true of all gcc versions? I have routinely found it
necessary to add -D_GNU_SOURCE to compile commands in order to get
access to the various extensions... This has been true with gcc
2.95.2 and with Redhat's gcc 2.96 -- and I have not (AFAIK) ever
specified the -ansi flag to gcc.

-- Kaelin

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

From: "Hugin" <[EMAIL PROTECTED]>
Subject: Re: Win NT boot and Lilo boot
Date: Fri, 25 May 2001 02:34:44 +0200

I'm using Mandrake 8, so I guess the LILO version is pretty up-to-date.
If I try any of your methods, I think Lilo says that it cannot find a disk
/dev/hdx (which points to the SCSI controller) because, Lilo can't see it.
And then Lilo wont install with the new parameters. Maybe there is a way
to force Lilo to install? If anyone know, please let me know...

Linux does however support my FastTrak100 controller, but only if you
use it as a regular IDE controller and not an IDE Raid controller.
I know which resources the controller is assigned. If I write

linux ide2=0xXXXX, 0xXXXX, ide3=0xXXXX, 0xXXXX

It's detected. But when linux exams the boot-block of the ide2 and ide3
channels, it
stops because of the Raid array. If you have more ideas, please share :)

Thanks!


"John in SD" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Tue, 22 May 2001 14:40:45 +0200, "Hugin" <[EMAIL PROTECTED]> wrote:
>
> >Hello,
> >
> >I've got a Win2000 install on a 90GB Raid array on a Promise
> >FastTrak100 controller. To boot of this I have to set my BIOS to
> >boot SCSI first. I also have a linux install on a 9GB harddisk
> >connected as secondary master. To boot of this I have to set
> >the BIOS to boot C first.
> >
> >Is there a way (either by using Lilo or NT loader) so that I can
> >choose which OS to use during boot?
> >
> >The problem is that Lilo can't see the raid array, as it is not supported
> >under Linux. Also tried to add a line to boot.ini and created a
> >bootsect.lnx file on the raid array which points to the linux unstall,
> >but had no luck so far...
> >
>
> What version of LILO are you using?  Newer versions have support for far
more
> controllers.
>
> In any event, you might get away with the following in lilo.conf:
>
> disk=/dev/hdb   bios-0x81
> ...
>
> other=/dev/hdb
>     label=Win2k
>     unsafe
>
> --John
>
>
>
> LILO version 21.7 (24-Feb-2001) source at
> http://www.ibiblio.org/pub/Linux/system/boot/lilo
> patches to -2 at ftp://brun.dyndns.org/pub/linux/lilo



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

From: "Hugin" <[EMAIL PROTECTED]>
Subject: Re: Win NT boot and Lilo boot
Date: Fri, 25 May 2001 02:46:02 +0200

Hellu,

I have no idea how the BIOS adress boot-devices. It's an Award 4.51 bios
on an Abit BX6-2 mainboard. My win2k fs is NTFS, so accessing the
first few bootsectors are difficult using Dos programs (?).

I'll test your idea if I don't figure something else out. Personally I
believe
it's very simple to solve this, but I've never faced this problem before
either...

Thank you for your help!



"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hugin wrote:
> >
> > Hello,
> >
> > I've got a Win2000 install on a 90GB Raid array on a Promise
> > FastTrak100 controller. To boot of this I have to set my BIOS to
> > boot SCSI first. I also have a linux install on a 9GB harddisk
> > connected as secondary master. To boot of this I have to set
> > the BIOS to boot C first.
> >
> > Is there a way (either by using Lilo or NT loader) so that I can
> > choose which OS to use during boot?
> >
> > The problem is that Lilo can't see the raid array, as it is not
supported
> > under Linux. Also tried to add a line to boot.ini and created a
> > bootsect.lnx file on the raid array which points to the linux unstall,
> > but had no luck so far...
> >
> > Suggestions?
> >
> > Thanks!
>
> Do you know how the BIOS assigns driver numbers to
> the drives in the two cases?
>
> Usually the boot device is assigned number 0x80,
> and I would expect the other drive to be assigned
> 0x81. Do you know if your BIOS actually does this.
>
> I don't know the NT loader, so I cannot help you
> with that, but I have an idea to how it might be
> posible to get it working using LILO.
>
> In some way copy the first few (logical) cylinders
> of the SCSI drive to a file. If you cannot do this
> from within w2k try some dos utility.
>
> Copy this file to your Linux partition, if you
> cannot do this directly you might get it working
> by copying it to a floppy first.
>
> Now tell LILO that this file is actually BIOS
> device number 0x81, I don't know if LILO will
> believe this perhaps it will help to connect it
> to a loopback device using the losetup command.
>
> Maybee in this way it will be possible for LILO
> to install a map that will actually be able to
> boot your w2k disk.
>
> I don't know how much of your SCSI disk will be
> needed in the file. Perhaps 512 bytes is enough,
> perhaps you need 32KB or maybee a lot more. This
> is just an idea, I've never tried anything like
> this.
>
> --
> Kasper Dupont



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

From: [EMAIL PROTECTED] (jman8086)
Subject: Re: Does /sbin/dump in RedHat 7.1 ever hang for anyone?
Date: 24 May 2001 19:01:46 -0700

Yes, I had the same problem.  I went to
http://sourceforge.net/projects/dump/ and saw that there was a bug
report opened for this problem.  It turns out that it was a problem
with the compiler and it was fixed in the latest version.  I
downloaded the latest version (0.4b22)in RPM form from sourceforge and
it works great.

Anonymous <[EMAIL PROTECTED]> wrote in message 
news:<[EMAIL PROTECTED]>...
> Sometimes /sbin/dump hangs when I dump a filesystem.
> especially when the dump target is a file located
> on an NFS server on another machine.
> 
> dump -T "Wed Dec 31 19:00:00 1969" -B 1500000 -M -f 
>/auto/backup-c700-1/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-05-19/14-48-26--0400/celeron600-0.xxxxxxxx.com/windows.dump
> /windows
> 
> Has anyone ran into a similar problem with dump in 
> RedHat 7.1 and found a solution?
> 
> Thanks.
> 
>   --------== Posted Anonymously via Newsfeeds.Com ==-------
>      Featuring the worlds only Anonymous Usenet Server
>     -----------== http://www.newsfeeds.com ==----------

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: Preprocessor symbols automatically defined by gcc
Date: 24 May 2001 23:34:16 -0400
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, Nix wrote:
> (GCC-3.0 loses the __i386__ crock

I still seem to have it defined, though.  (Is my installation broken?)

$ gcc-3.0 -v 2>&1 | grep version
gcc version 3.0 20010521 (prerelease)
$ gcc-3.0 -dM -E - < /dev/null | grep -i i386 
#define __i386 1
#define i386 1
#define __i386__ 1

-- 
Paul Kimoto
This message was originally posted on Usenet in plain text.  Any images, 
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.

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

From: [EMAIL PROTECTED]
Subject: recvfrom with PF_PACKET does not return actual packet size
Date: Fri, 25 May 2001 01:41:35 -0500
Reply-To: [EMAIL PROTECTED]

I use a socket as in socket(PF_PACKET,SOCK_RAW,protocol).

I receive my packets using recvfrom(). Everything works fine, except that recvfrom()
always returns the size of the receive buffer (e.g. 1514 bytes) instead of the actual
number of bytes received (most packets were only 64 bytes long).

kernel 2.2.13.

Is that just the way it is, or is this being fixed?

Thanks,


--
Jan Roelens




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

From: Julien Laganier <[EMAIL PROTECTED]>
Subject: Netfilter Hacking
Date: Fri, 25 May 2001 09:17:20 +0200
Reply-To: [EMAIL PROTECTED]

Hi folks,

I want to register a new Hook in the netfilter canvas for IP. The struct
used for register is :

struct nf_hook_ops
{
        struct list_head list;

        /* User fills in from here down. */
        nf_hookfn *hook;
        int pf;
        int hooknum;
        /* Hooks are ordered in ascending priority. */
        int priority;
};

And the hook function is a nf_hookfn, which is a typedef :

typedef unsigned int nf_hookfn(unsigned int hooknum,
                               struct sk_buff **skb,
                               const struct net_device *in,
                               const struct net_device *out,
                               int (*okfn)(struct sk_buff *));

What is the parameter int (*okfn)(struct sk_buff *) which is passed to
the hook ?

Thanx for the answers !!!

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

From: "Wong Ka Chun" <[EMAIL PROTECTED]>
Subject: Re: question about fork()
Date: Fri, 25 May 2001 15:57:17 +0800

Hi Karl,

  I am asking all of these as I have a multithreaded program, which the
parent thread will launch child thread from time to time. In each child
thread, it will call fork()/execv()/waitpid() to get the return value from
another external program. When there are multiple child threads try to do
the fork()/execv()/waitpid() thingy, the program sometime crashes, sometime
waitpid does not return. I just can't figure out what / why cause the error.
Or, there is some problem in pthread that I should do the fork() within a
thread?

- Wong
"Karl Heyes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
: In article <9egj9n$q4m$[EMAIL PROTECTED]>, "Wong Ka Chun"
: <[EMAIL PROTECTED]> wrote:
:
: When the child exits the memory used by the child is 'reclaimed'.  threads
: are a different issue as the share the data space ie where s in located.
If
: the child free'd s then it would affect the parent.  The execv call should
: affect all threads, although I'm not sure under linux.




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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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-Development-System Digest
******************************

Reply via email to