HP-UX libstdc++ patch for 64 bit mode.

law@redhat.com law@redhat.com
Tue Mar 12 16:09:00 GMT 2002


 In message <200203122319.PAA23644@hpsje.cup.hp.com>, Steve Ellcey writes:
 > I can't believe I forgot that Jessica had sent this in and that you had
 > replied to it.  I tried the patch refered to in msg00241.html.  I think
 > it works OK, I completely removed the strtoll and strtoull definitions
 > from config/os/hpux/bits/os_defines.h and applied that patch and built.
 > 
 > I am having some problems creating a test program though, I tried:
 > 
 > #include <cstdlib>
 > int main()
 > {
 >         long long i;
 >         long j;
 >         i = std::strtoll("123",(char **) 0, 10);
 >         j = std::strtol("123",(char **) 0, 10);
 >         exit(0);
 > }
 > 
 > and got:
 > 
 > str.cc: In function `int main()':
 > str.cc:6: `strtoll' undeclared in namespace `std'
 > 
 > I think this is OK since strtoll in cstdlib is under
 > #if _GLIBCPP_USE_C99
 > but I don't know how to write a program that uses it
 > though.  I tried --std=c99 but that created more errors.
 > 
 > I did verify that strtoll and strtoull were created in libiberty and
 > called from libstdc++.
 > 
 > Where do we go from here?
Do you still have the #define _GPPLIB_USE_LONG_LONG in os_defines.h?  I
think if you do that things should start to work.


jeff



More information about the Gcc-patches mailing list