Skip to content
Permalink
Browse files

general: removed all WIN32, WIN32_VC and friends

  • Loading branch information
Cerberus1746 authored and CFSworks committed Feb 6, 2020
1 parent edc31ce commit 5f7809469c04047b64b2b998c8251239a826c9df
Showing with 263 additions and 298 deletions.
  1. +1 −1 cmake/macros/Interrogate.cmake
  2. +3 −3 direct/src/dcparser/dcbase.h
  3. +3 −3 direct/src/showbase/showBase.cxx
  4. +2 −2 dtool/src/dtoolbase/atomicAdjustWin32Impl.cxx
  5. +2 −2 dtool/src/dtoolbase/atomicAdjustWin32Impl.h
  6. +1 −1 dtool/src/dtoolbase/dtoolbase.cxx
  7. +3 −15 dtool/src/dtoolbase/dtoolbase.h
  8. +1 −1 dtool/src/dtoolbase/dtoolbase_cc.h
  9. +5 −5 dtool/src/dtoolbase/memoryHook.cxx
  10. +1 −1 dtool/src/dtoolbase/mutexImpl.h
  11. +2 −2 dtool/src/dtoolbase/mutexWin32Impl.cxx
  12. +2 −2 dtool/src/dtoolbase/mutexWin32Impl.h
  13. +1 −1 dtool/src/dtoolbase/selectThreadImpl.h
  14. +6 −6 dtool/src/dtoolutil/executionEnvironment.cxx
  15. +75 −77 dtool/src/dtoolutil/filename.cxx
  16. +1 −1 dtool/src/dtoolutil/load_dso.cxx
  17. +2 −2 dtool/src/dtoolutil/pfstreamBuf.h
  18. +1 −1 dtool/src/dtoolutil/vector_src.h
  19. +1 −1 dtool/src/interrogatedb/config_interrogatedb.cxx
  20. +4 −4 dtool/src/prc/configPageManager.cxx
  21. +3 −3 dtool/src/prc/notify.cxx
  22. +2 −2 dtool/src/prc/streamWrapper.I
  23. +9 −9 dtool/src/prc/streamWrapper.cxx
  24. +1 −1 dtool/src/prc/streamWrapper.h
  25. +1 −1 dtool/src/test_interrogate/test_interrogate.cxx
  26. +4 −9 makepanda/makepanda.py
  27. +2 −2 panda/src/audio/audioManager.cxx
  28. +1 −1 panda/src/audio/config_audio.h
  29. +1 −1 panda/src/display/graphicsEngine.cxx
  30. +1 −1 panda/src/display/graphicsWindowProc.h
  31. +1 −1 panda/src/display/graphicsWindowProcCallbackData.I
  32. +1 −1 panda/src/display/graphicsWindowProcCallbackData.cxx
  33. +3 −3 panda/src/display/graphicsWindowProcCallbackData.h
  34. +2 −2 panda/src/display/nativeWindowHandle.I
  35. +6 −6 panda/src/display/nativeWindowHandle.cxx
  36. +4 −4 panda/src/display/nativeWindowHandle.h
  37. +6 −6 panda/src/downloader/bioStreamBuf.cxx
  38. +2 −2 panda/src/downloader/httpChannel.cxx
  39. +2 −2 panda/src/downloader/multiplexStreamBuf.cxx
  40. +1 −1 panda/src/egg/eggGroupNode.h
  41. +1 −1 panda/src/egg/eggPrimitive.h
  42. +3 −3 panda/src/express/error_utils.cxx
  43. +4 −4 panda/src/express/memoryUsage.cxx
  44. +1 −1 panda/src/express/memoryUsage.h
  45. +1 −1 panda/src/express/multifile.cxx
  46. +2 −2 panda/src/express/pointerToArray.I
  47. +4 −4 panda/src/express/pointerToArray.h
  48. +3 −3 panda/src/express/trueClock.I
  49. +2 −2 panda/src/express/trueClock.cxx
  50. +1 −1 panda/src/express/trueClock.h
  51. +12 −12 panda/src/express/virtualFileMountSystem.cxx
  52. +3 −3 panda/src/express/virtualFileSystem.cxx
  53. +1 −1 panda/src/glstuff/glmisc_src.h
  54. +1 −1 panda/src/glstuff/glpure.cxx
  55. +1 −1 panda/src/grutil/frameRateMeter.cxx
  56. +1 −1 panda/src/grutil/sceneGraphAnalyzerMeter.cxx
  57. +2 −2 panda/src/nativenet/socket_fdset.h
  58. +2 −2 panda/src/nativenet/time_base.h
  59. +3 −3 panda/src/net/connectionManager.cxx
  60. +1 −1 panda/src/pandabase/pandasymbols.h
  61. +1 −1 panda/src/pgraph/findApproxPath.h
  62. +1 −1 panda/src/pipeline/conditionVarImpl.h
  63. +2 −2 panda/src/pipeline/conditionVarWin32Impl.cxx
  64. +2 −2 panda/src/pipeline/conditionVarWin32Impl.h
  65. +3 −3 panda/src/pipeline/test_delete.cxx
  66. +3 −3 panda/src/pipeline/test_diners.cxx
  67. +2 −2 panda/src/pipeline/threadDummyImpl.I
  68. +1 −1 panda/src/pipeline/threadDummyImpl.cxx
  69. +1 −1 panda/src/pipeline/threadDummyImpl.h
  70. +2 −10 panda/src/pnmimage/pnmimage_base.cxx
  71. +3 −3 panda/src/pnmimagetypes/colrops.c
  72. +0 −8 panda/src/pnmimagetypes/pnmFileTypeTIFF.cxx
  73. +1 −1 panda/src/pstatclient/pStatClientImpl.cxx
  74. +2 −2 panda/src/speedtree/speedTreeNode.cxx
  75. +2 −2 panda/src/tinydisplay/config_tinydisplay.cxx
  76. +1 −1 panda/src/tinydisplay/tinyWinGraphicsPipe.cxx
  77. +1 −1 panda/src/tinydisplay/tinyWinGraphicsPipe.h
  78. +1 −1 panda/src/tinydisplay/tinyWinGraphicsWindow.cxx
  79. +1 −1 panda/src/tinydisplay/tinyWinGraphicsWindow.h
  80. +1 −1 panda/src/tinydisplay/zfeatures.h
  81. +2 −2 pandatool/src/maya/mayaApi.cxx
  82. +2 −2 pandatool/src/mayaprogs/mayaPview.cxx
  83. +4 −4 pandatool/src/mayaprogs/mayaSavePview.cxx
  84. +1 −1 pandatool/src/mayaprogs/mayaSavePview.h
  85. +2 −2 pandatool/src/mayaprogs/mayaToEgg_server.cxx
  86. +1 −1 pandatool/src/mayaprogs/mayapath.cxx
  87. +1 −1 pandatool/src/palettizer/paletteGroups.h
