Linux-Development-Sys Digest #980, Volume #7     Tue, 27 Jun 00 22:13:10 EDT

Contents:
  How do I learn development for DosEmu ? ("smile773")
  Newbie question (Marcos E. =?iso-8859-1?Q?Kurb=E1n?=)
  Re: Not Quite C (Erik Max Francis)
  Re: Newbie question (Grant Edwards)
  Re: how to make a RPM? (Ronald Cole)
  Re: running remote untrusted code (Chetan Ahuja)
  Re: nonblocking gethostbyname? (Warren Young)
  Re: About blocking IO? (Bjorn Reese)
  Re: Good Basic compiler for linux? ("AndyD")
  Re: Kernel 2.4 question (bill davidsen)
  Re: How to crerate a library C++ (tabascox)
  Re: About blocking IO? (Kaz Kylheku)
  how to initialize a global instance ([EMAIL PROTECTED])
  Re: Embedded Linux Login Problem ... (Mario Klebsch)
  Re: how to initialize a global instance (Kaz Kylheku)
  Checking socket status (c/c++) (Bhavin Shah)
  Re: Checking socket status (c/c++) (Kaz Kylheku)

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

From: "smile773" <[EMAIL PROTECTED]>
Subject: How do I learn development for DosEmu ?
Date: Tue, 27 Jun 2000 16:19:21 GMT

I am concidering the advantages of approaching some
problems in dos from the Dosemu perspective.

I downloaded dosemu source and am not sure how to proceed
with learning how it works ?

will I need to understand the linux kernel to fully understand
how dosemu is works ?

where is the best place to start ?
Is there a better way to accomplish 32bit dos pmode development ?



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

From: Marcos E. =?iso-8859-1?Q?Kurb=E1n?= <[EMAIL PROTECTED]>
Subject: Newbie question
Date: Tue, 27 Jun 2000 13:01:04 -0300
Reply-To: [EMAIL PROTECTED]

Hi all,
        I'm trying to write drivers and have the folowing problem:
        The onli file compiles perfectlly, but when loaded, insmod complains
about the following symbols (all of them funtions and well includded)
connot be resolved:
                inb, queue_task, outb_p, mark_bh, inb_p

        Shouldn't them be exported by the kernel and linked at module load
time? I' working wiht kernel version 2.2.5, without serial lines suppot,
I recompiled the kernel to get this. Does it have to do with my kernel
recompilation?
        I appretiate any help,

Marcos E. Kurban

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

From: Erik Max Francis <[EMAIL PROTECTED]>
Subject: Re: Not Quite C
Date: Tue, 27 Jun 2000 10:41:09 -0700

Stephan Beyer wrote:

> Thanks, but I want to know some things before starting with NQC:
> What do I need exactly (LEGO Mindstorms, any adapters for computer?)
> What do I need in Kernel? (IrDA protocol?)
> How much does that cost? (in Dollars)\

Oh, okay.  The standard LEGO Mindstorms package is all you need.  It
comes with an infrared transmitter that talks to the "brick" (the
"brains" of the LEGO Mindstorms machine) and downloads programs.  The
transmitter hooks into a standard serial port; you don't need any
infrared services in the computer itself to use it.

You'll need the NCQ compiler (nqcc), and a program to download programs
to the brick via the serial port.  One such program is rcxdl, which I
believe comes with the NCQ package (at the very least it's by the same
guy) -- you can download all this software (for free, obviously) via the
links I mentioned earlier.

As for the price, the best thing to do is check in your area.  I got
mine quite some time ago and there have been several revisions and
updates since then, so what I got it for is irrelevant.  Amazon.com has
the 1.5 version of the set for $200; there are also some additional
expansion sets which obviously you don't need to get started.

-- 
 Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Love has no heart.
\__/ Ned Rorem
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!

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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Newbie question
Date: Tue, 27 Jun 2000 18:29:25 GMT

In article <[EMAIL PROTECTED]>, Marcos E. Kurb�n wrote:

>       I'm trying to write drivers and have the folowing problem:
>       The onli file compiles perfectlly, but when loaded, insmod complains
>about the following symbols (all of them funtions and well includded)
>connot be resolved:
>               inb, queue_task, outb_p, mark_bh, inb_p

The inb/oub problems are probably because you didn't have optimization
turned on when you compiled your file (the __inline__ stuff that is to be
used for inb/outb is disabled unless optimization is turned on).  Try using
-O2 in your gcc command line.

The queue_task symbol might be the same problem -- don't know for sure.

