Hello All,

Oh. That.

From what I've been told, the groan that came out of my office was heard in the next building. Then, because of the alternating chuckles and muttered curses, it took 30 minutes to convince the paramedics that I was ok. I had to sign a waiver.

"that doesn't hold on a big-endian machine" pointed me in the right direction. Using %llu instead of %lu in printf shows the code actually working. Thank you.

For the record, perl Config datatypes from linux:

intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define

The compiler on solaris is Solaris Studio CC. The compiling host is running solaris 5.10, and is the same host used to compile perl. The cc commandline below was taken from the output of Inline C with BUILD_NOISY enabled.

cc -V says: cc: Sun C 5.12 SunOS_sparc Spica 2011/08/03 /import/tools/vendor/sun/solaris-sparc/studio13b26/solstudiodev/bin/cc + -c -I"/import/coverage5/ccg/qot/vx/inline-dev/test" -D_REENTRANT -K +PIC -DUSE_HASH_SEED_EXPLICIT -DPERL_USE_SAFE_PUTENV -D_LARGEFILE_SOUR +CE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"0.0 +0\" -DXS_VERSION=\"0.00\" -KPIC "-I/import/tools/local/perl/perl-5.18 +.4/lib/5.18.4/sun4-solaris-thread-multi-64int/CORE" Short_00d0.c

Snip of output from working code:

obj size : 4 obj val : 2bf2d8 thing size : 4 thing val : 7895864 thing simtime p : 40 thing simtime A : 20 thing index A : 1 thing simtime B : 40 << this is what I was looking for thing index B : 2 << this is what I was looking for

Thanks to everyone. If not for you, I'd probably still be crawling all over perlapi.


In reply to Re: Inline C solaris vs linux by ccgcube
in thread Inline C solaris vs linux by ccgcube

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.