Linux-Development-Sys Digest #236, Volume #8 Wed, 25 Oct 00 20:13:13 EDT
Contents:
Re: Memory Allocation Problem (Philip Armstrong)
Re: ModSSL/Linux 6.1/Apache (Fabien Voland)
Re: _findfirst, _findnext from win32? ("Norman Black")
Re: Microsoft Linux API? ("Brandon Van Every")
Re: Microsoft Linux API? ("Brandon Van Every")
Re: msgrcv/msgsnd error ("Brad Taylor")
www.soft-profi.de Green&Blue Card. ������ � �������� �������� ��� IT-������������
("Soft Profi Team www.soft-profi.de")
Re: unexpected sorting order? (Juha Laiho)
Re: Question - make remote block dev look like local ("Les Mikesell")
Re: makefile (Jeff Andre)
Re: Question - make remote block dev look like local (Jeff Andre)
problem about ip_forward on 2.2.14 (wolf)
Re: Microsoft Linux API? (Alexander Viro)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: Memory Allocation Problem
Date: 25 Oct 2000 18:54:34 +0100
In article <39f6d3a3$[EMAIL PROTECTED]>,
Michael Schoettner <[EMAIL PROTECTED]> wrote:
>I want to allocate a virtual memory block and I want to suggest a starting
>address (like VirtualAlloc in MS-Windows). Does anybody know the proper
>system call? A short e-mail would be great.
Telling us *why* you want to do this would be a good start. Often the
'windows way' isn't the same as the 'unix way' .
However, if you look at the mmap(2) man page you'll see that it takes
a void * parameter as a hint to the kernel as to where you'd like the
address to be mapped to.
Note that this is a *hint*. The kernel can map the mmapped file into
your processes virtual memory space anywhere it likes. YMMV.
Phil
--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
------------------------------
From: [EMAIL PROTECTED] (Fabien Voland)
Subject: Re: ModSSL/Linux 6.1/Apache
Date: Wed, 25 Oct 2000 19:35:13 GMT
En date du Wed, 25 Oct 2000 18:39:35 GMT, de [EMAIL PROTECTED]
(Kaz Kylheku), a �crit:
>On Wed, 25 Oct 2000 18:34:54 GMT, Fabien Voland <[EMAIL PROTECTED]> wrote:
>>Hi, thanks for your answer.
>>
>>En date du Wed, 25 Oct 2000 16:05:05 +0200, de
>>"[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, a �crit:
>>
>>>Hi,
>>>
>>>It is best to compile from source,
>>
>>Can you tell me why ? (I'm novice in Redhat 6.1).
>
>Because if you compile the source code, then the resulting executable will be
>perfectly matched to the versions of libraries you have on your system. People
>who compile their own binaries are strangers to shared library versioning
>headaches.
Ok, thanks. But just a question : between the version of Apache
distribued with Redhat and the source code only of Apache, is it a
difference ?
Thanks.
Fabien
====================================================
>From Anywhere
====================================================
------------------------------
From: "Norman Black" <[EMAIL PROTECTED]>
Subject: Re: _findfirst, _findnext from win32?
Date: Wed, 25 Oct 2000 13:42:20 -0700
Reply-To: "Norman Black" <[EMAIL PROTECTED]>
> For instance, because MSDOS derivatives do not glob in the shell,
> MSDOS programs have taken on the effort of performing the globbing
> within their own code (i.e. TYPE *.TXT would result in TYPE.EXE
> invoking the findfirst()/findnext() API). On Linux (as in Unix),
> filename globbing is (typically) performed at the shell, and is
> (usually) unnecessary within the program (i.e. cat *.txt would result
All fine and well as long as the wildcard match (glob) comes via the command
line, via the shell. What if the wild card is given some other way.
>From a file, from a prompt in a dialog, or anything other than the shell
command line.
My own application has directory lists, and I search those. It is not worth
mentioning the details. I just use opendir...readdir_r...fnmatch...closedir.
Implementing a findfirst, findnext, findclose is a simple and portable way
to have code that runs on Unix and Microsoft platforms with no code changes,
other than obviously the implementation of the find API calls themselves. My
own code follows this approach. Nothing ever calls the operating system
directly, since all such activity goes through an encapsulation.
File/directory access, sockets, threads, exec, redirection exec, memory
mapped files, shared memory, debugger interface, and even all GUI all go
through encapsulations. No operating system types, constants or procedures
exist in the encapsulation interface. Most encapsulations are very thin and
trivial, some are not. Such encapsulations can also help in Unix <-> Unix
ports, since some differences can exist.
I personally would rather encapsulate than recode for each system.
--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom
"Lew Pitcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Wed, 25 Oct 2000 18:46:02 GMT, [EMAIL PROTECTED] (Kaz
> Kylheku) wrote:
>
> >On Wed, 25 Oct 2000 18:43:38 GMT, Lew Pitcher <[EMAIL PROTECTED]>
wrote:
> >>On Wed, 25 Oct 2000 19:18:37 -0000, "Igor Bobalo"
> >><[EMAIL PROTECTED]> wrote:
> >>
> >>>Hi.
> >>>
> >>>I'm porting some system routlines from win32 platform to linux. Is
there are
> >>>some replacement for _findfirst, _findnext function?
> >>Not directly. opendir(), readdir() and family are the directory
> >>functions (one flavour at least), but they don't support globing.
> >
> >Note that readdir() returns a pointer to static storage, so it is not
thread
> >safe. I recommend readdir_r() or getdents() in code that may need to be
thread
> >safe in the future.
>
> I qualified readdir() as "one flavour of directory functions" because
> I didn't have my references handy, and am in a CYA mode today <g>.
>
> I'm pleased to learn that my memory isn't completely faulty, as I
> would have hoped that you would correct me if I had misstated things.
>
> I still maintain that, if a porting exercise becomes a task of
> rewriting the environment from which the program is derived (i.e.
> building a findfirst() equivalent), then there's something
> questionable with the design or implementation of the program being
> ported. Rather than "look for the equivalent" of a platform-specific
> API, porting should "look for how" other implementations on the
> platform usually solve the problem.
>
> For instance, because MSDOS derivatives do not glob in the shell,
> MSDOS programs have taken on the effort of performing the globbing
> within their own code (i.e. TYPE *.TXT would result in TYPE.EXE
> invoking the findfirst()/findnext() API). On Linux (as in Unix),
> filename globbing is (typically) performed at the shell, and is
> (usually) unnecessary within the program (i.e. cat *.txt would result
> in the shell globbing *.txt into a list of filenames into the
> commandstring before the program is executed, and 'cat' just looks
> through a list of completed filenames). If someone were to port an
> MSDOS program that used findfirst()/findnext() in this manner, then
> the effort of emulating findfirst()/findnext() in Linux would be of
> minimal benefit (I'd say no benefit at all) to the program.
>
>
>
> Lew Pitcher
> Information Technology Consultant
> Toronto Dominion Bank Financial Group
>
> ([EMAIL PROTECTED])
>
>
> (Opinions expressed are my own, not my employer's.)
------------------------------
From: "Brandon Van Every" <[EMAIL PROTECTED]>
Subject: Re: Microsoft Linux API?
Date: Wed, 25 Oct 2000 20:56:58 GMT
<[EMAIL PROTECTED]> wrote in message
news:8t127s$koh$[EMAIL PROTECTED]...
> Feature for
> feature, if the Linux community comes out with apps exponentially
> for linux, this would be a driving force that will make it the most
> popular OS.
Nobody comes out with apps exponentially. Apps take time and
development dollars. Volunteer freeware enthusiasts cannot create apps
exponentially because they don't have enough available free time to work
on them. Bills gotta be paid and all of that.
Your best hope regarding the Microsoft Windows+Word leveraging scenario
is that the justice department smashes Microsoft up into separate app
and OS units. Failing that, you're SOL. Leverage is leverage.
> Linux must play to the human psychie.
Linux was created by people who weren't interested in the human psyche,
but rather the engineering under the hood. If you rely primarily on
marketroids to move the product, then you will not have anything
different than what Microsoft or Apple ever produced.
I think what Linux really needs is usability. Linux should try to win
by doing the same jobs better than the competitors. That means
acknowledging what the rest of the world considers those jobs to be,
i.e. the rest of the world does *not* think that tweaking text scripts
by gurus is usability.
--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA
------------------------------
From: "Brandon Van Every" <[EMAIL PROTECTED]>
Subject: Re: Microsoft Linux API?
Date: Wed, 25 Oct 2000 20:59:13 GMT
"J.H.Delaney" <[EMAIL PROTECTED]> wrote in message news:IxjJ5.26172
>
> Will never happen. Sure, Microsoft 'ports' some apps to linux, but...
Its
> **BINARYS** they deliver, not source code. People that love linux,
love it
> because they can modify anything they want. Cant do that with binarys.
That's true today. As Linux grows, you will have more and more people
who could care less about the source code and just want the job to get
done reliably. If you posit a Linux world where all Linuxen insist on
source code, you are positing a Linux world that cannot grow. The
market for developer hackers is only so big.
--
Cheers, www.3DProgrammer.com
Brandon Van Every Seattle, WA
------------------------------
From: "Brad Taylor" <[EMAIL PROTECTED]>
Subject: Re: msgrcv/msgsnd error
Date: Wed, 25 Oct 2000 16:01:32 -0500
I am not sure what you mean by "it has to be running"....following is the
receive code with the debug:
============================================================================
=
int SC_receive_message(int iMsgq,
AGENT_MESSAGE * spAgentMsg,
int iMsglen,
long lId)
{
int iRc;
if (iDebug)
{
sprintf(caErrMsg,"scmsgio SC_receive_message
pre,Msgq=%d,Msglen=%d,Id=%d",
iMsgq,iMsglen,lId);
SC_log_message(LOG_DEBUG,caErrMsg);
}
iRc = msgrcv(iMsgq, (void *)spAgentMsg, iMsglen, lId, 0);
if (iRc < 0)
{
sprintf(caErrMsg,"msgrcv error");
SC_log_message_errno(LOG_CRIT,caErrMsg);
}
if (iDebug)
{
sprintf(caErrMsg,"scmsgio SC_receive_message post,Msgq=%d,Rc=%d,Id=%d",
iMsgq,
iRc,
lId);
SC_log_message(LOG_DEBUG,caErrMsg);
SC_hex_dump(spAgentMsg,sizeof(*spAgentMsg));
}
return iRc;
}
following is the send code
============================================================================
=
int SC_send_message(int iMsgq, AGENT_MESSAGE * spAgentMsg, int iMsglen)
{
int iRc;
if (iDebug)
{
sprintf(caErrMsg,"scmsgio - about to write message q=%d, len=%d, id=%d",
iMsgq,iMsglen,spAgentMsg->sMsgHdr.lMsgID);
SC_log_message(LOG_DEBUG,caErrMsg);
}
iRc = msgsnd(iMsgq, (struct msgbuf *)spAgentMsg, iMsglen, 0);
if (iRc < 0)
{
sprintf(caErrMsg,"msgsnd error");
SC_log_message_errno(LOG_CRIT,caErrMsg);
}
if (iDebug)
{
SC_hex_dump(spAgentMsg,sizeof(*spAgentMsg));
}
return iRc;
}
Following are the structures:
============================================================================
=
struct message_t
{
long lMsgID;
};
typedef struct message_t MESSAGE;
struct agent_buffer_t
{
TRAN_HEADER sTranHeader;
JOBTRAN sJobtran;
};
typedef struct agent_buffer_t AGENT_BUFFER;
struct agent_message_t
{
MESSAGE sMsgHdr;
AGENT_BUFFER sAgentBuffer;
};
typedef struct agent_message_t AGENT_MESSAGE;
"ChromeDome" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Brad Taylor wrote:
> >
> > I have three processes which communicate via msgsnd/msgrcv.
> > P1 - msgsnd with id=1
> > P2 - msgrcv with id=1...(work)...msgsnd with id=2
> > P3 - msgrcv with id=2
> >
> > When I first bring up my apps the message flows correctly, as described
> > above. Upon subsequent sends when P1 does the send, immediately P3
wakes up
>
> If P3 is really only reading message type 2 and P1 is really only
> sending message type 1, then your error has to be in the debug print
> from P2. It has to be running :-).
>
> I'm not familiar with the "quota_on" state, but could it have to do with
> printing?
>
> Gene
>
> --
> ChromeDome
> "Anyone who wants to be elected shouldn't be" - Will Rogers
------------------------------
From: "Soft Profi Team www.soft-profi.de" <[EMAIL PROTECTED]>
Subject: www.soft-profi.de Green&Blue Card. ������ � �������� �������� ���
IT-������������
Date: Thu, 26 Oct 2000 01:22:51 +0400
Reply-To: "Soft Profi Team www.soft-profi.de" <[EMAIL PROTECTED]>
www.soft-profi.de Green&Blue Card. ������ � �������� �������� ���
IT-������������
------------------------------
From: Juha Laiho <[EMAIL PROTECTED]>
Subject: Re: unexpected sorting order?
Date: 25 Oct 2000 18:24:55 +0300
Ronald Cole <[EMAIL PROTECTED]> said:
>Now imagine my surprise when I discover that, on my new RedHat 7.0
>installation, sorting seems to be folding lowercase to uppercase to
>determine sort order!
>
>$ echo "Z
>> a" | sort
>a
>Z
...
>However, ls seems to "do the right thing" (i.e., what I expected):
>
>$ ls -1
>Z
>a
>
>LANG is set to "en_US" and there are no LC_* environment variables set
>(so no LC_COLLATE). What gives? Am I locale challenged, or what?
>Please clue me.
Yep, it's locales. Why 'ls' works, I don't know -- perhaps it's not compiled
with locale support. I think one of the worst effects is:
- what happens with 'rm [a-z]*'?
As known, typically, that'd have removed only files starting with
a lowercase letter. In present RHs this would remove anything
staring with a letter other than 'Z' (uppercase). This already happened
with RH 6.2 if you were using bash2 as your shell. bash 1.x apparently
wasn't locale-aware.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a- C++ UH++++$ UL++++ P+@ L+++ E(-) W+$@ N++ !K w !O
!M V PS(+) PE Y+ PGP(+) t- 5? !X R tv--- b+ DI? D G e+ h--- r+++ y+
"...cancel my subscription to the resurrection!" (Jim Morrison)
------------------------------
From: "Les Mikesell" <[EMAIL PROTECTED]>
Subject: Re: Question - make remote block dev look like local
Date: Wed, 25 Oct 2000 22:47:40 GMT
"Don Carroll" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Is there a way to make remote block dev look like local dev
>
> make a Linux Appliance with a cdrom or dvd drive and make it accessable
> with /dev/cdrom on another Linux system
>
>
> i.e. small linux device in stereo rack networked to Linux server in
> computer closet
The usual way is to mount the drive on it's local machine, then export
and remotely mount with NFS, but that won't work if you are after
the audio tracks on the CD. Someone has done a network block
device with an intended application of mirroring hard drives over
the network, but I would think you would be better off with some
sort of audio-streaming server feeding the network from the box
that has the drive.
Les Mikesell
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: makefile
Date: 25 Oct 2000 22:34:29 GMT
Mikael Chambon ([EMAIL PROTECTED]) wrote:
: Hello,
: I have a Makefile that procude a shared library, on linux we have to use
: -shared and
: under solaris we have to use -G, because of that i Have two Makefile.
: Can someone tell how to make only one Makefile.
: I mean, i thing that I should use a conditionnal statement that look the
: architecture, but
: how to do this ??
We use GNU make for all products because it's portable across
all of the platforms. At the beginning of a common set of
make rules:
ifndef PLATFORM
PLATFORM := $(shell uname -s)
endif
ifneq ($(findstring $(PLATFORM),linux Linux LINUX),)
override PLATFORM := linux
endif
ifneq ($(findstring $(PLATFORM),sunos SunOS SUNOS solaris Solaris SOLARIS),)
override PLATFORM := solaris
endif
At the end of this file:
-include Makerules.$(PLATFORM)
In the platfrom specific make rules we do things like this for
Solaris:
LDFLAGS += -G
and for Linux:
LDFLAGS += -shared
We used to do:
ifeq ($(PLATFORM),solaris)
LDFLAGS += -G
endif
ifeq ($(PLATFORM),linux)
LDFLAGS += -shared
endif
But it got too messy for 6+ platforms.
--
Jeff Andre
------------------------------
From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: Question - make remote block dev look like local
Date: 25 Oct 2000 22:52:41 GMT
Don Carroll ([EMAIL PROTECTED]) wrote:
: Is there a way to make remote block dev look like local dev
: make a Linux Appliance with a cdrom or dvd drive and make it accessable
: with /dev/cdrom on another Linux system
: i.e. small linux device in stereo rack networked to Linux server in
: computer closet
Can you simply export the file system on /dev/cdrom and let
the other systems NFS mount it? Otherwise you could look into
the network block device driver.
--
Jeff Andre
------------------------------
From: wolf <[EMAIL PROTECTED]>
Subject: problem about ip_forward on 2.2.14
Date: Wed, 25 Oct 2000 10:16:13 +0800
Hello , everyone
Recently I came up with two confusing problem on kernel 2.2.14 when I
was going to configure my machine to work as a router.
(1) It is said to make Linux machine a router, the only thing to do is
enable IP_FORWARDING. I dit it on 2.2.5, it works well. But on 2.2.14,
I couldn't make it. Why ?
(2) On 2.2.14, first I got one nameserver, everything went well. But
after another nameserver was added through netconf, the machine seemed
to have difficulty in contacting the hosts in the same subnet. The rrt
time took up to 2000 ms, which is quite unusual. I have no idea what has
happened .
Thanx in advance .
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: Microsoft Linux API?
Date: 25 Oct 2000 19:41:33 -0400
In article <BQHJ5.23885$[EMAIL PROTECTED]>,
Brandon Van Every <[EMAIL PROTECTED]> wrote:
>done reliably. If you posit a Linux world where all Linuxen insist on
>source code, you are positing a Linux world that cannot grow. The
>market for developer hackers is only so big.
Slightly OT: are these references to growth as the Absolute Goal(tm) a
sort of cultural thing? Never really managed to understand them. Sure,
if I insist on being able to fit into a normal chair there _is_ a limit
to, erm, growth, but what's wrong with that?
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
** 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
******************************