Make nsgmls compile on OpenBSD.
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Sat, 11 Aug 2012 12:09:40 +0000 (14:09 +0200)
committerJon Trulson <jon@radscan.com>
Sun, 12 Aug 2012 02:06:43 +0000 (20:06 -0600)
As far as I can tell, the duplicate instantiations from entmgr_inst.m4 are
unnecessary and only cause compile failures without -fpermissive.

cde/programs/nsgmls/CmdLineApp.C
cde/programs/nsgmls/CmdLineApp.h
cde/programs/nsgmls/CodingSystem.C
cde/programs/nsgmls/CodingSystem.h
cde/programs/nsgmls/OutputCharStream.C
cde/programs/nsgmls/OutputCharStream.h
cde/programs/nsgmls/config.h
cde/programs/nsgmls/entmgr_inst.m4
cde/programs/nsgmls/nsgmls.C
cde/programs/nsgmls/xnew.h

index b2f74684f249294355850f5f44ce43536549e75e..4ba7cbcbce727c58b587f346d16ec60de046b525 100644 (file)
@@ -58,7 +58,7 @@
 
 #include "ConsoleOutput.h"
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <iostream>
 #include <fstream>
 using namespace std;
@@ -292,7 +292,7 @@ Boolean CmdLineApp::openFilebufWrite(filebuf &file,
     return 0;
   return file.attach(fd) != 0;
 #else
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
   return file.open(filename, ios::out|ios::trunc) != 0;
 #else
   return file.open(filename, ios::out|ios::trunc|IOS_BINARY) != 0;
index 98f57736de08984895b8a37a5023c3fbf8cca5a5..45d505f133a022d47673b386dbf009331a2ea30b 100644 (file)
@@ -43,7 +43,7 @@
 #include <stddef.h>
 #endif
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <fstream>
 using namespace std;
 #else
index ad7935a76b149d736cb3020faf0092c5348cae4d..6f9e520740d539afe9d9729431b2f4c17f6cec91 100644 (file)
@@ -33,7 +33,7 @@
 #ifdef SP_SHORT_HEADERS
 #include <strstrea.h>
 #else
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <strstream>
 #else
 #include <strstream.h>
@@ -82,7 +82,7 @@ String<char> OutputCodingSystem::convertOut(const StringC &str) const
   encoder->output(copy.data(), copy.size(), &stream);
   delete encoder;
   char *s = stream.str();
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
   String<char> result(s, stream.pcount());
 #else
   String<char> result(s, stream.out_waiting());
index e073ae5cf765d0d089b3cee15c9ff093009e96ce..62adbd0cce1b443ffc9384d55938a71051d830e0 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <stddef.h>
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <streambuf>
 using namespace std;
 #else
index fd1f7584674e4df1bc8c6e0b6503bde00cb2cefc..1739437a3e38707333fca9b9d6becdd613f67bc1 100644 (file)
@@ -28,7 +28,7 @@
 #include "OutputCharStream.h"
 #include "CodingSystem.h"
 #include "macros.h"
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <iostream>
 #else
 #include <iostream.h>
@@ -148,7 +148,7 @@ void IosOutputCharStream::flush()
     encoder_->output(buf_, ptr_ - buf_, byteStream_);
     ptr_ = buf_;
   }
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
   byteStream_->pubsync();
 #else
   byteStream_->sync();
index 15088bb4854767d5275ea1f43a039a6f5f9dbb55..7551bfd7cf50c8bce1f89955ddaa14c6873d3f2b 100644 (file)
@@ -33,7 +33,7 @@
 #include "Owner.h"
 #include "CodingSystem.h"
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <streambuf>
 using namespace std;
 #else
index 7859a9c42a78835bccd660e6dd126d7d67199a04..2f7bcc9076ead8826e4b176f9716f01c78f4cbba 100644 (file)
@@ -32,7 +32,7 @@
 
 #ifdef __GNUG__
 // It's not missing, but it pulls in libg++
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
 #define SP_NEW_H_MISSING
 // set_new_handler() has to be declared extern "C"
 #define SP_SET_NEW_HANDLER_EXTERN_C
index 79a9784d73b7fc506dc5bdb051d6825233d452cf..20002a844eaecae64429cdbaf4e791de620f15ba 100644 (file)
@@ -61,7 +61,6 @@ __instantiate(`RangeMapIter<WideChar,UnivChar>')
 __instantiate(`RangeMap<WideChar,UnivChar>')
 __instantiate(Vector<InputSourceOriginNamedCharRef>)
 __instantiate(Vector<StringC>)
-__instantiate(Vector<String<EquivCode> >)
 __instantiate(Owner<ExternalInfo>)
 __instantiate(ISet<Char>)
 __instantiate(Vector<ISetRange<Char> >)
@@ -71,16 +70,11 @@ __instantiate(ISetIter<WideChar>)
 __instantiate(Vector<ISetRange<WideChar> >)
 __instantiate(SubstTable<Char>)
 __instantiate(SharedXcharMap<PackedBoolean>)
-__instantiate(SharedXcharMap<unsigned char>)
 __instantiate(SharedXcharMap<EquivCode>)
-__instantiate(String<EquivCode>)
 __instantiate(String<SyntaxChar>)
 __instantiate(XcharMap<PackedBoolean>)
-__instantiate(XcharMap<unsigned char>)
 __instantiate(XcharMap<EquivCode>)
 __instantiate(Vector<char>)
-__instantiate(Vector<PackedBoolean>)
-__instantiate(SubstTable<Char>)
 
 #ifdef SP_NAMESPACE
 }
index c1ec860850751d8a56d9e6d819c31dae167e4dbf..f9490f21ebdbfe788b00c1069ce59a9f940b8a88 100644 (file)
@@ -38,7 +38,7 @@
 #include "sptchar.h"
 #include "macros.h"
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <iostream>
 #include <fstream>
 #else
@@ -84,7 +84,7 @@ public:
                    const AppChar *filename,
                    const StringC &filenameStr,
                    const OutputCodingSystem *,
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
                    ::Messenger *messenger);
 #else
                    Messenger *messenger);
@@ -94,7 +94,7 @@ public:
   void truncateOutput();
   void allLinkTypesActivated();
 private:
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
   ::Messenger *messenger_;
 #else
   Messenger *messenger_;
@@ -248,7 +248,7 @@ XRastEventHandler::XRastEventHandler(SgmlParser *parser,
                                     const AppChar *filename,
                                     const StringC &filenameStr,
                                     const OutputCodingSystem *codingSystem,
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
                                     ::Messenger *messenger)
 #else
                                     ::Messenger *messenger)
index caffae69da3bf47a7d10a41eb3511f5be31c1a84..96596397fd5f5027b0c5970c6580fd0fd66f41ab 100644 (file)
@@ -39,7 +39,7 @@ void set_new_handler(VFP);
 
 #else /* not SP_NEW_H_MISSING */
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #include <new>
 #else
 #include <new.h>