diff -wru \sp-win32-source\include\config.h.old.in .\include\config.h.old.in
--- \sp-win32-source\include\config.h.old.in	Thu Mar 14 11:34:56 2002
+++ .\include\config.h.old.in	Sat Jan 17 16:51:15 2004
@@ -84,7 +84,7 @@
 #define SP_DLLEXPORT __declspec(dllexport)
 #define SP_DLLIMPORT __declspec(dllimport)
 
-#ifdef _DLL
+#if defined(_DLL) || defined(_USRDLL) || defined(_MT)
 #define SP_USE_DLL
 #endif
 
@@ -103,6 +103,9 @@
 #define SP_MANUAL_INST
 #endif
 #endif /* not SP_MANUAL_INST */
+
+// onsgmls and osx would not compile with SP_MULTI_BYTE defined
+#undef SP_MULTI_BYTE
 
 #ifdef SP_MULTI_BYTE
 #define SP_WIDE_SYSTEM
diff -wru \sp-win32-source\include\Message.h .\include\Message.h
--- \sp-win32-source\include\Message.h	Fri Mar 15 12:53:30 2002
+++ .\include\Message.h	Sat Jan 17 16:47:24 2004
@@ -21,11 +21,22 @@
 #endif
 
 class MessageModule;
+
+#ifdef _MSC_VER
+extern SP_API MessageModule libModule;
+extern SP_API MessageModule appModule;
+#else
 extern MessageModule libModule;
 extern MessageModule appModule;
+#endif
 
 class SP_API MessageFragment {
 public:
+
+#ifdef _MSC_VER
+  MessageFragment() {};
+#endif
+
   MessageFragment(const MessageModule *module, unsigned number, const char *text = 0);
   const MessageModule *module() const;
   unsigned number() const;
diff -wru \sp-win32-source\include\MessageReporter.h .\include\MessageReporter.h
--- \sp-win32-source\include\MessageReporter.h	Sat Aug 30 10:26:00 2003
+++ .\include\MessageReporter.h	Sat Jan 17 15:35:03 2004
@@ -38,8 +38,11 @@
   void addOption(Option);
   void setProgramName(const StringC &);
 protected:
+
+#ifndef _MSC_VER
   MessageReporter(const MessageReporter &); // undefined
   void operator=(const MessageReporter &);  // undefined
+#endif
   
   virtual const ExternalInfo *locationHeader(const Location &, Offset &off);
   virtual const ExternalInfo *locationHeader(const Origin *, Index, Offset &off);
diff -wru \sp-win32-source\lib\lib.dsp .\lib\lib.dsp
--- \sp-win32-source\lib\lib.dsp	Thu Mar 14 11:37:30 2002
+++ .\lib\lib.dsp	Sat Jan 17 16:56:13 2004
@@ -53,7 +53,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 wininet.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\bin\osp15pre4.dll" /base:0x21000000
+# ADD LINK32 wininet.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\bin\osp151.dll" /base:0x21000000
 # SUBTRACT LINK32 /profile
 
 !ELSEIF  "$(CFG)" == "lib - Win32 Debug"
@@ -808,7 +808,7 @@
 InputName=ParserMessages
 
 "$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	perl -w ..\msggen.pl libModule $(InputPath)
+	perl -w ..\msggen.pl -l libModule $(InputPath)
 
 # End Custom Build
 
@@ -820,7 +820,7 @@
 InputName=ParserMessages
 
 "$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	perl -w ..\msggen.pl libModule $(InputPath)
+	perl -w ..\msggen.pl -l libModule $(InputPath)
 
 # End Custom Build
 
diff -wru \sp-win32-source\lib\MessageTable.cxx .\lib\MessageTable.cxx
--- \sp-win32-source\lib\MessageTable.cxx	Fri Mar 15 12:53:30 2002
+++ .\lib\MessageTable.cxx	Sat Jan 17 15:39:00 2004
@@ -86,7 +86,7 @@
 BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID)
 {
   if (reason == DLL_PROCESS_ATTACH)
-    SP_NAMESPACE_SCOPE::libModule->dllInstanceHandle = inst;
+    SP_NAMESPACE_SCOPE libModule.dllInstanceHandle = inst;
   return TRUE;
 }
 #endif
diff -wru \sp-win32-source\msggen.pl.in .\msggen.pl.in
--- \sp-win32-source\msggen.pl.in	Fri Mar 15 12:53:30 2002
+++ .\msggen.pl.in	Sat Jan 17 16:46:55 2004
@@ -191,9 +191,11 @@
 END
 }
 
-if (defined($opt_l)) {
-    print "extern MessageModule $module;\n\n";
-}
+# The declaration is already included through Message.h
+#
+# if (defined($opt_l)) {
+#     print "extern MessageModule $module;\n\n";
+# }
 
 foreach $i (0 .. $#message) {
     if (defined($message[$i])) {
diff -wru \sp-win32-source\sp-generate.mak .\sp-generate.mak
--- \sp-win32-source\sp-generate.mak	Tue May 16 09:19:08 2000
+++ .\sp-generate.mak	Sat Jan 17 17:02:43 2004
@@ -66,8 +66,8 @@
 	$(PERL) -w msggen.pl -l appModule -t po\$(LANG).po $<
 	attrib +r $@
 
-include\config.h: include\config.h.old
-	copy include\config.h.old include\config.h 
+include\config.h: include\config.h.old.in
+	copy include\config.h.old.in include\config.h 
 
 msggen.pl: msggen.pl.in
 	copy msggen.pl.in msggen.pl
diff -wru \sp-win32-source\SP.dsw .\SP.dsw
--- \sp-win32-source\SP.dsw	Tue Feb 08 17:59:26 2000
+++ .\SP.dsw	Sat Jan 17 16:53:57 2004
@@ -68,6 +68,9 @@
 
 Package=<4>
 {{{
+    Begin Project Dependency
+    Project_Dep_Name lib
+    End Project Dependency
 }}}
 
 ###############################################################################

