Port code from Solaris to Linux

L

Leo Calado

Hi,

I begin porting an application originally write on Solaris, using some
functions from libgen and other.

If anybody have some documents which help me on this porting I
appreciate much.

Any comparative or alternative functions for common functions on
Solaris environment to Linux.

Actually I try compile in REL5 using GCC with this configuration:

gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-libgcj-multifile --enable-
languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --
disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-
gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)

Before I have this:

gcc -v
Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/
ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
 
T

Tim Prince

Leo said:
I begin porting an application originally write on Solaris, using some
functions from libgen and other.

If anybody have some documents which help me on this porting I
appreciate much.

Any comparative or alternative functions for common functions on
Solaris environment to Linux.

Actually I try compile in REL5 using GCC with this configuration:

It looks like your questions are well off the topic of standard C. If
you have questions related to porting to newer versions of gcc, the
gcc-help list should be the place. Sign up on http://gcc.gnu.org
You might even get leads there about OS specific questions.
 
K

Kenny McCormack

It looks like your questions are well off the topic of standard C. If
you have questions related to porting to newer versions of gcc, the
gcc-help list should be the place. Sign up on http://gcc.gnu.org
You might even get leads there about OS specific questions.

IOW:

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

--
Useful clc-related links:

http://en.wikipedia.org/wiki/Aspergers
http://en.wikipedia.org/wiki/Clique
http://en.wikipedia.org/wiki/C_programming_language
 
L

Leo Calado

I'm not talk about porting to other compile, I talk about porting a
small C application it was originally written on Solaris and use a
small set of own functions. I need only some help to port this code to
Linux. Only this.
 
I

Ian Collins

Leo said:
Hi,

I begin porting an application originally write on Solaris, using some
functions from libgen and other.

If anybody have some documents which help me on this porting I
appreciate much.

Any comparative or alternative functions for common functions on
Solaris environment to Linux.
Anything from standard C will be common and so should anything from
Posix. Once you go beyond common standards, you'll have to ask on a
Linux group.
 
S

Stephen Sprunk

Leo Calado said:
I begin porting an application originally write on Solaris, using some
functions from libgen and other.

If anybody have some documents which help me on this porting I
appreciate much.

Any comparative or alternative functions for common functions on
Solaris environment to Linux.

<OT>
If your code is reasonably POSIX compliant, you shouldn't have many
problems. Just try compiling it and see what linker errors pop up; check
out the missing functions and determine if there's a POSIX replacement
that'll work on both systems. If not, you may need to add some #ifdefs that
compile alternate code depending on where you're compiling it. The folks on
comp.unix.programmer should be helpful.

If it's a big project and/or you'll be porting to other UNIX-ish platforms
in the future, you may also want to look into GNU Autotools.
</OT>

S
 
T

Tor Rustad

Leo said:
I'm not talk about porting to other compile, I talk about porting a
small C application it was originally written on Solaris and use a
small set of own functions. I need only some help to port this code to
Linux. Only this.

When C90 code, can compile without a warning using:

gcc -ansi -pedantic -W -Wall ...

it's easy.

My current SW project, I perform unit testing on Windows, the system
test is done on Solaris, later we will move the code to a Linux box.

Since, most of the code has been written in standard C, I don't even
bother to re-compile it on Solaris, before shipping source to the system
test team.
 
K

Keith Thompson

Leo Calado said:
I begin porting an application originally write on Solaris, using some
functions from libgen and other.
[...]

Try asking in comp.unix.programmer.
 
C

CBFalconer

Leo said:
I'm not talk about porting to other compile, I talk about porting
a small C application it was originally written on Solaris and use
a small set of own functions. I need only some help to port this
code to Linux. Only this.

If you write in standard C no porting is really needed. If you
don't, nobody here knows what you are talking about.
Non-ISO-standard C is OFF-TOPIC here.
 
D

Dik T. Winter

> In article <[email protected]>,

>
> IOW:
>
> Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Apparently "off topic" triggers you. Why do you not provide an answer?
Why bitch on somebody who points the OP to a place where he might actually
*get* useful answers? The only answer *I* can provide (and I know both
Solaris and Linux) is the only problem with porting is recompiling. I
recently found back a program I had written for Solaris some 15+ years
ago, recompiled it under Linux, and it worked as before.
 
R

Richard Heathfield

CBFalconer said:

If you write in standard C no porting is really needed.

Not quite universally true, although probably true between Solaris and
typical Linux implementations (the subject of the thread). Few of us write
in strictly conforming C all the time. Most of us, I suppose, write, at
the very least, in what I like to call "clc-conforming C", which tends to
assume some fairly outrageous things - such as the presence of a standard
library (not guaranteed to be available under a freestanding
implementation), for example.
If you don't, nobody here knows what you are talking about.

As a rhetorical device, yes, they don't. In practice, no, at least some of
them probably do.
Non-ISO-standard C is OFF-TOPIC here.

Not quite true. K&R C is non-ISO-standard C and yet is topical here.
 
K

Kenny McCormack

Dik T. Winter said:
[the usual]

Apparently "off topic" triggers you. Why do you not provide an answer?
[snip]

Because KM is a (self-proclaimed) troll. Please ignore him.

Well, ya got me. In the spirit of transparency, I wish to also announce
that KT is a sockpuppet of mine. Note how faithfully "he" follows me
around, always just one step behind with his little "Please, oh please,
don't feed the troll".

Clearly, no real human being would be this pathetic.
 
R

Richard Harter

Dik T. Winter said:
[the usual]

Apparently "off topic" triggers you. Why do you not provide an answer?
[snip]

Because KM is a (self-proclaimed) troll. Please ignore him.

