Linux-Development-Apps Digest #496, Volume #6     Tue, 4 Apr 00 19:13:20 EDT

Contents:
  Re: rpc from WNT to linux? (Peter Mortensen)
  Re: Is there a C++ compiler for linux that... (Peter Mortensen)
  Re: How compatible is Linux with .. Linux (Michael Martin)
  cursel 0.0.5 - curses based interpreter (David Stes)
  Re: lilo.conf ("Norm Dresner")
  Re: How compatible is Linux with .. Linux ("Peter T. Breuer")
  Re: Zero padding in sprintf() doesn't work for strings - HELP ! (Juergen Heinzl)
  struct passwd * ([EMAIL PROTECTED])
  Re: Call to close() crashes my program.  Why? (Juergen Heinzl)
  Re: struct passwd * ("Peter T. Breuer")
  Re: struct passwd * (Juergen Heinzl)
  Re: Shared memory allocator for Linux... ("Anthony W. Youngman")

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

From: [EMAIL PROTECTED] (Peter Mortensen)
Subject: Re: rpc from WNT to linux?
Date: Tue, 04 Apr 2000 19:17:10 GMT

On Tue, 04 Apr 2000 16:59:00 +0200, Maarten van Dootingh
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>How can I do RPC from Windows NT to linux?
>
>I hope somebody can help me, or give a reading reference.
>I've been searching now for 3 days, and all I found was some buggy alfa
>release DCE-RPC source that was almost 2 years old. I got it compiling
>and running with some adjustments for the new libraries, but it crached
>a lot.
>
>Or is it possible to use sunrpc on windows nt? How?
>
>Or is there a DCOM version available for linux that works without
>problems?
>
>
>greetings and thanks in advance.

I have used XML-RPC for distributed computing between 
Windows NT and Linux/Windows CLI. It is simple and easy to 
understand and implement. The spec is 2-3 pages: 
<http://www.xmlrpc.com/stories/storyReader$7>. XML-RPC for 
newbies/intro: 
<http://www.scripting.com/davenet/98/07/xmlRpcForNewbies.html>

Another possibility is SOAP.


More links at <http://www.protana.com/~pm/XML.html>. Search 
for RPC.









--

Regards,
Peter Mortensen

========================================================================
Peter Mortensen,        E-mail: [EMAIL PROTECTED]
Software Engineer, M.Sc.E.E.                 FAX: +45 63 15 20 40
Bioinformatics Application developer       Phone: +45 63 15 20 37 
Protana A/S                                       +45 63 15 20 30 (SwB)
http://www.protana.com/~pm/
DKK 14000 (US$ 2000) charge to accept unsolicited commercial messages.

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

From: [EMAIL PROTECTED] (Peter Mortensen)
Subject: Re: Is there a C++ compiler for linux that...
Date: Tue, 04 Apr 2000 19:24:18 GMT


>Hi,
>
>Is there a C++ compiler for linux that implements sstream and bitset?  
>
>Albert

It might just have been released; from 
<http://sourceware.cygnus.com/ml/libstdc++/2000-q1/msg00410.html>:

. 
. 
. 

  http://sourceware.cygnus.com/libstdc++/


New: 
--- 

. 
. 
. 

  - SGI's strstream implementation has been added.


. 
. 
. 



--

Regards,
Peter Mortensen

========================================================================
Peter Mortensen,        E-mail: [EMAIL PROTECTED]
Software Engineer, M.Sc.E.E.                 FAX: +45 63 15 20 40
Bioinformatics Application developer       Phone: +45 63 15 20 37 
Protana A/S                                       +45 63 15 20 30 (SwB)
http://www.protana.com/~pm/
DKK 14000 (US$ 2000) charge to accept unsolicited commercial messages.

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

From: Michael Martin <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: Re: How compatible is Linux with .. Linux
Date: Tue, 04 Apr 2000 15:05:07 -0500