-- 
Grant Edwards                   grante             Yow!  .. I want FORTY-TWO
                                  at               TRYNEL FLOATATION SYSTEMS
                               visi.com            installed within SIX AND A
                                                   HALF HOURS!!!

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: how to make a RPM?
Date: 27 Jun 2000 12:17:55 -0700

[EMAIL PROTECTED] writes:
> Philip Pearl <[EMAIL PROTECTED]> wrote:
> 
> > Untitled DocumentThere's a book called "Maximum RPM" that explains
> > what to do.  It is available to read on the Web, but I don't have the
> > URL right now.  Try searching...
> 
> http://www.rpm.org. Unfortunatly, the rpm folks aren't quite vocal
> enough warning you that the book is hopelessly out of date, like the
> rest of the deplorable rpm documentation. It's a decent start, but be
> prepared for alot of excursions into the source code and text files in
> the rpm distribution.

Truer words were never spoken!!  Isn't there supposed to be a revised
edition of "Maximum RPM" in the works?

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B

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

From: Chetan Ahuja <[EMAIL PROTECTED]>
Subject: Re: running remote untrusted code
Date: 27 Jun 2000 19:47:25 GMT

Brennan Cheung <[EMAIL PROTECTED]>  spoke thusly:

> I have have been thinking about what the requirements of this system are and
> they are really pretty high.  Due to the number of processes running
> concurrently
> there music be a really low context switch for task swapping.  The large
> number
> of processes also demands that each process run as fast as it possibly can.  I
> am
> currently looking under different opearting systems to see if any other
> operating
> systems out there meet this requirement.  So far I haven't really found
> anything
> too promising.  I am thinking that a new operating system will have to be
> build
> in order to solve this problem.  I'm probably going to start playing around
> with
> the OSKit again sometime soon.

> Anyone have any suggestions?

> Brennan Cheung

   Er... I think you're probably skipping a step in your
