This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


This is a patch for 64 bit mode on HP-UX.  HP-UX does not provide
strtoll or strtoull functions in libc in 64 bit mode since they are the
same as strtol and strtoul so we define the libstdc++ functions to call
strtol and strtoul.

Tested on IA64 HP-UX and HPPA HP-UX, I do not have write permission
so if someone could approve these and check them in that would be
great.

Steve Ellcey
sje@cup.hp.com



2002-02-28  Steve Ellcey  <sje@cup.hp.com>
	* gcc/libstdc++-v3/config/os/hpux/bits/os_defines.h
	(strtoll, strtoull): In 64 bit mode HP-UX (IA64 and HPPA)
	does not define strtoll or strtoull, but does define strtol
	and strtoul which are the same since in 64 bit mode
	sizeof(long) == sizeof(long long).


*** gcc.orig/libstdc++-v3/config/os/hpux/bits/os_defines.h	Mon Mar 11 14:06:01 2002
--- gcc/libstdc++-v3/config/os/hpux/bits/os_defines.h	Mon Mar 11 14:07:05 2002
***************
*** 60,69 ****
--- 60,76 ----
     We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
     to bastardize configure to deal with this sillyness.  */
  namespace std {
+ #ifndef __LP64__
    __extension__ extern "C" long long strtoll (const char *, char **, int)
      __asm  ("__strtoll");
    __extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
      __asm  ("__strtoull");
+ #else
+   __extension__ extern "C" long long strtoll (const char *, char **, int)
+     __asm  ("strtol");
+   __extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
+     __asm  ("strtoul");
+ #endif
  }
  #define _GLIBCPP_USE_LONG_LONG 1
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]