Port code from Solaris to Linux

Discussion in 'C Programming' started by Leo Calado, Nov 9, 2007.

  1. Leo Calado

    Leo Calado Guest

    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
    Leo Calado, Nov 9, 2007
    #1
    1. Advertising

  2. Leo Calado

    Tim Prince Guest

    Leo Calado wrote:

    > 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.
    Tim Prince, Nov 9, 2007
    #2
    1. Advertising

  3. In article <Se_Yi.19553$>,
    Tim Prince <> wrote:
    >Leo Calado wrote:
    >
    >> 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.


    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
    Kenny McCormack, Nov 9, 2007
    #3
  4. Leo Calado

    Leo Calado Guest

    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.
    Leo Calado, Nov 9, 2007
    #4
  5. Leo Calado

    Ian Collins Guest

    Leo Calado wrote:
    > 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.

    --
    Ian Collins.
    Ian Collins, Nov 9, 2007
    #5
  6. "Leo Calado" <> wrote in message
    news:...
    > 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

    --
    Stephen Sprunk "God does not play dice." --Albert Einstein
    CCIE #3723 "God is an inveterate gambler, and He throws the
    K5SSS dice at every possible opportunity." --Stephen Hawking


    --
    Posted via a free Usenet account from http://www.teranews.com
    Stephen Sprunk, Nov 9, 2007
    #6
  7. Leo Calado

    Tor Rustad Guest

    Leo Calado wrote:
    > 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.

    --
    Tor < | tr i-za-h a-z>
    Tor Rustad, Nov 9, 2007
    #7
  8. Leo Calado <> writes:
    > I begin porting an application originally write on Solaris, using some
    > functions from libgen and other.

    [...]

    Try asking in comp.unix.programmer.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Looking for software development work in the San Diego area.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Nov 9, 2007
    #8
  9. Leo Calado

    CBFalconer Guest

    Leo Calado wrote:
    >
    > 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.

    --
    Chuck F (cbfalconer at maineline dot net)
    <http://cbfalconer.home.att.net>
    Try the download section.



    --
    Posted via a free Usenet account from http://www.teranews.com
    CBFalconer, Nov 10, 2007
    #9
  10. In article <fh1rgo$p98$> (Kenny McCormack) writes:
    > In article <Se_Yi.19553$>,
    > Tim Prince <> wrote:

    ....
    > >> 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.

    >
    > 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.
    --
    dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
    Dik T. Winter, Nov 10, 2007
    #10
  11. CBFalconer said:

    <snip>

    > 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.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -http://www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
    Richard Heathfield, Nov 10, 2007
    #11
  12. "Dik T. Winter" <> writes:
    > In article <fh1rgo$p98$>
    > (Kenny McCormack) writes:
    > > [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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Looking for software development work in the San Diego area.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Nov 10, 2007
    #12
  13. In article <>,
    Keith Thompson <> wrote:
    >"Dik T. Winter" <> writes:
    >> In article <fh1rgo$p98$>
    >> (Kenny McCormack) writes:
    >> > [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.
    Kenny McCormack, Nov 10, 2007
    #13
  14. On Fri, 09 Nov 2007 22:39:54 -0800, Keith Thompson
    <> wrote:

    >"Dik T. Winter" <> writes:
    >> In article <fh1rgo$p98$>
    >> (Kenny McCormack) writes:
    >> > [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,
    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
    Richard Harter, Nov 10, 2007
    #14
  15. Leo Calado

    James Kuyper Guest

    Richard Harter wrote:
    > On Fri, 09 Nov 2007 22:39:54 -0800, Keith Thompson
    > <> wrote:

    ....
    >> 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".


    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.
    James Kuyper, Nov 10, 2007
    #15
  16. In article <QFkZi.2780$CI1.893@trnddc03>,
    James Kuyper <> wrote:
    >Richard Harter wrote:
    >> On Fri, 09 Nov 2007 22:39:54 -0800, Keith Thompson
    >> <> wrote:

    >...
    >>> 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".

    >
    >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.


    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'.
    Kenny McCormack, Nov 10, 2007
    #16
  17. James Kuyper <> writes:

    > Richard Harter wrote:
    >> On Fri, 09 Nov 2007 22:39:54 -0800, Keith Thompson
    >> <> wrote:

    > ...
    >>> 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".

    >
    > 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.


    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.
    Richard Riley, Nov 10, 2007
    #17
  18. Leo Calado

    Serve Lau Guest

    "Richard Heathfield" <> wrote in message
    news:...
    > CBFalconer said:
    >
    > <snip>
    >
    >> 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.


    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.
    Serve Lau, Nov 10, 2007
    #18
  19. Leo Calado

    jacob navia Guest

    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!


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Nov 10, 2007
    #19
  20. jacob navia <> writes:
    > 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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Looking for software development work in the San Diego area.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Nov 10, 2007
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. elastic
    Replies:
    1
    Views:
    631
    elastic
    Feb 3, 2004
  2. thomhashi
    Replies:
    2
    Views:
    810
    Nils O. =?iso-8859-1?Q?Sel=E5sdal?=
    Oct 31, 2003
  3. Garry
    Replies:
    0
    Views:
    353
    Garry
    Jan 18, 2005
  4. nitin
    Replies:
    2
    Views:
    422
    Ron Natalie
    Jul 14, 2003
  5. Christopher Tidy
    Replies:
    4
    Views:
    580
    Christopher Tidy
    Jan 22, 2007
Loading...

Share This Page