Commit 58ac1d7f by Benjamin Kosnik Committed by Benjamin Kosnik

acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.


2003-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
	* aclocal.m4: Regenerate.
	* Makefile.am (SUBDIRS): Remove libio.
	* Makefile.in: Regenerate.
	* configure.in: Same.
	* configure: Regenerate.
	* config/io/basic_file_libio.cc: Remove.
	* config/io/basic_file_libio.h: Remove.
	* config/io/c_io_libio_codecvt.c: Remove.
	* config/io/c_io_libio.h: Remove.
	* libio/*: Remove.
	* src/Makefile.am: Same.
	* src/Makefile.in: Regenerate.
	* docs/html/configopts.html: Edits.
	* docs/html/explanations.html: Edits.

From-SVN: r67813
parent 3ad93a34
2003-06-11 Benjamin Kosnik <bkoz@redhat.com> 2003-06-11 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Simplify.
* aclocal.m4: Regenerate.
* Makefile.am (SUBDIRS): Remove libio.
* Makefile.in: Regenerate.
* configure.in: Same.
* configure: Regenerate.
* config/io/basic_file_libio.cc: Remove.
* config/io/basic_file_libio.h: Remove.
* config/io/c_io_libio_codecvt.c: Remove.
* config/io/c_io_libio.h: Remove.
* libio/*: Remove.
* src/Makefile.am: Same.
* src/Makefile.in: Regenerate.
* docs/html/configopts.html: Edits.
* docs/html/explanations.html: Edits.
2003-06-11 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_alloc.h (__debug_alloc): Move out. * include/bits/stl_alloc.h (__debug_alloc): Move out.
(__malloc_alloc): Same. (__malloc_alloc): Same.
(__pool_alloc): Same. (__pool_alloc): Same.
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
AUTOMAKE_OPTIONS = 1.3 cygnus AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1 MAINT_CHARSET = latin1
SUBDIRS = include libio libmath libsupc++ src po testsuite SUBDIRS = include libmath libsupc++ src po testsuite
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
......
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
...@@ -70,7 +70,6 @@ AWK = @AWK@ ...@@ -70,7 +70,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -97,7 +96,6 @@ GCJ = @GCJ@ ...@@ -97,7 +96,6 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@ ...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@ glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@ glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
glibcpp_POFILES = @glibcpp_POFILES@ glibcpp_POFILES = @glibcpp_POFILES@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@ glibcpp_builddir = @glibcpp_builddir@
...@@ -139,14 +138,13 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -139,14 +138,13 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
AUTOMAKE_OPTIONS = 1.3 cygnus AUTOMAKE_OPTIONS = 1.3 cygnus
MAINT_CHARSET = latin1 MAINT_CHARSET = latin1
SUBDIRS = include libio libmath libsupc++ src po testsuite SUBDIRS = include libmath libsupc++ src po testsuite
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
...@@ -170,7 +168,45 @@ MULTICLEAN = true ...@@ -170,7 +168,45 @@ MULTICLEAN = true
# Work around what appears to be a GNU make bug handling MAKEFLAGS # Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and # values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile. # friends when we are called from the top level Makefile.
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "gxx_include_dir=$(gxx_include_dir)" "AR=$(AR)" "AS=$(AS)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" "NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)" AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"gxx_include_dir=$(gxx_include_dir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
# Subdir rules rely on $(FLAGS_TO_PASS) # Subdir rules rely on $(FLAGS_TO_PASS)
...@@ -185,7 +221,7 @@ mkcheck.in testsuite_flags.in ...@@ -185,7 +221,7 @@ mkcheck.in testsuite_flags.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
all: all-redirect all: all-redirect
.SUFFIXES: .SUFFIXES:
...@@ -199,7 +235,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ...@@ -199,7 +235,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
...@@ -272,7 +308,7 @@ maintainer-clean-recursive: ...@@ -272,7 +308,7 @@ maintainer-clean-recursive:
dot_seen=no; \ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \ rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \ test "$$subdir" != "." || dot_seen=yes; \
done; \ done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \ test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
......
...@@ -206,8 +206,6 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -206,8 +206,6 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
need_libmath=no need_libmath=no
enable_wchar_t=no enable_wchar_t=no
#enable_debug=no #enable_debug=no
#need_libio=no
#need_wlibio=no
#glibcpp_pch_comp=no #glibcpp_pch_comp=no
#enable_cheaders=c #enable_cheaders=c
#c_compatibility=no #c_compatibility=no
...@@ -1331,10 +1329,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [ ...@@ -1331,10 +1329,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl dnl
dnl Check for which I/O library to use: libio, or something specific. dnl Check for which I/O library to use: stdio, or something specific.
dnl dnl
dnl GLIBCPP_ENABLE_CSTDIO dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
dnl dnl
dnl default is stdio dnl default is stdio
dnl dnl
...@@ -1353,72 +1350,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1353,72 +1350,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl Check if a valid I/O package dnl Check if a valid I/O package
case x${enable_cstdio_flag} in case x${enable_cstdio_flag} in
xlibio)
CSTDIO_H=config/io/c_io_libio.h
BASIC_FILE_H=config/io/basic_file_libio.h
BASIC_FILE_CC=config/io/basic_file_libio.cc
AC_MSG_RESULT(libio)
# see if we are on a system with libio native (ie, linux)
AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
# Need to check and see what version of glibc is being used. If
# it's not glibc-2.2 or higher, then we'll need to go ahead and
# compile most of libio for linux systems.
if test x$has_libio = x"yes"; then
case "$target" in
*-*-linux*)
AC_MSG_CHECKING([for glibc version >= 2.2])
AC_EGREP_CPP([ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
ok
#endif
], glibc_satisfactory=yes, glibc_satisfactory=no)
AC_MSG_RESULT($glibc_satisfactory)
;;
esac
# XXX at the moment, admit defeat and force the recompilation
# XXX of glibc even on glibc-2.2 systems, because libio is not synched.
glibc_satisfactory=no
if test x$glibc_satisfactory = x"yes"; then
need_libio=no
need_wlibio=no
else
need_libio=yes
# bkoz XXX need to add checks to enable this
# pme XXX here's a first pass at such a check
if test x$enable_c_mbchar != xno; then
need_wlibio=yes
else
need_wlibio=no
fi
fi
else
# Using libio, but <libio.h> doesn't exist on the target system. . .
need_libio=yes
# bkoz XXX need to add checks to enable this
# pme XXX here's a first pass at such a check
if test x$enable_c_mbchar != xno; then
need_wlibio=yes
else
need_wlibio=no
fi
fi
;;
xstdio | x | xno | xnone | xyes) xstdio | x | xno | xnone | xyes)
# default # default
CSTDIO_H=config/io/c_io_stdio.h CSTDIO_H=config/io/c_io_stdio.h
BASIC_FILE_H=config/io/basic_file_stdio.h BASIC_FILE_H=config/io/basic_file_stdio.h
BASIC_FILE_CC=config/io/basic_file_stdio.cc BASIC_FILE_CC=config/io/basic_file_stdio.cc
AC_MSG_RESULT(stdio) AC_MSG_RESULT(stdio)
# We're not using stdio.
need_libio=no
need_wlibio=no
;; ;;
*) *)
echo "$enable_cstdio is an unknown io package" 1>&2 echo "$enable_cstdio is an unknown io package" 1>&2
...@@ -1428,22 +1365,6 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1428,22 +1365,6 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
AC_SUBST(CSTDIO_H) AC_SUBST(CSTDIO_H)
AC_SUBST(BASIC_FILE_H) AC_SUBST(BASIC_FILE_H)
AC_SUBST(BASIC_FILE_CC) AC_SUBST(BASIC_FILE_CC)
# 2000-08-04 bkoz hack
CCODECVT_C=config/io/c_io_libio_codecvt.c
AC_SUBST(CCODECVT_C)
# 2000-08-04 bkoz hack
AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
test "$need_libio" = yes || test "$need_wlibio" = yes)
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
if test "$need_libio" = yes || test "$need_wlibio" = yes; then
libio_la=../libio/libio.la
else
libio_la=
fi
AC_SUBST(libio_la)
]) ])
...@@ -1859,7 +1780,6 @@ dnl ...@@ -1859,7 +1780,6 @@ dnl
dnl TOPLEVEL_INCLUDES dnl TOPLEVEL_INCLUDES
dnl LIBMATH_INCLUDES dnl LIBMATH_INCLUDES
dnl LIBSUPCXX_INCLUDES dnl LIBSUPCXX_INCLUDES
dnl LIBIO_INCLUDES
dnl dnl
dnl GLIBCPP_EXPORT_INCLUDES dnl GLIBCPP_EXPORT_INCLUDES
AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
...@@ -1875,11 +1795,6 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ ...@@ -1875,11 +1795,6 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++' LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
if test x"$need_libio" = xyes; then
LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
AC_SUBST(LIBIO_INCLUDES)
fi
# Now, export this to all the little Makefiles.... # Now, export this to all the little Makefiles....
AC_SUBST(GLIBCPP_INCLUDES) AC_SUBST(GLIBCPP_INCLUDES)
AC_SUBST(TOPLEVEL_INCLUDES) AC_SUBST(TOPLEVEL_INCLUDES)
......
...@@ -218,8 +218,6 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ ...@@ -218,8 +218,6 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
need_libmath=no need_libmath=no
enable_wchar_t=no enable_wchar_t=no
#enable_debug=no #enable_debug=no
#need_libio=no
#need_wlibio=no
#glibcpp_pch_comp=no #glibcpp_pch_comp=no
#enable_cheaders=c #enable_cheaders=c
#c_compatibility=no #c_compatibility=no
...@@ -1343,10 +1341,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [ ...@@ -1343,10 +1341,9 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
dnl dnl
dnl Check for which I/O library to use: libio, or something specific. dnl Check for which I/O library to use: stdio, or something specific.
dnl dnl
dnl GLIBCPP_ENABLE_CSTDIO dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
dnl dnl
dnl default is stdio dnl default is stdio
dnl dnl
...@@ -1365,72 +1362,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1365,72 +1362,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl Check if a valid I/O package dnl Check if a valid I/O package
case x${enable_cstdio_flag} in case x${enable_cstdio_flag} in
xlibio)
CSTDIO_H=config/io/c_io_libio.h
BASIC_FILE_H=config/io/basic_file_libio.h
BASIC_FILE_CC=config/io/basic_file_libio.cc
AC_MSG_RESULT(libio)
# see if we are on a system with libio native (ie, linux)
AC_CHECK_HEADER(libio.h, has_libio=yes, has_libio=no)
# Need to check and see what version of glibc is being used. If
# it's not glibc-2.2 or higher, then we'll need to go ahead and
# compile most of libio for linux systems.
if test x$has_libio = x"yes"; then
case "$target" in
*-*-linux*)
AC_MSG_CHECKING([for glibc version >= 2.2])
AC_EGREP_CPP([ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
ok
#endif
], glibc_satisfactory=yes, glibc_satisfactory=no)
AC_MSG_RESULT($glibc_satisfactory)
;;
esac
# XXX at the moment, admit defeat and force the recompilation
# XXX of glibc even on glibc-2.2 systems, because libio is not synched.
glibc_satisfactory=no
if test x$glibc_satisfactory = x"yes"; then
need_libio=no
need_wlibio=no
else
need_libio=yes
# bkoz XXX need to add checks to enable this
# pme XXX here's a first pass at such a check
if test x$enable_c_mbchar != xno; then
need_wlibio=yes
else
need_wlibio=no
fi
fi
else
# Using libio, but <libio.h> doesn't exist on the target system. . .
need_libio=yes
# bkoz XXX need to add checks to enable this
# pme XXX here's a first pass at such a check
if test x$enable_c_mbchar != xno; then
need_wlibio=yes
else
need_wlibio=no
fi
fi
;;
xstdio | x | xno | xnone | xyes) xstdio | x | xno | xnone | xyes)
# default # default
CSTDIO_H=config/io/c_io_stdio.h CSTDIO_H=config/io/c_io_stdio.h
BASIC_FILE_H=config/io/basic_file_stdio.h BASIC_FILE_H=config/io/basic_file_stdio.h
BASIC_FILE_CC=config/io/basic_file_stdio.cc BASIC_FILE_CC=config/io/basic_file_stdio.cc
AC_MSG_RESULT(stdio) AC_MSG_RESULT(stdio)
# We're not using stdio.
need_libio=no
need_wlibio=no
;; ;;
*) *)
echo "$enable_cstdio is an unknown io package" 1>&2 echo "$enable_cstdio is an unknown io package" 1>&2
...@@ -1440,22 +1377,6 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1440,22 +1377,6 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
AC_SUBST(CSTDIO_H) AC_SUBST(CSTDIO_H)
AC_SUBST(BASIC_FILE_H) AC_SUBST(BASIC_FILE_H)
AC_SUBST(BASIC_FILE_CC) AC_SUBST(BASIC_FILE_CC)
# 2000-08-04 bkoz hack
CCODECVT_C=config/io/c_io_libio_codecvt.c
AC_SUBST(CCODECVT_C)
# 2000-08-04 bkoz hack
AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
test "$need_libio" = yes || test "$need_wlibio" = yes)
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
if test "$need_libio" = yes || test "$need_wlibio" = yes; then
libio_la=../libio/libio.la
else
libio_la=
fi
AC_SUBST(libio_la)
]) ])
...@@ -1871,7 +1792,6 @@ dnl ...@@ -1871,7 +1792,6 @@ dnl
dnl TOPLEVEL_INCLUDES dnl TOPLEVEL_INCLUDES
dnl LIBMATH_INCLUDES dnl LIBMATH_INCLUDES
dnl LIBSUPCXX_INCLUDES dnl LIBSUPCXX_INCLUDES
dnl LIBIO_INCLUDES
dnl dnl
dnl GLIBCPP_EXPORT_INCLUDES dnl GLIBCPP_EXPORT_INCLUDES
AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
...@@ -1887,11 +1807,6 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [ ...@@ -1887,11 +1807,6 @@ AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++' LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
if test x"$need_libio" = xyes; then
LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
AC_SUBST(LIBIO_INCLUDES)
fi
# Now, export this to all the little Makefiles.... # Now, export this to all the little Makefiles....
AC_SUBST(GLIBCPP_INCLUDES) AC_SUBST(GLIBCPP_INCLUDES)
AC_SUBST(TOPLEVEL_INCLUDES) AC_SUBST(TOPLEVEL_INCLUDES)
......
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have a working `mmap' system call. */ /* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP
...@@ -749,6 +749,9 @@ ...@@ -749,6 +749,9 @@
/* Define if you have the <nan.h> header file. */ /* Define if you have the <nan.h> header file. */
#undef HAVE_NAN_H #undef HAVE_NAN_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <sys/filio.h> header file. */ /* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H #undef HAVE_SYS_FILIO_H
......
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000, 2001 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 27.8 File-based streams
//
#include <bits/basic_file.h>
namespace std
{
// __basic_file<char> definitions
__basic_file<char>::__basic_file(__c_lock* __lock)
{
#ifdef _IO_MTSAFE_IO
_lock = __lock;
#endif
// Don't set the orientation of the stream when initializing.
#ifdef _GLIBCPP_USE_WCHAR_T
_IO_no_init(this, 0, 0, &_M_wfile, 0);
#else /* !defined(_GLIBCPP_USE_WCHAR_T) */
_IO_no_init(this, 0, 0, NULL, 0);
#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
_IO_JUMPS((_IO_FILE_plus *) this) = &_IO_file_jumps;
_IO_file_init((_IO_FILE_plus*)this);
}
// NB: Unused.
int
__basic_file<char>::overflow(int __c)
{ return _IO_file_overflow(this, __c); }
// NB: Unused.
int
__basic_file<char>::underflow()
{ return _IO_file_underflow(this); }
// NB: Unused.
int
__basic_file<char>::uflow()
{ return _IO_default_uflow(this); }
// NB: Unused.
int
__basic_file<char>::pbackfail(int __c)
{ return _IO_default_pbackfail(this, __c); }
streamsize
__basic_file<char>::xsputn(const char* __s, streamsize __n)
{ return _IO_file_xsputn(this, __s, __n); }
streamoff
__basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way,
ios_base::openmode __mode)
{ return _IO_file_seekoff(this, __off, __way, __mode); }
streamoff
__basic_file<char>::seekpos(streamoff __pos, ios_base::openmode __mode)
{ return _IO_file_seekoff(this, __pos, ios_base::beg, __mode); }
// NB: Unused.
streambuf*
__basic_file<char>::setbuf(char* __b, int __len)
{ return (streambuf*) _IO_file_setbuf(this,__b, __len); }
int
__basic_file<char>::sync()
{ return _IO_file_sync(this); }
// NB: Unused.
int
__basic_file<char>::doallocate()
{ return _IO_file_doallocate(this); }
// __basic_file<wchar_t> definitions
#ifdef _GLIBCPP_USE_WCHAR_T
__basic_file<wchar_t>::__basic_file(__c_lock* __lock)
{
#ifdef _IO_MTSAFE_IO
_lock = __lock;
#endif
// Don't set the orientation of the stream when initializing.
_IO_no_init(this, 0, 0, &_M_wfile, &_IO_wfile_jumps);
_IO_JUMPS((_IO_FILE_plus *) this) = &_IO_wfile_jumps;
_IO_file_init((_IO_FILE_plus*)this);
// In addition, need to allocate the buffer...
_IO_wdoallocbuf(this);
// Setup initial positions for this buffer...
// if (!(_flags & _IO_NO_READS))
_IO_wsetg(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base,
_wide_data->_IO_buf_base);
// if (!(_flags & _IO_NO_WRITES))
_IO_wsetp(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base);
// Setup codecvt bits...
_codecvt = &__c_libio_codecvt;
// Do the same for narrow bits...
if (_IO_write_base == NULL)
{
_IO_doallocbuf(this);
// if (!(_flags & _IO_NO_READS))
_IO_setg(this, _IO_buf_base, _IO_buf_base, _IO_buf_base);
// if (!(_flags & _IO_NO_WRITES))
_IO_setp(this, _IO_buf_base, _IO_buf_base);
}
}
int
__basic_file<wchar_t>::overflow(int __c)
{ return _IO_wfile_overflow(this, __c); }
int
__basic_file<wchar_t>::underflow()
{ return _IO_wfile_underflow(this); }
// NB: Unused.
int
__basic_file<wchar_t>::uflow()
{ return _IO_wdefault_uflow(this); }
// NB: Unused.
int
__basic_file<wchar_t>::pbackfail(int __c)
{ return _IO_wdefault_pbackfail(this, __c); }
streamsize
__basic_file<wchar_t>::xsputn(const wchar_t* __s, streamsize __n)
{ return _IO_wfile_xsputn(this, __s, __n); }
streamoff
__basic_file<wchar_t>::seekoff(streamoff __off, ios_base::seekdir __way,
ios_base::openmode __mode)
{ return _IO_wfile_seekoff(this, __off, __way, __mode); }
streamoff
__basic_file<wchar_t>::seekpos(streamoff __pos, ios_base::openmode __mode)
{ return _IO_wfile_seekoff(this, __pos, ios_base::beg, __mode); }
streambuf*
__basic_file<wchar_t>::setbuf(wchar_t* __b, int __len)
{ return (streambuf*) _IO_wfile_setbuf(this,__b, __len); }
int
__basic_file<wchar_t>::sync()
{ return _IO_wfile_sync(this); }
int
__basic_file<wchar_t>::doallocate()
{ return _IO_wfile_doallocate(this); }
#endif
// Need to instantiate base class here for type-info bits, etc
template struct __basic_file_base<char>;
template class __basic_file<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template struct __basic_file_base<wchar_t>;
template class __basic_file<wchar_t>;
#endif
} // namespace std
// underlying io library -*- C++ -*-
// Copyright (C) 2000, 2001, 2002, 2003 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
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
// c_io_libio.h - Defines for using the GNU libio
#ifndef _CPP_IO_LIBIO_H
#define _CPP_IO_LIBIO_H 1
#include <libio.h>
namespace std
{
// from fpos.h
typedef _IO_ssize_t streamsize; // Signed integral type
typedef _IO_ssize_t wstreamsize;
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
typedef _IO_off64_t streamoff;
typedef _IO_fpos64_t __c_streampos;
#else
typedef _IO_off_t streamoff;
typedef _IO_fpos_t __c_streampos;
#endif
#ifdef _GLIBCPP_USE_THREADS
typedef _IO_lock_t __c_lock;
#else
typedef int __c_lock;
#endif
// from basic_file.h
typedef _IO_FILE __c_file;
typedef _IO_wide_data __c_wfile;
#ifdef _GLIBCPP_USE_WCHAR_T
extern "C" _IO_codecvt __c_libio_codecvt;
#endif
// from ios_base.h
struct __ios_flags
{
typedef short __int_type;
static const __int_type _S_boolalpha = _IO_BAD_SEEN;
static const __int_type _S_dec = _IO_DEC;
static const __int_type _S_fixed = _IO_FIXED;
static const __int_type _S_hex = _IO_HEX;
static const __int_type _S_internal = _IO_INTERNAL;
static const __int_type _S_left = _IO_LEFT;
static const __int_type _S_oct = _IO_OCT;
static const __int_type _S_right = _IO_RIGHT;
static const __int_type _S_scientific = _IO_SCIENTIFIC;
static const __int_type _S_showbase = _IO_SHOWBASE;
static const __int_type _S_showpoint = _IO_SHOWPOINT;
static const __int_type _S_showpos = _IO_SHOWPOS;
static const __int_type _S_skipws = _IO_SKIPWS;
static const __int_type _S_unitbuf = _IO_UNITBUF;
static const __int_type _S_uppercase = _IO_UPPERCASE;
static const __int_type _S_adjustfield = _IO_LEFT | _IO_RIGHT
| _IO_INTERNAL;
static const __int_type _S_basefield = _IO_DEC | _IO_OCT | _IO_HEX;
static const __int_type _S_floatfield = _IO_SCIENTIFIC | _IO_FIXED;
// 27.4.2.1.3 Type ios_base::iostate
static const __int_type _S_badbit = _IO_BAD_SEEN;
static const __int_type _S_eofbit = _IO_EOF_SEEN;
static const __int_type _S_failbit = _IO_ERR_SEEN;
// 27.4.2.1.4 Type openmode
static const __int_type _S_app = _IOS_APPEND;
static const __int_type _S_ate = _IOS_ATEND;
static const __int_type _S_bin = _IOS_BIN;
static const __int_type _S_in = _IOS_INPUT;
static const __int_type _S_out = _IOS_OUTPUT;
static const __int_type _S_trunc = _IOS_TRUNC;
};
}
#endif // _CPP_IO_LIBIO_H
/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
/* Slightly modified from glibc/libio/iofwide.c */
#include <libio.h>
#ifdef _GLIBCPP_USE_WCHAR_T
/* Prototypes of libio's codecvt functions. */
static enum __codecvt_result
do_out(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const wchar_t *from_start, const wchar_t *from_end,
const wchar_t **from_stop, char *to_start, char *to_end,
char **to_stop);
static enum __codecvt_result
do_unshift(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, char *to_start,
char *to_end, char **to_stop);
static enum __codecvt_result
do_in(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const char *from_start, const char *from_end, const char **from_stop,
wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop);
static int
do_encoding(struct _IO_codecvt *codecvt);
static int
do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const char *from_start, const char *from_end, _IO_size_t max);
static int
do_max_length(struct _IO_codecvt *codecvt);
static int
do_always_noconv(struct _IO_codecvt *codecvt);
/* The functions used in `codecvt' for libio are always the same. */
struct _IO_codecvt __c_libio_codecvt =
{
.__codecvt_destr = NULL, /* Destructor, never used. */
.__codecvt_do_out = do_out,
.__codecvt_do_unshift = do_unshift,
.__codecvt_do_in = do_in,
.__codecvt_do_encoding = do_encoding,
.__codecvt_do_always_noconv = do_always_noconv,
.__codecvt_do_length = do_length,
.__codecvt_do_max_length = do_max_length
};
static enum __codecvt_result
do_out(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const wchar_t *from_start, const wchar_t *from_end,
const wchar_t **from_stop, char *to_start, char *to_end,
char **to_stop)
{
enum __codecvt_result res = __codecvt_ok;
while (from_start < from_end)
{
if (to_start >= to_end)
{
res = __codecvt_partial;
break;
}
*to_start++ = (char) *from_start++;
}
*from_stop = from_start;
*to_stop = to_start;
return res;
}
static enum __codecvt_result
do_unshift(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
char *to_start, char *to_end, char **to_stop)
{
*to_stop = to_start;
return __codecvt_ok;
}
static enum __codecvt_result
do_in(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const char *from_start, const char *from_end, const char **from_stop,
wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop)
{
enum __codecvt_result res = __codecvt_ok;
while (from_start < from_end)
{
if (to_start >= to_end)
{
res = __codecvt_partial;
break;
}
*to_start++ = (wchar_t) *from_start++;
}
*from_stop = from_start;
*to_stop = to_start;
return res;
}
static int
do_encoding(struct _IO_codecvt *codecvt)
{ return 1; }
static int
do_always_noconv(struct _IO_codecvt *codecvt)
{ return 0; }
static int
do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
const char *from_start, const char *from_end, _IO_size_t max)
{ return from_end - from_start; }
static int
do_max_length(struct _IO_codecvt *codecvt)
{ return 1; }
#endif /* _GLIBCPP_USE_WCHAR_T */
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -490,7 +490,7 @@ AC_SUBST(LIBSUPCXX_PICFLAGS) ...@@ -490,7 +490,7 @@ AC_SUBST(LIBSUPCXX_PICFLAGS)
# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here. # top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
AC_OUTPUT(Makefile \ AC_OUTPUT(Makefile \
include/Makefile src/Makefile \ include/Makefile src/Makefile \
libmath/Makefile libio/Makefile libsupc++/Makefile \ libmath/Makefile libsupc++/Makefile \
po/Makefile testsuite/Makefile mkcheck testsuite_flags, po/Makefile testsuite/Makefile mkcheck testsuite_flags,
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then if test -n "$CONFIG_FILES"; then
...@@ -532,7 +532,7 @@ ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" ...@@ -532,7 +532,7 @@ ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros: dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
dnl AC_CONFIG_FILES(Makefile \ dnl AC_CONFIG_FILES(Makefile \
dnl include/Makefile src/Makefile \ dnl include/Makefile src/Makefile \
dnl libmath/Makefile libio/Makefile libsupc++/Makefile \ dnl libmath/Makefile libsupc++/Makefile \
dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags) dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags)
dnl AC_CONFIG_COMMANDS([default], dnl AC_CONFIG_COMMANDS([default],
dnl [if test -n "$CONFIG_FILES"; then dnl [if test -n "$CONFIG_FILES"; then
......
...@@ -90,13 +90,10 @@ options</a></h1> ...@@ -90,13 +90,10 @@ options</a></h1>
</dd> </dd>
<dt><code>--enable-cstdio=OPTION </code></dt> <dt><code>--enable-cstdio=OPTION </code></dt>
<dd><p>Select a target-specific I/O package. As of libstdc++-v3 <dd><p>Select a target-specific I/O package. At the moment, the only
snapshot 3.0.96, the choices are 'libio' to specify the GNU choice is to use 'stdio', a generic &quot;C&quot; abstraction.
I/O package (from The default is 'stdio'. A longer explanation is <a
<a href="http://sources.redhat.com/glibc/">glibc</a>, the href="explanations.html#cstdio">here</a>.
GNU C library), or 'stdio' to use a generic &quot;C&quot;
abstraction. The default is 'stdio'. A longer explanation
is <a href="explanations.html#cstdio">here</a>.
</p> </p>
</dd> </dd>
......
...@@ -48,12 +48,6 @@ design</a></h1> ...@@ -48,12 +48,6 @@ design</a></h1>
disadvantage is that the C++ code will run slower (fortunately, the layer disadvantage is that the C++ code will run slower (fortunately, the layer
is thin). is thin).
</p> </p>
<p>Choosing 'libio' is the cool way; it allows C++ and C to share some
buffers. It's disabled because of tricky synchronization issues. Other
cool ways (various methods of sharing resources between C and C++
facilities, instead of layering) are possible. This approach can speed
up I/O significantly.
</p>
<p>Other packages are possible. For a new package, a header must be <p>Other packages are possible. For a new package, a header must be
written to provide types like streamsize (usually just a typedef), as written to provide types like streamsize (usually just a typedef), as
well as some internal types like<code> __c_file_type </code> and well as some internal types like<code> __c_file_type </code> and
......
...@@ -70,7 +70,6 @@ AWK = @AWK@ ...@@ -70,7 +70,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -95,7 +94,6 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ ...@@ -95,7 +94,6 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
...@@ -134,7 +132,6 @@ glibcpp_prefixdir = @glibcpp_prefixdir@ ...@@ -134,7 +132,6 @@ glibcpp_prefixdir = @glibcpp_prefixdir@
glibcpp_toolexecdir = @glibcpp_toolexecdir@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
......
// Threading support -*- C++ -*- // Threading support -*- C++ -*-
// Copyright (C) 2001, 2002 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
......
## Makefile for the libio subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
## 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
## terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option)
## any later version.
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License along
## with this library; see the file COPYING. If not, write to the Free
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
AUTOMAKE_OPTIONS = 1.3 cygnus
mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
if GLIBCPP_BUILD_LIBIO
noinst_LTLIBRARIES = libio.la
else
noinst_LTLIBRARIES =
endif
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
INCLUDES = \
-nostdinc++ \
$(GLIBCPP_INCLUDES) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
libio_headers = \
libio.h libioP.h iolibio.h
if GLIBCPP_NEED_LIBIO
LIBIO_SRCS = \
filedoalloc.c genops.c fileops.c stdfiles.c \
iofclose.c iofopen.c
else
LIBIO_SRCS =
endif
if GLIBCPP_NEED_WLIBIO
LIBIO_WSRCS = \
wfiledoalloc.c wfileops.c wgenops.c iofwide.c
else
LIBIO_WSRCS =
endif
EXTRA_DIST = iostreamP.h
libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS)
AM_CFLAGS = -D_GNU_SOURCE
/* This file is needed by libio to define various configuration parameters.
These are always the same in the GNU C library. */
#ifndef _G_config_h
#define _G_config_h 1
#ifndef _LIBC
# include <bits/c++config.h>
# ifdef _GLIBCPP_USE_THREADS
# define _IO_MTSAFE_IO
# endif
#endif
/* Define types for libio in terms of the standard internal type names. */
#include <sys/types.h>
#define __need_size_t
#define __need_wchar_t
#define __need_wint_t
#define __need_NULL
#define __need_ptrdiff_t
#ifdef __cplusplus
# include <cstddef>
#else
# include <stddef.h>
#endif
#ifndef _WINT_T
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
set, as well as at least one value that does not correspond to any
member of the extended character set. */
# define _WINT_T
typedef unsigned int wint_t;
#endif
/* For use as part of glibc (native) or as part of libstdc++ (maybe
not glibc) */
#ifndef __c_mbstate_t_defined
# define __c_mbstate_t_defined 1
/*# ifdef _GLIBCPP_USE_WCHAR_T*/
typedef struct
{
int count;
wint_t value;
}__c_mbstate_t;
/*# endif*/
#endif
#undef __need_mbstate_t
typedef size_t _G_size_t;
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
typedef struct
{
__off_t __pos;
__c_mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__c_mbstate_t __state;
} _G_fpos64_t;
#else
typedef __off_t _G_fpos_t;
typedef __off64_t _G_fpos64_t;
#endif
#define _G_ssize_t __ssize_t
#define _G_off_t __off_t
#define _G_off64_t __off64_t
#define _G_pid_t __pid_t
#define _G_uid_t __uid_t
#define _G_wchar_t wchar_t
#define _G_wint_t wint_t
#define _G_stat64 stat64
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <iconv.h>
typedef iconv_t _G_iconv_t;
#endif
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
#define _G_HAVE_BOOL 1
/* These library features are always available in the GNU C library. */
#define _G_HAVE_ATEXIT 1
#define _G_HAVE_SYS_CDEFS 1
#define _G_HAVE_SYS_WAIT 1
#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
#define _G_HAVE_PRINTF_FP 1
#define _G_HAVE_MMAP 1
#define _G_HAVE_LONG_DOUBLE_IO 1
#define _G_HAVE_IO_FILE_OPEN 1
#define _G_HAVE_IO_GETLINE_INFO 1
#define _G_IO_IO_FILE_VERSION 0x20001
//#define _G_OPEN64 __open64
//#define _G_LSEEK64 __lseek64
//#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
/* This is defined by <bits/stat.h> if `st_blksize' exists. */
/*#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)*/
#define _G_BUFSIZ 8192
/* These are the vtbl details for ELF. */
#define _G_NAMES_HAVE_UNDERSCORE 0
#define _G_VTABLE_LABEL_HAS_LENGTH 1
#ifndef _G_USING_THUNKS
# define _G_USING_THUNKS 1
#endif /* _G_USING_THUNKS */
#define _G_VTABLE_LABEL_PREFIX "__vt_"
#define _G_VTABLE_LABEL_PREFIX_ID __vt_
#define _G_INTERNAL_CCS "UCS4"
#define _G_HAVE_WEAK_SYMBOL 1
#define _G_STDIO_USES_LIBIO 1
#if defined __cplusplus || defined __STDC__
# define _G_ARGS(ARGLIST) ARGLIST
#else
# define _G_ARGS(ARGLIST) ()
#endif
#endif /* _G_config.h */
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
/*
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* Modified for GNU iostream by Per Bothner 1991, 1992. */
#ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
#endif
#include "libioP.h"
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __STDC__
#include <stdlib.h>
#include <unistd.h>
#endif
#ifdef _LIBC
# undef isatty
# define isatty(Fd) __isatty (Fd)
#endif
/*
* Allocate a file buffer, or switch to unbuffered I/O.
* Per the ANSI C standard, ALL tty devices default to line buffered.
*
* As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
* optimisation) right after the _fstat() that finds the buffer size.
*/
int
_IO_file_doallocate (fp)
_IO_FILE *fp;
{
_IO_size_t size;
int couldbetty;
char *p;
struct _G_stat64 st;
if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
{
couldbetty = 0;
size = _IO_BUFSIZ;
#if 0
/* do not try to optimise fseek() */
fp->_flags |= __SNPT;
#endif
}
else
{
couldbetty = S_ISCHR (st.st_mode);
#if _IO_HAVE_ST_BLKSIZE
size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
#else
size = _IO_BUFSIZ;
#endif
}
ALLOC_BUF (p, size, EOF);
_IO_setb (fp, p, p + size, 1);
if (couldbetty && isatty (fp->_fileno))
fp->_flags |= _IO_LINE_BUF;
return 1;
}
/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
#include "libioP.h"
#ifdef __STDC__
#include <stdlib.h>
#endif
#if _LIBC
# include "../iconv/gconv_int.h"
# include <shlib-compat.h>
#else
# define SHLIB_COMPAT(a, b, c) 0
# define _IO_new_fclose fclose
#endif
int
_IO_new_fclose (fp)
_IO_FILE *fp;
{
int status;
CHECK_FILE(fp, EOF);
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
/* We desperately try to help programs which are using streams in a
strange way and mix old and new functions. Detect old streams
here. */
if (fp->_vtable_offset != 0)
return _IO_old_fclose (fp);
#endif
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
else
status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
_IO_FINISH (fp);
_IO_funlockfile (fp);
if (fp->_mode > 0)
{
#if _LIBC
/* This stream has a wide orientation. This means we have to free
the conversion functions. */
struct _IO_codecvt *cc = fp->_codecvt;
if (cc->__cd_in.__cd.__steps->__shlib_handle != NULL)
{
--cc->__cd_in.__cd.__steps->__counter;
__gconv_close_transform (cc->__cd_in.__cd.__steps, 1);
}
if (cc->__cd_out.__cd.__steps->__shlib_handle != NULL)
{
--cc->__cd_out.__cd.__steps->__counter;
__gconv_close_transform (cc->__cd_out.__cd.__steps, 1);
}
#endif
}
_IO_cleanup_region_end (0);
if (_IO_have_backup (fp))
_IO_free_backup_area (fp);
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
{
fp->_IO_file_flags = 0;
free(fp);
}
return status;
}
#ifdef _LIBC
versioned_symbol (libc, _IO_new_fclose, _IO_fclose, GLIBC_2_1);
strong_alias (_IO_new_fclose, __new_fclose)
versioned_symbol (libc, __new_fclose, fclose, GLIBC_2_1);
#endif
/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
#include "libioP.h"
#ifdef __STDC__
#include <stdlib.h>
#endif
#ifdef _LIBC
# include <shlib-compat.h>
#else
# define _IO_new_fopen fopen
#endif
_IO_FILE *
_IO_new_fopen (filename, mode)
const char *filename;
const char *mode;
{
struct locked_FILE
{
struct _IO_FILE_plus fp;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
struct _IO_wide_data wd;
#endif /* !(defined _LIBC || defined _GLIBCPP_USE_WCHAR_T) */
} *new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
new_f->fp.file._lock = &new_f->lock;
#endif
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
_IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
#else
_IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);
#endif
_IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
_IO_file_init (&new_f->fp);
#if !_IO_UNIFIED_JUMPTABLES
new_f->fp.vtable = NULL;
#endif
if (_IO_file_fopen ((_IO_FILE *) new_f, filename, mode, 1) != NULL)
return (_IO_FILE *) &new_f->fp;
_IO_un_link (&new_f->fp);
free (new_f);
return NULL;
}
#ifdef _LIBC
strong_alias (_IO_new_fopen, __new_fopen)
versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);
versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
#endif
#include "libio.h"
/* These emulate stdio functionality, but with a different name
(_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
#ifdef __cplusplus
extern "C" {
#endif
extern int _IO_fclose __P((_IO_FILE*));
extern int _IO_new_fclose __P((_IO_FILE*));
extern int _IO_old_fclose __P((_IO_FILE*));
extern _IO_FILE *_IO_fdopen __P((int, const char*));
extern _IO_FILE *_IO_old_fdopen __P((int, const char*));
extern _IO_FILE *_IO_new_fdopen __P((int, const char*));
extern int _IO_fflush __P((_IO_FILE*));
extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
extern int _IO_fgetpos64 __P((_IO_FILE*, _IO_fpos64_t*));
extern char* _IO_fgets __P((char*, int, _IO_FILE*));
extern _IO_FILE *_IO_fopen __P((const char*, const char*));
extern _IO_FILE *_IO_old_fopen __P((const char*, const char*));
extern _IO_FILE *_IO_new_fopen __P((const char*, const char*));
extern _IO_FILE *_IO_fopen64 __P((const char*, const char*));
extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
extern int _IO_fputs __P((const char*, _IO_FILE*));
extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
extern int _IO_fsetpos64 __P((_IO_FILE*, const _IO_fpos64_t *));
extern long int _IO_ftell __P((_IO_FILE*));
extern _IO_size_t _IO_fread __P((void*, _IO_size_t, _IO_size_t, _IO_FILE*));
extern _IO_size_t _IO_fwrite __P((const void*,
_IO_size_t, _IO_size_t, _IO_FILE*));
extern char* _IO_gets __P((char*));
extern void _IO_perror __P((const char*));
extern int _IO_printf __P((const char*, ...));
extern int _IO_puts __P((const char*));
extern int _IO_scanf __P((const char*, ...));
extern void _IO_setbuffer __P((_IO_FILE *, char*, _IO_size_t));
extern int _IO_setvbuf __P((_IO_FILE*, char*, int, _IO_size_t));
extern int _IO_sscanf __P((const char*, const char*, ...));
extern int _IO_sprintf __P((char *, const char*, ...));
extern int _IO_ungetc __P((int, _IO_FILE*));
extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list));
extern int _IO_vsprintf __P((char*, const char*, _IO_va_list));
extern int _IO_vswprintf __P((wchar_t*, _IO_size_t, const wchar_t*,
_IO_va_list));
struct obstack;
extern int _IO_obstack_vprintf __P ((struct obstack *, const char *,
_IO_va_list));
extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
#ifndef _IO_pos_BAD
#define _IO_pos_BAD ((_IO_off64_t)(-1))
#endif
#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
#define _IO_fseek(__fp, __offset, __whence) \
(_IO_seekoff(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD ? EOF : 0)
#define _IO_rewind(FILE) (void)_IO_seekoff(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
#define _IO_vprintf(FORMAT, ARGS) _IO_vfprintf(_IO_stdout, FORMAT, ARGS)
#define _IO_freopen(FILENAME, MODE, FP) \
(_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 0))
#define _IO_old_freopen(FILENAME, MODE, FP) \
(_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
#define _IO_freopen64(FILENAME, MODE, FP) \
(_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 1))
#define _IO_fileno(FP) ((FP)->_fileno)
extern _IO_FILE* _IO_popen __P((const char*, const char*));
extern _IO_FILE* _IO_new_popen __P((const char*, const char*));
extern _IO_FILE* _IO_old_popen __P((const char*, const char*));
extern int __new_pclose __P((_IO_FILE *));
extern int __old_pclose __P((_IO_FILE *));
#define _IO_pclose _IO_fclose
#define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
#define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
_IO_FILE *__new_freopen __P ((const char *, const char *, _IO_FILE *));
_IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *));
#ifdef __cplusplus
}
#endif
/* Copyright (C) 1993, 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
/* This file provides definitions of _IO_stdin, _IO_stdout, and _IO_stderr
for C code. Compare stdstreams.cc.
(The difference is that here the vtable field is set to 0,
so the objects defined are not valid C++ objects. On the other
hand, we don't need a C++ compiler to build this file.) */
#include "libioP.h"
#ifdef _IO_MTSAFE_IO
# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
static struct _IO_wide_data _IO_wide_data_##FD \
= { ._wide_vtable = &_IO_wfile_jumps }; \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
&_IO_file_jumps};
# else
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
&_IO_file_jumps};
# endif
#else
# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
static struct _IO_wide_data _IO_wide_data_##FD \
= { ._wide_vtable = &_IO_wfile_jumps }; \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
&_IO_file_jumps};
# else
# define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
&_IO_file_jumps};
# endif
#endif
DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES);
DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS);
DEF_STDFILE(_IO_2_1_stderr_, 2, &_IO_2_1_stdout_, _IO_NO_READS+_IO_UNBUFFERED);
struct _IO_FILE_plus *_IO_list_all = &_IO_2_1_stderr_;
/* Copyright (C) 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
#include "libioP.h"
#include "stdio.h"
#undef stdin
#undef stdout
#undef stderr
_IO_FILE *stdin = (FILE *) &_IO_2_1_stdin_;
_IO_FILE *stdout = (FILE *) &_IO_2_1_stdout_;
_IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
#undef _IO_stdin
#undef _IO_stdout
#undef _IO_stderr
#ifdef _LIBC
strong_alias (stdin, _IO_stdin);
strong_alias (stdout, _IO_stdout);
strong_alias (stderr, _IO_stderr);
#endif
/* Copyright (C) 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does
not cause the resulting executable to be covered by the GNU General
Public License. This exception does not however invalidate any
other reasons why the executable file might be covered by the GNU
General Public License. */
/*
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* Modified for GNU iostream by Per Bothner 1991, 1992. */
#ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
#endif
#include "libioP.h"
#ifdef _GLIBCPP_USE_WCHAR_T
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __STDC__
#include <stdlib.h>
#include <unistd.h>
#endif
#ifdef _LIBC
# undef isatty
# define isatty(Fd) __isatty (Fd)
#endif
/*
* Allocate a file buffer, or switch to unbuffered I/O.
* Per the ANSI C standard, ALL tty devices default to line buffered.
*
* As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
* optimisation) right after the _fstat() that finds the buffer size.
*/
int
_IO_wfile_doallocate (fp)
_IO_FILE *fp;
{
_IO_size_t size;
int couldbetty;
wchar_t *p;
struct _G_stat64 st;
/* Allocate room for the external buffer. */
if (fp->_IO_buf_base == NULL)
_IO_file_doallocate (fp);
if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
{
couldbetty = 0;
size = _IO_BUFSIZ;
#if 0
/* do not try to optimise fseek() */
fp->_flags |= __SNPT;
#endif
}
else
{
couldbetty = S_ISCHR (st.st_mode);
#if _IO_HAVE_ST_BLKSIZE
size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
#else
size = _IO_BUFSIZ;
#endif
}
ALLOC_WBUF (p, size * sizeof (wchar_t), EOF);
_IO_wsetb (fp, p, p + size, 1);
if (couldbetty && isatty (fp->_fileno))
fp->_flags |= _IO_LINE_BUF;
return 1;
}
#endif /* _GLIBCPP_USE_WCHAR_T */
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
...@@ -70,7 +70,6 @@ AWK = @AWK@ ...@@ -70,7 +70,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -97,7 +96,6 @@ GCJ = @GCJ@ ...@@ -97,7 +96,6 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
...@@ -127,6 +125,7 @@ enable_shared = @enable_shared@ ...@@ -127,6 +125,7 @@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@ glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@ glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
glibcpp_POFILES = @glibcpp_POFILES@ glibcpp_POFILES = @glibcpp_POFILES@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@ glibcpp_builddir = @glibcpp_builddir@
...@@ -138,7 +137,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -138,7 +137,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
......
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
...@@ -69,7 +69,6 @@ ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@ ...@@ -69,7 +69,6 @@ ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
AWK = @AWK@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -94,7 +93,6 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ ...@@ -94,7 +93,6 @@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
...@@ -124,6 +122,7 @@ enable_shared = @enable_shared@ ...@@ -124,6 +122,7 @@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@ glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@ glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
glibcpp_POFILES = @glibcpp_POFILES@ glibcpp_POFILES = @glibcpp_POFILES@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@ glibcpp_builddir = @glibcpp_builddir@
...@@ -135,7 +134,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -135,7 +134,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
...@@ -164,11 +162,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ ...@@ -164,11 +162,13 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# These bits are all figured out from configure. Look in acinclude.m4 # These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS # or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden. # NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = @SECTION_FLAGS@ @EXTRA_CXX_FLAGS@ CONFIG_CXXFLAGS = \
@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@
# Warning flags to use. # Warning flags to use.
WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
LIBSUPCXX_CXXFLAGS = @LIBSUPCXX_PICFLAGS@ LIBSUPCXX_CXXFLAGS = @LIBSUPCXX_PICFLAGS@
...@@ -178,13 +178,41 @@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ ...@@ -178,13 +178,41 @@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
INCLUDES = $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES) INCLUDES = \
$(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
headers = exception new typeinfo cxxabi.h exception_defines.h
headers = \
exception new typeinfo cxxabi.h exception_defines.h
sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_aux_runtime.cc eh_catch.cc eh_exception.cc eh_globals.cc eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc vec.cc vterminate.cc
sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
eh_exception.cc \
eh_globals.cc \
eh_personality.cc \
eh_term_handler.cc \
eh_terminate.cc \
eh_throw.cc \
eh_type.cc \
eh_unex_handler.cc \
guard.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
new_opv.cc \
new_opvnt.cc \
pure.cc \
tinfo.cc \
tinfo2.cc \
vec.cc \
vterminate.cc
libsupc___la_SOURCES = $(sources) libsupc___la_SOURCES = $(sources)
...@@ -198,10 +226,16 @@ glibcppinstall_HEADERS = $(headers) ...@@ -198,10 +226,16 @@ glibcppinstall_HEADERS = $(headers)
# set this option because CONFIG_CXXFLAGS has to be after # set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion call for it. # as the occasion call for it.
AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) AM_CXXFLAGS = \
-fno-implicit-templates \
$(LIBSUPCXX_CXXFLAGS) \
$(WARN_CXXFLAGS) \
$(OPTIMIZE_CXXFLAGS) \
$(CONFIG_CXXFLAGS)
AM_MAKEFLAGS = "gxx_include_dir=$(gxx_include_dir)" AM_MAKEFLAGS = \
"gxx_include_dir=$(gxx_include_dir)"
# libstdc++ libtool notes # libstdc++ libtool notes
...@@ -225,7 +259,9 @@ AM_MAKEFLAGS = "gxx_include_dir=$(gxx_include_dir)" ...@@ -225,7 +259,9 @@ AM_MAKEFLAGS = "gxx_include_dir=$(gxx_include_dir)"
# #
# We have to put --tag disable-shared after --tag CXX lest things # We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared. # CXX undo the affect of disable-shared.
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
--mode=compile $(CXX) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# 3) We'd have a problem when building the shared libstdc++ object if # 3) We'd have a problem when building the shared libstdc++ object if
...@@ -234,7 +270,9 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=c ...@@ -234,7 +270,9 @@ LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared --mode=c
# course is problematic at this point. So, we get the top-level # course is problematic at this point. So, we get the top-level
# directory to configure libstdc++-v3 to use gcc as the C++ # directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver. # compilation driver.
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared --mode=link $(CXX) @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@ CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
--mode=link $(CXX) \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
...@@ -271,7 +309,7 @@ DIST_COMMON = Makefile.am Makefile.in ...@@ -271,7 +309,7 @@ DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
SOURCES = $(libsupc__convenience_la_SOURCES) $(libsupc___la_SOURCES) SOURCES = $(libsupc__convenience_la_SOURCES) $(libsupc___la_SOURCES)
OBJECTS = $(libsupc__convenience_la_OBJECTS) $(libsupc___la_OBJECTS) OBJECTS = $(libsupc__convenience_la_OBJECTS) $(libsupc___la_OBJECTS)
......
...@@ -70,7 +70,6 @@ AWK = @AWK@ ...@@ -70,7 +70,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -97,7 +96,6 @@ GCJ = @GCJ@ ...@@ -97,7 +96,6 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@ ...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@ glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@ glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
glibcpp_POFILES = @glibcpp_POFILES@ glibcpp_POFILES = @glibcpp_POFILES@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@ glibcpp_builddir = @glibcpp_builddir@
...@@ -138,7 +137,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -138,7 +137,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
...@@ -159,7 +157,9 @@ LOCALE_OUT = @glibcpp_MOFILES@ ...@@ -159,7 +157,9 @@ LOCALE_OUT = @glibcpp_MOFILES@
MSGFMT = msgfmt MSGFMT = msgfmt
# Necessary files. # Necessary files.
DISTFILES = Makefile.am Makefile.in string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) DISTFILES = \
Makefile.am Makefile.in string_literals.cc POTFILES.in $(PACKAGE).pot \
$(LOCALE_IN)
# Specify what gets cleaned up on a 'make clean' # Specify what gets cleaned up on a 'make clean'
...@@ -174,15 +174,15 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ...@@ -174,15 +174,15 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in DIST_COMMON = Makefile.am Makefile.in
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
all: all-redirect all: all-redirect
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .mo .po .SUFFIXES: .mo .po
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile cd $(top_srcdir) && $(AUTOMAKE) --cygnus po/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
...@@ -195,13 +195,8 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) ...@@ -195,13 +195,8 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = po subdir = po
distdir: $(DISTFILES) distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu po/Makefile
@for file in $(DISTFILES); do \ @for file in $(DISTFILES); do \
d=$(srcdir); \ if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \ cp -pr $$d/$$file $(distdir)/$$file; \
else \ else \
...@@ -214,10 +209,12 @@ info-am: ...@@ -214,10 +209,12 @@ info-am:
info: info-am info: info-am
dvi-am: dvi-am:
dvi: dvi-am dvi: dvi-am
check-am: all-am check-am:
check: check-am check: check-am
installcheck-am: installcheck-am:
installcheck: installcheck-am installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am: install-exec-am:
install-exec: install-exec-am install-exec: install-exec-am
...@@ -266,11 +263,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am ...@@ -266,11 +263,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \ .PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \ installcheck-am installcheck install-info-am install-info \
install-data-local install-data-am install-data install-am install \ install-exec-am install-exec install-data-local install-data-am \
uninstall-am uninstall all-local all-redirect all-am all installdirs \ install-data install-am install uninstall-am uninstall all-local \
mostlyclean-generic distclean-generic clean-generic \ all-redirect all-am all installdirs mostlyclean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.po.mo: .po.mo:
......
...@@ -62,13 +62,12 @@ WARN_CXXFLAGS = \ ...@@ -62,13 +62,12 @@ WARN_CXXFLAGS = \
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = \ INCLUDES = \
-nostdinc++ \ -nostdinc++ \
$(GLIBCPP_INCLUDES) \ $(GLIBCPP_INCLUDES) \
$(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \ $(LIBSUPCXX_INCLUDES) $(LIBMATH_INCLUDES) \
$(TOPLEVEL_INCLUDES) $(TOPLEVEL_INCLUDES)
# Source files linked in via configuration/make substitution for a # Source files linked in via configuration/make substitution for a
...@@ -151,7 +150,7 @@ VPATH = $(top_srcdir)/src:$(top_srcdir) ...@@ -151,7 +150,7 @@ VPATH = $(top_srcdir)/src:$(top_srcdir)
libstdc___la_SOURCES = $(sources) libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \ libstdc___la_LIBADD = \
$(top_builddir)/libmath/libmath.la @libio_la@ \ $(top_builddir)/libmath/libmath.la \
$(top_builddir)/libsupc++/libsupc++convenience.la $(top_builddir)/libsupc++/libsupc++convenience.la
libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD) libstdc___la_DEPENDENCIES = libstdc++-symbol.ver $(libstdc___la_LIBADD)
......
...@@ -69,7 +69,6 @@ AWK = @AWK@ ...@@ -69,7 +69,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -131,7 +130,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -131,7 +130,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
...@@ -169,13 +167,12 @@ WARN_CXXFLAGS = \ ...@@ -169,13 +167,12 @@ WARN_CXXFLAGS = \
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
INCLUDES = \ INCLUDES = \
-nostdinc++ \ -nostdinc++ \
$(GLIBCPP_INCLUDES) \ $(GLIBCPP_INCLUDES) \
$(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \ $(LIBSUPCXX_INCLUDES) $(LIBMATH_INCLUDES) \
$(TOPLEVEL_INCLUDES) $(TOPLEVEL_INCLUDES)
...@@ -235,7 +232,7 @@ VPATH = $(top_srcdir)/src:$(top_srcdir) ...@@ -235,7 +232,7 @@ VPATH = $(top_srcdir)/src:$(top_srcdir)
libstdc___la_SOURCES = $(sources) libstdc___la_SOURCES = $(sources)
libstdc___la_LIBADD = \ libstdc___la_LIBADD = \
$(top_builddir)/libmath/libmath.la @libio_la@ \ $(top_builddir)/libmath/libmath.la \
$(top_builddir)/libsupc++/libsupc++convenience.la $(top_builddir)/libsupc++/libsupc++convenience.la
......
...@@ -70,7 +70,6 @@ AWK = @AWK@ ...@@ -70,7 +70,6 @@ AWK = @AWK@
BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_CC = @BASIC_FILE_CC@
BASIC_FILE_H = @BASIC_FILE_H@ BASIC_FILE_H = @BASIC_FILE_H@
CC = @CC@ CC = @CC@
CCODECVT_C = @CCODECVT_C@
CCODECVT_CC = @CCODECVT_CC@ CCODECVT_CC = @CCODECVT_CC@
CCODECVT_H = @CCODECVT_H@ CCODECVT_H = @CCODECVT_H@
CCOLLATE_CC = @CCOLLATE_CC@ CCOLLATE_CC = @CCOLLATE_CC@
...@@ -96,7 +95,6 @@ GCJ = @GCJ@ ...@@ -96,7 +95,6 @@ GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@ GCJFLAGS = @GCJFLAGS@
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@ GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@ GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@ LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@ LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@ ...@@ -128,6 +126,7 @@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
glibcpp_CXX = @glibcpp_CXX@ glibcpp_CXX = @glibcpp_CXX@
glibcpp_MOFILES = @glibcpp_MOFILES@ glibcpp_MOFILES = @glibcpp_MOFILES@
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
glibcpp_POFILES = @glibcpp_POFILES@ glibcpp_POFILES = @glibcpp_POFILES@
glibcpp_basedir = @glibcpp_basedir@ glibcpp_basedir = @glibcpp_basedir@
glibcpp_builddir = @glibcpp_builddir@ glibcpp_builddir = @glibcpp_builddir@
...@@ -139,7 +138,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@ ...@@ -139,7 +138,6 @@ glibcpp_toolexecdir = @glibcpp_toolexecdir@
glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@ glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
gxx_include_dir = @gxx_include_dir@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@ ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@ libtool_VERSION = @libtool_VERSION@
toplevel_srcdir = @toplevel_srcdir@ toplevel_srcdir = @toplevel_srcdir@
...@@ -147,10 +145,14 @@ AUTOMAKE_OPTIONS = cygnus dejagnu ...@@ -147,10 +145,14 @@ AUTOMAKE_OPTIONS = cygnus dejagnu
DEJATOOL = libstdc++-v3 DEJATOOL = libstdc++-v3
EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then echo @glibcpp_builddir@/../../expect/expect ; else echo expect ; fi` EXPECT = `if [ -f @glibcpp_builddir@/../../expect/expect ] ; then \
echo @glibcpp_builddir@/../../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then echo @glibcpp_srcdir@/../dejagnu/runtest ; else echo runtest; fi` RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
echo @glibcpp_srcdir@/../dejagnu/runtest ; \
else echo runtest; fi`
AM_RUNTESTFLAGS = AM_RUNTESTFLAGS =
...@@ -158,20 +160,26 @@ RUNTESTFLAGS = ...@@ -158,20 +160,26 @@ RUNTESTFLAGS =
CXX_build = @glibcpp_CXX@ CXX_build = @glibcpp_CXX@
CXX = `echo "$(CXX_build)" | sed 's,gcc/xgcc ,gcc/g++ ,'` CXX = `echo "$(CXX_build)" | sed 's,gcc/xgcc ,gcc/g++ ,'`
CXXLINK = LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ CXXLINK = \
LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
INCLUDES = -nostdinc++ @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ INCLUDES = \
-nostdinc++ \
@GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
noinst_LIBRARIES = libv3test.a noinst_LIBRARIES = libv3test.a
libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
@GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = abi_check @GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = @GLIBCPP_BUILD_ABI_CHECK_TRUE@abi_check
@GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS = @GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS =
abi_check_SOURCES = abi_check.cc abi_check_SOURCES = abi_check.cc
# By adding these files here, automake will remove them for 'make clean' # By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum testsuite_* site.exp abi_check CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
testsuite_* site.exp abi_check
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
...@@ -197,12 +205,12 @@ CXXFLAGS = @CXXFLAGS@ ...@@ -197,12 +205,12 @@ CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX) CXXLD = $(CXX)
DIST_COMMON = README Makefile.am Makefile.in DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
SOURCES = $(libv3test_a_SOURCES) $(abi_check_SOURCES) SOURCES = $(libv3test_a_SOURCES) $(abi_check_SOURCES)
OBJECTS = $(libv3test_a_OBJECTS) $(abi_check_OBJECTS) OBJECTS = $(libv3test_a_OBJECTS) $(abi_check_OBJECTS)
...@@ -313,7 +321,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) ...@@ -313,7 +321,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
awk ' { files[$$0] = 1; } \ awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags: mostlyclean-tags:
...@@ -370,7 +378,7 @@ site.exp: Makefile ...@@ -370,7 +378,7 @@ site.exp: Makefile
@echo 'set build_alias $(build_alias)' >> $@-t @echo 'set build_alias $(build_alias)' >> $@-t
@echo 'set build_triplet $(build_triplet)' >> $@-t @echo 'set build_triplet $(build_triplet)' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
@test ! -f $(srcdir)/site.exp || sed '1,/^## All variables above are.*##/ d' $(srcdir)/site.exp >> $@-t @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
@test ! -f site.exp || mv site.exp site.bak @test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp @mv $@-t site.exp
info-am: info-am:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment