Merge further Compiler Compatibility fixes onto default branch.
authorSimon Howkins <simonh@symbian.org>
Fri, 05 Mar 2010 15:33:20 +0000
changeset 72 11b60e3fbace
parent 61 6d3ef2aa5c43 (current diff)
parent 70 3f73f939db10 (diff)
Merge further Compiler Compatibility fixes onto default branch.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Fri Mar 05 15:33:20 2010 +0000
@@ -0,0 +1,2 @@
+a41df078684ad3b64d71f9407a748f84d50d35b1 PDK_3.0.b
+f828418ede2a3e3e1cecc4b3424860ae81a94969 PDK_3.0.c
--- a/kernel/eka/euser/epoc/arm/uc_dll.cpp	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/euser/epoc/arm/uc_dll.cpp	Fri Mar 05 15:33:20 2010 +0000
@@ -44,11 +44,11 @@
 	return 0;
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_(void);
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
 	{
--- a/kernel/eka/euser/epoc/arm/uc_exe.cpp	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/euser/epoc/arm/uc_exe.cpp	Fri Mar 05 15:33:20 2010 +0000
@@ -70,11 +70,11 @@
 	}
 }
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst);
 
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 void globalDestructorFunc()
 	{
--- a/kernel/eka/include/e32def.h	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/include/e32def.h	Fri Mar 05 15:33:20 2010 +0000
@@ -446,7 +446,7 @@
 #if __GNUC__ < 4
 #define _FOFF(c,f)			(((TInt)&(((c *)0x1000)->f))-0x1000)
 #else
-#define _FOFF(c,f)			__builtin_offsetof(c,f)
+#define _FOFF(c,f)			(__builtin_offsetof(c,f))
 #endif
 #endif
 
--- a/kernel/eka/kernel/arm/d_entry.cpp	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/kernel/arm/d_entry.cpp	Fri Mar 05 15:33:20 2010 +0000
@@ -49,11 +49,11 @@
 	return KernelModuleEntry(aReason);
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_(void);
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
 //
--- a/kernel/eka/kernel/arm/k_entry.cia	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/kernel/arm/k_entry.cia	Fri Mar 05 15:33:20 2010 +0000
@@ -71,7 +71,7 @@
 	asm("__CtorList: ");
 	asm(".word __CTOR_LIST__ ");
 	}
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
   
@@ -80,7 +80,7 @@
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can be a dummy (i.e. just a label)
 
-__asm void __dso_handle(void) {}
+__NAKED__ void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 void _E32Startup_Body(TLinAddr aRomHeader, TLinAddr aSuperPage);
--- a/kernel/eka/kernel/arm/l_entry.cia	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/kernel/arm/l_entry.cia	Fri Mar 05 15:33:20 2010 +0000
@@ -19,7 +19,7 @@
 
 extern "C" {
 
-#if defined(__ARMCC__)
+#if defined(__EABI__)
 void __DLL_Export_Table__(void);
 #endif
 
--- a/kernel/eka/kernel/arm/v_entry.cpp	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/kernel/arm/v_entry.cpp	Fri Mar 05 15:33:20 2010 +0000
@@ -46,7 +46,7 @@
 	return KErrGeneral;
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
@@ -55,7 +55,7 @@
 // needs destruction. But kernel side static objects will never need this so, define it as a nop
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can just be a label since its not used
-__asm void __dso_handle(void) {}
+__NAKED__ void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
--- a/kernel/eka/kernel/arm/x_entry.cpp	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/kernel/arm/x_entry.cpp	Fri Mar 05 15:33:20 2010 +0000
@@ -41,7 +41,7 @@
 	return KernelModuleEntry(aReason);
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
@@ -50,7 +50,7 @@
 // needs destruction. But the kernel never will need this so, define it as a nop
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can just be a label since its not used.
-__asm void __dso_handle(void){}
+__NAKED__ void __dso_handle(void){}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
--- a/kernel/eka/nkern/arm/nk_entry.cia	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/nkern/arm/nk_entry.cia	Fri Mar 05 15:33:20 2010 +0000
@@ -80,7 +80,7 @@
 	asm("__CtorList: ");
 	asm(".word __CTOR_LIST__ ");
 	}
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
   
@@ -89,7 +89,7 @@
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can be a dummy (i.e. just a label)
 
-__asm void __dso_handle(void) {}
+__NAKED__  void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 void _E32Startup_Body(TLinAddr aRomHeader, TLinAddr aSuperPage);
--- a/kernel/eka/personality/example/personality.h	Wed Feb 24 15:45:41 2010 +0000
+++ b/kernel/eka/personality/example/personality.h	Fri Mar 05 15:33:20 2010 +0000
@@ -41,6 +41,8 @@
 typedef unsigned int size_t;
 #elif defined(__ARMCC__)
 typedef unsigned int size_t;
+#elif defined(__GCCE__)
+typedef unsigned int size_t;
 #endif
 
 #ifdef __cplusplus
--- a/userlibandfileserver/fileserver/sfile/sf_func.h	Wed Feb 24 15:45:41 2010 +0000
+++ b/userlibandfileserver/fileserver/sfile/sf_func.h	Fri Mar 05 15:33:20 2010 +0000
@@ -918,9 +918,12 @@
 public:
 	static TInt Initialise(CFsRequest* aRequest);
 	static TInt DoRequestL(CFsRequest* aRequest);
+	
+#ifndef __GCCE__ // GCC does not like AddFsToCompositeMountL() being private 
 #ifndef __GCC32__ // GCC does not like AddFsToCompositeMountL() being private 
 private:
 #endif
+#endif
 	static void AddFsToCompositeMountL(TInt aDriveNumber, CFileSystem& aFileSystem, TInt aLocalDriveNumber);
 	};