Browse Source

osx compilation issues

David Rose 16 years ago
parent
commit
3e8eca5528

+ 5 - 0
direct/src/plugin/p3dConditionVar.cxx

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

+ 4 - 4
direct/src/plugin/p3d_plugin.cxx

@@ -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;
     }
   }
 

+ 0 - 1
direct/src/plugin/p3d_plugin_common.h

@@ -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)