summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-03 14:33:05 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-03 14:33:05 +0200
commit4d1c1eae73df67c115f532b7078deaf7caf4cde8 (patch)
tree4f78780804635ba19f984e6b1244b5abc94c1795 /tools
parentc20d10ab416cb1abb4f1e6ed3f75c379355db8c8 (diff)
parentd21adcdca61a7c54b3bf1584d80746dc0d2d1fc0 (diff)
slidecopy: merged latest DEV300.m80 changes
Diffstat (limited to 'tools')
-rw-r--r--tools/bootstrp/command.cxx8
-rw-r--r--tools/bootstrp/rscdep.cxx8
-rw-r--r--tools/inc/bootstrp/command.hxx4
-rw-r--r--tools/inc/tools/debug.hxx31
-rw-r--r--tools/inc/tools/postextstl.h36
-rw-r--r--tools/inc/tools/preextstl.h64
-rw-r--r--tools/inc/tools/solar.h2
-rw-r--r--tools/prj/d.lst3
-rw-r--r--tools/qa/makefile.mk1
-rw-r--r--tools/source/debug/debug.cxx32
-rw-r--r--tools/source/fsys/tdir.cxx2
-rw-r--r--tools/source/stream/strmunx.cxx6
-rw-r--r--tools/test/export.map2
-rw-r--r--tools/test/makefile.mk2
14 files changed, 148 insertions, 53 deletions
diff --git a/tools/bootstrp/command.cxx b/tools/bootstrp/command.cxx
index 605965339b0e..2ab0cc8dc4a6 100644
--- a/tools/bootstrp/command.cxx
+++ b/tools/bootstrp/command.cxx
@@ -355,7 +355,7 @@ CCommand::CCommand( ByteString &rString )
{
rString.SearchAndReplace( '\t', ' ' );
aCommand = rString.GetToken( 0, ' ' );
- aCommandLine = Search();
+ aCommandLine = Search( "PATH" );
#ifndef UNX
aCommandLine += " /c ";
#else
@@ -365,7 +365,7 @@ CCommand::CCommand( ByteString &rString )
ByteString sCmd( rString.GetToken( 0, ' ' ));
ByteString sParam( rString.Copy( sCmd.Len()));
- aCommandLine += Search( thePath, sCmd );
+ aCommandLine += Search( "PATH", sCmd );
aCommandLine += sParam;
ImplInit();
@@ -379,7 +379,7 @@ CCommand::CCommand( const char *pChar )
aString.SearchAndReplace( '\t', ' ' );
aCommand = aString.GetToken( 0, ' ' );
- aCommandLine = Search();
+ aCommandLine = Search( "PATH" );
#ifndef UNX
aCommandLine += " /c ";
#else
@@ -390,7 +390,7 @@ CCommand::CCommand( const char *pChar )
ByteString sCmd( rString.GetToken( 0, ' ' ));
ByteString sParam( rString.Copy( sCmd.Len()));
- aCommandLine += Search( thePath, sCmd );
+ aCommandLine += Search( "PATH", sCmd );
aCommandLine += sParam;
ImplInit();
diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx
index 35968654b5cd..5c18793c9833 100644
--- a/tools/bootstrp/rscdep.cxx
+++ b/tools/bootstrp/rscdep.cxx
@@ -36,6 +36,7 @@
#include <string.h>
#include "bootstrp/prj.hxx"
+#include "sal/main.h"
#include <tools/string.hxx>
#include <tools/list.hxx>
@@ -78,12 +79,7 @@ static int optopt = 0;
static int opterr = 0;
#endif
-
-int
-#ifdef WNT
-_cdecl
-#endif
-main( int argc, char **argv )
+SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
{
int c;
char aBuf[255];
diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx
index e0d8f1e39aeb..638beb6cce1f 100644
--- a/tools/inc/bootstrp/command.hxx
+++ b/tools/inc/bootstrp/command.hxx
@@ -92,8 +92,6 @@ public:
void Print();
};
-static ByteString thePath( "PATH" );
-
/** Declares and spawns a child process.
The spawned programm could be a native executable or a schell script.
*/
@@ -127,7 +125,7 @@ public:
@param sItem specifies the system shell
@return the Location (when programm was found)
*/
- static ByteString Search( ByteString sEnv = thePath,
+ static ByteString Search( ByteString sEnv,
ByteString sItem = COMMAND_SHELL );
/** Spawns the Process
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index e764ed2fc79a..b8aa1c8b59fe 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -125,19 +125,18 @@ struct DbgDataType
#define DBG_FUNC_SAVEDATA 5
#define DBG_FUNC_SETPRINTMSGBOX 6
#define DBG_FUNC_SETPRINTWINDOW 7
-#define DBG_FUNC_SETPRINTSHELL 8
-#define DBG_FUNC_SETPRINTTESTTOOL 9
-#define DBG_FUNC_MEMTEST 10
-#define DBG_FUNC_XTORINFO 11
-#define DBG_FUNC_MEMINFO 12
-#define DBG_FUNC_COREDUMP 13
-#define DBG_FUNC_ALLERROROUT 14
-#define DBG_FUNC_SETTESTSOLARMUTEX 15
-#define DBG_FUNC_TESTSOLARMUTEX 16
-#define DBG_FUNC_PRINTFILE 17
-#define DBG_FUNC_GETPRINTMSGBOX 18
-#define DBG_FUNC_FILTERMESSAGE 19 // new for #i38967
-#define DBG_FUNC_UPDATEOSLHOOK 20
+#define DBG_FUNC_SETPRINTTESTTOOL 8
+#define DBG_FUNC_MEMTEST 9
+#define DBG_FUNC_XTORINFO 10
+#define DBG_FUNC_MEMINFO 11
+#define DBG_FUNC_COREDUMP 12
+#define DBG_FUNC_ALLERROROUT 13
+#define DBG_FUNC_SETTESTSOLARMUTEX 14
+#define DBG_FUNC_TESTSOLARMUTEX 15
+#define DBG_FUNC_PRINTFILE 16
+#define DBG_FUNC_GETPRINTMSGBOX 17
+#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967
+#define DBG_FUNC_UPDATEOSLHOOK 19
TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL );
@@ -176,11 +175,6 @@ inline void DbgSetPrintWindow( DbgPrintLine pProc )
DbgFunc( DBG_FUNC_SETPRINTWINDOW, (void*)(long)pProc );
}
-inline void DbgSetPrintShell( DbgPrintLine pProc )
-{
- DbgFunc( DBG_FUNC_SETPRINTSHELL, (void*)(long)pProc );
-}
-
inline void DbgSetPrintTestTool( DbgPrintLine pProc )
{
DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc );
@@ -344,6 +338,7 @@ void DbgPrintStackTree( void* p );
TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE,
const sal_Char* pFile = NULL, USHORT nLine = 0 );
+TOOLS_DLLPUBLIC void DbgPrintShell(char const * message);
TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
diff --git a/tools/inc/tools/postextstl.h b/tools/inc/tools/postextstl.h
new file mode 100644
index 000000000000..81a21e25c15b
--- /dev/null
+++ b/tools/inc/tools/postextstl.h
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef std_was_redefined_as_stlport
+// put things back the way they were
+# define std std_was_redefined_as_stlport
+# undef _STLP_OUTERMOST_HEADER_ID
+// force config to be re-read
+# undef _STLP_NOTHROW_INHERENTLY
+# undef _STLP_CONFIG_H
+# include <stddef.h>
+#endif
diff --git a/tools/inc/tools/preextstl.h b/tools/inc/tools/preextstl.h
new file mode 100644
index 000000000000..4d0418d01c57
--- /dev/null
+++ b/tools/inc/tools/preextstl.h
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if defined(ADAPT_EXT_STL)
+# include <ostream>
+# include <istream>
+# include <fstream>
+# include <iostream>
+# include <vector>
+# include <list>
+# include <map>
+# include <algorithm>
+# if defined(std)
+# define std_was_redefined_as_stlport std
+# undef std
+# define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf
+# pragma GCC visibility push(default)
+# include _STLP_NATIVE_HEADER(exception_defines.h)
+# include _STLP_NATIVE_HEADER(limits)
+# include _STLP_NATIVE_HEADER(memory)
+# include _STLP_NATIVE_HEADER(exception)
+# include _STLP_NATIVE_HEADER(iosfwd)
+# include _STLP_NATIVE_HEADER(algorithm)
+# include _STLP_NATIVE_HEADER(string)
+# include _STLP_NATIVE_HEADER(streambuf)
+# include _STLP_NATIVE_HEADER(ios)
+# include _STLP_NATIVE_HEADER(locale)
+# include _STLP_NATIVE_HEADER(stdexcept)
+# include _STLP_NATIVE_HEADER(ostream)
+# include _STLP_NATIVE_HEADER(istream)
+# include _STLP_NATIVE_HEADER(iostream)
+# include _STLP_NATIVE_HEADER(vector)
+# include _STLP_NATIVE_HEADER(list)
+# include _STLP_NATIVE_HEADER(map)
+# pragma GCC visibility pop
+# endif
+#endif
+//ext_std resolves to the std that external c++ libs, e.g. Graphite were built
+//against regardless of whether that is stlport or system stl
+namespace ext_std = std;
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 1d248853f895..2ae0fa5f2f32 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -384,6 +384,8 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#define __DLLEXTENSION "lm.so"
#elif defined LINUX && defined HPPA
#define __DLLEXTENSION "lh.so"
+#elif defined LINUX && defined AXP
+ #define __DLLEXTENSION "ll.so"
#elif defined LINUX
#error unknown plattform
#elif defined FREEBSD && defined X86
diff --git a/tools/prj/d.lst b/tools/prj/d.lst
index 76cb0107453c..6b4a99a3a676 100644
--- a/tools/prj/d.lst
+++ b/tools/prj/d.lst
@@ -34,6 +34,9 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp
..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
+..\inc\tools\postextstl.h %_DEST%\inc%_EXT%\tools\postextstl.h
+..\inc\tools\preextstl.h %_DEST%\inc%_EXT%\tools\preextstl.h
+
..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx
..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx
..\inc\tools\mapunit.hxx %_DEST%\inc%_EXT%\tools\mapunit.hxx
diff --git a/tools/qa/makefile.mk b/tools/qa/makefile.mk
index 66ed19e20737..abaea848c1db 100644
--- a/tools/qa/makefile.mk
+++ b/tools/qa/makefile.mk
@@ -32,6 +32,7 @@ ENABLE_EXCEPTIONS = TRUE
.INCLUDE: settings.mk
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
DLLPRE = # no leading "lib" on .so files
SHL1TARGET = test_pathutils
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 62f36e662ea9..e17457c60525 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -151,7 +151,6 @@ struct DebugData
USHORT bInit;
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
- DbgPrintLine pDbgPrintShell;
DbgPrintLine pDbgPrintTestTool;
::std::vector< DbgPrintLine >
aDbgPrintUserChannels;
@@ -166,7 +165,6 @@ struct DebugData
:bInit( FALSE )
,pDbgPrintMsgBox( FALSE )
,pDbgPrintWindow( NULL )
- ,pDbgPrintShell( NULL )
,pDbgPrintTestTool( NULL )
,pProfList( NULL )
,pXtorList( NULL )
@@ -1037,9 +1035,7 @@ static void DebugDeInit()
pData->aDbgData.nTestFlags &= (DBG_TEST_MEM | DBG_TEST_PROFILING);
pData->aDbgPrintUserChannels.clear();
pData->pDbgPrintTestTool = NULL;
- pData->pDbgPrintShell = NULL;
pData->pDbgPrintWindow = NULL;
- pData->pDbgPrintShell = NULL;
pData->pOldDebugMessageFunc = NULL;
ImplDbgDeInitLock();
}
@@ -1199,10 +1195,6 @@ void* DbgFunc( USHORT nAction, void* pParam )
pDebugData->pDbgPrintWindow = (DbgPrintLine)(long)pParam;
break;
- case DBG_FUNC_SETPRINTSHELL:
- pDebugData->pDbgPrintShell = (DbgPrintLine)(long)pParam;
- break;
-
case DBG_FUNC_SETPRINTTESTTOOL:
pDebugData->pDbgPrintTestTool = (DbgPrintLine)(long)pParam;
break;
@@ -1739,14 +1731,6 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
if ( pData->pDbgPrintMsgBox )
pData->pDbgPrintMsgBox( aBufOut );
else
- nOut = DBG_OUT_SHELL;
- }
-
- if ( nOut == DBG_OUT_SHELL )
- {
- if ( pData->pDbgPrintShell )
- pData->pDbgPrintShell( aBufOut );
- else
nOut = DBG_OUT_WINDOW;
}
@@ -1758,14 +1742,28 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
nOut = DBG_OUT_FILE;
}
- if ( nOut == DBG_OUT_FILE )
+ switch ( nOut )
+ {
+ case DBG_OUT_SHELL:
+ DbgPrintShell( aBufOut );
+ break;
+ case DBG_OUT_FILE:
ImplDbgPrintFile( aBufOut );
+ break;
+ }
ImplDbgUnlock();
bIn = FALSE;
}
+void DbgPrintShell(char const * message) {
+ fprintf(stderr, "%s\n", message);
+#if defined WNT
+ OutputDebugStringA(message);
+#endif
+}
+
// -----------------------------------------------------------------------
void DbgOutTypef( USHORT nDbgOut, const sal_Char* pFStr, ... )
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index 429835d35ab3..b6bf48a8cdf9 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -266,7 +266,7 @@ void Dir::Construct( DirEntryKind nKindFlags )
strcpy( pBuffer, aTStr.GetBuffer() );
CharLowerBuff( pBuffer, aTStr.Len() );
aNameMask = WildCard( String(pBuffer, osl_getThreadTextEncoding()), ';' );
- delete pBuffer;
+ delete [] pBuffer;
}
#else
aNameMask = WildCard( CutName(), ';' );
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 8a3504a417c0..9e4f501d1823 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -91,7 +91,7 @@ InternalStreamLock::InternalStreamLock(
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "locked %s", aFileName.GetBuffer() );
if( m_nStartPos || m_nEndPos )
- fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos );
+ fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos );
fprintf( stderr, "\n" );
#endif
}
@@ -103,7 +103,7 @@ InternalStreamLock::~InternalStreamLock()
ByteString aFileName(m_pStream->GetFileName(), osl_getThreadTextEncoding());
fprintf( stderr, "unlocked %s", aFileName.GetBuffer() );
if( m_nStartPos || m_nEndPos )
- fprintf(stderr, " [ %d ... %d ]", m_nStartPos, m_nEndPos );
+ fprintf(stderr, " [ %ld ... %ld ]", m_nStartPos, m_nEndPos );
fprintf( stderr, "\n" );
#endif
}
@@ -514,7 +514,7 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
if( ! InternalStreamLock::LockFile( nByteOffset, nByteOffset+nBytes, this ) )
{
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "InternalLock on %s [ %d ... %d ] failed\n",
+ fprintf( stderr, "InternalLock on %s [ %ld ... %ld ] failed\n",
ByteString(aFilename, osl_getThreadTextEncoding()).GetBuffer(), nByteOffset, nByteOffset+nBytes );
#endif
return sal_False;
diff --git a/tools/test/export.map b/tools/test/export.map
index 709047ae63e5..7321bbca16ad 100644
--- a/tools/test/export.map
+++ b/tools/test/export.map
@@ -25,7 +25,7 @@
#
#*************************************************************************
-UDK_3.1 {
+UDK_3_0_0 {
global:
registerAllTestFunction;
diff --git a/tools/test/makefile.mk b/tools/test/makefile.mk
index 5dea8ce6f960..ab2cfd8e6676 100644
--- a/tools/test/makefile.mk
+++ b/tools/test/makefile.mk
@@ -36,6 +36,8 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# --- Common ----------------------------------------------------------
SHL1OBJS= \