]> git.cworth.org Git - apitrace/commitdiff
common: Add platform #ifdefs for non-cmake build convenience.
authorNigel Stewart <nigels@users.sourceforge.net>
Mon, 24 Jun 2013 20:40:44 +0000 (15:40 -0500)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 2 Jul 2013 22:42:04 +0000 (23:42 +0100)
The cmake CMakeLists.txt file has logic for including or excluding certain
compilation units based on the platform: Windows, Linux or Mac OS X.
Other build systems are not as clever, it is convenient to also wrap
platform-specifics with #ifdef _WIN32 ... #endif to keep things simple on
the build side.

common/os_posix.cpp
common/os_win32.cpp
helpers/eglsize.cpp
helpers/eglsize.hpp

index 9e8580f2f8f505b2a3753b34d413038d11bb88dd..967d12eba4116ddccd8f1c3389f165c7c8edc4c0 100644 (file)
@@ -23,6 +23,7 @@
  *
  **************************************************************************/
 
+#ifndef _WIN32
 
 #include <assert.h>
 #include <string.h>
@@ -331,3 +332,4 @@ resetExceptionCallback(void)
 
 } /* namespace os */
 
+#endif // !defined(_WIN32)
index bd4b06d46c919d94f2f0e2d24002564db2c9c011..05a7a46c37d89ef33f812c79995732d6e6358ac3 100644 (file)
@@ -23,6 +23,8 @@
  *
  **************************************************************************/
 
+#ifdef _WIN32
+
 #include <windows.h>
 
 #include <assert.h>
@@ -172,7 +174,7 @@ int execute(char * const * args)
         sep = ' ';
     }
 
-    STARTUPINFO startupInfo;
+    STARTUPINFOA startupInfo;
     memset(&startupInfo, 0, sizeof(startupInfo));
     startupInfo.cb = sizeof(startupInfo);
 
@@ -338,3 +340,5 @@ resetExceptionCallback(void)
 
 
 } /* namespace os */
+
+#endif  // defined(_WIN32)
index 4f2dfdcda8236aeadc331459e5d913b470f7ebf3..d2883386048ad6d94a8155057676d6c15a4f5878 100644 (file)
@@ -29,6 +29,8 @@
  * Auxiliary functions to compute the size of array/blob arguments.
  */
 
+#ifndef _WIN32
+
 #include <string.h>
 
 #include "os_thread.hpp"
@@ -214,4 +216,5 @@ _EGLImageKHR_free_image_info(struct image_info *info)
     delete info;
 }
 
+#endif // !defined(_WIN32)
 
index a2014f61db84a029557a0a100fbd8ac055bf1591..3da79d120c7e4883e76772ad793d90f12abfd3be 100644 (file)
@@ -32,6 +32,7 @@
 #ifndef _EGLSIZE_HPP_
 #define _EGLSIZE_HPP_
 
+#ifndef _WIN32
 
 #include "glimports.hpp"
 
@@ -53,5 +54,6 @@ _EGLImageKHR_get_image_info(GLenum target, EGLImageKHR image);
 void
 _EGLImageKHR_free_image_info(struct image_info *info);
 
+#endif // !defined(_WIN32)
 
 #endif