osx compilation issues

This commit is contained in:
David Rose 2009-07-06 19:43:39 +00:00
parent 4738f31efd
commit 3e8eca5528
3 changed files with 9 additions and 5 deletions

View File

@ -14,6 +14,11 @@
#include "p3dConditionVar.h"
#ifndef _WIN32
#include <sys/time.h>
#include <math.h>
#endif
////////////////////////////////////////////////////////////////////
// Function: P3DConditionVar::Constructor
// Access: Public

View File

@ -30,7 +30,7 @@
bool initialized_lock = false;
LOCK _api_lock;
ofstream log;
ofstream logfile;
string plugin_output_filename;
ostream *nout_stream;
@ -54,9 +54,9 @@ P3D_initialize(int api_version, const char *output_filename) {
}
nout_stream = &cerr;
if (!plugin_output_filename.empty()) {
log.open(plugin_output_filename.c_str(), ios::out | ios::trunc);
if (log) {
nout_stream = &log;
logfile.open(plugin_output_filename.c_str(), ios::out | ios::trunc);
if (logfile) {
nout_stream = &logfile;
}
}

View File

@ -34,7 +34,6 @@
using namespace std;
// Appears in p3d_plugin.cxx.
extern ofstream log;
extern string plugin_output_filename;
extern ostream *nout_stream;
#define nout (*nout_stream)