[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-cxx-dev
Subject: Re: __strtoll() (was: CXX-DEV: 64 bits integer in 32 bits
From: Harri Porten <porten () trolltech ! com>
Date: 2003-04-08 11:55:24
[Download RAW message or body]
On Mon, 7 Apr 2003, Dennis Handly wrote:
> >I ran into two problems when trying to use __strtoll on HP-UX 10.20.
> >1) had to define __STDC__ with A.01.23 manually to get the proper
> >function prototype. Shouldn't this be the default?
>
> This bug in <inttypes.h> has been fixed on 11.x.
Ah. Thanks for the info.
> >2) when linking I get: ld: Unsatisfied symbols: __strtoll() (code)
> >How do I properly use this function? Or do I have to use sscanf() on
> >older systems?
> Harri.
>
> What version of libc.2 do you have? It is there in PHCO_25640.
libc.1 you mean ? It didn't have that patch applied. Now it has. Thanks
for pointing this out. Turned out that the lib was okay, though. See
below.
> Perhaps using sscanf is a good idea.
Assuming that this alternative might be slower I looked closer and found
the reason: The bug mentioned in 1) appearantly involves the lack of an
extern "C" declaration. So the function name got mangled for C++ and
couldn't be resolved.
What I did now is to not include the header but insert the correct
declaration directly into the code. Ugly, I know. Is there any
pre-processor define that allows me to #ifdef code for specific versions
of HP-UX ? Couldn't find any (looking at stdsyms.h for example).
Thanks for your help,
Harri.
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE cxx-dev
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic