acconfig.h: Add _GLIBCXX_USE_C99_MATH.

* acconfig.h: Add _GLIBCXX_USE_C99_MATH.
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Define GLIBCXX_USE_C99_MATH.
	* configure.ac: Define HAVE_S_ISREG and HAVE_S_IFREG when
	targeting newlib.
	* aclocal.m4: Regenerated.
	* config.h.in: Likewise.
	* configure: Likewise.
	* Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* include/c_std/std_cmath.h (_GLIBCXX_USE_C99): Replace with ...
	(_GLIBCXX_USE_C99_MATH): ... this.

	* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL for
	arm-none-elf.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6476-2.cc: Likewise.
	* testsuite/27_io/objects/char/9.cc: Likewise.
	* testsuite/ext/stdio_filebuf/char/10063-2.cc: Likewise.

From-SVN: r75209
This commit is contained in:
Mark Mitchell 2003-12-29 19:26:16 +00:00 committed by Mark Mitchell
parent 88e541e13b
commit 517da0ce8a
22 changed files with 4186 additions and 11762 deletions

View File

@ -1,3 +1,31 @@
2003-12-29 Mark Mitchell <mark@codesourcery.com>
* acconfig.h: Add _GLIBCXX_USE_C99_MATH.
* acinclude.m4 (GLIBCXX_ENABLE_C99): Define GLIBCXX_USE_C99_MATH.
* configure.ac: Define HAVE_S_ISREG and HAVE_S_IFREG when
targeting newlib.
* aclocal.m4: Regenerated.
* config.h.in: Likewise.
* configure: Likewise.
* Makefile.in: Likewise.
* include/Makefile.in: Likewise.
* libmath/Makefile.in: Likewise.
* libsupc++/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* po/Makefile.in: Likewise.
* include/c_std/std_cmath.h (_GLIBCXX_USE_C99): Replace with ...
(_GLIBCXX_USE_C99_MATH): ... this.
* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: XFAIL for
arm-none-elf.
* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
* testsuite/27_io/basic_istream/readsome/char/6476-2.cc: Likewise.
* testsuite/27_io/objects/char/9.cc: Likewise.
* testsuite/ext/stdio_filebuf/char/10063-2.cc: Likewise.
2003-12-28 Paolo Carlini <pcarlini@suse.de>
* include/ext/pool_allocator.h (class __pool_alloc): Use

View File

@ -306,7 +306,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign ./Makefile
$(AUTOMAKE) --foreign Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)

View File

@ -16,6 +16,9 @@
// Include I/O support for 'long long' and 'unsigned long long'.
#undef _GLIBCXX_USE_LONG_LONG
// Define if C99 math functions (like fpclassify) should be exposed.
#undef _GLIBCXX_USE_C99_MATH
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
#undef _GLIBCXX_USE_C99

View File

@ -866,6 +866,10 @@ AC_DEFUN(GLIBCXX_ENABLE_C99, [
[isunordered(0.0,0.0);],, [ac_c99_math=no])
AC_MSG_RESULT($ac_c99_math)
if test x"$ac_c99_math" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
# Check for the existence in <stdio.h> of vscanf, et. al.
ac_c99_stdio=yes;
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
@ -942,6 +946,10 @@ AC_DEFUN(GLIBCXX_ENABLE_C99, [
fi;
AC_MSG_RESULT($enable_c99)
if test x"$ac_99_math" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
# Option parsed, now set things appropriately
if test x"$enable_c99" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99)

View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.7.8 -*- Autoconf -*-
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
@ -879,6 +879,10 @@ AC_DEFUN(GLIBCXX_ENABLE_C99, [
[isunordered(0.0,0.0);],, [ac_c99_math=no])
AC_MSG_RESULT($ac_c99_math)
if test x"$ac_c99_math" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
# Check for the existence in <stdio.h> of vscanf, et. al.
ac_c99_stdio=yes;
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
@ -955,6 +959,10 @@ AC_DEFUN(GLIBCXX_ENABLE_C99, [
fi;
AC_MSG_RESULT($enable_c99)
if test x"$ac_99_math" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
# Option parsed, now set things appropriately
if test x"$enable_c99" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99)
@ -1985,7 +1993,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.7.8])])
[AM_AUTOMAKE_VERSION([1.7.9])])
# Helper functions for option handling. -*- Autoconf -*-

View File

@ -17,6 +17,9 @@
// Include I/O support for 'long long' and 'unsigned long long'.
#undef _GLIBCXX_USE_LONG_LONG
// Define if C99 math functions (like fpclassify) should be exposed.
#undef _GLIBCXX_USE_C99_MATH
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
#undef _GLIBCXX_USE_C99

15823
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -220,6 +220,9 @@ else
AC_DEFINE(HAVE_SQRTF)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
AC_DEFINE(HAVE_S_ISREG)
AC_DEFINE(HAVE_S_IFREG)
else
m4_include([crossconfig.m4])
fi

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -525,9 +525,9 @@ debug_headers = \
# Some "C" header schemes require the "C" compatibility headers.
# For --enable-cheaders=c_std
@GLIBCXX_C_HEADERS_C_STD_TRUE@c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra =
@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers}
@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra =
host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
host_builddir = ./${host_alias}/bits
@ -673,7 +673,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -436,8 +436,7 @@ namespace std
{ return __builtin_tanh(__x); }
}
#if _GLIBCXX_USE_C99
#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
// These are possible macros imported from C99-land. For strict
// conformance, remove possible C99-injected names from the global
@ -514,7 +513,7 @@ namespace __gnu_cxx
#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
#endif
#if _GLIBCXX_USE_C99
#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
namespace __gnu_cxx
{

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -379,7 +379,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -530,7 +530,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -318,7 +318,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -219,12 +219,12 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
# Cross compiler support.
toolexeclib_LTLIBRARIES = libstdc++.la
@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_arg =
# Symbol versioning for shared libraries.
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_dep =
@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_arg =
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_dep = libstdc++-symbol.ver
@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@version_dep =
# Source files linked in via configuration/make substitution for a
# particular host.
@ -551,7 +551,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
// 27.8.1.4 Overridden virtual functions
#include <fstream>

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
// 27.8.1.4 Overridden virtual functions
#include <fstream>

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
// 27.8.1.4 Overridden virtual functions
#include <fstream>

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
// 27.8.1.4 Overridden virtual functions
#include <fstream>

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
// 27.6.1.3 unformatted input functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt

View File

@ -18,6 +18,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
#include <iostream>
#include <cstdio>
#include <testsuite_hooks.h>
@ -35,6 +39,7 @@ void test09()
freopen(name, "r", stdin);
fprintf(stderr, "%d\n", std::cin.rdbuf()->in_avail());
// The number of unread characters should be 4 (a, b, c, \\n)
VERIFY( 4 == std::cin.rdbuf()->in_avail() );
}

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@ -242,9 +242,9 @@ lists_of_files = \
noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
@GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS =
@GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check
@GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS =
abi_check_SOURCES = abi_check.cc
baseline_file = ${baseline_dir}/baseline_symbols.txt
@ -498,7 +498,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

View File

@ -16,6 +16,10 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// The ARM simulator does not provide support for "fstat", which
// causes "sbumpc" to return an incorrect value.
// { dg-do run { xfail arm-none-elf } }
#include <cstdio>
#include <fstream>
#include <ext/stdio_filebuf.h>