Commit 8b8ab21c by Benjamin Kosnik

acconfig.h: List _GLIBCPP_USE_THREADS.


2000-10-24  Phil Edwards  <pme@sources.redhat.com>

        * acconfig.h:  List _GLIBCPP_USE_THREADS.
        * acinclude.m4:  General formatting cleanup (tabs/spaces), typo
          correction, etc.  Add comments about following *real* changes
          where they are used.
          (GLIBCPP_ENABLE_C_MBCHAR):  New test...
          (GLIBCPP_CHECK_WCHAR_T_SUPPORT):  ...results used here.
          (GLIBCPP_ENABLE_CSTDIO):  Define need_wlibio iff wide characters
          are requested.
          (GLIBCPP_ENABLE_THREADS):  If threads are used, define new
          macro _GLIBCPP_USE_THREADS in c++config.h.
          (GLIBCPP_ENABLE_SHADOW):  For C_INCLUDE_DIR, change () to {} as
          this is used in both makefiles and shell scripts (mkcheck).
        * configure.in:  Call GLIBCPP_ENABLE_C_MBCHAR.

        * libio/_G_config.h:  Wrap _IO_MTSAFE_IO in _GLIBCPP_USE_THREADS.
        * config/c_io_libio.h:  In nonthreaded case, typedef __c_lock to
          something harmless, like int.

        * config/os/aix/bits/os_defines.h:  Guard with _GLIBCPP_OS_DEFINES,
          add comment/instructions.
        * config/os/bsd/bits/os_defines.h:  Ditto.
        * config/os/generic/bits/os_defines.h:  Ditto.
        * config/os/gnu-linux/bits/os_defines.h:  Ditto.
        * config/os/irix/bits/os_defines.h:  Ditto.
        * config/os/newlib/bits/os_defines.h:  Ditto.
        * config/os/solaris/solaris2.5/bits/os_defines.h:  Ditto.
        * config/os/solaris/solaris2.6/bits/os_defines.h:  Ditto.

        * mkcheck.in:  Limit the available heap size for testsuite
          binaries, initially at 2MB.

