RE: kbuild & C++

2005-09-07 Thread Lee Revell
On Wed, 2005-09-07 at 12:17 +0200, Budde, Marco wrote: > Well, it is not the first driver I am writing for Linux. > So yes, I do know, what is part of a Linux driver and > what is not. It should be fairly obvious. Windows drivers do all kinds of crap that just obviously doesn't belong in the

Re: kbuild & C++

2005-09-07 Thread Nick Piggin
Budde, Marco wrote: make life more difficult. If you do not like any kind of abstraction, why are you using C instead of pure assembler? This has nothing to do with the linux kernel anymore, so can the thread be killed from lkml please? (Not to be rude; understand the s/n ratio is bad at the

RE: kbuild & C++

2005-09-07 Thread Bernd Petrovitsch
On Wed, 2005-09-07 at 14:04 +0200, Budde, Marco wrote: [...] > > Yes, this is a general problem with integrated c/c++ stuff like > > Win-Visual C++. > > not all Windows users do not know what they are doing :-). > Speaking for myself: I am programming under Linux and > Windows (with more than 10

RE: kbuild & C++

2005-09-07 Thread Budde, Marco
Hi, > Yes, this is a general problem with integrated c/c++ stuff like > Win-Visual C++. not all Windows users do not know what they are doing :-). Speaking for myself: I am programming under Linux and Windows (with more than 10 years experience in C and C++) and I do know the differences. So

Re: kbuild & C++

2005-09-07 Thread Bodo Eggert
Budde, Marco <[EMAIL PROTECTED]> wrote: > for one of our customers I have to port a Windows driver to > Linux. Large parts of the driver's backend code consists of > C++. > > How can I compile this code with kbuild? The C++ support > (I have tested with 2.6.11) of kbuild seems to be incomplete /

Re: kbuild & C++

2005-09-07 Thread Bernd Petrovitsch
On Wed, 2005-09-07 at 11:21 +0200, Esben Nielsen wrote: > On Tue, 6 Sep 2005 [EMAIL PROTECTED] wrote: > > > On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: > > > > > Which is too bad. You can do stuff much more elegant, effectively and > > > safer in C++ than in C. Yes, you can do

Re: kbuild & C++

2005-09-07 Thread Esben Nielsen
On Wed, 7 Sep 2005 [EMAIL PROTECTED] wrote: > On Wed, 07 Sep 2005 11:21:42 +0200, Esben Nielsen said: > > > I use a RTOS written in plain C but where you can easily use C++ in kernel > > space (there is no user-space :-). We use gcc by the way. > > This isn't RTOS, in case you haven't

Re: kbuild & C++

2005-09-07 Thread Esben Nielsen
On Wed, 7 Sep 2005 [EMAIL PROTECTED] wrote: > On Wed, 07 Sep 2005 11:13:24 +0200, "Budde, Marco" said: > > > E.g. in my case the Windows source code has got more than 10 MB. > > Nobody will convert such an amount of code from C++ to C. > > This would take years. > > Do you have any *serious*

RE: kbuild & C++

2005-09-07 Thread Budde, Marco
Hi, > Do you have any *serious* intent to drop 10 *megabytes* worth of driver > into the kernel??? (Hint - *everything* in drivers/net/wireless *totals* > to only 2.7M). no, I don't. No every module has to go into the standard kernel :-). > A Linux device driver isn't the same thing as a

Re: kbuild & C++

2005-09-07 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 11:21:42 +0200, Esben Nielsen said: > I use a RTOS written in plain C but where you can easily use C++ in kernel > space (there is no user-space :-). We use gcc by the way. This isn't RTOS, in case you haven't noticed. ;) > It has been done for Linux as well >

RE: kbuild & C++

2005-09-07 Thread Bernd Petrovitsch
BTW you kill threading. On Wed, 2005-09-07 at 11:13 +0200, Budde, Marco wrote: [...] > >> That would be because the kernel is written in *C* (and some asm), > *not* C++. > > I cannot see the connection. At the end everything gets converted > to assembler/opcode. In the user space I can mix C and

Re: kbuild & C++

