Commit 30ff6342 by Benjamin Kosnik

[multiple changes]


2000-05-31  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Add strtoull checks...

2000-05-31 Steven King <sxking@uswest.net>

        * shadow/time.h: fix typo
        * shadow/wchar.h: ifdef __USE_GNU for wcsdup
        * shadow/bits/std_cwchar.h: ditto
        * shadow/bits/std_cstdlib.h: add overloads of abs and div for long
        and long long.

From-SVN: r34321
parent 0f145be8
2000-05-31 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Add strtoull checks...
2000-05-31 Steven King <sxking@uswest.net>
* shadow/time.h: fix typo
* shadow/wchar.h: ifdef __USE_GNU for wcsdup
* shadow/bits/std_cwchar.h: ditto
* shadow/bits/std_cstdlib.h: add overloads of abs and div for long
and long long.
2000-05-26 Phil Edwards <pme@sourceware.cygnus.com> 2000-05-26 Phil Edwards <pme@sourceware.cygnus.com>
* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): If strtoll isn't * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): If strtoll isn't
......
...@@ -948,8 +948,7 @@ dnl ...@@ -948,8 +948,7 @@ dnl
dnl GLIBCPP_ENABLE_LONG_LONG dnl GLIBCPP_ENABLE_LONG_LONG
AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
# must do check_func outside the local msg_checking/msg_result
AC_CHECK_FUNC(strtoll,,ac_ll=no)
AC_MSG_CHECKING([for enabled long long]) AC_MSG_CHECKING([for enabled long long])
AC_ARG_ENABLE(long-long, AC_ARG_ENABLE(long-long,
changequote(<<, >>)dnl changequote(<<, >>)dnl
...@@ -961,7 +960,15 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl ...@@ -961,7 +960,15 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
*) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;; *) AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
esac], esac],
enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
if test x"$ac_ll" = xno; then enable_long_long=no; fi; unset ac_ll
# Check for the existance of functions used if long long is enabled.
AC_CHECK_FUNC(strtoll,,ac_strtoll=no)
AC_CHECK_FUNC(strtoull,,ac_strtoull=no)
if test x"$ac_strtoll" = xno || test x"$ac_strtoull" = xno; then
enable_long_long=no;
fi; unset ac_ll
AC_MSG_RESULT($enable_long_long) AC_MSG_RESULT($enable_long_long)
dnl Option parsed, now set things appropriately dnl Option parsed, now set things appropriately
case "$enable_long_long" in case "$enable_long_long" in
......
...@@ -116,19 +116,17 @@ includes = ...@@ -116,19 +116,17 @@ includes =
libio_headers = \ libio_headers = \
libio.h libioP.h iolibio.h libio.h libioP.h iolibio.h
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = \ @GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@ filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c @GLIBCPP_NEED_LIBIO_TRUE@ filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c
@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS = \ @GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS =
EXTRA_DIST = iostreamP.h EXTRA_DIST = iostreamP.h
libio_la_LIBADD = $(LIBIO_SRCS) libio_la_LIBADD = $(LIBIO_SRCS)
libio_la_DEPENDENCIES = $(libio_la_LIBADD) libio_la_DEPENDENCIES = $(libio_la_LIBADD)
libio_la_SOURCES = $(LIBIO_SRCS) libio_la_SOURCES = $(LIBIO_SRCS)
@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@LIBIO_CONFIG_H = \ @GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@LIBIO_CONFIG_H = @GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@_G_config.h
@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@_G_config.h @GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@LIBIO_CONFIG_H =
@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@LIBIO_CONFIG_H = \
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
......
// -*- C++ -*- header wrapper // -*- C++ -*- header wrapper
// Copyright (C) 1997-1999 Free Software Foundation, Inc. // Copyright (C) 1997-1999, 2000 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
...@@ -40,25 +40,25 @@ ...@@ -40,25 +40,25 @@
# include <bits/std_cstddef.h> /* pick up NULL, size_t */ # include <bits/std_cstddef.h> /* pick up NULL, size_t */
namespace _C_legacy { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_LEGACY_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <stdlib.h> # include_next <stdlib.h>
typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr
} }
const int _CPP_EXIT_SUCCESS_capture = int(EXIT_SUCCESS); const int _CPP_EXIT_SUCCESS_capture = int(EXIT_SUCCESS);
const int _CPP_EXIT_FAILURE_capture = int(EXIT_FAILURE); const int _CPP_EXIT_FAILURE_capture = int(EXIT_FAILURE);
const int _CPP_RAND_MAX_capture = int(RAND_MAX); const int _CPP_RAND_MAX_capture = int(RAND_MAX);
inline int _CPP_MB_CUR_MAX_capture() { return int(MB_CUR_MAX); } inline int _CPP_MB_CUR_MAX_capture() { return int(MB_CUR_MAX); }
// typedef size_t _CPP_size_t_capture; // typedef size_t _CPP_size_t_capture;
// typedef wchar_t _CPP_wchar_t_capture; // typedef wchar_t _CPP_wchar_t_capture;
typedef div_t _CPP_div_t_capture; typedef div_t _CPP_div_t_capture;
typedef ldiv_t _CPP_ldiv_t_capture; typedef ldiv_t _CPP_ldiv_t_capture;
namespace _C_shadow { namespace _C_shadow {
} }
} // close namespace ::_C_legacy:: } // namespace _C_legacy::
# undef size_t # undef size_t
# undef wchar_t # undef wchar_t
...@@ -100,6 +100,10 @@ ...@@ -100,6 +100,10 @@
# undef div # undef div
# undef labs # undef labs
# undef ldiv # undef ldiv
#ifdef _GLIBCPP_USE_LONG_LONG
# undef llabs
# undef lldiv
#endif
# undef mblen # undef mblen
# undef mbtowc # undef mbtowc
# undef wctomb # undef wctomb
...@@ -185,11 +189,25 @@ ...@@ -185,11 +189,25 @@
inline int abs(int __x) inline int abs(int __x)
{ return __x >= 0 ? __x : -__x; } { return __x >= 0 ? __x : -__x; }
inline div_t div(int __n, int __d) inline div_t div(int __n, int __d)
{ _div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } { div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline long labs(long __x) inline long labs(long __x)
{ return __x >= 0 ? __x : -__x; } { return __x >= 0 ? __x : -__x; }
inline ldiv_t ldiv(long __num, long __den) inline long abs(long __x)
{ _ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } { return __x >= 0 ? __x : -__x; }
inline ldiv_t ldiv(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline ldiv_t div(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#ifdef _GLIBCPP_USE_LONG_LONG
inline long long llabs(long long __x)
{ return __x >= 0 ? __x : -__x; }
inline long long abs(long long __x)
{ return __x >= 0 ? __x : -__x; }
inline lldiv_t lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#endif
using ::_C_legacy::mblen; using ::_C_legacy::mblen;
using ::_C_legacy::mbtowc;; using ::_C_legacy::mbtowc;;
...@@ -213,6 +231,10 @@ ...@@ -213,6 +231,10 @@
using ::std::div; using ::std::div;
using ::std::labs; using ::std::labs;
using ::std::ldiv; using ::std::ldiv;
#ifdef _GLIBCPP_USE_LONG_LONG
using ::std::llabs;
using ::std::lldiv;
#endif
} }
} }
...@@ -220,3 +242,4 @@ ...@@ -220,3 +242,4 @@
#endif #endif
...@@ -213,7 +213,9 @@ ...@@ -213,7 +213,9 @@
using ::_C_legacy::wcstok; using ::_C_legacy::wcstok;
using ::_C_legacy::wcslen; using ::_C_legacy::wcslen;
#ifndef __sun #ifndef __sun
#ifdef __USE_GNU
using ::_C_legacy::wcsdup; using ::_C_legacy::wcsdup;
#endif
using ::_C_legacy::wcsstr; using ::_C_legacy::wcsstr;
using ::_C_legacy::wmemchr; using ::_C_legacy::wmemchr;
using ::_C_legacy::wmemcmp; using ::_C_legacy::wmemcmp;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
// turn off glibc-2.0 weirdness. Other systems define similar foolishness // turn off glibc-2.0 weirdness. Other systems define similar foolishness
#undef __need_time_t #undef __need_time_t
#undef __need_clock_t #undef __need_clock_t
#undef __need_timespec)) #undef __need_timespec
# undef _SHADOW_NAME # undef _SHADOW_NAME
# define _SHADOW_NAME <ctime> # define _SHADOW_NAME <ctime>
......
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
using ::std::wcscmp; using ::std::wcscmp;
using ::std::wcscoll; using ::std::wcscoll;
using ::std::wcsxfrm; using ::std::wcsxfrm;
# ifdef __USE_GNU
using ::std::wcsdup; using ::std::wcsdup;
# endif
using ::std::wcschr; using ::std::wcschr;
using ::std::wcscspn; using ::std::wcscspn;
using ::std::wcspbrk; using ::std::wcspbrk;
......
...@@ -105,12 +105,9 @@ libinst_wstring_la = @libinst_wstring_la@ ...@@ -105,12 +105,9 @@ libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 gnits AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1 MAINT_CHARSET = latin1
@USE_LIBDIR_TRUE@toolexeclibdir = \ @USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
@USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR) @USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexeclibdir = \ @USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
@USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
@USE_LIBDIR_FALSE@toolexecdir = \
@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
toolexeclib_LTLIBRARIES = libstdc++.la toolexeclib_LTLIBRARIES = libstdc++.la
EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
...@@ -256,10 +253,9 @@ std_headers = \ ...@@ -256,10 +253,9 @@ std_headers = \
map memory new numeric ostream queue set sstream stack stdexcept \ map memory new numeric ostream queue set sstream stack stdexcept \
streambuf string strstream typeinfo utility valarray vector streambuf string strstream typeinfo utility valarray vector
@GLIBCPP_NEED_LIBIO_TRUE@libio_headers = \ @GLIBCPP_NEED_LIBIO_TRUE@libio_headers = @GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@\
@GLIBCPP_NEED_LIBIO_TRUE@ $(top_builddir)/libio/_G_config.h $(top_srcdir)/libio/libio.h @GLIBCPP_NEED_LIBIO_TRUE@ $(top_builddir)/libio/_G_config.h $(top_srcdir)/libio/libio.h
@GLIBCPP_NEED_LIBIO_FALSE@libio_headers = \ @GLIBCPP_NEED_LIBIO_FALSE@libio_headers =
generated_headers = \ generated_headers = \
$(top_builddir)/bits/std_limits.h $(top_builddir)/bits/c++config.h \ $(top_builddir)/bits/std_limits.h $(top_builddir)/bits/c++config.h \
...@@ -338,9 +334,8 @@ libstdc___la_LIBADD = \ ...@@ -338,9 +334,8 @@ libstdc___la_LIBADD = \
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = \ @GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = @GLIBCPP_USE_CSHADOW_TRUE@$(top_builddir)/stamp-cshadow
@GLIBCPP_USE_CSHADOW_TRUE@$(top_builddir)/stamp-cshadow @GLIBCPP_USE_CSHADOW_FALSE@CSHADOW_H =
@GLIBCPP_USE_CSHADOW_FALSE@CSHADOW_H = \
# We cannot use the default rules to install headers since we cannot # We cannot use the default rules to install headers since we cannot
# statically decide which headers to install. So we have our own special # statically decide which headers to install. So we have our own special
......
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