"Peter T. Breuer" wrote:
> 
> In comp.os.linux.development.system The Wogster <[EMAIL PROTECTED]> wrote:
> 
> :>I am talking to an equal, not a client. That's left to the oily people
> :>up front.
> 
> : uh, anyone in an organization, can and does deal with clients, in my current
> 
> Quite possibly (GHT). But I wasn't.
> 
> : multimedia engineer book-keeper and salesforce all rolled into one.  A good
> : estimate is now, close to 50% of the people who work in the computer
> 
> You are including the 50% of webpage makers and graphic artists!
> 
> :>: not technically proficient, that we were all there once.  There are also
> :>: people who are technically excellent, that have not previously worked with
> :>: Linux, who would ask this very question.  Beleive me, there are tonnes of
> :>: them out there.
> :>
> :>Then they don't deserve any respect in software engineering terms. They
> :>haven't gone to a college course, even. The question was naive and
> :>ig'rant.
> 
> : Not always, here is a scenario, take a guy who has a Comp. Sci. PhD, his
> : college had received a nice donation from Sun, the workstations were Sun,
> 
> Perfectly normal situation, and one which trains you quickly in the
> meaning of shared libraries, configuration file placements, and
> incompatibilities between OS revisions IF you are administering your
> own machine. Please bring back SunOS. I liked it.
> 
> : the servers were Sun,  his PC runs Solaris on Intel.  He now works for a
> : company that produces Unix software, they want to get on the Linux
> : bandwagon, and have assigned him to research it.  The question how
> 
> Yes, I can see your model. You are talking about someone who has a lot
> of theoretical knowledge, but not a lot of practical knowledge. Such a
> person will learn very, very fast. It's a possible explanation. And
> indeed it would account for the naivity and ignorance that I commented
> on.
> 
> : compatable are OpenLinux, Red Hat, Debian, Corel, Mandrake et al, is a very
> 
> It is an appropriate question ...
> 
> : appropriate one.   Same goes for someone who comes from a Windows, Netware,
> 
> ... and one that is easily answered by reading the distro's faqs, and
> the linux faq too!
> 
> : VMS, HPUX, AIX, Irix, MVS, VSE or other environment.   Heck, three years
> : ago, I could have asked the same question!
> 
> OK, what IS the difference between VMS and MVS, then! Apart from the
> first letter (of their manufacturer).

Sorry, but I really can't resist this opening. Only a very naive,
ignorant
person would have to ask this question!


> 
> : Wogster
> 
> Peter

-- 

================================
Michael Martin
[EMAIL PROTECTED]
(713) 918-2631
================================

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

From: David Stes <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer
Subject: cursel 0.0.5 - curses based interpreter
Date: Tue, 04 Apr 2000 20:12:10 GMT


This is to announce version 0.0.5 of "CURSEL", a (freeware) package for
building curses (character terminal) interfaces for Linux and Unix.

It's designed to be compatible with Unix "FMLI", the "Forms and Menus
Language Interpreter".

CURSEL uses the ETI (extended terminal interface) of System V UNIX (as
also available for Linux, the "ncurses" libraries "libmenu" and
"libform").

        http://users.pandora.be/stes/cursel-0.0.5a.tar.gz

This package has been compiled on SCO OpenServer and Linux; it should
work okay on most System V Unix systems and BSD systems with the
extended terminal interface.  Compilation instructions are in the
included INSTALL file.

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

Reply-To: "Norm Dresner" <[EMAIL PROTECTED]>
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: lilo.conf
Date: Tue, 04 Apr 2000 20:22:15 GMT


Michael Faurot <[EMAIL PROTECTED]> wrote in message
news:8cbtq8$50f$[EMAIL PROTECTED]...
> Chris <[EMAIL PROTECTED]> wrote:
> : Re: Linux 6.1RH I have added ---> append='mem=256M' and I don't appear
> : to have the whole memory recognized. Any suggestions ? Have I done
> : something wrong in the setup ?
>
> Did you run lilo afterwards, to rewrite the MBR, and then reboot?
>
    ABSOLUTELY.
        Even though  man lilo and man lilo.conf imply that the loader reads
lilo.conf, it's not true.  It reads a special "file" accessable to the boot
loader because lilo puts it in a known place.  The "file" that lilo puts
there is derived from lilo.conf but in a much more compact format.

    Norm
> --
> --------------------------------------------------------------------------
----
>  Michael | mfaurot  | May your camel be as swift as the wind.
>  Faurot  | atww.net |


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

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system
Subject: Re: How compatible is Linux with .. Linux
Date: 4 Apr 2000 20:41:23 GMT

In comp.os.linux.development.system Michael Martin <[EMAIL PROTECTED]> wrote:
:> : VMS, HPUX, AIX, Irix, MVS, VSE or other environment.   Heck, three years
:> : ago, I could have asked the same question!
:> 
:> OK, what IS the difference between VMS and MVS, then! Apart from the
:> first letter (of their manufacturer).

: Sorry, but I really can't resist this opening. Only a very naive, ignorant
: person would have to ask this question!

Oh, I'm ignorant about VMS and MVS alright!  Just to prove it, I rather
think that MVS was the multiuser sliced system on the big ibm's back at
uni in the old days, and which I never touched, since I was on JANET
instead - but I got to go to the same room at nights and watch the
history students typing up their theses while Piet Brookes twiddled his
toes!  The computer I was on actually had an answer to "help god"
(appeals to the deity must be made directly and not via the XYZ9000).
And "help bus".  That one I'll leave to your imagination. I wonder
what computer it was? It wasn't MVS, obviously. Maybe it was unix!
Nah ... it was something else altogether. 