Well, no, he's not a troll - he's merely a gadfly who has a
rather low opinion of the "regulars" in comp.lang.c. I agree
that he should be ignored, but that is only because he only has
one thing to say, and he has said it already, many times over.
There are far worse nuisances in comp.lang.c, some of them
"regulars".


Richard Harter, (e-mail address removed)
http://home.tiac.net/~cri, http://www.varinoma.com
In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die
 
J

James Kuyper

Richard said:
On Fri, 09 Nov 2007 22:39:54 -0800, Keith Thompson


Well, no, he's not a troll - he's merely a gadfly who has a
rather low opinion of the "regulars" in comp.lang.c. I agree
that he should be ignored, but that is only because he only has
one thing to say, and he has said it already, many times over.
There are far worse nuisances in comp.lang.c, some of them
"regulars".

He supposedly has a history of describing himself as a troll, and I can
personally confirm that he's done so at least once in the short time
that I've been monitoring this newsgroup:

2007-10-25, "Dev-C++ compiling problem":
> (This is not a troll - which is to say, this post is out-of-character
> for me)"


So, when he said that, what he lying?

However, to be fair, I gather from his messages that he doesn't mean the
same thing when he confesses to being a troll, that other people mean
when they accuse him of being a troll.

His accusers are pointing out, correctly, that he has a habit of saying
obnoxious things, apparently solely for the purpose of provoking a reaction.

When he confesses to trollhood, he's confessing incorrectly to being
someone who dares to tell truths that conflict with the mistaken
understandings of the people he calls "regulars". I'm sure that's the
way he perceives his own behavior, but I've seldom seen him be on the
right side of a disagreement with one of the "regulars" he despises so much.
 
K

Kenny McCormack

He supposedly has a history of describing himself as a troll, and I can
personally confirm that he's done so at least once in the short time
that I've been monitoring this newsgroup:

2007-10-25, "Dev-C++ compiling problem":


So, when he said that, what he lying?

However, to be fair, I gather from his messages that he doesn't mean the
same thing when he confesses to being a troll, that other people mean
when they accuse him of being a troll.

His accusers are pointing out, correctly, that he has a habit of saying
obnoxious things, apparently solely for the purpose of provoking a reaction.

I'm using the modern definition of 'troll' - someone who disagrees with me.
When he confesses to trollhood, he's confessing incorrectly to being
someone who dares to tell truths that conflict with the mistaken

Actually, I sometimes use the term 'contrarian' - which generally means
to someone who is right, but at odds with the Establishment (which
should come as no surprise, since the Establishment is usually wrong -
witness thousands of years of Church history).
understandings of the people he calls "regulars". I'm sure that's the
way he perceives his own behavior, but I've seldom seen him be on the
right side of a disagreement with one of the "regulars" he despises so
much.

By 'seldom', we mean 'always'.
 
R

Richard Riley

James Kuyper said:
He supposedly has a history of describing himself as a troll, and I
can personally confirm that he's done so at least once in the short
time that I've been monitoring this newsgroup:

2007-10-25, "Dev-C++ compiling problem":


So, when he said that, what he lying?

However, to be fair, I gather from his messages that he doesn't mean
the same thing when he confesses to being a troll, that other people
mean when they accuse him of being a troll.

His accusers are pointing out, correctly, that he has a habit of
saying obnoxious things, apparently solely for the purpose of
provoking a reaction.

When he confesses to trollhood, he's confessing incorrectly to being
someone who dares to tell truths that conflict with the mistaken
understandings of the people he calls "regulars". I'm sure that's the
way he perceives his own behavior, but I've seldom seen him be on the
right side of a disagreement with one of the "regulars" he despises so
much.

Since his "disagreement" is generally "stop being such a pompous ass and
cut the guy some slack" then I think he is correct 99.99% of the time.

The small hard core in here are a bunch of self obsessed cretins who
would unlikely be able to work on any sizable project in case the size
of their egos caused the building to collapse.
 
S

Serve Lau

Richard Heathfield said:
CBFalconer said:



Not quite universally true, although probably true between Solaris and
typical Linux implementations (the subject of the thread). Few of us write
in strictly conforming C all the time. Most of us, I suppose, write, at
the very least, in what I like to call "clc-conforming C", which tends to
assume some fairly outrageous things - such as the presence of a standard
library (not guaranteed to be available under a freestanding
implementation), for example.

Another simple example is directory names. You can write standard C but your
program can still fail to run if you didnt think of directory separators on
different platforms.
 
J

jacob navia

Kenny McCormack wrote:
[snip]

I find Mr McCormack much more interesting than Mr McIntyre, for
instance.

This is obviously a personal opinion. Is Mr McCormack a "troll"?

Since he stopped sending his message

"Out of topic blah blah blah"

to each question and started participating in this group,
his answers to questions have been reasonable (more than those
of the regulars in any case).

I am against banning him. But this, of course doesn't count since
I am banned too:)

Greetings Mr McCormack!
 
K

Keith Thompson

jacob navia said:
Kenny McCormack wrote:
[snip]

I find Mr McCormack much more interesting than Mr McIntyre, for
instance.

Well, there's no accounting for taste.
This is obviously a personal opinion. Is Mr McCormack a "troll"?
Yes.

Since he stopped sending his message

"Out of topic blah blah blah"

He hasn't stopped.
to each question and started participating in this group,
his answers to questions have been reasonable (more than those
of the regulars in any case).
Nonsense.

I am against banning him. But this, of course doesn't count since
I am banned too:)

Don't be ridiculous; nobody is "banned".

I'm dismayed to see that people are paying attention to KM, but
there's nothing I can do about it beyond offering my opinion. He
deliberately disrupts discussions, and he contributes very little of
any positive value. His absence would improve the quality of this
newsgroup substantially.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top