@@ -31,7 +31,7 @@ set(INTERROGATE_EXCLUDE_REGEXES
)

if(WIN32)
list(APPEND IGATE_FLAGS -D_X86_ -D__STDC__=1 -DWIN32_VC -D "_declspec(param)=" -D "__declspec(param)=" -D_near -D_far -D__near -D__far -D_WIN32 -D__stdcall -DWIN32)
list(APPEND IGATE_FLAGS -D_X86_ -D__STDC__=1 -D "_declspec(param)=" -D "__declspec(param)=" -D_near -D_far -D__near -D__far -D_WIN32 -D__stdcall)
endif()
if(MSVC_VERSION)
list(APPEND IGATE_FLAGS "-D_MSC_VER=${MSVC_VERSION}")
@@ -36,12 +36,12 @@

#else // WITHIN_PANDA

#ifdef WIN32
#ifdef _MSC_VER
/* C4786: 255 char debug symbols */
#pragma warning (disable : 4786)
/* C4503: decorated name length exceeded */
#pragma warning (disable : 4503)
#endif /* WIN32_VC */
#endif /* _MSC_VER */

#include <iostream>
#include <fstream>
@@ -54,7 +54,7 @@
// These header files are needed to compile dcLexer.cxx, the output from flex.
// flex doesn't create a perfectly windows-friendly source file right out of
// the box.
#ifdef WIN32
#ifdef _WIN32
#include <io.h>
#include <malloc.h>
#else
@@ -27,7 +27,7 @@ extern "C" { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); }
#include "camera.h"
#include "graphicsPipeSelection.h"

