From bdb3d1533268ee0874841b402f6916451b6e6a32 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 3 Sep 2009 18:43:47 +0000 Subject: [PATCH] More PHAVE fixes --- direct/src/autorestart/autorestart.c | 2 +- dtool/src/dtoolutil/filename.cxx | 10 +++++----- panda/src/pipeline/contextSwitch.c | 2 +- panda/src/pipeline/contextSwitch.h | 4 ++-- panda/src/pipeline/test_setjmp.cxx | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/direct/src/autorestart/autorestart.c b/direct/src/autorestart/autorestart.c index 0b5f100115..04873c29e9 100644 --- a/direct/src/autorestart/autorestart.c +++ b/direct/src/autorestart/autorestart.c @@ -18,7 +18,7 @@ #ifndef HAVE_GETOPT #include "gnu_getopt.h" #else -#ifdef HAVE_GETOPT_H +#ifdef PHAVE_GETOPT_H #include #endif #endif diff --git a/dtool/src/dtoolutil/filename.cxx b/dtool/src/dtoolutil/filename.cxx index 05f813eeba..b05ba885b0 100644 --- a/dtool/src/dtoolutil/filename.cxx +++ b/dtool/src/dtoolutil/filename.cxx @@ -1755,7 +1755,7 @@ scan_directory(vector_string &contents) const { sort(contents.begin() + orig_size, contents.end()); return scan_ok; -#elif defined(HAVE_DIRENT_H) +#elif defined(PHAVE_DIRENT_H) // Use Posix's opendir() / readir() to walk through the list of // files in a directory. size_t orig_size = contents.size(); @@ -1801,7 +1801,7 @@ scan_directory(vector_string &contents) const { sort(contents.begin() + orig_size, contents.end()); 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 // provide openddir() .. readdir(), but this code is leftover from a // time when there was an undetected bug in the above readdir() @@ -2318,7 +2318,7 @@ touch() const { CloseHandle(fhandle); return true; -#elif defined(HAVE_UTIME_H) +#elif defined(PHAVE_UTIME_H) // Most Unix systems can do this explicitly. string os_specific = to_os_specific(); @@ -2351,14 +2351,14 @@ touch() const { return false; } return true; -#else // WIN32, HAVE_UTIME_H +#else // WIN32, PHAVE_UTIME_H // Other systems may not have an explicit control over the // modification time. For these systems, we'll just temporarily // open the file in append mode, then close it again (it gets closed // when the pfstream goes out of scope). pfstream file; return open_append(file); -#endif // WIN32, HAVE_UTIME_H +#endif // WIN32, PHAVE_UTIME_H } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pipeline/contextSwitch.c b/panda/src/pipeline/contextSwitch.c index a46c43d651..5e1f01e13e 100644 --- a/panda/src/pipeline/contextSwitch.c +++ b/panda/src/pipeline/contextSwitch.c @@ -332,5 +332,5 @@ switch_to_thread_context(struct ThreadContext *context) { abort(); } -#endif /* HAVE_UCONTEXT_H */ +#endif /* PHAVE_UCONTEXT_H */ #endif /* THREAD_SIMPLE_IMPL */ diff --git a/panda/src/pipeline/contextSwitch.h b/panda/src/pipeline/contextSwitch.h index ce64a67fd2..e32942f143 100644 --- a/panda/src/pipeline/contextSwitch.h +++ b/panda/src/pipeline/contextSwitch.h @@ -46,7 +46,7 @@ struct ThreadContext { #endif }; -#else /* HAVE_UCONTEXT_H */ +#else /* PHAVE_UCONTEXT_H */ /* Unfortunately, setcontext() is not defined everywhere (even though it claims to be adopted by Posix). So we have to fall back to setjmp() / longjmp() in its absence. This is a hackier solution. */ @@ -84,7 +84,7 @@ struct ThreadContext { cs_jmp_buf _jmp_context; }; -#endif /* HAVE_UCONTEXT_H */ +#endif /* PHAVE_UCONTEXT_H */ #ifdef __cplusplus extern "C" { diff --git a/panda/src/pipeline/test_setjmp.cxx b/panda/src/pipeline/test_setjmp.cxx index adaee1705c..d0b3a10bbb 100644 --- a/panda/src/pipeline/test_setjmp.cxx +++ b/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 // anyway). -#ifndef HAVE_UCONTEXT_H +#ifndef PHAVE_UCONTEXT_H jmp_buf buf1, buf2; char * volatile scratch; @@ -41,7 +41,7 @@ main(int argc, char *argv[]) { } cerr << "scratch = " << (void *)scratch << "\n"; cerr << "scratch end = " << (void *)(scratch + 1024) << "\n"; -#endif // HAVE_UCONTEXT_H +#endif // PHAVE_UCONTEXT_H return 0; }