2005-09-07 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 11:13:24 +0200, "Budde, Marco" said: > E.g. in my case the Windows source code has got more than 10 MB. > Nobody will convert such an amount of code from C++ to C. > This would take years. Do you have any *serious* intent to drop 10 *megabytes* worth of driver into the

Re: kbuild & C++

2005-09-07 Thread Esben Nielsen
On Tue, 6 Sep 2005 [EMAIL PROTECTED] wrote: > On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: > > > Which is too bad. You can do stuff much more elegant, effectively and > > safer in C++ than in C. Yes, you can do inheritance in C, but it leaves > > it up to the user to make sure the

RE: kbuild & C++

2005-09-07 Thread Budde, Marco
Hi, >> That would be because the kernel is written in *C* (and some asm), *not* C++. I cannot see the connection. At the end everything gets converted to assembler/opcode. In the user space I can mix C and C++ code without any problems, why should this not be possible in the kernel mode? >>

Re: kbuild & C++

2005-09-07 Thread Bernd Petrovitsch
On Tue, 2005-09-06 at 17:08 -0400, Chris Frey wrote: > On Tue, Sep 06, 2005 at 01:30:34PM +0200, Bernd Petrovitsch wrote: > > Yes, because the official Linux kernel is pure C (using some gcc > > extensions). > > There is http://netlab.ru.is/exception/LinuxCXX.shtml but it is > > a) not integrated

Re: kbuild C++

2005-09-07 Thread Bernd Petrovitsch
On Tue, 2005-09-06 at 17:08 -0400, Chris Frey wrote: On Tue, Sep 06, 2005 at 01:30:34PM +0200, Bernd Petrovitsch wrote: Yes, because the official Linux kernel is pure C (using some gcc extensions). There is http://netlab.ru.is/exception/LinuxCXX.shtml but it is a) not integrated (and will

Re: kbuild C++

2005-09-07 Thread Esben Nielsen
On Tue, 6 Sep 2005 [EMAIL PROTECTED] wrote: On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: Which is too bad. You can do stuff much more elegant, effectively and safer in C++ than in C. Yes, you can do inheritance in C, but it leaves it up to the user to make sure the type-casts

RE: kbuild C++

2005-09-07 Thread Budde, Marco
Hi, That would be because the kernel is written in *C* (and some asm), *not* C++. I cannot see the connection. At the end everything gets converted to assembler/opcode. In the user space I can mix C and C++ code without any problems, why should this not be possible in the kernel mode? There

Re: kbuild C++

2005-09-07 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 11:13:24 +0200, Budde, Marco said: E.g. in my case the Windows source code has got more than 10 MB. Nobody will convert such an amount of code from C++ to C. This would take years. Do you have any *serious* intent to drop 10 *megabytes* worth of driver into the kernel???

RE: kbuild C++

2005-09-07 Thread Bernd Petrovitsch
BTW you kill threading. On Wed, 2005-09-07 at 11:13 +0200, Budde, Marco wrote: [...] That would be because the kernel is written in *C* (and some asm), *not* C++. I cannot see the connection. At the end everything gets converted to assembler/opcode. In the user space I can mix C and C++

Re: kbuild C++

2005-09-07 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 11:21:42 +0200, Esben Nielsen said: I use a RTOS written in plain C but where you can easily use C++ in kernel space (there is no user-space :-). We use gcc by the way. This isn't RTOS, in case you haven't noticed. ;) It has been done for Linux as well

RE: kbuild C++

2005-09-07 Thread Budde, Marco
Hi, Do you have any *serious* intent to drop 10 *megabytes* worth of driver into the kernel??? (Hint - *everything* in drivers/net/wireless *totals* to only 2.7M). no, I don't. No every module has to go into the standard kernel :-). A Linux device driver isn't the same thing as a Windows

Re: kbuild C++

2005-09-07 Thread Esben Nielsen
On Wed, 7 Sep 2005 [EMAIL PROTECTED] wrote: On Wed, 07 Sep 2005 11:13:24 +0200, Budde, Marco said: E.g. in my case the Windows source code has got more than 10 MB. Nobody will convert such an amount of code from C++ to C. This would take years. Do you have any *serious* intent to drop

Re: kbuild C++

