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]

[Patch] libstdc++/16210


Hi,

the problem and its solution seem simple: submitter notices that support
for long long types in the iostreams is enabled only if strto(u)ll are
available. However, those functions are *not* used anymore in 3.4 and we
should simply take into account what is requested at configure time (not
changing the default, of course). The below does this.

Ok with everyone? I'll wait 'til tomorrow.

Tested building the lib default configured/--disable-long-long/
--enable-long-long and inspecting the generated config.h.

Paolo.

/////////////
2004-06-27  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/16210
	* acinclude.m4 (GLIBCXX_ENABLE_LONG_LONG): Do not check for the
	availability of strto(u)ll, not used anymore in the iostreams.
	* configure: Regenerate.
diff -prN libstdc++-v3-orig/acinclude.m4 libstdc++-v3/acinclude.m4
*** libstdc++-v3-orig/acinclude.m4	Tue Jun 15 16:47:05 2004
--- libstdc++-v3/acinclude.m4	Sat Jun 26 00:36:26 2004
*************** dnl --enable-long-long defines _GLIBCXX_
*** 1402,1429 ****
  dnl --disable-long-long leaves _GLIBCXX_USE_LONG_LONG undefined
  dnl  +  Usage:  GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
  dnl       Where DEFAULT is either `yes' or `no'.
- dnl  +  If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
  dnl
  AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
    GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
- 
-   AC_LANG_SAVE
-   AC_LANG_CPLUSPLUS
- 
-   AC_MSG_CHECKING([for enabled long long I/O support])
-   # iostreams require strtoll, strtoull to compile
-   AC_TRY_COMPILE([#include <stdlib.h>],
-                  [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
-   AC_TRY_COMPILE([#include <stdlib.h>],
-                  [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
- 
-   # Option parsed, now set things appropriately
    if test $enable_long_long = yes; then
      AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
    fi
-   AC_MSG_RESULT($enable_long_long)
- 
-   AC_LANG_RESTORE
  ])
  
  
--- 1402,1413 ----

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