Hello,

I haven't tried to use STL in kernel module. STL is a very 
complex library. When I attempted to compile your example,
I also encountered various error, though different from yours.

On Wed, 19 Apr 2000, Tobias Klotz wrote:

> Hello,
> 
> i tried to use the STL Vector library in a RTL Module and used the hints
> given before to create the following source code for testing it out:
(other warning messages omitted)
> /opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:159: warning: assignment
> of negative value `-1' to `long unsigned int'
> /opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:160: warning: assignment
> of negative value `-1' to `long unsigned int'
> /opt/rtl/rtlinux-2.0/linux/include/linux/signal.h: In function `void
> siginitsetinv(struct sigset_t *, long unsigned int)':
> /opt/rtl/rtlinux-2.0/linux/include/linux/signal.h:203: warning: assignment
> of negative value `-1' to `long unsigned int'

I forgot to mention in earlier post that I had to typecase -1 to
(unsigned long)-1 in signal.h
I tried to avoid modifying system header files, but found no 
other way. Is there an compiler option to turn off only the above warning?

Don't know about other errors you listed, but I was able to avoid
some errors by including vector.h before rtl.h:
----
#define NULL 0
#include <vector.h>

extern "C"
{
#define new _new
#include <rtl.h>
#undef new
}
----

I still get a few "... redefined" warnings but the compilation 
completed anyway. The version of my compiler is
egcs-2.91.66, and I am compiling with kernel 2.2.12 hearders.

Is there anyone on this list also on linux kernel dev list? 
I understand that there is near to zero probability that linux 
kernel will be rewritten in C++, but modifying header files to be
g++/STL safe should not be that complicated.

-- 
Yunho Jeon                  +82-2-875-9183 
Ph.D. Student, Elec. Engr.  http://csl.snu.ac.kr/~yunho
Seoul Nat'l Univ., Korea    e-mail: yunho at csl.snu.ac.kr

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to