2005-09-07 Thread Esben Nielsen
On Wed, 7 Sep 2005 [EMAIL PROTECTED] wrote: On Wed, 07 Sep 2005 11:21:42 +0200, Esben Nielsen said: I use a RTOS written in plain C but where you can easily use C++ in kernel space (there is no user-space :-). We use gcc by the way. This isn't RTOS, in case you haven't noticed. ;)

Re: kbuild C++

2005-09-07 Thread Bernd Petrovitsch
On Wed, 2005-09-07 at 11:21 +0200, Esben Nielsen wrote: On Tue, 6 Sep 2005 [EMAIL PROTECTED] wrote: On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: Which is too bad. You can do stuff much more elegant, effectively and safer in C++ than in C. Yes, you can do inheritance in C,

Re: kbuild C++

2005-09-07 Thread Bodo Eggert
Budde, Marco [EMAIL PROTECTED] wrote: for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I have tested with 2.6.11) of kbuild seems to be incomplete / not

RE: kbuild C++

2005-09-07 Thread Budde, Marco
Hi, Yes, this is a general problem with integrated c/c++ stuff like Win-Visual C++. not all Windows users do not know what they are doing :-). Speaking for myself: I am programming under Linux and Windows (with more than 10 years experience in C and C++) and I do know the differences. So

RE: kbuild C++

2005-09-07 Thread Bernd Petrovitsch
On Wed, 2005-09-07 at 14:04 +0200, Budde, Marco wrote: [...] Yes, this is a general problem with integrated c/c++ stuff like Win-Visual C++. not all Windows users do not know what they are doing :-). Speaking for myself: I am programming under Linux and Windows (with more than 10 years

Re: kbuild C++

2005-09-07 Thread Nick Piggin
Budde, Marco wrote: make life more difficult. If you do not like any kind of abstraction, why are you using C instead of pure assembler? This has nothing to do with the linux kernel anymore, so can the thread be killed from lkml please? (Not to be rude; understand the s/n ratio is bad at the

RE: kbuild C++

2005-09-07 Thread Lee Revell
On Wed, 2005-09-07 at 12:17 +0200, Budde, Marco wrote: Well, it is not the first driver I am writing for Linux. So yes, I do know, what is part of a Linux driver and what is not. It should be fairly obvious. Windows drivers do all kinds of crap that just obviously doesn't belong in the

Re: kbuild & C++

2005-09-06 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: > Which is too bad. You can do stuff much more elegant, effectively and > safer in C++ than in C. Yes, you can do inheritance in C, but it leaves > it up to the user to make sure the type-casts are done OK every time. You > can with macros

Re: kbuild & C++

2005-09-06 Thread Jesper Juhl
On 9/7/05, Esben Nielsen <[EMAIL PROTECTED]> wrote: > On Tue, 6 Sep 2005, Jesper Juhl wrote: > > > On 9/6/05, Budde, Marco <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > for one of our customers I have to port a Windows driver to > > > Linux. Large parts of the driver's backend code consists of

Re: kbuild & C++

2005-09-06 Thread Randy.Dunlap
On Wed, 7 Sep 2005, Esben Nielsen wrote: > On Tue, 6 Sep 2005, Jesper Juhl wrote: > > > On 9/6/05, Budde, Marco <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > for one of our customers I have to port a Windows driver to > > > Linux. Large parts of the driver's backend code consists of > > > C++.

Re: kbuild & C++

2005-09-06 Thread Esben Nielsen
On Tue, 6 Sep 2005, Jesper Juhl wrote: > On 9/6/05, Budde, Marco <[EMAIL PROTECTED]> wrote: > > Hi, > > > > for one of our customers I have to port a Windows driver to > > Linux. Large parts of the driver's backend code consists of > > C++. > > > > How can I compile this code with kbuild? The

Re: kbuild & C++

2005-09-06 Thread Sam Ravnborg
On Tue, Sep 06, 2005 at 01:23:56PM +0200, Budde, Marco wrote: > Hi, > > for one of our customers I have to port a Windows driver to > Linux. Large parts of the driver's backend code consists of > C++. > > How can I compile this code with kbuild? The C++ support > (I have tested with 2.6.11) of

Re: kbuild & C++

2005-09-06 Thread Jesper Juhl
On 9/6/05, Budde, Marco <[EMAIL PROTECTED]> wrote: > Hi, > > for one of our customers I have to port a Windows driver to > Linux. Large parts of the driver's backend code consists of > C++. > > How can I compile this code with kbuild? The C++ support > (I have tested with 2.6.11) of kbuild seems

Re: kbuild & C++

2005-09-06 Thread Chris Frey
On Tue, Sep 06, 2005 at 01:30:34PM +0200, Bernd Petrovitsch wrote: > Yes, because the official Linux kernel is pure C (using some gcc > extensions). > There is http://netlab.ru.is/exception/LinuxCXX.shtml but it is > a) not integrated (and will probably never) and > b) you can't use parts of C++

Re: kbuild & C++

2005-09-06 Thread linux-os \(Dick Johnson\)
On Tue, 6 Sep 2005, Budde, Marco wrote: > Hi, > > for one of our customers I have to port a Windows driver to > Linux. Large parts of the driver's backend code consists of > C++. > > How can I compile this code with kbuild? The C++ support > (I have tested with 2.6.11) of kbuild seems to be

Re: kbuild & C++

2005-09-06 Thread Bernd Petrovitsch
On Tue, 2005-09-06 at 13:23 +0200, Budde, Marco wrote: [] > for one of our customers I have to port a Windows driver to > Linux. Large parts of the driver's backend code consists of > C++. > > How can I compile this code with kbuild? The C++ support > (I have tested with 2.6.11) of kbuild

Re: kbuild C++

2005-09-06 Thread Bernd Petrovitsch
On Tue, 2005-09-06 at 13:23 +0200, Budde, Marco wrote: [] for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I have tested with 2.6.11) of kbuild seems to

Re: kbuild C++

2005-09-06 Thread linux-os \(Dick Johnson\)
On Tue, 6 Sep 2005, Budde, Marco wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I have tested with 2.6.11) of kbuild seems to be incomplete /