reasoning. From the original description of your problem, (AI agents
interacting with each other) there's no fundamental requirement to run
each agent in a different process (unless there's something else you
didn't mention which makes it necessary) This is the crux of the
issue. This the reason why somebody earlier in this thread recommended
Java with (possibly) green threads. If you feel Java may have scaling
problems, you could extend the same concept to some other, possibly 
lighter-weight interpreted language (python, perl etc).  Essentially,
you would  be much better off trying to modify say, an existing
python, interpreter rather than trying to write a whole new  OS.

Of course a totally different approach might be to build
distributed server farm which would divide all these processes among
different nodes and would communicate over a fast subnet... That's a
very commonly used approach for heavy duty web servers etc. Security
etc. might still require you to modify a language interpreter though...


  Chetan
  


   
  

  



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

Date: Tue, 27 Jun 2000 13:59:25 -0600
From: Warren Young <[EMAIL PROTECTED]>
Subject: Re: nonblocking gethostbyname?

Philip Pearl wrote:
> 
> I've looked into this a number of times on different UNIX platforms and have
> been unable to find a non-blocking gethostbyname.  

There's the libresolv library, part of the BIND distribution.  Harder to
use than gethostbyname(), but far more powerful.

-- 
= Warren Young, maintainer of the Winsock Programmer's FAQ at:
=     http://www.cyberport.com/~tangent/programming/winsock/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

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

From: Bjorn Reese <[EMAIL PROTECTED]>
Subject: Re: About blocking IO?
Date: Tue, 27 Jun 2000 20:12:44 +0000

Mathias Waack wrote:

> #include <linux/poll.h>

And of course the man page for poll tells you to include <sys/poll.h>,
not <linux/poll.h>, which is a good idea if you, or somebody else,
want to port your application to another SUSv2 compliant platform in
the future.

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

From: "AndyD" <[EMAIL PROTECTED]>
Subject: Re: Good Basic compiler for linux?
Date: Tue, 27 Jun 2000 21:38:31 +0100

Not very helpful...

I don`t think the person posting the message was ASKING for your opinion on
BASIC or wished to see a list of your programming conquests.

Visual Basic is used by a great number of people & if linux has a comparable
application it would help it be adopted more in the real world.

A large number of people make a living programming in a variety of BASIC`s
and I for one would like to see a modern implementation of the language on
LINUX.

-AndyD

Brian J Luczkiewicz <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> If Basic were a worthwhile enough language that it were actually used for
> linux application development then there would be hundreds of these
> programs...Instead, we have extensively flexible and completely wonderful
> tools for linux such as egcs/gcc,binutils,gdb,etc...and if you really need
an
> interface builder use glade....it's not so bad either....I gave up basic
at 11
> for Assembler and shortly after, C....I tried visual basic and decided
that if
> you an't have source to the compiler, it's not worth using....
>
> Brian
>
>
> dave wrote:
>
> > I manage a small team of VB programmers and I am looking for a Basic
> > Compiler and IDE for Linux. I have seen Xbasic and some others but they
are
> > quite the quality I am looking for. I need a complete commercial package
> > with available support. Anyone know of such a product?
> >
> > thanks
> > [EMAIL PROTECTED]
>



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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Kernel 2.4 question
Date: 27 Jun 2000 20:36:56 GMT

In article <[EMAIL PROTECTED]>,
Todd Scheetz  <[EMAIL PROTECTED]> wrote:
| 
| I have a couple of questions regarding the capabilities of kernel 2.4
| with regards to file sizes. Specifically, is kernel 2.4 capable of
| accessing (reading and writing) files larger than 2 GB?

  Yes.
-- 
bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
  "Doing interesting things with little computers since 1979"(tm)
It doesn't bother me that people make flavored yogurt with fruits. It doesn't
bother me that someone makes caramel broccoli yogurt. It doesn't even bother
me that people buy it to rub on each other's naked bodies.
What DOES bother me is that people buy it to EAT!

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

Date: Tue, 27 Jun 2000 16:43:42 -0500
From: tabascox <[EMAIL PROTECTED]>
Subject: Re: How to crerate a library C++

Hi Kurt, thanks for the tip, but the problem is different:

In C++ I declare templates, for istance class tensor<double>
The declarations are in .h files while the implementations are in .cpp files.

Inside cpp files the implementations are done with templates, since all
possible
operation on my structures have the same algebra, for fload, double,
long-double,
complex, and also for class of class (tensor of tensors).

When I compile to get the library, the compiler doesnot know which
implementation
choose for the template, so my library is .... empty.
How can I force the compiler to compile the templates with
the data tipes I want, without rewriting all the implementations,
but using only the templates ??

Thanks

Stefano


Kurt Wall wrote:

> tabascox <[EMAIL PROTECTED]> wrote:
>
> > Hi Linux friends,
>
> > I am writing a set of math functions, in C++, and I would like to create
> > a simple library like, libXX.so libXX.a to link inside the program.
>
> libXX.so would be a shared library, while libXX.a typically denotes
> a static library.  To create a static library (assuming you're using
> gcc):
>
> $ gcc -c libXX.c -o libXX.o
> $ ar rcs libXX.a libXX.o
>
> Of course, add flags for libraries you're linking against and so forth.
>
> To create a shared library, again supposing you're using gcc:
>
> $ gcc -c -fPIC libXX.c -o libXX.o
> $ gcc -shared -Wl,-soname,libXX.so -o libXX.so.M.N.O libXX.o -lc
> $ ln -s libXX.so.M.N.O liberr.so
>
> "-fPIC" creates Position Independent Code that can link and load at
> any address - you need this for a shared library.
>
> "-shared" should be obvious "-Wl,-soname,libXX.so"  passes "-soname" to
> the linker, specifying an soname of "libXX.so" - apps typically link
> against a library's soname. "-lc" links the C library too, just in case
> your lib winds up on a system with a different C library version.
> "libXX.so.M.N.O" is the actual library file, where M, N, and O are
> the major, minor, and release version numbers.  The "ln" line creates
> a symbolic for the linker to use.
>
> Kurt
> --
> Old age is too high a price to pay for maturity.


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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: About blocking IO?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 27 Jun 2000 21:13:25 GMT

On Tue, 27 Jun 2000 20:12:44 +0000, Bjorn Reese <[EMAIL PROTECTED]>
wrote:
>Mathias Waack wrote:
>
>> #include <linux/poll.h>
>
>And of course the man page for poll tells you to include <sys/poll.h>,
>not <linux/poll.h>, which is a good idea if you, or somebody else,
>want to port your application to another SUSv2 compliant platform in
>the future.

But he's writing kernel code which implements a poll function.

-- 
#exclude <windows.h>

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

From: [EMAIL PROTECTED]
Subject: how to initialize a global instance
Date: Tue, 27 Jun 2000 23:29:15 GMT



I wrote a C++ program to verify how the global object to be constructed.

in myclass.h:
class MyClass
{
  public:
        int result;
        int ia, ib;
        MyClass();
        ~MyClass();
        int getResult();
};

in myclass.cc (implemented by C++)

#include "myclass.h"
void *operator new (size_t size)
{
  printk("calling new...\n");
  return kmalloc(size, GFP_KERNEL);
}

void operator delete (void *ptr)
{
  printk("calling delete...\n");
  kfree(ptr);
}

MyClass::MyClass()
{
  printk(KERN_INFO "MyClass constructor.\n");
  result = 0;
  ia = 5;
  ib = 14;
}

MyClass::~MyClass()
{
  printk(KERN_INFO "MyClass destructor.\n");
}

int MyClass::getResult()
{
  result = ia * ib;
  printk("result = %d\n", result);
  return result;
}

in main.c (implemented by C)

#include "lib1.h"

MyClass myClass;     // won't work (???)
//MyClass *myClass;  // work

extern "C" int init_module(void)
{
   ///////myClass = new MyClass();

   printk("init_module called.\n");

   printk("before getResult().\n");
   myClass.getResult();
   printk("after getResult().\n");

   return 0;
}

extern "C" void cleanup_module(void)
{
   printk("cleanup_module called.\n");
   //////delete myClass;
}

And, I use the following to compile/link.

g++ -fno-exceptions -D__KERNEL__ -DMODULE -c myclass.cc
ar cru myclass.a myclass.o
ranlib myclass.a
g++ -fno-exceptions -D__KERNEL__ -DMODULE -c main.c
ld -Ur main.o myclass.a -o mytest.o


The problem is when I try to initalize a global object, say MyClass
myClass, it won't call the constructor after loaded the mytest module.
But, if I use global instance pointer, say MyClass *myClass, it works.

How can I get a global instance sucessfully?
Thanks very much!




Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: Embedded Linux Login Problem ...
Date: Wed, 28 Jun 2000 01:11:24 +0200

Shane <[EMAIL PROTECTED]> writes:

>I am working on building my own version of an embedded Linux
>filesystem.  I have gotten to the point where I can boot the system into
>single-user mode; however, when booting using multiuser mode, I cannot
>log in.  What happens is that I type in a user name, then <enter> and
>then immediately I get a "Invalid Login" error.

Do you have /etc/nsswitch.conf? Do you have the shared name service
lookup files /lib/libnss_*.so? do you have /etc/passwd&/etc/shadow?

Perhaps you can include strace in your filesystem and use it on your
getty. You could start a shell without getty on an unused tty to run
strace on it.

However, most embedded systems do not need a login at all.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB  1483 30CE 9FB2 A047 9CE0
 Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5  8B98 9464 53FF 9382 F518

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: how to initialize a global instance
Reply-To: [EMAIL PROTECTED]
Date: Tue, 27 Jun 2000 23:42:09 GMT

On Tue, 27 Jun 2000 23:29:15 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
>
>The problem is when I try to initalize a global object, say MyClass
>myClass, it won't call the constructor after loaded the mytest module.

That's right; there is no support for this. The answer is not to rely on
any C++ global constructions, but rather acquire resources from your
init_module() function.

>But, if I use global instance pointer, say MyClass *myClass, it works.
>
>How can I get a global instance sucessfully?

You have to call the special hidden global construction function that is
generated into your module. 

When a user space C++ program is linked, the addresses of these functions are
collected by the linker into a global table. The CRT startup code iterates over
these functions and calls them. You don't have this in the kernel.

-- 
#exclude <windows.h>

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

From: Bhavin Shah <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Checking socket status (c/c++)
Date: Tue, 27 Jun 2000 18:18:48 -0700

Is there a way to check and see if a particular
socket descriptor is still connected?  I want
to check this before I send any data on it.

When I recv data from the socket using "recv()",
the appropriate errno gets set and I can catch
broken connections.  However, when I try and
send to this broken socket with "send", I
get a broken pipe message and my program halts.

Thanks,

Bhavin 


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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development
Subject: Re: Checking socket status (c/c++)
Reply-To: [EMAIL PROTECTED]
Date: Wed, 28 Jun 2000 01:25:37 GMT

On Tue, 27 Jun 2000 18:18:48 -0700, Bhavin Shah <[EMAIL PROTECTED]> wrote:
>Is there a way to check and see if a particular
>socket descriptor is still connected?  I want
>to check this before I send any data on it.

And what if it becomes disconnected before you actually send the data? (Do you
know what a race condition is?)

The way you use sockets is that you just try the operation and then deal with
the result.

>When I recv data from the socket using "recv()",
>the appropriate errno gets set and I can catch
>broken connections.  However, when I try and
>send to this broken socket with "send", I
>get a broken pipe message and my program halts.

That's because you program gets a SIGPIPE signal. You should either install a
handler for this signal, or set the action to SIG_IGN.  If the pipe signal is
ignored, then the send will return -1 with errno set to EPIPE, and you can deal
with the error.

-- 
#exclude <windows.h>

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


** 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.development.system) 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-Development-System Digest
******************************

Reply via email to