Clean up configure/build longstanding issues.

2000-07-07  Benjamin Kosnik  <bkoz@soma.redhat.com>

	Clean up configure/build longstanding issues.
	* src/Makefile.am (AC_CXXFLAGS): Don't set @SECTION_LDFLAGS@ here.
	(CXXLINK): Add here, instead.

	* Makefile.am (check-install): Make sure mkcheck has execute privs.
	(check): Same here.
	* configure.in (AC_OUTPUT_COMMANDS): Remove hacks here.

	* configure.in (AC_OUTPUT_COMMANDS): Link c_io_libio.h and
	c_io_libio.cc instead of copying.
	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Do link here.

	* configure.in (AC_OUTPUT_COMMANDS): Link $THREADS.h and
	c++threads.h instead of copying.
	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Do link here.

	* config/c_io_libio.cc (__basic_file::_M_open_mode): Consolidate.
	* bits/basic_file.h: Declare.

	* mkcheck.in (TESTS_FILE): Use -v instead of --version.

From-SVN: r34917
This commit is contained in:
Benjamin Kosnik 2000-07-08 01:08:44 +00:00 committed by Benjamin Kosnik
parent b848ded1da
commit 6eaa6abdbc
4 changed files with 47 additions and 47 deletions

View File

@ -16,6 +16,11 @@
c++threads.h instead of copying.
* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Do link here.
* config/c_io_libio.cc (__basic_file::_M_open_mode): Consolidate.
* bits/basic_file.h: Declare.
* mkcheck.in (TESTS_FILE): Use -v instead of --version.
2000-07-07 brent verner <brent@rcfile.org>
* testsuite/27_io/istream_unformatted.cc (test05): New test.

View File

@ -56,6 +56,10 @@ namespace std {
public:
__basic_file(__c_lock* __lock = 0);
void
__basic_file::_M_open_mode(ios_base::openmode __mode, int& __p_mode,
int& __rw_mode);
// Eqivalent to the normal fopen function.
__basic_file*
open(const char* __name, ios_base::openmode __mode, int __prot = 0664);

View File

@ -60,49 +60,10 @@ namespace std {
_IO_default_finish(this, 0);
}
__basic_file*
__basic_file::sys_open(int __fd, ios_base::openmode __mode)
void
__basic_file::_M_open_mode(ios_base::openmode __mode, int& __p_mode,
int& __rw_mode)
{
__basic_file* __retval = NULL;
bool __testi = __mode & ios_base::in;
bool __testo = __mode & ios_base::out;
#ifdef O_BINARY
bool __testb = __mode & ios_base::binary;
#endif
int __p_mode = 0;
int __rw_mode = _IO_NO_READS + _IO_NO_WRITES;
if (__testi)
{
__p_mode = O_RDONLY;
__rw_mode = _IO_NO_WRITES;
}
if (__testo)
{
__p_mode = O_WRONLY | O_TRUNC;
__rw_mode = _IO_NO_READS;
}
#ifdef O_BINARY
if (__testb)
__p_mode |= O_BINARY;
#endif
if (__fd >= 0)
{
_fileno = __fd;
int __mask = _IO_NO_READS + _IO_NO_WRITES + _IO_IS_APPENDING;
_flags = (_flags & ~__mask) | (__rw_mode & __mask);
_IO_link_in((_IO_FILE_plus*) this);
__retval = this;
}
return __retval;
}
__basic_file*
__basic_file::open(const char* __name, ios_base::openmode __mode,
int __prot = 0664)
{
__basic_file* __retval = NULL;
#ifdef O_BINARY
bool __testb = __mode & ios_base::binary;
#endif
@ -110,8 +71,6 @@ namespace std {
bool __testo = __mode & ios_base::out;
bool __testt = __mode & ios_base::trunc;
bool __testa = __mode & ios_base::app;
int __p_mode = 0;
int __rw_mode = _IO_NO_READS + _IO_NO_WRITES;
if (!__testi && __testo && !__testt && !__testa)
{
@ -147,6 +106,36 @@ namespace std {
if (__testb)
__p_mode |= O_BINARY;
#endif
}
__basic_file*
__basic_file::sys_open(int __fd, ios_base::openmode __mode)
{
__basic_file* __retval = NULL;
int __p_mode = 0;
int __rw_mode = _IO_NO_READS + _IO_NO_WRITES;
_M_open_mode(__mode, __p_mode, __rw_mode);
if (__fd >= 0)
{
_fileno = __fd;
int __mask = _IO_NO_READS + _IO_NO_WRITES + _IO_IS_APPENDING;
_flags = (_flags & ~__mask) | (__rw_mode & __mask);
_IO_link_in((_IO_FILE_plus*) this);
__retval = this;
}
return __retval;
}
__basic_file*
__basic_file::open(const char* __name, ios_base::openmode __mode,
int __prot = 0664)
{
__basic_file* __retval = NULL;
int __p_mode = 0;
int __rw_mode = _IO_NO_READS + _IO_NO_WRITES;
_M_open_mode(__mode, __p_mode, __rw_mode);
if (!_IO_file_is_open(this))
{
#if _G_HAVE_IO_FILE_OPEN

View File

@ -68,16 +68,18 @@ fi
#LIB_PATH == where to find the build library binaries.
if [ $WHICH != "1" ]; then
LIB_PATH="$BUILD_DIR/src/.libs"
CXX="../../gcc/g++ -B../../gcc/"
CXX="../../gcc/g++"
CXX_BASE="-B../../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 -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
CXX_FLAG="-g $CXX_BASE -DDEBUG_ASSERT @SECTION_FLAGS@ @SECTION_LDFLAGS@"
# a specific flag(s) to force the use of shared libraries, if any
SH_FLAG=""
@ -146,7 +148,7 @@ chmod u+w $TEST_DIR/*.tst
# Emit useful info about compiler and platform
echo "host: $(uname -mrsv)" >> $RESULTS_FILE
echo "compiler: $($CXX --version)" >> $RESULTS_FILE
echo "compiler: $($CXX -v 2>&1 | tail -1)" >> $RESULTS_FILE
echo "compiler flags: $CXX_FLAG" >> $RESULTS_FILE
echo "date: $(date +%Y%m%d)" >> $RESULTS_FILE
echo "" >> $RESULTS_FILE