compare.cc (test01): Add using declarations.
2000-10-23 Benjamin Kosnik <bkoz@redhat.com> * testsuite/21_strings/compare.cc (test01): Add using declarations. * include/c_std/bits/std_cerrno.h: And here. * include/c_std/bits/std_cassert.h: Tweaks. * mkcheck.in: Simplify. * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify. (GLIBCPP_ENABLE_LONG_LONG): Same. * aclocal.m4: Regenerate. * src/Makefile.am (c_shadow_headers): Add features.h, bits/wrap_features.h. * src/Makefile.in: Regenerate. * include/c_std/features.h: New file. * include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New file. Need to have c++config.h included before this file so _ISOC99_SOURCE around. * include/c_std/sys/cdefs.h: Hack. * include/c_std/stdlib.h: Same, use c++config.h. * include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD. * include/c_std/bits/std_cassert.h: Fix. * include/c_std/bits/std_cerrno.h: Make consistent. * include/c_std/bits/std_csetjmp.h (setjmp): Unscope global declaration from ::_C_legacy to _C_legacy. * include/c_std/bits/std_cstdio.h: same with printf. * include/c_std/stdio.h: And here. * include/c_std/bits/std_cstdlib.h: abort, exit comment. * include/c_std/stdlib.h: Same here. From-SVN: r37035
This commit is contained in:
parent
060974d0af
commit
dcc41852e1
@ -1,3 +1,40 @@
|
||||
2000-10-23 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* testsuite/21_strings/compare.cc (test01): Add using declarations.
|
||||
|
||||
* include/c_std/bits/std_cerrno.h: And here.
|
||||
* include/c_std/bits/std_cassert.h: Tweaks.
|
||||
|
||||
* mkcheck.in: Simplify.
|
||||
|
||||
* acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify.
|
||||
(GLIBCPP_ENABLE_LONG_LONG): Same.
|
||||
* aclocal.m4: Regenerate.
|
||||
|
||||
* src/Makefile.am (c_shadow_headers): Add features.h,
|
||||
bits/wrap_features.h.
|
||||
* src/Makefile.in: Regenerate.
|
||||
* include/c_std/features.h: New file.
|
||||
* include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New
|
||||
file. Need to have c++config.h included before this file so
|
||||
_ISOC99_SOURCE around.
|
||||
|
||||
* include/c_std/sys/cdefs.h: Hack.
|
||||
* include/c_std/stdlib.h: Same, use c++config.h.
|
||||
* include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD.
|
||||
|
||||
* include/c_std/bits/std_cassert.h: Fix.
|
||||
* include/c_std/bits/std_cerrno.h: Make consistent.
|
||||
|
||||
* include/c_std/bits/std_csetjmp.h (setjmp): Unscope global
|
||||
declaration from ::_C_legacy to _C_legacy.
|
||||
|
||||
* include/c_std/bits/std_cstdio.h: same with printf.
|
||||
* include/c_std/stdio.h: And here.
|
||||
|
||||
* include/c_std/bits/std_cstdlib.h: abort, exit comment.
|
||||
* include/c_std/stdlib.h: Same here.
|
||||
|
||||
2000-10-21 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): New macro.
|
||||
|
@ -1404,10 +1404,9 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
|
||||
AC_MSG_RESULT($enable_long_long)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_long" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
|
||||
;;
|
||||
esac
|
||||
if test x"$enable_long_long" = xyes; then
|
||||
AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@ -1448,10 +1447,9 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_DOUBLE, [dnl
|
||||
AC_MSG_RESULT($enable_long_double)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_double" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
;;
|
||||
esac
|
||||
if test x"$enable_long_double" = xyes; then
|
||||
AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
14
libstdc++-v3/aclocal.m4
vendored
14
libstdc++-v3/aclocal.m4
vendored
@ -1416,10 +1416,9 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
|
||||
AC_MSG_RESULT($enable_long_long)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_long" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
|
||||
;;
|
||||
esac
|
||||
if test x"$enable_long_long" = xyes; then
|
||||
AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@ -1460,10 +1459,9 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_DOUBLE, [dnl
|
||||
AC_MSG_RESULT($enable_long_double)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_double" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
;;
|
||||
esac
|
||||
if test x"$enable_long_double" = xyes; then
|
||||
AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
1852
libstdc++-v3/configure
vendored
1852
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -41,8 +41,8 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
// expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
|
||||
#ifdef _ASSERT_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
|
@ -31,19 +31,31 @@
|
||||
// ISO C++ 14882: 19.2 Assertions
|
||||
//
|
||||
|
||||
#ifndef _CPP_CASSERT
|
||||
#define _CPP_CASSERT 1
|
||||
// NB: This is assumed to be a conforming implementation.
|
||||
|
||||
namespace _C_legacy {
|
||||
// ISO/IEC 9899:1999 (E), section 7.2
|
||||
// assert.h
|
||||
// ..defines the assert macro...
|
||||
|
||||
// ISO 14882
|
||||
// 17.4.1.2 Headers
|
||||
// ... declarations and definitions (except for macros) are within
|
||||
// namespace scope of the namepace std...
|
||||
|
||||
|
||||
//#ifndef _CPP_CASSERT
|
||||
//#define _CPP_CASSERT 1
|
||||
|
||||
//namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
//# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <assert.h>
|
||||
}
|
||||
} // namespace _C_legacy
|
||||
//} // namespace _C_legacy
|
||||
|
||||
#undef _IN_C_LEGACY_
|
||||
//#undef _IN_C_LEGACY_
|
||||
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
|
||||
|
@ -33,26 +33,16 @@
|
||||
#ifndef _CPP_CERRNO
|
||||
#define _CPP_CERRNO 1
|
||||
|
||||
namespace _C_legacy {
|
||||
//namespace _C_legacy {
|
||||
extern "C" {
|
||||
# define _IN_C_LEGACY_
|
||||
//# define _IN_C_LEGACY_
|
||||
# pragma GCC system_header
|
||||
# include_next <errno.h>
|
||||
}
|
||||
//} // namespace _C_legacy::
|
||||
|
||||
// inline int&
|
||||
// _CPP_errno_capture() { return errno; }
|
||||
|
||||
} // namespace _C_legacy::
|
||||
|
||||
# undef errno
|
||||
//# define errno _C_legacy::_CPP_errno_capture()
|
||||
|
||||
namespace std {
|
||||
using _C_legacy::errno;
|
||||
}
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
//# undef _IN_C_LEGACY_
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ namespace _C_legacy {
|
||||
|
||||
# undef jmp_buf
|
||||
# undef setjmp
|
||||
# define setjmp(__jb) ::_C_legacy::_CPP_setjmp_capture(__jb)
|
||||
# define setjmp(__jb) _C_legacy::_CPP_setjmp_capture(__jb)
|
||||
# undef longjmp
|
||||
|
||||
namespace std {
|
||||
|
@ -133,7 +133,7 @@ namespace std {
|
||||
using _C_legacy::remove;
|
||||
using _C_legacy::rename;
|
||||
using _C_legacy::tmpnam;
|
||||
using _C_legacy::printf;
|
||||
// using _C_legacy::printf;
|
||||
using _C_legacy::scanf;
|
||||
using _C_legacy::sprintf;
|
||||
using _C_legacy::sscanf;
|
||||
|
@ -57,7 +57,6 @@ namespace _C_legacy {
|
||||
# endif
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef size_t
|
||||
# undef wchar_t
|
||||
# undef div_t
|
||||
# undef ldiv_t
|
||||
@ -68,6 +67,9 @@ namespace _C_legacy {
|
||||
# undef strtod
|
||||
# undef strtol
|
||||
# undef strtoul
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
# undef strtold
|
||||
#endif
|
||||
# undef rand
|
||||
# undef srand
|
||||
# undef calloc
|
||||
@ -124,9 +126,9 @@ namespace std {
|
||||
using _C_legacy::malloc;
|
||||
using _C_legacy::realloc;
|
||||
|
||||
using _C_legacy::abort;
|
||||
// using _C_legacy::abort;
|
||||
using _C_legacy::atexit;
|
||||
using _C_legacy::exit;
|
||||
// using _C_legacy::exit;
|
||||
using _C_legacy::bsearch;
|
||||
using _C_legacy::qsort;
|
||||
|
||||
@ -137,10 +139,14 @@ namespace std {
|
||||
using _C_legacy::mbstowcs;
|
||||
using _C_legacy::wcstombs;
|
||||
|
||||
using _C_legacy::strtof;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
using _C_legacy::strtoll;
|
||||
using _C_legacy::strtoull;
|
||||
using _C_legacy::strtof;
|
||||
#endif
|
||||
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
using _C_legacy::strtold;
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
// Expose global C names, including non-standard ones, but shadow
|
||||
// some names and types with the std:: C++ version.
|
||||
using std::errno;
|
||||
// using std::errno;
|
||||
|
||||
# ifdef _ERRNO_NEED_C_LEGACY_
|
||||
// dive back into the "swamp"
|
||||
@ -53,3 +53,4 @@
|
||||
# undef _ERRNO_NEED_C_LEGACY_
|
||||
# endif /* _ERRNO_NEED_C_LEGACY_ */
|
||||
#endif /* _INCLUDED_CPP_ERRNO_H_ */
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
using std::setvbuf;
|
||||
using std::fprintf;
|
||||
using std::fscanf;
|
||||
using std::printf;
|
||||
// using std::printf;
|
||||
using std::scanf;
|
||||
using std::sprintf;
|
||||
using std::sscanf;
|
||||
|
@ -31,6 +31,8 @@
|
||||
#ifndef _INCLUDED_CPP_STDLIB_H_
|
||||
# define _INCLUDED_CPP_STDLIB_H_ 1
|
||||
|
||||
# include <bits/c++config.h>
|
||||
|
||||
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
|
||||
// get out of the "legacy"
|
||||
} // close extern "C"
|
||||
@ -49,7 +51,7 @@
|
||||
using std::lldiv_t;
|
||||
#endif
|
||||
|
||||
using std::abort;
|
||||
// using std::abort;
|
||||
using std::abs;
|
||||
using std::atexit;
|
||||
using std::atof;
|
||||
@ -58,7 +60,7 @@
|
||||
using std::bsearch;
|
||||
using std::calloc;
|
||||
using std::div;
|
||||
using std::exit;
|
||||
// using std::exit;
|
||||
using std::free;
|
||||
using std::getenv;
|
||||
using std::labs;
|
||||
@ -78,10 +80,14 @@
|
||||
using std::wcstombs;
|
||||
using std::wctomb;
|
||||
|
||||
using std::strtof;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
using std::strtoll;
|
||||
using std::strtoull;
|
||||
using std::strtof;
|
||||
#endif
|
||||
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
using std::strtold;
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- header wrapper.
|
||||
|
||||
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
#ifndef _CPP_SYS_CDEFS_H
|
||||
# define _CPP_SYS_CDEFS_H
|
||||
# define _CPP_SYS_CDEFS_H 1
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <sys/cdefs.h>
|
||||
@ -40,4 +40,10 @@
|
||||
#undef __END_DECLS
|
||||
#define __END_DECLS
|
||||
|
||||
#endif
|
||||
#endif /* _CPP_SYS_CDEFS_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -72,18 +72,16 @@ fi
|
||||
#LIB_PATH == where to find the build library binaries.
|
||||
if [ $WHICH != "1" ]; then
|
||||
LIB_PATH="$BUILD_DIR/src/.libs"
|
||||
CXX="../../gcc/g++"
|
||||
CXX_BASE="-B../../gcc/"
|
||||
CXX="$BUILD_DIR/../../gcc/g++ -B$BUILD_DIR/../../gcc/"
|
||||
elif [ $WHICH -eq 1 ]; then
|
||||
LIB_PATH="$PREFIX_DIR/lib"
|
||||
CXX="$PREFIX_DIR/bin/g++"
|
||||
CXX_BASE=""
|
||||
fi
|
||||
|
||||
# gcc compiler flags
|
||||
#CXX_FLAG="-fsquangle -fhonor-std -fnew-exceptions -g -O2 -DDEBUG_ASSERT "
|
||||
#CXX_FLAG="-g -O2 -DDEBUG_ASSERT "
|
||||
CXX_FLAG="-g $CXX_BASE -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
|
||||
CXX_FLAG="-g -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
|
||||
|
||||
# a specific flag(s) to force the use of shared libraries, if any
|
||||
SH_FLAG=""
|
||||
|
@ -21,7 +21,7 @@
|
||||
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
## USA.
|
||||
|
||||
## $Id: Makefile.am,v 1.42 2000/10/17 10:12:23 bkoz Exp $
|
||||
## $Id: Makefile.am,v 1.43 2000/10/18 23:26:22 bkoz Exp $
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.3 gnits
|
||||
MAINT_CHARSET = latin1
|
||||
@ -136,8 +136,10 @@ c_shadow_headers = \
|
||||
assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h \
|
||||
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h \
|
||||
wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h \
|
||||
features.h \
|
||||
bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h \
|
||||
bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h \
|
||||
bits/wrap_features.h \
|
||||
sys/cdefs.h
|
||||
|
||||
if GLIBCPP_USE_CSHADOW
|
||||
|
@ -146,7 +146,7 @@ base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/
|
||||
c_base_headers = bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h bits/std_cwchar.h bits/std_cwctype.h
|
||||
|
||||
|
||||
c_shadow_headers = assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h sys/cdefs.h
|
||||
c_shadow_headers = assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h features.h bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h bits/wrap_features.h sys/cdefs.h
|
||||
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@c_headers = $(c_base_headers) $(c_shadow_headers)
|
||||
@GLIBCPP_USE_CSHADOW_FALSE@c_headers = $(c_base_headers)
|
||||
|
@ -75,6 +75,10 @@ test01()
|
||||
std::string str_1("costa marbella");
|
||||
std::string str_2;
|
||||
|
||||
using std::strcmp;
|
||||
using std::strncmp;
|
||||
using std::memcmp;
|
||||
|
||||
//sanity check
|
||||
test_value(strcmp("costa marbella", "costa rica"), lt);
|
||||
test_value(strcmp("costa rica", "costa rica"), z);
|
||||
|
Loading…
x
Reference in New Issue
Block a user