Commit f3b004d8 by Benjamin Kosnik

[multiple changes]


2000-04-26  Nathan C. Myers  <ncm@cantrip.org>

	* bits/basic_string.h: include <bits/atomicity.h> instead
        of <atomicity.h>, and use the uglified names.
        * config/cpu/*/atomicity.h: replace with bits/atomicity.h;
        uglify names, eliminate dependence on <inttypes.h>.
        * src/Makefile.in, src/Makefile.am: refer to correct place
        for atomicity.h header.

2000-04-25 Steven King <sxking@uswest.net>

        * bits/basic_string.h: Fix syntax error.

2000-04-25  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Improve checks for
	USE_LONG_DOUBLE.
	(GLIBCPP_ENABLE_DEBUG): If alpha, use -gdwarf-2.
	* math/Makefile.am (EXTRA_LONG_DOUBLE_yes): Add all the long
	versions to this as copysignl is needed anyway for these targets.
	* math/Makefile.in: Regenerate.

	* bits/streambuf.tcc (streambuf::xsgetn): Tweak.
	* bits/fstream.tcc (underflow): Cast to libio types.
	* bits/basic_file.h (seekoff): Fixes for alpha: use __c_streamoff.
	* config/c_io_libio.cc (seekoff): And here.

From-SVN: r33501
parent a6496605
2000-04-26 Nathan C. Myers <ncm@cantrip.org>
* bits/basic_string.h: include <bits/atomicity.h> instead
of <atomicity.h>, and use the uglified names.
* config/cpu/*/atomicity.h: replace with bits/atomicity.h;
uglify names, eliminate dependence on <inttypes.h>.
* src/Makefile.in, src/Makefile.am: refer to correct place
for atomicity.h header.
2000-04-25 Steven King <sxking@uswest.net>
* bits/basic_string.h: Fix syntax error.
2000-04-25 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Improve checks for
USE_LONG_DOUBLE.
(GLIBCPP_ENABLE_DEBUG): If alpha, use -gdwarf-2.
* math/Makefile.am (EXTRA_LONG_DOUBLE_yes): Add all the long
versions to this as copysignl is needed anyway for these targets.
* math/Makefile.in: Regenerate.
* bits/streambuf.tcc (streambuf::xsgetn): Tweak.
* bits/fstream.tcc (underflow): Cast to libio types.
* bits/basic_file.h (seekoff): Fixes for alpha: use __c_streamoff.
* config/c_io_libio.cc (seekoff): And here.
2000-04-24 Loren J. Rittle <ljrittle@acm.org> 2000-04-24 Loren J. Rittle <ljrittle@acm.org>
* mkcheck.in: Report compiler version used for test. Find * mkcheck.in: Report compiler version used for test. Find
......
...@@ -137,11 +137,4 @@ AM_MAKEFLAGS = \ ...@@ -137,11 +137,4 @@ AM_MAKEFLAGS = \
"NM=$(NM)" \ "NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \ "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" "DESTDIR=$(DESTDIR)"
...@@ -188,7 +188,7 @@ AM_MAKEFLAGS = \ ...@@ -188,7 +188,7 @@ AM_MAKEFLAGS = \
"NM=$(NM)" \ "NM=$(NM)" \
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \ "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" "DESTDIR=$(DESTDIR)"
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
......
...@@ -242,8 +242,8 @@ dnl Check to see what architecture we are compiling for. If it's ...@@ -242,8 +242,8 @@ dnl Check to see what architecture we are compiling for. If it's
dnl supported, use special hand-crafted routines to provide thread dnl supported, use special hand-crafted routines to provide thread
dnl primitives. dnl primitives.
dnl dnl
dnl Depending on what is found, select various configure/cpu/*/atomicity.h dnl Depending on what is found, select configure/cpu/*/bits/atomicity.h
dnl If not found, select configure/cpu/generic/atomicity.h dnl If not found, select configure/cpu/generic/bits/atomicity.h
dnl dnl
dnl GLIBCPP_CHECK_CPU dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [ AC_DEFUN(GLIBCPP_CHECK_CPU, [
...@@ -414,9 +414,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [ ...@@ -414,9 +414,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
carg cargf nan hypot hypotf atan2f expf copysignf) carg cargf nan hypot hypotf atan2f expf copysignf)
dnl We compile the long double complex functions only if the function dnl We compile the long double complex functions only if the function
dnl provides the non-complex functions. dnl provides the non-complex long double functions.
USE_LONG_DOUBLE=no USE_LONG_DOUBLE=no
AC_CHECK_FUNC(sinl, AC_CHECK_FUNC(copysignl,
USE_LONG_DOUBLE=yes USE_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \ AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)) csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l))
...@@ -604,10 +604,19 @@ changequote([, ])dnl ...@@ -604,10 +604,19 @@ changequote([, ])dnl
enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
dnl Option parsed, now set things appropriately dnl Option parsed, now set things appropriately
case "$enable_debug" in case "$enable_debug" in
yes) DEBUGFLAGS='-ggdb -O0' yes)
;; case "$target_cpu" in
no) DEBUGFLAGS='-g' alpha*)
;; DEBUGFLAGS='-O0 -gdwarf-2'
;;
*)
DEBUGFLAGS='-O0 -g'
;;
esac
;;
no)
DEBUGFLAGS='-g'
;;
esac esac
AC_SUBST(DEBUGFLAGS) AC_SUBST(DEBUGFLAGS)
]) ])
...@@ -728,6 +737,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -728,6 +737,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
fi fi
AC_SUBST(BUILD_LIBIO_INCLUDE) AC_SUBST(BUILD_LIBIO_INCLUDE)
# see if the _G_config.h header needs to be built.
# NB: This replaces the _G_CONFIG_H machinery in libio-v2
AC_CHECK_HEADER(_G_config.h, has_gconf_h=yes, has_gconf_h=no)
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO_CONFIG_H, test "$has_gconf_h" = no)
;; ;;
xwince) xwince)
CSTDIO_H=c_io_wince.h CSTDIO_H=c_io_wince.h
......
...@@ -254,8 +254,8 @@ dnl Check to see what architecture we are compiling for. If it's ...@@ -254,8 +254,8 @@ dnl Check to see what architecture we are compiling for. If it's
dnl supported, use special hand-crafted routines to provide thread dnl supported, use special hand-crafted routines to provide thread
dnl primitives. dnl primitives.
dnl dnl
dnl Depending on what is found, select various configure/cpu/*/atomicity.h dnl Depending on what is found, select configure/cpu/*/bits/atomicity.h
dnl If not found, select configure/cpu/generic/atomicity.h dnl If not found, select configure/cpu/generic/bits/atomicity.h
dnl dnl
dnl GLIBCPP_CHECK_CPU dnl GLIBCPP_CHECK_CPU
AC_DEFUN(GLIBCPP_CHECK_CPU, [ AC_DEFUN(GLIBCPP_CHECK_CPU, [
...@@ -426,9 +426,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [ ...@@ -426,9 +426,9 @@ AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
carg cargf nan hypot hypotf atan2f expf copysignf) carg cargf nan hypot hypotf atan2f expf copysignf)
dnl We compile the long double complex functions only if the function dnl We compile the long double complex functions only if the function
dnl provides the non-complex functions. dnl provides the non-complex long double functions.
USE_LONG_DOUBLE=no USE_LONG_DOUBLE=no
AC_CHECK_FUNC(sinl, AC_CHECK_FUNC(copysignl,
USE_LONG_DOUBLE=yes USE_LONG_DOUBLE=yes
AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \ AC_REPLACE_MATHFUNCS(ccoshl ccosl cexpl cpowl csinhl csinl \
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l)) csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l))
...@@ -616,10 +616,19 @@ changequote([, ])dnl ...@@ -616,10 +616,19 @@ changequote([, ])dnl
enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
dnl Option parsed, now set things appropriately dnl Option parsed, now set things appropriately
case "$enable_debug" in case "$enable_debug" in
yes) DEBUGFLAGS='-ggdb -O0' yes)
;; case "$target_cpu" in
no) DEBUGFLAGS='-g' alpha*)
;; DEBUGFLAGS='-O0 -gdwarf-2'
;;
*)
DEBUGFLAGS='-O0 -g'
;;
esac
;;
no)
DEBUGFLAGS='-g'
;;
esac esac
AC_SUBST(DEBUGFLAGS) AC_SUBST(DEBUGFLAGS)
]) ])
...@@ -740,6 +749,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -740,6 +749,11 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
need_libio=yes need_libio=yes
fi fi
AC_SUBST(BUILD_LIBIO_INCLUDE) AC_SUBST(BUILD_LIBIO_INCLUDE)
# see if the _G_config.h header needs to be built.
# NB: This replaces the _G_CONFIG_H machinery in libio-v2
AC_CHECK_HEADER(_G_config.h, has_gconf_h=yes, has_gconf_h=no)
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO_CONFIG_H, test "$has_gconf_h" = no)
;; ;;
xwince) xwince)
CSTDIO_H=c_io_wince.h CSTDIO_H=c_io_wince.h
......
// Wrapper of C-language FILE struct -*- C++ -*- // Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 1999 Free Software Foundation, Inc. // Copyright (C) 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
...@@ -49,8 +49,8 @@ namespace std { ...@@ -49,8 +49,8 @@ namespace std {
#endif #endif
{ {
#if _GLIBCPP_BASIC_FILE_ENCAPSULATION #if _GLIBCPP_BASIC_FILE_ENCAPSULATION
int _M_fileno; int _M_fileno;
__c_file_type* _M_cfile; __c_file_type* _M_cfile;
#endif #endif
public: public:
...@@ -110,15 +110,15 @@ namespace std { ...@@ -110,15 +110,15 @@ namespace std {
// A complex "seekoff" function that sets all of __c_file_type's // A complex "seekoff" function that sets all of __c_file_type's
// ponters and associated data members correctly and manages it's // ponters and associated data members correctly and manages it's
// relation to the external byte sequence. // relation to the external byte sequence.
virtual __c_streampos virtual streamoff
seekoff(streamoff __off, ios_base::seekdir __way, seekoff(streamoff __off, ios_base::seekdir __way,
ios_base::openmode __mode = ios_base::in | ios_base::out); ios_base::openmode __mode = ios_base::in | ios_base::out);
// A complex "seekpos" function that sets all of __c_file_type's // A complex "seekpos" function that sets all of __c_file_type's
// pointers and associated data members correctly and manages it's // pointers and associated data members correctly and manages it's
// relation to the external byte sequence. // relation to the external byte sequence.
virtual __c_streampos virtual streamoff
seekpos(__c_streampos __pos, seekpos(streamoff __pos,
ios_base::openmode __mode = ios_base::in | ios_base::out); ios_base::openmode __mode = ios_base::in | ios_base::out);
virtual streambuf* virtual streambuf*
...@@ -145,8 +145,8 @@ namespace std { ...@@ -145,8 +145,8 @@ namespace std {
// A simple seek function for the external byte sequence, that // A simple seek function for the external byte sequence, that
// does no mucking around with or setting of the pointers or flags // does no mucking around with or setting of the pointers or flags
// in __c_file_type. // in __c_file_type.
virtual __c_streampos virtual streamoff
sys_seek(__c_streampos __off, ios_base::seekdir __way); sys_seek(streamoff __off, ios_base::seekdir __way);
virtual int virtual int
sys_close(); sys_close();
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define _CPP_BITS_STRING_H 1 #define _CPP_BITS_STRING_H 1
#include <bits/exception_support.h> #include <bits/exception_support.h>
#include <atomicity.h> #include <bits/atomicity.h>
namespace std { namespace std {
...@@ -123,10 +123,6 @@ namespace std { ...@@ -123,10 +123,6 @@ namespace std {
// Types: // Types:
typedef typename _Alloc::rebind<char>::other _Raw_bytes_alloc; typedef typename _Alloc::rebind<char>::other _Raw_bytes_alloc;
// NB: Would be better if atomicity.h defined type(s) itself.
typedef uint32_t _State_type;
typedef int32_t _Signed_state_type;
// (Public) Data members: // (Public) Data members:
// The maximum number of individual char_type elements of an // The maximum number of individual char_type elements of an
...@@ -145,19 +141,19 @@ namespace std { ...@@ -145,19 +141,19 @@ namespace std {
size_type _M_length; size_type _M_length;
size_type _M_capacity; size_type _M_capacity;
_State_type _M_state; _Atomic_word _M_state;
bool bool
_M_is_leaked() const _M_is_leaked() const
{ return static_cast<_Signed_state_type>(_M_state) < 0; } { return _M_state < 0; }
bool bool
_M_is_shared() const _M_is_shared() const
{ return static_cast<_Signed_state_type>(_M_state) > 0; } { return _M_state > 0; }
void void
_M_set_leaked() _M_set_leaked()
{ _M_state = _State_type(-1); } { _M_state = -1; }
void void
_M_set_sharable() _M_set_sharable()
...@@ -183,7 +179,7 @@ namespace std { ...@@ -183,7 +179,7 @@ namespace std {
void void
_M_dispose(const _Alloc& __a) _M_dispose(const _Alloc& __a)
{ {
if (_Signed_state_type(exchange_and_add(&_M_state, -1)) <= 0) if (__exchange_and_add(&_M_state, -1) <= 0)
_M_destroy(__a); _M_destroy(__a);
} // XXX MT } // XXX MT
...@@ -193,7 +189,7 @@ namespace std { ...@@ -193,7 +189,7 @@ namespace std {
_CharT* _CharT*
_M_refcopy() throw() _M_refcopy() throw()
{ {
atomic_add(&_M_state, 1); __atomic_add(&_M_state, 1);
return _M_refdata(); return _M_refdata();
} // XXX MT } // XXX MT
...@@ -887,9 +883,10 @@ namespace std { ...@@ -887,9 +883,10 @@ namespace std {
inline basic_string<_CharT, _Traits, _Alloc> inline basic_string<_CharT, _Traits, _Alloc>
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
{ {
typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
typedef typename __string_type::size_type __size_type;
__string_type __str(__lhs); __string_type __str(__lhs);
__str.append(__string_type::size_type(1), __rhs); __str.append(__size_type(1), __rhs);
return __str; return __str;
} }
......
...@@ -198,8 +198,8 @@ namespace std ...@@ -198,8 +198,8 @@ namespace std
if (__testout) if (__testout)
_M_really_overflow(); _M_really_overflow();
else else
_M_file->seekoff(_M_in_cur - _M_in_beg, ios_base::cur, _M_file->seekoff(_M_in_cur - _M_in_beg,
ios_base::in); ios_base::cur, ios_base::in);
} }
if (__testinit || __testget) if (__testinit || __testget)
...@@ -208,7 +208,7 @@ namespace std ...@@ -208,7 +208,7 @@ namespace std
// external byte sequence (whatever physical byte sink or // external byte sequence (whatever physical byte sink or
// FILE actually is.) // FILE actually is.)
char __conv_buf[_M_buf_size]; char __conv_buf[_M_buf_size];
int_type __size = _M_file->xsgetn(__conv_buf, _M_buf_size); streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size);
// Part two: (Re)fill internal buf contents from external buf. // Part two: (Re)fill internal buf contents from external buf.
if (0 < __size) if (0 < __size)
...@@ -240,9 +240,9 @@ namespace std ...@@ -240,9 +240,9 @@ namespace std
// Part three: Sync the current internal buffer // Part three: Sync the current internal buffer
// position with the (now overshot) external buffer // position with the (now overshot) external buffer
// position. // position.
pos_type __p = _M_file->seekoff(0 - __size, ios_base::cur, streamoff __p = _M_file->seekoff(0 - __size, ios_base::cur,
ios_base::in); ios_base::in);
if (__p._M_position() == -1) if (__p == -1)
{ {
// XXX Something is wrong, do error checking. // XXX Something is wrong, do error checking.
} }
...@@ -379,11 +379,11 @@ namespace std ...@@ -379,11 +379,11 @@ namespace std
// _M_file->sys_write(), and do error (minimal) checking. // _M_file->sys_write(), and do error (minimal) checking.
if (__r != codecvt_base::error) if (__r != codecvt_base::error)
{ {
streamsize __r = _M_file->xsputn(__conv_buf, __plen); streamsize __len = _M_file->xsputn(__conv_buf, __plen);
// NB: Need this so that external byte sequence reflects // NB: Need this so that external byte sequence reflects
// internal buffer. // internal buffer.
_M_file->sync(); _M_file->sync();
if (__r == __plen) if (__len == __plen)
{ {
_M_set_indeterminate(); _M_set_indeterminate();
__retval = traits_type::not_eof(__c); __retval = traits_type::not_eof(__c);
...@@ -431,8 +431,6 @@ namespace std ...@@ -431,8 +431,6 @@ namespace std
__computed_off += _M_in_cur - _M_in_beg; __computed_off += _M_in_cur - _M_in_beg;
__retval = _M_file->seekoff(__computed_off, __way, __mode); __retval = _M_file->seekoff(__computed_off, __way, __mode);
if (__retval._M_position() == -1)
__retval == pos_type(off_type(-1));
_M_set_indeterminate(); _M_set_indeterminate();
} }
// NB: Need to do this in case _M_file in indeterminate // NB: Need to do this in case _M_file in indeterminate
...@@ -511,8 +509,7 @@ namespace std ...@@ -511,8 +509,7 @@ namespace std
if (__r != codecvt_base::error) if (__r != codecvt_base::error)
{ {
streamsize __r = _M_file->xsputn(__conv_buf, streamsize __r = _M_file->xsputn(__conv_buf, __rlen);
__rlen);
if (__r == __rlen) if (__r == __rlen)
{ {
_M_out_cur = _M_out_beg; _M_out_cur = _M_out_beg;
......
...@@ -171,7 +171,7 @@ namespace std { ...@@ -171,7 +171,7 @@ namespace std {
// the position of the external byte sequence (_M_file) // the position of the external byte sequence (_M_file)
// plus the offset in the current internal buffer // plus the offset in the current internal buffer
// (_M_out_beg - _M_out_cur) // (_M_out_beg - _M_out_cur)
__c_streampos __cur = _M_file->seekoff(0, ios_base::cur); streamoff __cur = _M_file->seekoff(0, ios_base::cur);
off_type __off = _M_out_cur - _M_out_beg; off_type __off = _M_out_cur - _M_out_beg;
this->_M_really_overflow(); this->_M_really_overflow();
_M_file->seekpos(__cur + __off); _M_file->seekpos(__cur + __off);
......
...@@ -128,8 +128,7 @@ namespace std { ...@@ -128,8 +128,7 @@ namespace std {
{ {
while (__retval < __n) while (__retval < __n)
{ {
bool __testget = _M_in_cur < _M_in_end; if (_M_in_cur < _M_in_end)
if (__testget)
{ {
size_t __len; size_t __len;
if (_M_in_cur + __n - __retval <= _M_in_end) if (_M_in_cur + __n - __retval <= _M_in_end)
......
...@@ -204,14 +204,14 @@ namespace std { ...@@ -204,14 +204,14 @@ namespace std {
__basic_file::xsgetn(char* __s, streamsize __n) __basic_file::xsgetn(char* __s, streamsize __n)
{ return _IO_default_xsgetn(this, __s, __n); } { return _IO_default_xsgetn(this, __s, __n); }
__c_streampos streamoff
__basic_file::seekoff(streamoff __off, ios_base::seekdir __way, __basic_file::seekoff(streamoff __off, ios_base::seekdir __way,
ios_base::openmode __mode) ios_base::openmode __mode)
{ return _IO_file_seekoff(this, __off, __way, __mode); } { return _IO_file_seekoff(this, __off, __way, __mode); }
__c_streampos streamoff
__basic_file::seekpos(__c_streampos __pos, ios_base::openmode __mode) __basic_file::seekpos(streamoff __pos, ios_base::openmode __mode)
{ return _IO_file_seekoff(this, __pos, ios_base::beg, __mode); } { return _IO_file_seekoff(this, __pos, ios_base::beg, __mode); }
// NB: Unused. // NB: Unused.
streambuf* streambuf*
...@@ -238,8 +238,8 @@ namespace std { ...@@ -238,8 +238,8 @@ namespace std {
{ return _IO_file_write(this, __s, __n); } { return _IO_file_write(this, __s, __n); }
// NB: Unused. // NB: Unused.
__c_streampos streamoff
__basic_file::sys_seek(__c_streampos __pos, ios_base::seekdir __way) __basic_file::sys_seek(streamoff __pos, ios_base::seekdir __way)
{ return _IO_file_seek(this, __pos, __way); } { return _IO_file_seek(this, __pos, __way); }
// NB: Unused. // NB: Unused.
......
...@@ -37,22 +37,23 @@ ...@@ -37,22 +37,23 @@
namespace std { namespace std {
// from fpos.h // from fpos.h
typedef _IO_off_t streamoff;
typedef _IO_ssize_t streamsize; // Signed integral type typedef _IO_ssize_t streamsize; // Signed integral type
#if _GLIBCPP_USE_WCHAR_T
typedef _IO_off_t wstreamoff;
typedef _IO_ssize_t wstreamsize; typedef _IO_ssize_t wstreamsize;
#endif
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
typedef _IO_fpos64_t __c_streampos; typedef _IO_off64_t streamoff;
typedef _IO_fpos64_t __c_streampos;
typedef _IO_off64_t wstreamoff;
#else #else
typedef _IO_fpos_t __c_streampos; typedef _IO_off_t streamoff;
typedef _IO_fpos_t __c_streampos;
typedef _IO_off_t wstreamoff;
#endif #endif
typedef _IO_lock_t __c_lock; typedef _IO_lock_t __c_lock;
// from basic_file.h // from basic_file.h
typedef _IO_FILE __c_file_type; typedef _IO_FILE __c_file_type;
#define _GLIBCPP_BASIC_FILE_INHERITANCE 1 #define _GLIBCPP_BASIC_FILE_INHERITANCE 1
// from ios_base.h // from ios_base.h
......
2000-04-25 Benjamin Kosnik <bkoz@haight.constant.com>
* libio.h: Change decls for seekoff/seekpos.
* Makefile.am: Add bits to not generate _G_config.h on linux.
* gen-params: Remove sigset_t declaration.
2000-02-29 Benjamin Kosnik <bkoz@haight.constant.com> 2000-02-29 Benjamin Kosnik <bkoz@haight.constant.com>
* Makefile.am (libio_headers): Strip out deadweight. * Makefile.am (libio_headers): Strip out deadweight.
......
...@@ -25,6 +25,12 @@ AUTOMAKE_OPTIONS = 1.3 cygnus ...@@ -25,6 +25,12 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libio.la noinst_LTLIBRARIES = libio.la
if GLIBCPP_NEED_LIBIO_CONFIG_H
LIBIO_CONFIG_H = _G_config.h
else
LIBIO_CONFIG_H =
endif
includes = includes =
libio_headers = \ libio_headers = \
...@@ -37,16 +43,17 @@ else ...@@ -37,16 +43,17 @@ else
LIBIO_SRCS = LIBIO_SRCS =
endif endif
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)
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
# Specifying that *.o depend on this one header # Specifying that *.o depend on this one header
$(libio_la_OBJECTS): _G_config.h $(libio_la_OBJECTS): $(LIBIO_CONFIG_H)
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
# Generate this file. # Generate this file.
_G_config.h: $(srcdir)/gen-params _G_config.h: $(srcdir)/gen-params
......
...@@ -105,6 +105,9 @@ libinst_wstring_la = @libinst_wstring_la@ ...@@ -105,6 +105,9 @@ libinst_wstring_la = @libinst_wstring_la@
AUTOMAKE_OPTIONS = 1.3 cygnus AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libio.la noinst_LTLIBRARIES = libio.la
@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@LIBIO_CONFIG_H = \
@GLIBCPP_NEED_LIBIO_CONFIG_H_TRUE@_G_config.h
@GLIBCPP_NEED_LIBIO_CONFIG_H_FALSE@LIBIO_CONFIG_H = \
includes = includes =
...@@ -334,7 +337,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean ...@@ -334,7 +337,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Specifying that *.o depend on this one header # Specifying that *.o depend on this one header
$(libio_la_OBJECTS): _G_config.h $(libio_la_OBJECTS): $(LIBIO_CONFIG_H)
# Generate this file. # Generate this file.
_G_config.h: $(srcdir)/gen-params _G_config.h: $(srcdir)/gen-params
......
...@@ -155,11 +155,20 @@ _IO_file_finish (fp, dummy) ...@@ -155,11 +155,20 @@ _IO_file_finish (fp, dummy)
_IO_default_finish (fp, 0); _IO_default_finish (fp, 0);
} }
#if _G_IO_IO_FILE_VERSION == 0x20001
_IO_FILE *
_IO_file_fopen (fp, filename, mode, some_int)
_IO_FILE *fp;
const char *filename;
const char *mode;
int some_int;
#else
_IO_FILE * _IO_FILE *
_IO_file_fopen (fp, filename, mode) _IO_file_fopen (fp, filename, mode)
_IO_FILE *fp; _IO_FILE *fp;
const char *filename; const char *filename;
const char *mode; const char *mode;
#endif
{ {
int oflags = 0, omode; int oflags = 0, omode;
int read_write, fdesc; int read_write, fdesc;
...@@ -419,12 +428,21 @@ _IO_file_sync (fp) ...@@ -419,12 +428,21 @@ _IO_file_sync (fp)
return retval; return retval;
} }
_IO_pos_t #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
_IO_off64_t
_IO_file_seekoff (fp, offset, dir, mode)
_IO_FILE *fp;
_IO_off64_t offset;
int dir;
int mode;
#else
_IO_off_t
_IO_file_seekoff (fp, offset, dir, mode) _IO_file_seekoff (fp, offset, dir, mode)
_IO_FILE *fp; _IO_FILE *fp;
_IO_off_t offset; _IO_off_t offset;
int dir; int dir;
int mode; int mode;
#endif
{ {
_IO_pos_t result; _IO_pos_t result;
_IO_off_t delta, new_offset; _IO_off_t delta, new_offset;
...@@ -587,11 +605,19 @@ _IO_file_read (fp, buf, size) ...@@ -587,11 +605,19 @@ _IO_file_read (fp, buf, size)
return read (fp->_fileno, buf, size); return read (fp->_fileno, buf, size);
} }
_IO_pos_t #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
_IO_off64_t
_IO_file_seek (fp, offset, dir)
_IO_FILE *fp;
_IO_off64_t offset;
int dir;
#else
_IO_off_t
_IO_file_seek (fp, offset, dir) _IO_file_seek (fp, offset, dir)
_IO_FILE *fp; _IO_FILE *fp;
_IO_off_t offset; _IO_off_t offset;
int dir; int dir;
#endif
{ {
return lseek (fp->_fileno, offset, dir); return lseek (fp->_fileno, offset, dir);
} }
......
...@@ -467,15 +467,24 @@ _IO_default_setbuf (fp, p, len) ...@@ -467,15 +467,24 @@ _IO_default_setbuf (fp, p, len)
return fp; return fp;
} }
_IO_pos_t #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
_IO_off64_t
_IO_default_seekpos (fp, pos, mode) _IO_default_seekpos (fp, pos, mode)
_IO_FILE *fp; _IO_FILE *fp;
_IO_pos_t pos; _IO_off64_t pos;
int mode; int mode;
#else
_IO_off_t
_IO_default_seekpos (fp, pos, mode)
_IO_FILE *fp;
_IO_off_t pos;
int mode;
#endif
{ {
return _IO_SEEKOFF (fp, _IO_pos_as_off (pos), 0, mode); return _IO_SEEKOFF (fp, pos, 0, mode);
} }
int int
_IO_default_doallocate (fp) _IO_default_doallocate (fp)
_IO_FILE *fp; _IO_FILE *fp;
...@@ -551,12 +560,21 @@ _IO_default_finish (fp, dummy) ...@@ -551,12 +560,21 @@ _IO_default_finish (fp, dummy)
_IO_un_link (fp); _IO_un_link (fp);
} }
_IO_pos_t #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
_IO_off64_t
_IO_default_seekoff (fp, offset, dir, mode)
_IO_FILE *fp;
_IO_off64_t offset;
int dir;
int mode;
#else
_IO_off_t
_IO_default_seekoff (fp, offset, dir, mode) _IO_default_seekoff (fp, offset, dir, mode)
_IO_FILE *fp; _IO_FILE *fp;
_IO_off_t offset; _IO_off_t offset;
int dir; int dir;
int mode; int mode;
#endif
{ {
return _IO_pos_BAD; return _IO_pos_BAD;
} }
...@@ -882,11 +900,19 @@ _IO_default_pbackfail (fp, c) ...@@ -882,11 +900,19 @@ _IO_default_pbackfail (fp, c)
return (unsigned char) *fp->_IO_read_ptr; return (unsigned char) *fp->_IO_read_ptr;
} }
_IO_pos_t #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
_IO_off64_t
_IO_default_seek (fp, offset, dir)
_IO_FILE *fp;
_IO_off64_t offset;
int dir;
#else
_IO_off_t
_IO_default_seek (fp, offset, dir) _IO_default_seek (fp, offset, dir)
_IO_FILE *fp; _IO_FILE *fp;
_IO_off_t offset; _IO_off_t offset;
int dir; int dir;
#endif
{ {
return _IO_pos_BAD; return _IO_pos_BAD;
} }
......
...@@ -344,19 +344,16 @@ extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *, ...@@ -344,19 +344,16 @@ extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *,
_IO_off64_t, int, int)); _IO_off64_t, int, int));
extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *, extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *,
_IO_off64_t, int)); _IO_off64_t, int));
extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else #else
extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int)); extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int));
extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif #endif
extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *, extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
_IO_ssize_t)); _IO_ssize_t));
extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t)); extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_default_stat __P ((_IO_FILE *, void *)); extern int _IO_default_stat __P ((_IO_FILE *, void *));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern int _IO_default_sync __P ((_IO_FILE *)); extern int _IO_default_sync __P ((_IO_FILE *));
#define _IO_default_close ((_IO_close_t) _IO_default_sync) #define _IO_default_close ((_IO_close_t) _IO_default_sync)
......
...@@ -26,16 +26,17 @@ AUTOMAKE_OPTIONS = 1.3 cygnus ...@@ -26,16 +26,17 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libmath.la noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = \ EXTRA_LONG_DOUBLE_yes = \
ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
signbitl.c cabsl.c signbitl.c cabsl.c
EXTRA_DIST = \ EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c ccosl.c \ ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
cexp.c cexpf.c cexpl.c \ cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c \
c_log.c c_logf.c c_logl.c clog10.c clog10f.c clog10l.c \ cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c \
cpow.c cpowf.c cpowl.c csin.c csinf.c csinh.c csinhf.c csinhl.c \ csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
csinl.c csqrt.c csqrtf.c csqrtl.c ctan.c ctanf.c ctanh.c \ ctanhf.c carg.c cargf.c hypot.c hypotf.c\
ctanhf.c ctanhl.c ctanl.c carg.c cargf.c cargl.c hypot.c hypotf.c\ atan2f.c expf.c \
hypotl.c atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes) $(EXTRA_LONG_DOUBLE_yes)
libmath_la_LIBADD = \ libmath_la_LIBADD = \
...@@ -54,3 +55,5 @@ INCLUDES = -I.. $(TOPLEVEL_INCLUDES) ...@@ -54,3 +55,5 @@ INCLUDES = -I.. $(TOPLEVEL_INCLUDES)
...@@ -107,17 +107,18 @@ AUTOMAKE_OPTIONS = 1.3 cygnus ...@@ -107,17 +107,18 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
noinst_LTLIBRARIES = libmath.la noinst_LTLIBRARIES = libmath.la
EXTRA_LONG_DOUBLE_yes = \ EXTRA_LONG_DOUBLE_yes = \
ccosl.c cexpl.c c_logl.c clog10l.c cpowl.c csinhl.c \
csqrtl.c ctanhl.c ctanl.c cargl.c hypotl.c \
signbitl.c cabsl.c signbitl.c cabsl.c
EXTRA_DIST = \ EXTRA_DIST = \
ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c ccosl.c \ ccos.c ccosf.c ccosh.c ccoshf.c ccoshl.c \
cexp.c cexpf.c cexpl.c \ cexp.c cexpf.c c_log.c c_logf.c clog10.c clog10f.c \
c_log.c c_logf.c c_logl.c clog10.c clog10f.c clog10l.c \ cpow.c cpowf.c csin.c csinf.c csinh.c csinhf.c \
cpow.c cpowf.c cpowl.c csin.c csinf.c csinh.c csinhf.c csinhl.c \ csinl.c csqrt.c csqrtf.c ctan.c ctanf.c ctanh.c \
csinl.c csqrt.c csqrtf.c csqrtl.c ctan.c ctanf.c ctanh.c \ ctanhf.c carg.c cargf.c hypot.c hypotf.c\
ctanhf.c ctanhl.c ctanl.c carg.c cargf.c cargl.c hypot.c hypotf.c\ atan2f.c expf.c \
hypotl.c atan2f.c expf.c \
$(EXTRA_LONG_DOUBLE_yes) $(EXTRA_LONG_DOUBLE_yes)
......
...@@ -166,7 +166,7 @@ generated_headers = \ ...@@ -166,7 +166,7 @@ generated_headers = \
bits/std_limits.h bits/c++config.h bits/c++threads.h bits/c++io.h bits/std_limits.h bits/c++config.h bits/c++threads.h bits/c++io.h
cpu_headers = \ cpu_headers = \
$(top_srcdir)/@cpu_include_dir@/atomicity.h $(top_srcdir)/@cpu_include_dir@/bits/atomicity.h
string_sources = \ string_sources = \
stringMAIN.cc stringCTORNC.cc stringCTORAL.cc \ stringMAIN.cc stringCTORNC.cc stringCTORAL.cc \
...@@ -262,8 +262,8 @@ myinstallheaders: $(headers:%=$(myincludep)%) ...@@ -262,8 +262,8 @@ myinstallheaders: $(headers:%=$(myincludep)%)
echo "$(INSTALL_DATA) $$i $(myincludep)"; \ echo "$(INSTALL_DATA) $$i $(myincludep)"; \
$(INSTALL_DATA) $$i $(myincludep); \ $(INSTALL_DATA) $$i $(myincludep); \
done; \ done; \
echo "$(INSTALL_DATA) $(cpu_headers) $(myincludep)"; \ echo "$(INSTALL_DATA) $(cpu_headers) $(myincludep)bits/"; \
$(INSTALL_DATA) $(cpu_headers) $(myincludep); \ $(INSTALL_DATA) $(cpu_headers) $(myincludep)bits/; \
fi; fi;
$(headers:%=$(myincludep)%): $(myincludep)%: % $(headers:%=$(myincludep)%): $(myincludep)%: %
......
...@@ -247,7 +247,7 @@ generated_headers = \ ...@@ -247,7 +247,7 @@ generated_headers = \
cpu_headers = \ cpu_headers = \
$(top_srcdir)/@cpu_include_dir@/atomicity.h $(top_srcdir)/@cpu_include_dir@/bits/atomicity.h
string_sources = \ string_sources = \
...@@ -614,8 +614,8 @@ myinstallheaders: $(headers:%=$(myincludep)%) ...@@ -614,8 +614,8 @@ myinstallheaders: $(headers:%=$(myincludep)%)
echo "$(INSTALL_DATA) $$i $(myincludep)"; \ echo "$(INSTALL_DATA) $$i $(myincludep)"; \
$(INSTALL_DATA) $$i $(myincludep); \ $(INSTALL_DATA) $$i $(myincludep); \
done; \ done; \
echo "$(INSTALL_DATA) $(cpu_headers) $(myincludep)"; \ echo "$(INSTALL_DATA) $(cpu_headers) $(myincludep)bits/"; \
$(INSTALL_DATA) $(cpu_headers) $(myincludep); \ $(INSTALL_DATA) $(cpu_headers) $(myincludep)bits/; \
fi; fi;
$(headers:%=$(myincludep)%): $(myincludep)%: % $(headers:%=$(myincludep)%): $(myincludep)%: %
......
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