This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Two year plus one week old patch, can someone approve this for 3.3 please?

Two years ago I submitted a patch that was partly
a fix (of what is described in the standard) and
partly an accessor for _S_ios_base_init in ios_base::Init,
that is useful for people who are writing debuggers in C++
(like myself).

The fix (incrementing _S_ios_base_init after initialization
is completed and not before) was applied in the meantime

[See libstdc++-v3/ChangeLog-2001 :

  2001-07-03  Benjamin Kosnik  <bkoz at redhat dot com>
  * src/ (ios_base::Init::Init): Increment _S_ios_base_init last.]

But I never received any reaction to my request for this accessor.
I'd still greatly appreciate it when this extension would be added.

It should be obvious that this patch doesn't harm anything; it is
merely an accessor for an otherwise hidden state of libstdc++.

Please don't ignore this post again - I've already been waiting
two years plus one week now.


	2001-10-16  Carlo Wood  <carlo at alinoe dot com>

	* include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added
	_S_initialized() in order to allow debugging libraries to detect
	when the std streams are initialized from an overloaded operator new.

Index: include/bits/ios_base.h
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/ios_base.h,v
retrieving revision 1.13
diff -u -d -p -r1.13 ios_base.h
--- ios_base.h	2001/09/25 23:51:17	1.13
+++ ios_base.h	2001/10/17 14:10:37
@@ -301,6 +301,13 @@ namespace std
       static void
+      // _S_initialized() is an extension to allow debugger applications
+      // to use the standard streams from operator new.  _S_ios_base_init
+      // must be incremented in _S_ios_create _after_ initialization is
+      // completed.
+      static bool
+      _S_initialized() { return _S_ios_base_init; }
       static int 	_S_ios_base_init;
       static bool	_S_synced_with_stdio;


Carlo Wood <carlo at alinoe dot com>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]