Win: Attempt to keep from using Linux functions.
This is a hopefully-temporary solution to prevent some of the problems of
people breaking the Windows build while developing on Linux (or vice-versa).
This uses macros of the names of Linux/Windows-specific functions in order to
catch people who use those functions directly, instead of using the
platform-compatibility-layer functions.
In order to avoid problems with the layers #include'ing "loader_platform.h"
before they #include system files (which can mess them up), I #include
"loader_platform.h" twice. The 2nd time, it #define's the hopefully-temporary
macros.
Note: For some reason, we can't #define LoadLibrary(). It generates warnings
on Windows.
diff --git a/layers/mem_tracker.c b/layers/mem_tracker.c
index 0165cb0..369131f 100644
--- a/layers/mem_tracker.c
+++ b/layers/mem_tracker.c
@@ -32,6 +32,9 @@
#include "xgl_struct_string_helper.h"
#include "mem_tracker.h"
#include "layers_config.h"
+// The following is #included again to catch certain OS-specific functions
+// being used:
+#include "loader_platform.h"
static XGL_LAYER_DISPATCH_TABLE nextTable;
static XGL_BASE_LAYER_OBJECT *pCurObj;