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

@@ -58,8 +58,14 @@
#include "ConsoleOutput.h"
#if defined(linux)
#include <iostream>
#include <fstream>
using namespace std;
#else
#include <iostream.h>
#include <fstream.h>
#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
@@ -285,8 +291,12 @@ Boolean CmdLineApp::openFilebufWrite(filebuf &file,
if (fd < 0)
return 0;
return file.attach(fd) != 0;
#else
#if defined(linux)
return file.open(filename, ios::out|ios::trunc) != 0;
#else
return file.open(filename, ios::out|ios::trunc|IOS_BINARY) != 0;
#endif
#endif
}