PAMP:Open C

From OpenSource

Jump to: navigation, search

[edit] Download

Download from Forum Nokia. We use both the older Open C Plug-in (12MB) and the newer Open C Plug-in MR (13MB) versions.

[edit] Fix

NOTE Applies only to the Open C Plug-in MR (13MB) version.

Apply the following patch to epoc32/stdapis/sys/cdefs.h

--- cdefs.h.original    Thu Jan 03 16:28:17 2008
+++ cdefs.h     Thu Jan 03 16:59:41 2008
@@ -331,9 +331,15 @@
 #define        __offsetof(type, field) ((size_t)(&((type *)0)->field))
 #else
 #define __offsetof(type, field)                                        \
+  ((reinterpret_cast <size_t>                  \
+                 (&reinterpret_cast <const volatile char &>    \
+                  (static_cast<type *> (0)->field))))
+/*
+#define __offsetof(type, field)                                        \
   (__offsetof__ (reinterpret_cast <size_t>                     \
                  (&reinterpret_cast <const volatile char &>    \
                   (static_cast<type *> (0)->field))))
+*/
 #endif
 #define        __rangeof(type, start, end) \
        (__offsetof(type, end) - __offsetof(type, start))

[edit] Fix

NOTE Applies only to the Open C Plug-in (12MB) version.

Apply the following patch to epoc32/stdapis/sys/resource.h to avoid multiply defined symbols

--- resource.h.original Wed Mar 14 09:37:00 2007
+++ resource.h  Tue Apr 10 14:25:00 2007
@@ -53,20 +53,22 @@
 #define        PRIO_USER       2

 #ifdef __SYMBIAN32__
-const int UPPER_LIMIT_PRIORITY_HIGHEST = -20;
-const int LOWER_LIMIT_PRIORITY_HIGHEST = -16;
+enum {
+    UPPER_LIMIT_PRIORITY_HIGHEST = -20,
+    LOWER_LIMIT_PRIORITY_HIGHEST = -16,

-const int UPPER_LIMIT_PRIORITY_ABOVE_NORMAL = -15;
-const int LOWER_LIMIT_PRIORITY_ABOVE_NORMAL = -6;
+    UPPER_LIMIT_PRIORITY_ABOVE_NORMAL = -15,
+    LOWER_LIMIT_PRIORITY_ABOVE_NORMAL = -6,

-const int UPPER_LIMIT_PRIORITY_NORMAL = -5;
-const int LOWER_LIMIT_PRIORITY_NORMAL = 4;
+    UPPER_LIMIT_PRIORITY_NORMAL = -5,
+    LOWER_LIMIT_PRIORITY_NORMAL = 4,

-const int UPPER_LIMIT_PRIORITY_BELOW_NORMAL = 5;
-const int LOWER_LIMIT_PRIORITY_BELOW_NORMAL = 14;
+    UPPER_LIMIT_PRIORITY_BELOW_NORMAL = 5,
+    LOWER_LIMIT_PRIORITY_BELOW_NORMAL = 14,

-const int UPPER_LIMIT_PRIORITY_LOWEST = 15;
-const int LOWER_LIMIT_PRIORITY_LOWEST = 20;
+    UPPER_LIMIT_PRIORITY_LOWEST = 15,
+    LOWER_LIMIT_PRIORITY_LOWEST = 20
+};
 #endif /* __SYMBIAN32__ */
 /*
  * Resource utilization information.
Personal tools
MediaWiki Resources