From-SVN: r37050
parent 9aa1d5ac
2000-10-24 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_pair.h (make_pair): Add LWG solution.
* testsuite/21_strings/compare.cc (test01): Inject namespace std
into the mix.
* mkcheck.in (MAX_MEM_USAGE): Bump up to 3072. Strangely enough,
this works.
2000-10-24 Levente Farkas <lfarkas@mindmaker.hu>
* include/bits/std_bitset.h (_M_do_find_next): Fix typo.
2000-10-24 Phil Edwards <pme@sources.redhat.com>
* acconfig.h: List _GLIBCPP_USE_THREADS.
* acinclude.m4: General formatting cleanup (tabs/spaces), typo
correction, etc. Add comments about following *real* changes
where they are used.
(GLIBCPP_ENABLE_C_MBCHAR): New test...
(GLIBCPP_CHECK_WCHAR_T_SUPPORT): ...results used here.
(GLIBCPP_ENABLE_CSTDIO): Define need_wlibio iff wide characters
are requested.
(GLIBCPP_ENABLE_THREADS): If threads are used, define new
macro _GLIBCPP_USE_THREADS in c++config.h.
(GLIBCPP_ENABLE_SHADOW): For C_INCLUDE_DIR, change () to {} as
this is used in both makefiles and shell scripts (mkcheck).
* configure.in: Call GLIBCPP_ENABLE_C_MBCHAR.
* libio/_G_config.h: Wrap _IO_MTSAFE_IO in _GLIBCPP_USE_THREADS.
* config/c_io_libio.h: In nonthreaded case, typedef __c_lock to
something harmless, like int.
* config/os/aix/bits/os_defines.h: Guard with _GLIBCPP_OS_DEFINES,
add comment/instructions.
* config/os/bsd/bits/os_defines.h: Ditto.
* config/os/generic/bits/os_defines.h: Ditto.
* config/os/gnu-linux/bits/os_defines.h: Ditto.
* config/os/irix/bits/os_defines.h: Ditto.
* config/os/newlib/bits/os_defines.h: Ditto.
* config/os/solaris/solaris2.5/bits/os_defines.h: Ditto.
* config/os/solaris/solaris2.6/bits/os_defines.h: Ditto.
* mkcheck.in: Limit the available heap size for testsuite
binaries, initially at 2MB.
2000-10-23 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/21_strings/compare.cc (test01): Add using declarations.
* include/c_std/bits/std_cerrno.h: And here.
* include/c_std/bits/std_cassert.h: Tweaks.
* mkcheck.in: Simplify.
* acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify.
(GLIBCPP_ENABLE_LONG_LONG): Same.
* aclocal.m4: Regenerate.
* src/Makefile.am (c_shadow_headers): Add features.h,
bits/wrap_features.h.
* src/Makefile.in: Regenerate.
* include/c_std/features.h: New file.
* include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New
file. Need to have c++config.h included before this file so
_ISOC99_SOURCE around.
* include/c_std/sys/cdefs.h: Hack.
* include/c_std/stdlib.h: Same, use c++config.h.
* include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD.
* include/c_std/bits/std_cassert.h: Fix.
* include/c_std/bits/std_cerrno.h: Make consistent.
* include/c_std/bits/std_csetjmp.h (setjmp): Unscope global
declaration from ::_C_legacy to _C_legacy.
* include/c_std/bits/std_cstdio.h: same with printf.
* include/c_std/stdio.h: And here.
* include/c_std/bits/std_cstdlib.h: abort, exit comment.
* include/c_std/stdlib.h: Same here.
2000-10-23 Benjamin Kosnik <bkoz@redhat.com> 2000-10-23 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/21_strings/compare.cc (test01): Add using declarations. * testsuite/21_strings/compare.cc (test01): Add using declarations.
......
// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*- // acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
// Include support for multiple threads, e.g., in the I/O package.
#undef _GLIBCPP_USE_THREADS
// Include support for 'long long' and 'unsigned long long'. // Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG #undef _GLIBCPP_USE_LONG_LONG
......
...@@ -168,7 +168,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -168,7 +168,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok ok
#endif #endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to gcc-2.95 or above]))
AC_MSG_RESULT($gpp_satisfactory) AC_MSG_RESULT($gpp_satisfactory)
]) ])
...@@ -668,7 +668,7 @@ dnl Check to see if there is native support for complex ...@@ -668,7 +668,7 @@ dnl Check to see if there is native support for complex
dnl dnl
dnl Don't compile bits in math/* if native support exits. dnl Don't compile bits in math/* if native support exits.
dnl dnl
dnl Define USE_COMPLEX_LONG_DOUBLE etc if "cargf" is found. dnl Define USE_COMPLEX_LONG_DOUBLE etc if "atan2l/copysignl" is found.
dnl dnl
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
...@@ -931,12 +931,15 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE, [ ...@@ -931,12 +931,15 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE, [
dnl dnl
dnl Check to see if this target can enable the wchar_t parts of libstdc++. dnl Check to see if this target can enable the wchar_t parts of libstdc++.
dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
dnl must have been previously checked.)
dnl dnl
dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h
dnl dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
if test x$enable_c_mbchar != xno; then
dnl Sanity check for existence of ISO C9X headers for extended encoding. dnl Sanity check for existence of ISO C9X headers for extended encoding.
AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no) AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
...@@ -945,7 +948,8 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -945,7 +948,8 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Only continue checking if the ISO C9X headers exist. dnl Only continue checking if the ISO C9X headers exist.
if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
dnl Test wchar.h for mbstate_t, which is needed for char_traits and others. dnl Test wchar.h for mbstate_t, which is needed for char_traits
dnl and others.
AC_MSG_CHECKING([for mbstate_t]) AC_MSG_CHECKING([for mbstate_t])
AC_TRY_COMPILE([#include <wchar.h>], AC_TRY_COMPILE([#include <wchar.h>],
[mbstate_t teststate;], [mbstate_t teststate;],
...@@ -1020,6 +1024,11 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -1020,6 +1024,11 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
AC_MSG_WARN([<wchar.h> not found]) AC_MSG_WARN([<wchar.h> not found])
AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T) AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
fi fi
else
dnl Wide characters disabled by the user. Maybe print a warning?
:
fi
]) ])
...@@ -1204,7 +1213,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1204,7 +1213,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
enable_cstdio_flag=$enable_cstdio enable_cstdio_flag=$enable_cstdio
dnl Check if a valid thread package dnl Check if a valid I/O package
case x${enable_cstdio_flag} in case x${enable_cstdio_flag} in
xlibio | x | xno | xnone | xyes) xlibio | x | xno | xnone | xyes)
# default # default
...@@ -1244,7 +1253,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1244,7 +1253,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
need_xtra_libio=yes need_xtra_libio=yes
# bkoz XXX need to add checks to enable this # 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 need_wlibio=yes
else
need_wlibio=no
fi
fi fi
# Using libio, but <libio.h> doesn't exist on the target system. . . # Using libio, but <libio.h> doesn't exist on the target system. . .
...@@ -1252,8 +1266,13 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1252,8 +1266,13 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
need_xtra_libio=no need_xtra_libio=no
# bkoz XXX need to add checks to enable this # 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 need_wlibio=no
fi fi
fi
;; ;;
xwince) xwince)
...@@ -1288,7 +1307,8 @@ dnl ...@@ -1288,7 +1307,8 @@ dnl
dnl GLIBCPP_ENABLE_THREADS dnl GLIBCPP_ENABLE_THREADS
dnl --enable-threads=posix sets config/threads-posix.h et. al. dnl --enable-threads=posix sets config/threads-posix.h et. al.
dnl dnl
dnl default is no threads dnl Default is no threads, which also disables _IO_MTSAFE_IO in
dnl libio. Any actual thread package will enable it.
dnl dnl
AC_DEFUN(GLIBCPP_ENABLE_THREADS, [ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
dnl Note this comes from the gcc/config.in and libjava/config.in dnl Note this comes from the gcc/config.in and libjava/config.in
...@@ -1343,6 +1363,9 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [ ...@@ -1343,6 +1363,9 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
AC_MSG_RESULT($THREADH) AC_MSG_RESULT($THREADH)
AC_LINK_FILES(config/$THREADH, bits/c++threads.h) AC_LINK_FILES(config/$THREADH, bits/c++threads.h)
if test $THREADH != threads-no.h; then
AC_DEFINE(_GLIBCPP_USE_THREADS)
fi
]) ])
...@@ -1351,15 +1374,15 @@ dnl GLIBCPP_ENABLE_ATOMICITY ...@@ -1351,15 +1374,15 @@ dnl GLIBCPP_ENABLE_ATOMICITY
AC_DEFUN(GLIBCPP_ENABLE_ATOMICITY, [ AC_DEFUN(GLIBCPP_ENABLE_ATOMICITY, [
AC_MSG_CHECKING([for atomicity.h]) AC_MSG_CHECKING([for atomicity.h])
case "$target" in case "$target" in
*-*-linux*) *-*-linux* | sparc*-*-*)
ATOMICITYH=$cpu_include_dir ATOMICITYH=$cpu_include_dir
;; ;;
*-*-aix*) *-*-aix*)
ATOMICITYH=$os_include_dir ATOMICITYH=$os_include_dir
;; ;;
*) *)
echo "$enable_threads is an unknown thread package" 1>&2 # bit of overkill on this text...
exit 1 AC_MSG_ERROR([Atomic locking requested, but $enable_threads is an unknown thread package and atomic operations are not present in the CPU])
;; ;;
esac esac
AC_MSG_RESULT($ATOMICITYH/bits/atomicity.h) AC_MSG_RESULT($ATOMICITYH/bits/atomicity.h)
...@@ -1487,12 +1510,12 @@ changequote([, ]) ...@@ -1487,12 +1510,12 @@ changequote([, ])
case "$enable_cshadow_headers" in case "$enable_cshadow_headers" in
yes) yes)
CSHADOW_FLAGS="-fno-builtin" CSHADOW_FLAGS="-fno-builtin"
C_INCLUDE_DIR='$(top_srcdir)/include/c_std' C_INCLUDE_DIR='${top_srcdir}/include/c_std'
AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS) AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
;; ;;
no) no)
CSHADOW_FLAGS="" CSHADOW_FLAGS=""
C_INCLUDE_DIR='$(top_srcdir)/include/c' C_INCLUDE_DIR='${top_srcdir}/include/c'
;; ;;
esac esac
...@@ -1501,6 +1524,33 @@ changequote([, ]) ...@@ -1501,6 +1524,33 @@ changequote([, ])
AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes) AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes)
]) ])
dnl
dnl Check for wide character support. Has the same effect as the option
dnl in gcc's configure, but in a form that autoconf can mess with.
dnl
dnl GLIBCPP_ENABLE_C_MBCHAR
dnl --enable-c-mbchar requests all the wchar_t stuff.
dnl --disable-c-mbchar doesn't.
dnl + Usage: GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
dnl defaults to `no'.
AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
AC_ARG_ENABLE(c-mbchar,
changequote(<<, >>)dnl
<< --enable-c-mbchar enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_c_mbchar=yes ;;
no) enable_c_mbchar=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
esac],
enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
])
dnl dnl
dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's. dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
dnl dnl
......
...@@ -180,7 +180,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -180,7 +180,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
ok ok
#endif #endif
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to gcc-2.95 or above]))
AC_MSG_RESULT($gpp_satisfactory) AC_MSG_RESULT($gpp_satisfactory)
]) ])
...@@ -680,7 +680,7 @@ dnl Check to see if there is native support for complex ...@@ -680,7 +680,7 @@ dnl Check to see if there is native support for complex
dnl dnl
dnl Don't compile bits in math/* if native support exits. dnl Don't compile bits in math/* if native support exits.
dnl dnl
dnl Define USE_COMPLEX_LONG_DOUBLE etc if "cargf" is found. dnl Define USE_COMPLEX_LONG_DOUBLE etc if "atan2l/copysignl" is found.
dnl dnl
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
...@@ -943,12 +943,15 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE, [ ...@@ -943,12 +943,15 @@ AC_DEFUN(GLIBCPP_CHECK_CTYPE, [
dnl dnl
dnl Check to see if this target can enable the wchar_t parts of libstdc++. dnl Check to see if this target can enable the wchar_t parts of libstdc++.
dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
dnl must have been previously checked.)
dnl dnl
dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found
dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h dnl Define _GLIBCPP_NEED_MBSTATE_T if mbstate_t is not in wchar.h
dnl dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
if test x$enable_c_mbchar != xno; then
dnl Sanity check for existence of ISO C9X headers for extended encoding. dnl Sanity check for existence of ISO C9X headers for extended encoding.
AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no) AC_CHECK_HEADER(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
...@@ -957,7 +960,8 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -957,7 +960,8 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Only continue checking if the ISO C9X headers exist. dnl Only continue checking if the ISO C9X headers exist.
if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then
dnl Test wchar.h for mbstate_t, which is needed for char_traits and others. dnl Test wchar.h for mbstate_t, which is needed for char_traits
dnl and others.
AC_MSG_CHECKING([for mbstate_t]) AC_MSG_CHECKING([for mbstate_t])
AC_TRY_COMPILE([#include <wchar.h>], AC_TRY_COMPILE([#include <wchar.h>],
[mbstate_t teststate;], [mbstate_t teststate;],
...@@ -1032,6 +1036,11 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [ ...@@ -1032,6 +1036,11 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
AC_MSG_WARN([<wchar.h> not found]) AC_MSG_WARN([<wchar.h> not found])
AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T) AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
fi fi
else
dnl Wide characters disabled by the user. Maybe print a warning?
:
fi
]) ])
...@@ -1216,7 +1225,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1216,7 +1225,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
enable_cstdio_flag=$enable_cstdio enable_cstdio_flag=$enable_cstdio
dnl Check if a valid thread package dnl Check if a valid I/O package
case x${enable_cstdio_flag} in case x${enable_cstdio_flag} in
xlibio | x | xno | xnone | xyes) xlibio | x | xno | xnone | xyes)
# default # default
...@@ -1256,7 +1265,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1256,7 +1265,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
need_xtra_libio=yes need_xtra_libio=yes
# bkoz XXX need to add checks to enable this # 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 need_wlibio=yes
else
need_wlibio=no
fi
fi fi
# Using libio, but <libio.h> doesn't exist on the target system. . . # Using libio, but <libio.h> doesn't exist on the target system. . .
...@@ -1264,8 +1278,13 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1264,8 +1278,13 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
need_xtra_libio=no need_xtra_libio=no
# bkoz XXX need to add checks to enable this # 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 need_wlibio=no
fi fi
fi
;; ;;
xwince) xwince)
...@@ -1300,7 +1319,8 @@ dnl ...@@ -1300,7 +1319,8 @@ dnl
dnl GLIBCPP_ENABLE_THREADS dnl GLIBCPP_ENABLE_THREADS
dnl --enable-threads=posix sets config/threads-posix.h et. al. dnl --enable-threads=posix sets config/threads-posix.h et. al.
dnl dnl
dnl default is no threads dnl Default is no threads, which also disables _IO_MTSAFE_IO in
dnl libio. Any actual thread package will enable it.
dnl dnl
AC_DEFUN(GLIBCPP_ENABLE_THREADS, [ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
dnl Note this comes from the gcc/config.in and libjava/config.in dnl Note this comes from the gcc/config.in and libjava/config.in
...@@ -1355,6 +1375,9 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [ ...@@ -1355,6 +1375,9 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
AC_MSG_RESULT($THREADH) AC_MSG_RESULT($THREADH)
AC_LINK_FILES(config/$THREADH, bits/c++threads.h) AC_LINK_FILES(config/$THREADH, bits/c++threads.h)
if test $THREADH != threads-no.h; then
AC_DEFINE(_GLIBCPP_USE_THREADS)
fi
]) ])
...@@ -1363,15 +1386,15 @@ dnl GLIBCPP_ENABLE_ATOMICITY ...@@ -1363,15 +1386,15 @@ dnl GLIBCPP_ENABLE_ATOMICITY
AC_DEFUN(GLIBCPP_ENABLE_ATOMICITY, [ AC_DEFUN(GLIBCPP_ENABLE_ATOMICITY, [
AC_MSG_CHECKING([for atomicity.h]) AC_MSG_CHECKING([for atomicity.h])
case "$target" in case "$target" in
*-*-linux*) *-*-linux* | sparc*-*-*)
ATOMICITYH=$cpu_include_dir ATOMICITYH=$cpu_include_dir
;; ;;
*-*-aix*) *-*-aix*)
ATOMICITYH=$os_include_dir ATOMICITYH=$os_include_dir
;; ;;
*) *)
echo "$enable_threads is an unknown thread package" 1>&2 # bit of overkill on this text...
exit 1 AC_MSG_ERROR([Atomic locking requested, but $enable_threads is an unknown thread package and atomic operations are not present in the CPU])
;; ;;
esac esac
AC_MSG_RESULT($ATOMICITYH/bits/atomicity.h) AC_MSG_RESULT($ATOMICITYH/bits/atomicity.h)
...@@ -1499,12 +1522,12 @@ changequote([, ]) ...@@ -1499,12 +1522,12 @@ changequote([, ])
case "$enable_cshadow_headers" in case "$enable_cshadow_headers" in
yes) yes)
CSHADOW_FLAGS="-fno-builtin" CSHADOW_FLAGS="-fno-builtin"
C_INCLUDE_DIR='$(top_srcdir)/include/c_std' C_INCLUDE_DIR='${top_srcdir}/include/c_std'
AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS) AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
;; ;;
no) no)
CSHADOW_FLAGS="" CSHADOW_FLAGS=""
C_INCLUDE_DIR='$(top_srcdir)/include/c' C_INCLUDE_DIR='${top_srcdir}/include/c'
;; ;;
esac esac
...@@ -1513,6 +1536,33 @@ changequote([, ]) ...@@ -1513,6 +1536,33 @@ changequote([, ])
AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes) AM_CONDITIONAL(GLIBCPP_USE_CSHADOW, test "$enable_cshadow_headers" = yes)
]) ])
dnl
dnl Check for wide character support. Has the same effect as the option
dnl in gcc's configure, but in a form that autoconf can mess with.
dnl
dnl GLIBCPP_ENABLE_C_MBCHAR
dnl --enable-c-mbchar requests all the wchar_t stuff.
dnl --disable-c-mbchar doesn't.
dnl + Usage: GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
dnl defaults to `no'.
AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
AC_ARG_ENABLE(c-mbchar,
changequote(<<, >>)dnl
<< --enable-c-mbchar enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
changequote([, ])dnl
[case "$enableval" in
yes) enable_c_mbchar=yes ;;
no) enable_c_mbchar=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
esac],
enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
])
dnl dnl
dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's. dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
dnl dnl
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
/* Define if you have a working `mmap' system call. */ /* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP
// Include support for multiple threads, e.g., in the I/O package.
#undef _GLIBCPP_USE_THREADS
// Include support for 'long long' and 'unsigned long long'. // Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG #undef _GLIBCPP_USE_LONG_LONG
......
...@@ -50,7 +50,12 @@ namespace std { ...@@ -50,7 +50,12 @@ namespace std {
typedef _IO_off_t wstreamoff; typedef _IO_off_t wstreamoff;
#endif #endif
#ifdef _GLIBCPP_USE_THREADS
typedef _IO_lock_t __c_lock; typedef _IO_lock_t __c_lock;
#else
typedef int __c_lock;
#endif
// from basic_file.h // from basic_file.h
#define _GLIBCPP_BASIC_FILE_INHERITANCE 1 #define _GLIBCPP_BASIC_FILE_INHERITANCE 1
......
...@@ -28,5 +28,13 @@ ...@@ -28,5 +28,13 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
...@@ -28,5 +28,14 @@ ...@@ -28,5 +28,14 @@
// the GNU General Public License. // the GNU General Public License.
#ifndef _GLIBCPP_OS_DEFINES
# define _GLIBCPP_OS_DEFINES
/* System-specific #define, typedefs, corrections, etc, go here. This
file will come before all others. */
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -31,8 +31,9 @@ GLIBCPP_CHECK_OS ...@@ -31,8 +31,9 @@ GLIBCPP_CHECK_OS
AC_CACHE_SAVE AC_CACHE_SAVE
# Enable all the crazy c++ stuff. # Enable all the crazy c++ stuff. C_MBCHAR must come early.
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE) GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_C_MBCHAR([yes])
GLIBCPP_ENABLE_CSTDIO GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_LONG_LONG(yes) GLIBCPP_ENABLE_LONG_LONG(yes)
GLIBCPP_ENABLE_LONG_DOUBLE(yes) GLIBCPP_ENABLE_LONG_DOUBLE(yes)
...@@ -249,6 +250,8 @@ fi ...@@ -249,6 +250,8 @@ fi
# Sanity checking & User-visible messages. # Sanity checking & User-visible messages.
# Checks down here, otherwise they get scrolled off before # Checks down here, otherwise they get scrolled off before
# the user will notice. # the user will notice.
### warnings removed; none were applicable anymore
# Trying to get more people to read documentation. Possibly remove # Trying to get more people to read documentation. Possibly remove
# check and warn all the time. There is no "informational" AC_MSG_ # check and warn all the time. There is no "informational" AC_MSG_
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
#ifndef _LIBC #ifndef _LIBC
# include <bits/c++config.h> # include <bits/c++config.h>
# ifdef _GLIBCPP_USE_THREADS
# define _IO_MTSAFE_IO # define _IO_MTSAFE_IO
# endif
#endif #endif
/* Define types for libio in terms of the standard internal type names. */ /* Define types for libio in terms of the standard internal type names. */
......
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