Linux compilation of nsgmls (Matthew Howkins)

This commit is contained in:
Peter Howkins
2012-04-11 18:03:23 +01:00
parent cc1d109aa9
commit e60d58be07
17 changed files with 102 additions and 10 deletions

View File

@@ -33,8 +33,12 @@
#ifdef SP_SHORT_HEADERS
#include <strstrea.h>
#else
#if defined(linux)
#include <strstream>
#else
#include <strstream.h>
#endif
#endif
#include <string.h>
#include <sys/param.h>
@@ -78,7 +82,11 @@ String<char> OutputCodingSystem::convertOut(const StringC &str) const
encoder->output(copy.data(), copy.size(), &stream);
delete encoder;
char *s = stream.str();
#if defined(linux)
String<char> result(s, stream.pcount());
#else
String<char> result(s, stream.out_waiting());
#endif
result += '\0';
stream.freeze(0);
#ifdef __lucid