#ifdef WIN32
#ifdef _WIN32
#include <windows.h> // For SystemParametersInfo()
STICKYKEYS g_StartupStickyKeys = {sizeof(STICKYKEYS), 0};
TOGGLEKEYS g_StartupToggleKeys = {sizeof(TOGGLEKEYS), 0};
@@ -131,7 +131,7 @@ query_fullscreen_testresult(int xsize, int ysize) {

void
store_accessibility_shortcut_keys() {
#ifdef WIN32
#ifdef _WIN32
SystemParametersInfo(SPI_GETSTICKYKEYS, sizeof(STICKYKEYS), &g_StartupStickyKeys, 0);
SystemParametersInfo(SPI_GETTOGGLEKEYS, sizeof(TOGGLEKEYS), &g_StartupToggleKeys, 0);
SystemParametersInfo(SPI_GETFILTERKEYS, sizeof(FILTERKEYS), &g_StartupFilterKeys, 0);
@@ -140,7 +140,7 @@ store_accessibility_shortcut_keys() {

void
allow_accessibility_shortcut_keys(bool allowKeys) {
#ifdef WIN32
#ifdef _WIN32
if( allowKeys )
{
// Restore StickyKeysetc to original state and enable Windows key
@@ -13,8 +13,8 @@

#include "selectThreadImpl.h"

#ifdef WIN32_VC
#ifdef _WIN32

#include "atomicAdjustWin32Impl.h"

#endif // WIN32_VC
#endif // _WIN32
@@ -17,7 +17,7 @@
#include "dtoolbase.h"
#include "selectThreadImpl.h"

#ifdef WIN32_VC
#ifdef _WIN32

#include "numeric_types.h"

@@ -62,6 +62,6 @@ class EXPCL_DTOOL_DTOOLBASE AtomicAdjustWin32Impl {

#include "atomicAdjustWin32Impl.I"

#endif // WIN32_VC
#endif // _WIN32

#endif
@@ -18,7 +18,7 @@
#error Buildsystem error: BUILDING_DTOOL_DTOOLBASE not defined
#endif

#if defined(USE_TAU) && defined(WIN32)
#if defined(USE_TAU) && defined(_WIN32)
// Hack around tau's lack of DLL export declarations for Profiler class.
bool __tau_shutdown = false;
#endif
@@ -21,19 +21,7 @@

#include "dtool_config.h"

/* Make sure WIN32 and WIN32_VC are defined when using MSVC */
#if defined(_WIN32) || defined(_WIN64)
#ifndef WIN32
#define WIN32
#endif
#ifdef _MSC_VER
#ifndef WIN32_VC
#define WIN32_VC
#endif
#endif
#endif

#ifdef WIN32_VC
/* These warning pragmas must appear before anything else for VC++ to
respect them. Sheesh. */

@@ -58,11 +46,11 @@
#pragma warning (disable : 4267)
/* C4577: 'noexcept' used with no exception handling mode specified */
#pragma warning (disable : 4577)
#endif /* WIN32_VC */
#endif /* _MSC_VER */

/* Windows likes to define min() and max() macros, which will conflict with
std::min() and std::max() respectively, unless we do this: */
#ifdef WIN32
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
@@ -485,7 +473,7 @@ typedef struct _object PyObject;
#endif

/* These symbols are used in dtoolsymbols.h and pandasymbols.h. */
#if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
#if defined(_WIN32) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
#define EXPORT_CLASS __declspec(dllexport)
#define IMPORT_CLASS __declspec(dllimport)
#elif __GNUC__ >= 4 && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
@@ -251,7 +251,7 @@ INLINE void thread_consider_yield() {

#endif // HAVE_THREADS && SIMPLE_THREADS

#if defined(USE_TAU) && defined(WIN32)
#if defined(USE_TAU) && defined(_WIN32)
// Hack around tau's lack of DLL export declarations for Profiler class.
extern EXPCL_DTOOL_DTOOLBASE bool __tau_shutdown;
class EXPCL_DTOOL_DTOOLBASE TauProfile {
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include "typeRegistry.h"

#ifdef WIN32
#ifdef _WIN32

// Windows case.
#ifndef WIN32_LEAN_AND_MEAN
@@ -191,7 +191,7 @@ ptr_to_alloc(void *ptr, size_t &size) {
*/
MemoryHook::
MemoryHook() {
#ifdef WIN32
#ifdef _WIN32

// Windows case.
SYSTEM_INFO sysinfo;
@@ -487,7 +487,7 @@ heap_trim(size_t pad) {
_lock.unlock();
#endif

#ifdef WIN32
#ifdef _WIN32
// Also, on Windows we have _heapmin().
if (_heapmin() == 0) {
trimmed = true;
@@ -516,7 +516,7 @@ mmap_alloc(size_t size, bool allow_exec) {
_total_mmap_size += size;
#endif

#ifdef WIN32
#ifdef _WIN32

// Windows case.
void *ptr = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE,
@@ -571,7 +571,7 @@ mmap_free(void *ptr, size_t size) {
_total_mmap_size -= size;
#endif

#ifdef WIN32
#ifdef _WIN32
VirtualFree(ptr, 0, MEM_RELEASE);
#else
munmap(ptr, size);
@@ -49,7 +49,7 @@ typedef ReMutexPosixImpl ReMutexImpl;
// Also define what a true OS-provided lock will be, even if we don't have
// threading enabled in the build. Sometimes we need to interface with an
// external program or something that wants real locks.
#if defined(WIN32_VC)
#if defined(_WIN32)
#include "mutexWin32Impl.h"
typedef MutexWin32Impl TrueMutexImpl;

@@ -13,7 +13,7 @@

#include "selectThreadImpl.h"

#ifdef WIN32_VC
#if defined(_WIN32) && !defined(CPPPARSER)

#include "mutexWin32Impl.h"

@@ -28,4 +28,4 @@ ReMutexWin32Impl() {
InitializeCriticalSectionAndSpinCount(&_lock, spin_count);
}

#endif // WIN32_VC
#endif // _WIN32
@@ -17,7 +17,7 @@
#include "dtoolbase.h"
#include "selectThreadImpl.h"

#ifdef WIN32_VC
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
@@ -68,6 +68,6 @@ class EXPCL_DTOOL_DTOOLBASE ReMutexWin32Impl {

#include "mutexWin32Impl.I"

#endif // WIN32_VC
#endif // _WIN32

#endif
@@ -47,7 +47,7 @@
#undef TVOLATILE
#define TVOLATILE

#elif defined(WIN32_VC)
#elif defined(_WIN32)

// In Windows, use the native threading library.
#define THREAD_WIN32_IMPL 1
@@ -101,7 +101,7 @@ static const char *const libp3dtool_filenames[] = {
// libp3dtool dynamic library - no guesswork needed.
LIBP3DTOOL_FILENAMES

#elif defined(WIN32_VC)
#elif defined(_WIN32)

#ifdef _DEBUG
"libp3dtool_d.dll",
@@ -223,7 +223,7 @@ get_cwd() {
Filename cwd = Filename::from_os_specific_w(buffer);
cwd.make_true_case();
return cwd;
#else // WIN32_VC
#else // _WIN32
// getcwd() requires us to allocate a dynamic buffer and grow it on demand.
static size_t bufsize = 1024;
static char *buffer = nullptr;
@@ -246,7 +246,7 @@ get_cwd() {
Filename cwd = Filename::from_os_specific(buffer);
cwd.make_true_case();
return cwd;
#endif // WIN32_VC
#endif // _WIN32
}

/**
@@ -585,7 +585,7 @@ read_args() {
// the p3dtool library.

#ifndef LINK_ALL_STATIC
#if defined(WIN32_VC)
#if defined(_WIN32)
for (const char *filename : libp3dtool_filenames) {
if (!_dtool_name.empty()) break;

@@ -704,7 +704,7 @@ read_args() {
// Now, we need to fill in _binary_name. This contains the full path to the
// currently running executable.

#ifdef WIN32_VC
#ifdef _WIN32
if (_binary_name.empty()) {
static const DWORD buffer_size = 1024;
wchar_t buffer[buffer_size];
@@ -766,7 +766,7 @@ read_args() {
// Next we need to fill in _args, which is a vector containing the command-
// line arguments that the executable was invoked with.

#if defined(WIN32_VC)
#if defined(_WIN32)

// We cannot rely on __argv when Python is linked in Unicode mode. Instead,
// let's use GetCommandLine.

0 comments on commit 5f78094

Please sign in to comment.
You can’t perform that action at this time.