I guess that means VMS must be digital's?  Gee, I think I'll look it up
in the dictionary of computing ... It's about time I found out. It's
probably in the comp.os faq ... OK OK. The vms faq is at

   www.geocities.com/SiliconValley/Lakes/9999/vms.html

and I've read it now. Yes, VMS is digital's. For VAX and Allpha. Wow,
there's OpenVMS and linux on VMS! I didn't get a flavour from a quick
read, however. Which was that system that insisted on making backups
of your file every time you edited it? With colons in. I _think_ that
was MVS. It's been a couple of decades. If so, it's still in use in
backup-conscious places.

I wonder how compatible VMS is with MVS ... ;)

Peter


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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Crossposted-To: comp.os.linux.development.system
Subject: Re: Zero padding in sprintf() doesn't work for strings - HELP !
Date: Tue, 04 Apr 2000 20:58:06 GMT

In article <8caudm$uef$[EMAIL PROTECTED]>, bill davidsen wrote:
>
>In article <[EMAIL PROTECTED]>,
>Stephen Harris <[EMAIL PROTECTED]> wrote:
>| Juergen Heinzl ([EMAIL PROTECTED]) wrote:
>| : In article <8briic$ofu$[EMAIL PROTECTED]>, bill davidsen wrote:
>|
>| [ Re 0 padding of strings ]
>|
>| : >  Another reason why it should be changed. Both AIX and hp-ux pad with
>| : >zeros as expected, so it would be at minimum acceptable to do it that
>|
>|
>| : ... conversions and the same as far as the Unix98 specification
>| : is concerned, so your installations of AIX and HP-UX are doing it
>| : wrong and you might see whether there is an appropriate patch.
>|
>| Solaris 7 does it with zero's as well, although the manpage doesn't
>| say it should :-)
>|
>| It sort of makes sense - if you want space padding, then the default syntax
>| without a zero does that for you.
>
>  I've given up on this one, there are people who blindly assume that
>"anything not required is forbidden." The standard requires zero padding
>on numerics, and the fact that most other operating systems allow it on
>strings, or that this is useful behaviour, does not reach them.

No, it does not reach me writing code that is free to break a./o.
does not work on some other installation is a good idea.

Once upon a time I was using undocumented system calls too. I ceased
to do that when leaving DOS 3.1 behind for something better.

[...]
>  And there isn't any overly simple way to do it yourself, you actually
>need a string with the zeros (or a loop, even worse). If I really had to
>have this behaviour I would write a small procedure to accept a string
>and width and return a string with the proper number of leading zeros.
>Not a hard problem, just one more bit of cruft floating through your
>code.
[...]
... which you are going to need even so, as no-one is going to
guarantee the buggy version will work. I prefer to leave work earlier
to sorting out other peoples' `clever' hacks, that is all.
[...]

Happy hacking, for better or worse 8-]
Juergen

-- 
\ Real name     : Jürgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: [EMAIL PROTECTED]
Subject: struct passwd *
Date: Tue, 04 Apr 2000 20:50:03 GMT

hey all,

ok why does this program result in a SEGV? On solaris the exact code
does not. Am I missing something, like the result is protected memory
and when you try to free it, it will not let you? Any assistance would
be appreciated!

tia,
robert
[EMAIL PROTECTED]

#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/types.h>

int main(void)
{
    struct passwd *myp;

    myp = getpwuid(1033);

    if (myp != (struct passwd *) NULL)
    {
        printf("User name = %s\nUser password = %s\nUser id = %d\nGroup
id = %d\nReal name = %s\nHome Directory = %s\nShell program = %s\n",
myp->pw_name, myp->pw_passwd, myp->pw_uid, myp->pw_gid, myp->pw_gecos,
myp->pw_dir, myp->pw_shell);

        if (myp != (struct passwd *) NULL)
        {
            free(myp);
        }
    }
    else
    {
        printf("Unable to find the user.\n");
    }
    return(0);
}


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

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Call to close() crashes my program.  Why?
Date: Tue, 04 Apr 2000 22:00:12 GMT

In article <[EMAIL PROTECTED]>, Richard Rowell wrote:
>   int fh;
>    if ((fh = open(filename, O_RDONLY)) < 0)
>    {
>      perror("Opening send file");
>      return;
>    }
>
>    char buff[64];
>
>    int i_result;
[...]
One bug here ...
>    while((i_result=read(fh,buff,64)) > 0 )
... ssize_t i_result; /* sizeof( ssize_t ) >= sizeof( int ) !! */
[...]
    
