egl: also use X types for building on Apple/MacOS X
[mesa.git] / include / EGL / eglplatform.h
index 6a67a3d29ff1780b9f9ee6ab981e8a935b01ca1b..9e83b600035e8774f01c1e94e384e982c1419784 100644 (file)
@@ -8,12 +8,15 @@
 /* Windows calling convention boilerplate */
 #if (defined(WIN32) || defined(_WIN32_WCE))
 #ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN            // Exclude rarely-used stuff from Windows headers
+#define WIN32_LEAN_AND_MEAN            /* Exclude rarely-used stuff from Windows headers */
 #endif
 #include <windows.h>
 #endif
 
+#if !defined(_WIN32_WCE)
 #include <sys/types.h>
+#include <stdint.h>
+#endif
 
 /* Macros used in EGL function prototype declarations.
  *
 #ifndef EGLAPI
 #define EGLAPI __declspec(dllexport)
 #endif
+
 typedef long   int32_t;
+typedef unsigned long uint32_t;
+typedef unsigned char uint8_t;
+#define snprintf _snprintf
+#define strcasecmp _stricmp
+#define vsnprintf _vsnprintf
+
 typedef HDC            NativeDisplayType;
 typedef HWND   NativeWindowType;
 typedef HBITMAP NativePixmapType;
 /** END Added for Windows **/
 
-#elif defined(__gnu_linux__)
+#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__APPLE__)
+
 
 /** BEGIN Added for X (Mesa) **/
 #ifndef EGLAPI