--- basic/source/comp/codegen.cxx.old	2007-06-27 16:19:50.000000000 +0200
+++ basic/source/comp/codegen.cxx	2007-11-20 20:26:42.000000000 +0100
@@ -532,11 +532,6 @@ PCodeBuffConvertor<T,S>::convert()
 	m_nCnvtdSize = static_cast<S>( aTrnsfrmer.buffer().GetSize() );
 }
 
-void NeverRunsEver()
-{
-	// force instatiation of templates... I dunno why, but I have to do
-	// this to force instatiation of the template. Otherwise using the template
-	// in another code module results in link errors :-(
-	PCodeBuffConvertor< UINT16, UINT32 > aInst1(0,0);	
-	PCodeBuffConvertor< UINT32, UINT16 > aInst2(0,0);	
-}
+// instantiate for types needed in SbiImage::Load and SbiImage::Save
+template class PCodeBuffConvertor<UINT16, UINT32 >;
+template class PCodeBuffConvertor<UINT32, UINT16>;
diff -urN bridges.old/source/cpp_uno/gcc3_freebsd_intel/except.cxx bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
--- bridges.old/source/cpp_uno/gcc3_freebsd_intel/except.cxx	2007-07-05 11:00:28.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx	2007-11-16 14:03:46.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 #include <sys/param.h>
 
 #include <rtl/strbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
--- bridges.old/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx	2007-07-05 11:01:44.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx	2007-11-16 14:03:35.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 #include <sys/param.h>
 
 #include <rtl/strbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_linux_powerpc/except.cxx bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
--- bridges.old/source/cpp_uno/gcc3_linux_powerpc/except.cxx	2006-09-16 17:48:22.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx	2007-11-16 14:03:16.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_linux_powerpc64/except.cxx bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx
--- bridges.old/source/cpp_uno/gcc3_linux_powerpc64/except.cxx	2007-06-18 18:35:07.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx	2007-11-16 14:03:08.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_linux_sparc/except.cxx bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx
--- bridges.old/source/cpp_uno/gcc3_linux_sparc/except.cxx	2006-11-22 12:07:33.000000000 +0100
+++ bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx	2007-11-16 14:02:49.000000000 +0100
@@ -39,6 +39,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_linux_s390/except.cxx bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
--- bridges.old/source/cpp_uno/gcc3_linux_s390/except.cxx	2006-09-16 17:49:02.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_linux_s390/except.cxx	2007-11-16 14:02:59.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_linux_x86-64/except.cxx bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
--- bridges.old/source/cpp_uno/gcc3_linux_x86-64/except.cxx	2006-09-16 17:50:39.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx	2007-11-16 14:02:40.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_macosx_intel/except.cxx bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
--- bridges.old/source/cpp_uno/gcc3_macosx_intel/except.cxx	2006-09-16 17:51:22.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx	2007-11-16 14:02:29.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_macosx_powerpc/except.cxx bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx
--- bridges.old/source/cpp_uno/gcc3_macosx_powerpc/except.cxx	2007-01-18 15:15:39.000000000 +0100
+++ bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx	2007-11-16 14:02:19.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_netbsd_intel/except.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx
--- bridges.old/source/cpp_uno/gcc3_netbsd_intel/except.cxx	2006-09-16 17:52:45.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx	2007-11-16 14:02:01.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_solaris_intel/except.cxx bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx
--- bridges.old/source/cpp_uno/gcc3_solaris_intel/except.cxx	2006-09-16 17:53:28.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx	2007-11-16 14:01:52.000000000 +0100
@@ -40,6 +40,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
diff -urN bridges.old/source/cpp_uno/gcc3_solaris_sparc/except.cxx bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
--- bridges.old/source/cpp_uno/gcc3_solaris_sparc/except.cxx	2006-09-16 17:54:11.000000000 +0200
+++ bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx	2007-11-16 14:01:44.000000000 +0100
@@ -39,6 +39,7 @@
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
+#include <cstring>
 
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
--- extensions/source/nsplugin/source/npshell.hxx.old	2005-09-08 21:39:08.000000000 +0200
+++ extensions/source/nsplugin/source/npshell.hxx	2007-11-16 18:50:04.000000000 +0100
@@ -35,7 +35,9 @@
 
 #ifdef UNIX
 
+#ifndef MOZ_X11
 #define MOZ_X11
+#endif
 
 #include <gtk/gtk.h>
 #include <X11/Xlib.h>
--- shell/source/backends/gconfbe/gconflayer.cxx.old	2007-06-19 18:11:58.000000000 +0200
+++ shell/source/backends/gconfbe/gconflayer.cxx	2007-11-16 18:05:38.000000000 +0100
@@ -36,6 +36,9 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_shell.hxx"
+
+#include <cstring>
+
 #ifndef GCONFLAYER_HXX_
 #include "gconflayer.hxx"
 #endif 
