Bug 2966 - Fixed GCC issues with redefinition of typedef's GCC_SURGE
authorLars Kurth <larsk@symbian.org>
Tue, 15 Jun 2010 15:39:06 +0100
branchGCC_SURGE
changeset 99 ac1910f6e7cb
parent 96 faed0e24b58a
child 100 16dccf7ef352
Bug 2966 - Fixed GCC issues with redefinition of typedef's
egl/eglinterface/include/1.2/khronos_types.h
egl/eglinterface/include/khrplatform.h
graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontextgeneral.h
graphicscomposition/openwfcompositionengine/adaptation/include/owfnativestream.h
graphicscomposition/openwfsupport/inc/eglsynchelper.h
--- a/egl/eglinterface/include/1.2/khronos_types.h	Fri Jun 11 16:28:08 2010 +0100
+++ b/egl/eglinterface/include/1.2/khronos_types.h	Tue Jun 15 15:39:06 2010 +0100
@@ -31,6 +31,10 @@
 typedef TUint16 khronos_uint16_t; // unsigned short int
 typedef TInt32  khronos_int32_t;  // long int
 typedef TUint32 khronos_uint32_t; // unsigned long int
+typedef TUint64 khronos_utime_nanoseconds_t;  // unsigned long long (may need to remobe this and 
+                                              // include a version #ifdef if there is a strong reason 
+                                              // not to have the typedef here. For simplicity I added it 
+                                              // here.
 
 #endif // __KHRONOS_TYPES_H__
 
--- a/egl/eglinterface/include/khrplatform.h	Fri Jun 11 16:28:08 2010 +0100
+++ b/egl/eglinterface/include/khrplatform.h	Tue Jun 15 15:39:06 2010 +0100
@@ -85,6 +85,7 @@
 #endif
 
 #include <e32def.h>
+#include <khronos_types.h>
 
 /*-------------------------------------------------------------------------
  * Definition of KHRONOS_APICALL and KHRONOS_APIENTRY
@@ -139,18 +140,12 @@
 #define KHRONOS_SUPPORT_INT64   0
 #define KHRONOS_SUPPORT_FLOAT   0
 
-typedef TReal32 khronos_float;    // float
-typedef TReal32 khronos_float_t;    // float
-typedef TInt8   khronos_int8_t;   // signed char
-typedef TUint8  khronos_uint8_t;  // unsigned char
-typedef TInt16  khronos_int16_t;  // short int
-typedef TUint16 khronos_uint16_t; // unsigned short int
-typedef TInt32  khronos_int32_t;  // long int
-typedef TUint32 khronos_uint32_t; // unsigned long int
+// The other types are defined in <khronos_types.h>
+// These have been removed, as GCC does not allow re-definition of the same type (even with the same name)
+
 typedef TInt64  khronos_int64_t;  // long int
 typedef TUint64 khronos_uint64_t; // unsigned long int
 
-typedef TUint64	khronos_utime_nanoseconds_t;
 typedef TInt32	khronos_stime_nanoseconds_t;
 
 #ifdef __cplusplus
--- a/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontextgeneral.h	Fri Jun 11 16:28:08 2010 +0100
+++ b/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontextgeneral.h	Tue Jun 15 15:39:06 2010 +0100
@@ -25,12 +25,13 @@
 #include <e32def.h>
 #include <WF/wfc.h>
 #include <KHR/khrplatform.h>
+#include <owfimage.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef void*   OWF_DISPCTX;
+// Type OWF_DISPCTX is defined in <owfimage.h>
 
 OWF_DISPCTX OWF_DisplayContext_Create(TInt screenNum);
 void OWF_DisplayContext_Destroy(TInt screenNum, OWF_DISPCTX dc);
--- a/graphicscomposition/openwfcompositionengine/adaptation/include/owfnativestream.h	Fri Jun 11 16:28:08 2010 +0100
+++ b/graphicscomposition/openwfcompositionengine/adaptation/include/owfnativestream.h	Tue Jun 15 15:39:06 2010 +0100
@@ -59,7 +59,8 @@
     OWF_STREAM_ERROR_OUT_OF_MEMORY      = -3
 } OWF_STREAM_ERROR;
 
-typedef WFCHandle           WFCNativeStreamType;
+// WFCNativeStreamType is defined in <WF/wfcplatform.h>
+
 /*!---------------------------------------------------------------------------
  * Converts from external WFC native stream handle type to internal OWF native stream handle type.
  * The internal handle MUST be persistant. The external handle may already be persistant.
--- a/graphicscomposition/openwfsupport/inc/eglsynchelper.h	Fri Jun 11 16:28:08 2010 +0100
+++ b/graphicscomposition/openwfsupport/inc/eglsynchelper.h	Tue Jun 15 15:39:06 2010 +0100
@@ -29,13 +29,8 @@
 
 #ifndef EGL_EGLEXT_PROTOTYPES
 
-/*
- * EGLSyncKHR is an opaque handle to an EGL sync object
- */
-typedef void* EGLSyncKHR;
-
-
-typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+// The types EGLSyncKHR (an opaque handle to an EGL sync object) & 
+// EGLTimeKHR are defined in <EGL/eglext.h>
 
 /* API functions */