Re: kbuild C++

2005-09-06 Thread Chris Frey
On Tue, Sep 06, 2005 at 01:30:34PM +0200, Bernd Petrovitsch wrote: Yes, because the official Linux kernel is pure C (using some gcc extensions). There is http://netlab.ru.is/exception/LinuxCXX.shtml but it is a) not integrated (and will probably never) and b) you can't use parts of C++ anyway

Re: kbuild C++

2005-09-06 Thread Jesper Juhl
On 9/6/05, Budde, Marco [EMAIL PROTECTED] wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I have tested with 2.6.11) of kbuild seems to be

Re: kbuild C++

2005-09-06 Thread Sam Ravnborg
On Tue, Sep 06, 2005 at 01:23:56PM +0200, Budde, Marco wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I have tested with 2.6.11) of kbuild

Re: kbuild C++

2005-09-06 Thread Esben Nielsen
On Tue, 6 Sep 2005, Jesper Juhl wrote: On 9/6/05, Budde, Marco [EMAIL PROTECTED] wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I compile this code with kbuild? The C++ support (I

Re: kbuild C++

2005-09-06 Thread Randy.Dunlap
On Wed, 7 Sep 2005, Esben Nielsen wrote: On Tue, 6 Sep 2005, Jesper Juhl wrote: On 9/6/05, Budde, Marco [EMAIL PROTECTED] wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How can I

Re: kbuild C++

2005-09-06 Thread Jesper Juhl
On 9/7/05, Esben Nielsen [EMAIL PROTECTED] wrote: On Tue, 6 Sep 2005, Jesper Juhl wrote: On 9/6/05, Budde, Marco [EMAIL PROTECTED] wrote: Hi, for one of our customers I have to port a Windows driver to Linux. Large parts of the driver's backend code consists of C++. How

Re: kbuild C++

2005-09-06 Thread Valdis . Kletnieks
On Wed, 07 Sep 2005 00:20:11 +0200, Esben Nielsen said: Which is too bad. You can do stuff much more elegant, effectively and safer in C++ than in C. Yes, you can do inheritance in C, but it leaves it up to the user to make sure the type-casts are done OK every time. You can with macros do