1 diff --git codemaker/source/cppumaker/cppumaker.cxx codemaker/source/cppumaker/cppumaker.cxx
2 index d2be93f..31bf594 100644
3 --- codemaker/source/cppumaker/cppumaker.cxx
4 +++ codemaker/source/cppumaker/cppumaker.cxx
7 #include "codemaker/typemanager.hxx"
8 #include "codemaker/generatedtypeset.hxx"
9 +#include "codemaker/commoncpp.hxx"
11 #include "cppuoptions.hxx"
12 #include "cpputype.hxx"
13 @@ -241,6 +242,43 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
17 + if (!aExceptionTypeNames.empty() && options.isValid("-E"))
19 + OString outFile = options.getOption("-E");
20 + FILE *excepts = fopen (outFile, "w+");
23 + fprintf(stderr, "%s ERROR: cannot open '%s'\n",
24 + options.getProgramName().getStr(), outFile.getStr());
27 + fprintf (excepts, "// This file is autogenerated by cppumaker\n");
28 + fprintf (excepts, "// include exception headers\n");
30 + ::std::list<rtl::OString>::const_iterator iter;
32 + for (iter = aExceptionTypeNames.begin();
33 + iter != aExceptionTypeNames.end(); iter++)
35 + rtl::OString aStr = *iter;
36 + fprintf (excepts, "#include <%s.hpp>\n", aStr.getStr());
39 + fprintf (excepts, "// dummy method\n");
40 + fprintf (excepts, "extern void force_emit ()\n");
41 + fprintf (excepts, "{\n");
42 + for (iter = aExceptionTypeNames.begin();
43 + iter != aExceptionTypeNames.end(); iter++) {
44 + fprintf (excepts, " try {\n");
45 + fprintf (excepts, " force_emit ();\n");
46 + fprintf (excepts, " }\n");
47 + OString aStr = codemaker::cpp::scopedCppName (*iter);
48 + fprintf (excepts, "catch (const %s &r) {} \n", aStr.getStr());
50 + fprintf (excepts, "}\n\n");
57 diff --git codemaker/source/cppumaker/cppuoptions.cxx codemaker/source/cppumaker/cppuoptions.cxx
58 index cdce000..1f9119b 100644
59 --- codemaker/source/cppumaker/cppuoptions.cxx
60 +++ codemaker/source/cppumaker/cppuoptions.cxx
61 @@ -70,6 +70,9 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
66 + m_options["-E"] = OString(av[i] + 2);
71 @@ -342,6 +345,7 @@ OString CppuOptions::prepareHelp()
72 help += " -G = generate only target files which does not exists.\n";
73 help += " -Gc = generate only target files which content will be changed.\n";
74 help += " -X<file> = extra types which will not be taken into account for generation.\n";
75 + help += " -E<file> = generate exception type library for faster Linux linking.\n";
76 help += prepareVersion();
79 diff --git codemaker/source/cppumaker/cpputype.cxx codemaker/source/cppumaker/cpputype.cxx
80 index 69fa71a..7a2359f 100644
81 --- codemaker/source/cppumaker/cpputype.cxx
82 +++ codemaker/source/cppumaker/cpputype.cxx
85 using namespace codemaker::cpp;
87 +::std::list<rtl::OString> aExceptionTypeNames;
91 rtl::OString translateSimpleUnoType(rtl::OString const & unoType, bool cppuUnoType=false) {
92 @@ -3077,6 +3079,13 @@ sal_Bool ExceptionType::dumpHFile(
97 +ExceptionType::dumpFiles(CppuOptions * options, rtl::OString const & outPath)
99 + aExceptionTypeNames.push_back(m_typeName);
100 + return CppuType::dumpFiles(options, outPath);
103 sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
104 throw( CannotDumpException )
106 diff --git codemaker/source/cppumaker/cpputype.hxx codemaker/source/cppumaker/cpputype.hxx
107 index c8c5f34..2140f3e 100644
108 --- codemaker/source/cppumaker/cpputype.hxx
109 +++ codemaker/source/cppumaker/cpputype.hxx
110 @@ -56,6 +56,9 @@ enum CppuTypeDecl
115 +extern ::std::list<rtl::OString> aExceptionTypeNames;
120 @@ -295,6 +298,7 @@ public:
122 virtual ~ExceptionType();
124 + bool dumpFiles(CppuOptions * options, rtl::OString const & outPath);
125 sal_Bool dumpDeclaration(FileStream& o) throw( CannotDumpException );
126 sal_Bool dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
127 sal_Bool dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
128 --- cppu/prj/build.lst
129 +++ cppu/prj/build.lst
130 @@ -8,3 +8,4 @@ cu cppu\source\cppu nmake - all cu_cppu cu_inc NULL
131 cu cppu\source\AffineBridge nmake - all cu_AffineBridge cu_inc NULL
132 cu cppu\source\LogBridge nmake - all cu_LogBridge cu_inc NULL
133 cu cppu\util nmake - all cu_util cu_thpool cu_typelib cu_cppu cu_uno cu_helper_purpenv cu_UnsafeBridge cu_AffineBridge cu_LogBridge NULL
134 +cu cppu\source\except nmake - all cu_except cu_util NULL
135 diff --git cppu/prj/d.lst cppu/prj/d.lst
136 index f019d78..c40325b 100644
139 @@ -56,6 +56,7 @@ mkdir: %_DEST%\inc%_EXT%\uno
140 ..\%__SRC%\lib\icppu.lib %_DEST%\lib%_EXT%\icppu.lib
141 ..\%__SRC%\bin\cppu* %_DEST%\bin%_EXT%\*
142 ..\%__SRC%\lib\libuno_cppu.*.* %_DEST%\lib%_EXT%\*
143 +..\%__SRC%\lib\libexlink* %_DEST%\lib%_EXT%\*
145 ..\%__SRC%\lib\ipurpenvhelper* %_DEST%\lib%_EXT%\*
146 ..\%__SRC%\bin\purpe*.dll %_DEST%\bin%_EXT%\*
147 diff --git cppu/source/except/except.cxx cppu/source/except/except.cxx
149 index 0000000..4406885
151 +++ cppu/source/except/except.cxx
153 +#include <sal/config.h>
154 +#include <cppu/macros.hxx>
155 +#include <com/sun/star/uno/Any.hxx>
156 +#include <com/sun/star/uno/Reference.hxx>
158 +// We don't want to hide all this shared goodness:
159 +#undef CPPU_GCC_DLLPUBLIC_EXPORT
160 +#define CPPU_GCC_DLLPUBLIC_EXPORT
161 +#undef CPPU_GCC_DLLPRIVATE
162 +#define CPPU_GCC_DLLPRIVATE
164 +#define CPPU_INTERNAL_IMPL 1
166 +#include <linking_catch.hxx>
168 diff --git cppu/source/except/makefile.mk cppu/source/except/makefile.mk
170 index 0000000..66e6328
172 +++ cppu/source/except/makefile.mk
174 +# --- Settings -----------------------------------------------------
180 +ENABLE_EXCEPTIONS=TRUE
182 +.INCLUDE : settings.mk
184 +LIB1TARGET= $(SLB)$/$(TARGET).lib
185 +LIB1OBJFILES= $(SLO)$/except.obj
187 +SHL1TARGET=exlink$(DLLPOSTFIX)
188 +SHL1LIBS=$(LIB1TARGET)
189 +SHL1STDLIBS= $(SALLIB) $(SALHELPERLIB) $(REGLIB) $(CPPULIB)
191 +# --- Targets -------------------------------------------------------
193 +.INCLUDE : target.mk
195 diff --git offuh/source/makefile.mk offuh/source/makefile.mk
196 index 8c490a8..a257099 100644
197 --- offuh/source/makefile.mk
198 +++ offuh/source/makefile.mk
199 @@ -41,7 +41,7 @@ TARGET= offuh
201 $(MISC)$/$(TARGET).don : $(UNOUCRRDB)
203 - $(CPPUMAKER) -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@
204 + $(CPPUMAKER) -E$(UNOUCROUT)/linking_catch.hxx -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@
206 # --- Targets ------------------------------------------------------
208 diff --git scp2/source/ooo/file_library_ooo.scp scp2/source/ooo/file_library_ooo.scp
209 index dbbe327..abc0c7c 100644
210 --- scp2/source/ooo/file_library_ooo.scp
211 +++ scp2/source/ooo/file_library_ooo.scp
212 @@ -200,6 +200,15 @@ STD_UNO_LIB_FILE( gid_File_Lib_Ctl , ctl)
214 STD_LIB_FILE_PATCH( gid_File_Lib_Cui, cui)
217 +File gid_File_Lib_ExLib
219 + Styles = (PACKED,PATCH);
220 + Dir = gid_Dir_Program;
221 + Name = LIBNAME(exlink);
227 File gid_File_Lib_Curl