Revert "Revert "Disabled STLPort built into NDK in favor of my own STLPort, disabled cin/cout/cerr in my STLPort""

STLPort inside NDK R5 crashes when accessing stdout the smae way as mine built-in STLPort, but I have the possibility to change my own STLPort sources

This reverts commit 4a02eeeded.
This commit is contained in:
pelya
2010-12-21 11:18:33 +00:00
parent b24ee52c8c
commit 565f159a20
13 changed files with 717 additions and 47 deletions
+25 -9
View File
@@ -16,13 +16,6 @@
*
*/
/* Outputting anything to cout/cerr WILL CRASH YOUR PROGRAM on specific devices -
x5a/x6d Android 2.1 tablet, and some other tablets,
however the same code runs on my HTC Evo without problem.
So I've just disabled them altogether.
*/
#ifndef ANDROID
#include "stlport_prefix.h"
#include <istream>
@@ -63,6 +56,29 @@ using _STLP_VENDOR_CSTD::_streams;
// (3) Create streambufs for the global stream objects, and initialize
// the stream objects by calling the init() member function.
#if defined (ANDROID_NO_COUT)
/* Outputting anything to cout/cerr WILL CRASH YOUR PROGRAM on specific devices -
x5a/x6d Android 2.1 tablet, and some other tablets,
however the same code runs on my HTC Evo without problem.
So I've just disabled cin/cout/cerr altogether.
*/
long ios_base::Init::_S_count = 0;
ios_base::Init::Init() {
if (_S_count++ == 0) {
_Locale_init();
_Filebuf_base::_S_initialize();
}
}
ios_base::Init::~Init() {
if (--_S_count == 0) {
_Locale_final();
}
}
#else
#if defined (_STLP_USE_NOT_INIT_SEGMENT)
@@ -400,10 +416,10 @@ bool _STLP_CALL ios_base::sync_with_stdio(bool sync) {
return was_synced;
}
_STLP_END_NAMESPACE
#endif /* ANDROID */
_STLP_END_NAMESPACE
// Local Variables:
// mode:C++
// End: