浏览代码

More PHAVE fixes

rdb 16 年之前
父节点
当前提交
bdb3d15332

+ 1 - 1
direct/src/autorestart/autorestart.c

@@ -18,7 +18,7 @@
 #ifndef HAVE_GETOPT
 #ifndef HAVE_GETOPT
 #include "gnu_getopt.h"
 #include "gnu_getopt.h"
 #else
 #else
-#ifdef HAVE_GETOPT_H
+#ifdef PHAVE_GETOPT_H
 #include <getopt.h>
 #include <getopt.h>
 #endif
 #endif
 #endif
 #endif

+ 5 - 5
dtool/src/dtoolutil/filename.cxx

@@ -1755,7 +1755,7 @@ scan_directory(vector_string &contents) const {
   sort(contents.begin() + orig_size, contents.end());
   sort(contents.begin() + orig_size, contents.end());
   return scan_ok;
   return scan_ok;
 
 
-#elif defined(HAVE_DIRENT_H)
+#elif defined(PHAVE_DIRENT_H)
   // Use Posix's opendir() / readir() to walk through the list of
   // Use Posix's opendir() / readir() to walk through the list of
   // files in a directory.
   // files in a directory.
   size_t orig_size = contents.size();
   size_t orig_size = contents.size();
@@ -1801,7 +1801,7 @@ scan_directory(vector_string &contents) const {
   sort(contents.begin() + orig_size, contents.end());
   sort(contents.begin() + orig_size, contents.end());
   return true;
   return true;
 
 
-#elif defined(HAVE_GLOB_H)
+#elif defined(PHAVE_GLOB_H)
   // It's hard to imagine a system that provides glob.h but does not
   // It's hard to imagine a system that provides glob.h but does not
   // provide openddir() .. readdir(), but this code is leftover from a
   // provide openddir() .. readdir(), but this code is leftover from a
   // time when there was an undetected bug in the above readdir()
   // time when there was an undetected bug in the above readdir()
@@ -2318,7 +2318,7 @@ touch() const {
   CloseHandle(fhandle);
   CloseHandle(fhandle);
   return true;
   return true;
 
 
-#elif defined(HAVE_UTIME_H)
+#elif defined(PHAVE_UTIME_H)
   // Most Unix systems can do this explicitly.
   // Most Unix systems can do this explicitly.
 
 
   string os_specific = to_os_specific();
   string os_specific = to_os_specific();
@@ -2351,14 +2351,14 @@ touch() const {
     return false;
     return false;
   }
   }
   return true;
   return true;
-#else  // WIN32, HAVE_UTIME_H
+#else  // WIN32, PHAVE_UTIME_H
   // Other systems may not have an explicit control over the
   // Other systems may not have an explicit control over the
   // modification time.  For these systems, we'll just temporarily
   // modification time.  For these systems, we'll just temporarily
   // open the file in append mode, then close it again (it gets closed
   // open the file in append mode, then close it again (it gets closed
   // when the pfstream goes out of scope).
   // when the pfstream goes out of scope).
   pfstream file;
   pfstream file;
   return open_append(file);
   return open_append(file);
-#endif  // WIN32, HAVE_UTIME_H
+#endif  // WIN32, PHAVE_UTIME_H
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
panda/src/pipeline/contextSwitch.c

@@ -332,5 +332,5 @@ switch_to_thread_context(struct ThreadContext *context) {
   abort();
   abort();
 }
 }
 
 
-#endif  /* HAVE_UCONTEXT_H */
+#endif  /* PHAVE_UCONTEXT_H */
 #endif  /* THREAD_SIMPLE_IMPL */
 #endif  /* THREAD_SIMPLE_IMPL */

+ 2 - 2
panda/src/pipeline/contextSwitch.h

@@ -46,7 +46,7 @@ struct ThreadContext {
 #endif
 #endif
 };
 };
 
 
-#else  /* HAVE_UCONTEXT_H */
+#else  /* PHAVE_UCONTEXT_H */
 /* Unfortunately, setcontext() is not defined everywhere (even though
 /* Unfortunately, setcontext() is not defined everywhere (even though
    it claims to be adopted by Posix).  So we have to fall back to
    it claims to be adopted by Posix).  So we have to fall back to
    setjmp() / longjmp() in its absence.  This is a hackier solution. */
    setjmp() / longjmp() in its absence.  This is a hackier solution. */
@@ -84,7 +84,7 @@ struct ThreadContext {
   cs_jmp_buf _jmp_context;
   cs_jmp_buf _jmp_context;
 };
 };
 
 
-#endif  /* HAVE_UCONTEXT_H */
+#endif  /* PHAVE_UCONTEXT_H */
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {

+ 2 - 2
panda/src/pipeline/test_setjmp.cxx

@@ -23,7 +23,7 @@ main(int argc, char *argv[]) {
   // bother trying to compile this program (it may not compile
   // bother trying to compile this program (it may not compile
   // anyway).
   // anyway).
 
 
-#ifndef HAVE_UCONTEXT_H
+#ifndef PHAVE_UCONTEXT_H
   jmp_buf buf1, buf2;
   jmp_buf buf1, buf2;
   char * volatile scratch;
   char * volatile scratch;
 
 
@@ -41,7 +41,7 @@ main(int argc, char *argv[]) {
   }
   }
   cerr << "scratch = " << (void *)scratch << "\n";
   cerr << "scratch = " << (void *)scratch << "\n";
   cerr << "scratch end = " << (void *)(scratch + 1024) << "\n";
   cerr << "scratch end = " << (void *)(scratch + 1024) << "\n";
-#endif  // HAVE_UCONTEXT_H
+#endif  // PHAVE_UCONTEXT_H
     
     
   return 0;
   return 0;
 }
 }