>      write(fh_writer,buff,i_result);
>
>    //this close crashes the program if un-commented
>    //close(fh);
[...]
Okay, this one is interesting as even if fh is crap close() ought
to return an error and nothing else. I assume the real error is
somewhere else .. use a debugger.
[...]

Cheers,
Juergen

-- 
\ Real name     : Jürgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: struct passwd *
Date: 4 Apr 2000 22:18:08 GMT

[EMAIL PROTECTED] wrote:
: hey all,

: ok why does this program result in a SEGV? On solaris the exact code
: does not. Am I missing something, like the result is protected memory
: and when you try to free it, it will not let you? Any assistance would

You certainly don't know, so YOU certainly shouldn't even think about
freeing it! I seem to recall the man page says it's a static ... No it
doesn't:

       The getpwuid() function returns a pointer to  a  structure
       containing   the   broken   out  fields  of  a  line  from
       /etc/passwd for the entry that matches the user uid uid.

So you can't assume anything. And therefore you can't assume you can
free it!

: be appreciated!

: {
:     struct passwd *myp;

:     myp = getpwuid(1033);

:         if (myp != (struct passwd *) NULL)
:         {
:             free(myp);
:         }


Peter

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: struct passwd *
Date: Tue, 04 Apr 2000 22:40:04 GMT

In article <8cdkhk$p98$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
>hey all,
>
>ok why does this program result in a SEGV? On solaris the exact code
>does not. Am I missing something, like the result is protected memory
>and when you try to free it, it will not let you? Any assistance would
>be appreciated!
>
>tia,
>robert
>[EMAIL PROTECTED]
>
>#include <stdio.h>
>#include <stdlib.h>
>#include <pwd.h>
>#include <sys/types.h>
>
>int main(void)
>{
>    struct passwd *myp;
>
>    myp = getpwuid(1033);
>
>    if (myp != (struct passwd *) NULL)
>    {
>        printf("User name = %s\nUser password = %s\nUser id = %d\nGroup
>id = %d\nReal name = %s\nHome Directory = %s\nShell program = %s\n",
>myp->pw_name, myp->pw_passwd, myp->pw_uid, myp->pw_gid, myp->pw_gecos,
>myp->pw_dir, myp->pw_shell);
>
>        if (myp != (struct passwd *) NULL)
>        {
>            free(myp);
>        }
[...]

getpwuid() returns the address to a struct passwd, that is true. It
is true too, that might allocate memory on the heap.

Now nowhere it is said that struct passwd* == start address of the
allocated memory block on the heap !!

In other words, the library functions are free to do something like ...
p = malloc( 1234 );
...
return p + 42;
... since they may take care of allocated memory internally *or* the
returned address may address a static memory area, to be re-used the
next time the functions is being called; this is implementation
dependent.

How free( ... ) behaves if called with an invalid address is, tough
luck, implementation dependent too. IMHO the Linux manual and info
pages are not clear enough here as they do not mention the returned
address might be the one of a static memory area etc. etc.

Cheers,
Juergen

-- 
\ Real name     : Jürgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: "Anthony W. Youngman" <[EMAIL PROTECTED]>
Subject: Re: Shared memory allocator for Linux...
Date: Tue, 4 Apr 2000 00:24:07 +0100
Reply-To: "Anthony W. Youngman" <[EMAIL PROTECTED]>

In article <[EMAIL PROTECTED]>, Andreas Rottmann
<[EMAIL PROTECTED]> writes
>Paul Douglas <[EMAIL PROTECTED]> writes:
>
>> As I understand it.. neither of these ways will let me reference shared data
>> between processes by passing a pointer value only.
>> 
>> Mmap maps the common area into each process' space so while each process
>> will be able to manipulate common structures.. each structure in that common
>> area will have a different pointer value depending on the process.
>> 
>> What I'm trying to find out is if there is a way to allocate a portion of
>> shared memory and that all processes be able to reference data structures in
>> that common area by the same/common address.
>> 
>I can't image why anyone wants to do so with processes -- thats what
>threads were invented for!
>
Except as I understand it, threads only work within one instance of one
program ...

I want to implement a locking table. The easiest way to do that is
shared memory. And if I've got 10 users on 10 different logins, threads
is NOT an option :-)
-- 
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
Trousers with a single hole in their waistband are topologically equivalent
to a doughnut. These sugarcoated trousers have yet to catch on at fast-food
outlets! (SuperStrings by F. David Peat)


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


** 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.apps) 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-Apps Digest
******************************

Reply via email to