Author: faridz
Date: Wed Mar 12 08:27:36 2008
New Revision: 636366
URL: http://svn.apache.org/viewvc?rev=636366&view=rev
Log:
2008-03-12 Farid Zaripov <[EMAIL PROTECTED]>
Merged r634731 from trunk.
2007-11-12 Martin Sebor <[EMAIL PROTECTED]>
* GNUmakefile.exm (RUNFLAGS): Bumped up virtual size limit
to half a gig to prevent errors on HP-UX/IPF.
2007-11-12 Martin Sebor <[EMAIL PROTECTED]>
* GNUmakefile.exm (RUNFLAGS): Updated comment and moved it
above the definition of the variable.
2008-02-28 Farid Zaripov <[EMAIL PROTECTED]>
* etc/config/gcc.config [CYGWIN]: Force .exe suffix for the executables.
2008-02-14 Farid Zaripov <[EMAIL PROTECTED]>
* etc/config/windows/configure.wsf (configure): Save the
configuration info in global variable. Don't compile libraries
before the compiling the tests, because the libraries could depend
on some of the tests.
(compileLibs): Function removed as unnecessary.
(runExeTests): Build the libraries in common order with the tests.
(checkDependencies): Don't skip the libraries.
2008-02-28 Farid Zaripov <[EMAIL PROTECTED]>
STDCXX-507
* etc/config/gcc.config [CYGWIN]: #define _RWSHARED in shared builds.
* include/rw/_config-gcc.h [__CYGWIN__ && _RWSHARED]: disable exporting
template instantiations in shared builds.
2008-03-07 Farid Zaripov <[EMAIL PROTECTED]>
* etc/config/src/nodbg.h: New header file with definition of
the nodbg() to prevent GUI popups on Windows.
* etc/config/src/DYNAMIC_CAST.cpp: Removed invoking of the
_CrtSetReportMode(), using nodbg() instead.
* etc/config/src/GLOBAL_BAD_ALLOC.cpp: Ditto.
* etc/config/src/STD_BAD_ALLOC.cpp: Ditto.
* etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp: Ditto.
* etc/config/src/NO_DBL_TRAPS.cpp: Invoke nodbg() before test to
prevent the Dr.Watson popups (was detected on Borland Turbo C++).
2008-03-07 Farid Zaripov <[EMAIL PROTECTED]>
* etc/config/src/NEW_THROWS.cpp: Split test to two independent
tests: NEW_THROWS and NEW_OFLOW_SAFE to prevent _RWSTD_NO_NEW_THROWS
#defined when operator new() throws exception, but check for overflow
is failed with Access Violation (as on the Borland Turbo C++).
* etc/config/src/NEW_OFLOW_SAFE.cpp: New config test to check if
operator new() checks the argument for overflow.
Added:
stdcxx/branches/4.2.x/etc/config/src/NEW_OFLOW_SAFE.cpp
- copied unchanged from r635445,
stdcxx/trunk/etc/config/src/NEW_OFLOW_SAFE.cpp
stdcxx/branches/4.2.x/etc/config/src/nodbg.h
- copied unchanged from r635445, stdcxx/trunk/etc/config/src/nodbg.h
Modified:
stdcxx/branches/4.2.x/etc/config/GNUmakefile.exm
stdcxx/branches/4.2.x/etc/config/gcc.config
stdcxx/branches/4.2.x/etc/config/src/DYNAMIC_CAST.cpp
stdcxx/branches/4.2.x/etc/config/src/GLOBAL_BAD_ALLOC.cpp
stdcxx/branches/4.2.x/etc/config/src/NEW_THROWS.cpp
stdcxx/branches/4.2.x/etc/config/src/NO_DBL_TRAPS.cpp
stdcxx/branches/4.2.x/etc/config/src/STD_BAD_ALLOC.cpp
stdcxx/branches/4.2.x/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp
stdcxx/branches/4.2.x/etc/config/windows/configure.wsf
stdcxx/branches/4.2.x/include/rw/_config-gcc.h
Modified: stdcxx/branches/4.2.x/etc/config/GNUmakefile.exm
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/GNUmakefile.exm?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/GNUmakefile.exm (original)
+++ stdcxx/branches/4.2.x/etc/config/GNUmakefile.exm Wed Mar 12 08:27:36 2008
@@ -41,9 +41,9 @@
INCLUDES += -I$(EXMDIR)/include
-RUNFLAGS += -d $(EXMDIR) --ulimit=as:268435456
-# No example should use more than 256MB of memory (Related to STDCXX-440).
-# The magic number 268435456 is 256MB in bytes.
+# No example should use more than 512MB of memory. On most platforms
+# except HP-UX/IPF, 256MB is enough. (Related to STDCXX-440).
+RUNFLAGS += -d $(EXMDIR) --ulimit=as:536870912
ifneq ($(RPATH),)
LDFLAGS += $(RPATH)$(LIBDIR)
Modified: stdcxx/branches/4.2.x/etc/config/gcc.config
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/gcc.config?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/gcc.config (original)
+++ stdcxx/branches/4.2.x/etc/config/gcc.config Wed Mar 12 08:27:36 2008
@@ -220,6 +220,8 @@
ifneq ($(findstring CYGWIN,$(OSNAME)),)
SHARED_SUFFIX = .dll
+ SHARED_CPPFLAGS += -D_RWSHARED
+ LDFLAGS += -Wl,-force-exe-suffix
endif
STATIC_CXXFLAGS =
Modified: stdcxx/branches/4.2.x/etc/config/src/DYNAMIC_CAST.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/DYNAMIC_CAST.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/DYNAMIC_CAST.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/DYNAMIC_CAST.cpp Wed Mar 12 08:27:36
2008
@@ -23,10 +23,7 @@
**************************************************************************/
#include "config.h"
-
-#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__)
-# include <crtdbg.h>
-#endif // _WIN{32,64}
+#include "nodbg.h"
#ifndef _RWSTD_NO_HONOR_STD
@@ -47,14 +44,7 @@
int main ()
{
-#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__)
-
- // prevent the Microsoft C library from popping up GUI windows
- _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
-
-#endif // _WIN{32,64}
+ nodbg ();
B b;
Modified: stdcxx/branches/4.2.x/etc/config/src/GLOBAL_BAD_ALLOC.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/GLOBAL_BAD_ALLOC.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/GLOBAL_BAD_ALLOC.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/GLOBAL_BAD_ALLOC.cpp Wed Mar 12
08:27:36 2008
@@ -23,6 +23,7 @@
**************************************************************************/
#include "config.h"
+#include "nodbg.h"
#if !defined (_RWSTD_NO_NEW_THROWS) && !defined (_RWSTD_NO_NEW_OFLOW_SAFE)
# include <stddef.h> // for size_t
@@ -45,29 +46,11 @@
struct bad_alloc { };
-#if defined (_MSC_VER)
-
-#include <crtdbg.h> // for _CrtSetReportMode()
-
-void disable_msc_gui ()
-{
- _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE);
- _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE);
- _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE);
-}
-
-#else // if !defined (_MSC_VER)
-
-void disable_msc_gui () { /* no-op */ }
-
-#endif // _MSC_VER
-
-
int main ()
{
// prevent MSVC's libc from popping up a dialog box
// with an out-of-memory message
- disable_msc_gui ();
+ nodbg ();
try {
Modified: stdcxx/branches/4.2.x/etc/config/src/NEW_THROWS.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/NEW_THROWS.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/NEW_THROWS.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/NEW_THROWS.cpp Wed Mar 12 08:27:36 2008
@@ -23,8 +23,7 @@
**************************************************************************/
#include "config.h"
-
-#include <stdio.h>
+#include "nodbg.h"
#ifndef _RWSTD_NO_SETRLIMIT
// test for setrlimit() presence before compiling current file
@@ -41,25 +40,9 @@
# endif // _RWSTD_NO_HONOR_STD
#endif // gcc 2.x
-
-#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__)
-
-# include <crtdbg.h> // for _CrtSetReportMode()
-
-void nodbg ()
-{
- // prevent the Microsoft C library from popping up GUI windows
- // on various failures and direct error messages to the console
- // instead
- _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
-}
-#else
-
-void nodbg () { }
-
-#endif // _WIN32 || _WIN64 && !__CYGWIN__
+#ifndef _RWSTD_NO_NEW_OFLOW_SAFE
+// test if operator new() checks the argument for overflow
+#endif // _RWSTD_NO_NEW_OFLOW_SAFE
// 18.4.1.1
@@ -70,31 +53,11 @@
{
nodbg ();
- void *p = 0;
-
- try {
- p = ::operator new (size_t (-1));
- }
- catch (...) {
- // exit successfully if new threw
-
- // this may give a false positive if operaor new()
- // fails to throw for arguments other than -1 as
- // happens to be the case with gcc 2.x
- printf ("// #define _RWSTD_NO_NEW_OFLOW_SAFE\n");
- return 0;
- }
-
- // otherwise note that operator new() may have not checked
- // its argument for overflow and try to coerce it to throw
- // by passing it a smaller argument
- printf ("#define _RWSTD_NO_NEW_OFLOW_SAFE\n");
-
// decrease resource limit to a minimum to induce a failure
// without unreasonably stressing the system
limit_memory (0);
- p = (void*)1;
+ void *p = (void*)1;
try {
const size_t size = (size_t)1 << (sizeof (size_t) * 8 - 1);
Modified: stdcxx/branches/4.2.x/etc/config/src/NO_DBL_TRAPS.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/NO_DBL_TRAPS.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/NO_DBL_TRAPS.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/NO_DBL_TRAPS.cpp Wed Mar 12 08:27:36
2008
@@ -37,11 +37,15 @@
* disables traps as required by C).
*/
+#include "nodbg.h"
+
double dbl_get_zero ();
double dbl_get_one ();
int main (int argc, char*[])
{
+ nodbg ();
+
double dbl_inf;
double dbl_nan;
Modified: stdcxx/branches/4.2.x/etc/config/src/STD_BAD_ALLOC.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/STD_BAD_ALLOC.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/STD_BAD_ALLOC.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/STD_BAD_ALLOC.cpp Wed Mar 12 08:27:36
2008
@@ -23,6 +23,7 @@
**************************************************************************/
#include "config.h"
+#include "nodbg.h"
#if !defined (_RWSTD_NO_NEW_THROWS) && !defined (_RWSTD_NO_NEW_OFLOW_SAFE)
# include <stddef.h> // for size_t
@@ -52,29 +53,11 @@
enum bad_alloc { };
-#if defined (_MSC_VER)
-
-#include <crtdbg.h> // for _CrtSetReportMode()
-
-void disable_msc_gui ()
-{
- _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE);
- _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE);
- _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE);
-}
-
-#else // if !defined (_MSC_VER)
-
-void disable_msc_gui () { /* no-op */ }
-
-#endif // _MSC_VER
-
-
int main ()
{
// prevent MSVC's libc from popping up a dialog box
// with an out-of-memory message
- disable_msc_gui ();
+ nodbg ();
try {
Modified: stdcxx/branches/4.2.x/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp (original)
+++ stdcxx/branches/4.2.x/etc/config/src/THREAD_SAFE_EXCEPTIONS.cpp Wed Mar 12
08:27:36 2008
@@ -23,6 +23,7 @@
**************************************************************************/
#include "thread.h"
+#include "nodbg.h"
extern "C" void* thread_proc (void *arg)
@@ -51,12 +52,7 @@
int main ()
{
-#if defined (_WIN32)
- // disable displaying the critical-error-handler
- // and general-protection-fault message boxes
- // windows.h included in thread.h
- SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
-#endif // _WIN32
+ nodbg ();
pthread_t tid [2];
Modified: stdcxx/branches/4.2.x/etc/config/windows/configure.wsf
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/windows/configure.wsf?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/windows/configure.wsf (original)
+++ stdcxx/branches/4.2.x/etc/config/windows/configure.wsf Wed Mar 12 08:27:36
2008
@@ -75,6 +75,7 @@
var runWindowMode = 0;
var timeOut = 30000; // 30 sec
var logFileName = "config.log";
+var confInfo = null;
var description = new configure; // run
@@ -209,7 +210,7 @@
getCompilerOpts(WScript.Arguments.Named("SolutionName"));
- var confInfo = configs.get(WScript.Arguments.Named("ConfigurationName"));
+ confInfo = configs.get(WScript.Arguments.Named("ConfigurationName"));
CPPFLAGS += " /GR"; // enable RTTI for tests
@@ -270,10 +271,6 @@
else
appendLineToOutFile("#define _RWSTD_NO_REENTRANT");
- // compile .lib.cpp s
- if (0 == compileLibs(confInfo.dll))
- cleanQuit(1, exitmsg);
-
// compile, link and run .cpp's (if possible)
if (0 == runExeTests())
cleanQuit(1, exitmsg);
@@ -729,31 +726,6 @@
return text;
}
-//compiles all libraries (.lib.cpp files)
-function compileLibs(shared)
-{
- var folder = fso.GetFolder(srcDir);
- var fc = new Enumerator(folder.Files);
- for (; !fc.atEnd(); fc.moveNext())
- {
- var file = fc.item();
- if (!(/\.lib\.cpp$/i).test(file.Name))
- {
- continue; //not a library file
- }
- var outLibName = file.Name.replace(/\.cpp/i, ".lib");
- if (makeLibrary(srcDir + "\\" + file.Name, outLibName, shared) != 0)
- {
- WScript.StdErr.WriteLine(
- "Configure: Fatal error: Failed to build library "
- + outLibName);
- return 0;
- }
- }
-
- return 1;
-}
-
// gets description from text if present
function getDescription(text)
{
@@ -776,7 +748,7 @@
return results[1];
}
-// compiles, links and runs (if possible) all .cpp (except .lib.cpp files)
+// compiles, links and runs (if possible) all .cpp
function runExeTests()
{
// first determine all files to be processed
@@ -786,10 +758,8 @@
for (; !fc.atEnd(); fc.moveNext())
{
var file = fc.item();
- if (!/(?!.*\.lib\.cpp)\.cpp$/.test(file.Name))
- {
- continue; // not an "exe" cpp file
- }
+ if (!(/\.cpp$/i).test(file.Name))
+ continue; // not an cpp file
srcs.push(file.Name); // save file name for processing
}
@@ -834,44 +804,58 @@
var textResult = ""; // text output of a test
// compile file
- var result = compileFiles(srcFile);
- if (result == 0 && /\s*main\s*\(/.test(srcText))
+ var result = 0;
+ if ((/\.lib\.cpp$/i).test(test))
{
- // main function present. file is runnable
- // get library and object dependencies
- var fileBase = stageDir + "\\" + base;
- var modules = fileBase + ".obj";
- var ldopts =
- (/^[^A-Z_a-z0-9]*LDOPTS\s*=\s*(\S*)\s*$/m).exec(srcText);
- if (ldopts != null)
- {
- // replace $(LIBSUFFIX) with .lib and replace .o with .obj
- modules += " " + stageDir + "\\" +
- ldopts[1].replace(/\$\(LIBSUFFIX\)/, ".lib").
- replace(/\.o/, ".obj");
- }
- var exeFile = base + ".exe";
- var fullExeName = fileBase + ".exe";
- result = linkFiles(modules, exeFile);
- if (result == 0) // can execute
+ // this is a library file
+ var outLibName = test.replace(/\.cpp/i, ".lib");
+ result = makeLibrary(srcDir + "\\" + test, outLibName,
confInfo.dll);
+ if (result)
+ WScript.StdErr.WriteLine(
+ "Configure: Fatal error: Failed to build library "
+ + outLibName);
+ }
+ else
+ {
+ result = compileFiles(srcFile);
+ if (0 == result && /\s*main\s*\(/.test(srcText))
{
- var exec = WshShell.Exec(fullExeName);
- var time = 0;
- while (exec.Status == 0)
+ // main function present. file is runnable
+ // get library and object dependencies
+ var fileBase = stageDir + "\\" + base;
+ var modules = fileBase + ".obj";
+ var ldopts =
+
(/^[^A-Z_a-z0-9]*LDOPTS\s*=\s*(\S*)\s*$/m).exec(srcText);
+ if (ldopts != null)
+ {
+ // replace $(LIBSUFFIX) with .lib and replace .o with
.obj
+ modules += " " + stageDir + "\\" +
+ ldopts[1].replace(/\$\(LIBSUFFIX\)/, ".lib").
+ replace(/\.o/, ".obj");
+ }
+ var exeFile = base + ".exe";
+ var fullExeName = fileBase + ".exe";
+ result = linkFiles(modules, exeFile);
+ if (result == 0) // can execute
{
- WScript.Sleep(100); // wait for completion
- time += 100;
- if (time > timeOut)
+ var exec = WshShell.Exec(fullExeName);
+ var time = 0;
+ while (exec.Status == 0)
{
- WScript.StdErr.WriteLine(
- "Configure: Fatal error: Test " + test
- + " failed to complete in " + timeOut / 1000
- + " seconds");
- return 0;
+ WScript.Sleep(100); // wait for completion
+ time += 100;
+ if (time > timeOut)
+ {
+ WScript.StdErr.WriteLine(
+ "Configure: Fatal error: Test " + test
+ + " failed to complete in " + timeOut /
1000
+ + " seconds");
+ return 0;
+ }
}
+ result = exec.ExitCode;
+ textResult = exec.StdOut.ReadAll();
}
- result = exec.ExitCode;
- textResult = exec.StdOut.ReadAll();
}
}
// append symbol result
@@ -936,10 +920,6 @@
var dep = /_RWSTD_(?:NO_)?(\S+)/.exec(deps[i])[1];
// remove _IN_LIBC | _IN_LIBM from dependency string
dep = dep.replace(/_IN_LIB[CM]/, "");
- if ((/\.lib$/i).test(dep)) // skip libraries
- {
- continue;
- }
var rx = new RegExp("_RWSTD_NO_" + dep);
if (!rx.test(configText))
{
Modified: stdcxx/branches/4.2.x/include/rw/_config-gcc.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_config-gcc.h?rev=636366&r1=636365&r2=636366&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_config-gcc.h (original)
+++ stdcxx/branches/4.2.x/include/rw/_config-gcc.h Wed Mar 12 08:27:36 2008
@@ -129,10 +129,11 @@
# define _RWSTD_NO_DEPRECATED_LIBC_IN_STD
# endif
- // exception::what() is incorrectly detected as not defined
- // causing linker errors due to multiple definitions; see
- // STDCXX-338
-# undef _RWSTD_NO_EXCEPTION_WHAT
+# ifdef _RWSHARED
+ // disabe exporting timeplate instantations in shared builds
+ // see STDCXX-507
+# define _RWSTD_NO_EXTERN_TEMPLATE
+# endif
#endif // __CYGWIN__
#ifdef _RWSTD_OS_OSF1