More static declarations in POUS.c in order to avoid conflicting symbol definitions with new POUS.c inclusion scheme
--- a/lib/accessor.h Wed Mar 26 13:20:45 2014 +0100
+++ b/lib/accessor.h Thu Mar 27 09:52:13 2014 +0100
@@ -21,10 +21,10 @@
#define __DECLARE_GLOBAL_FB(type, domain, name)\
type domain##__##name;\
static type *GLOBAL__##name = &(domain##__##name);\
- type* __GET_GLOBAL_##name(void) {\
+ static type* __GET_GLOBAL_##name(void) {\
return &(*GLOBAL__##name);\
}\
- extern void type##_init__(type* data__, BOOL retain);
+ /*extern void type##_init__(type* data__, BOOL retain)*/;
#define __DECLARE_GLOBAL_LOCATION(type, location)\
extern type *location;
#define __DECLARE_GLOBAL_LOCATED(type, resource, name)\
@@ -68,6 +68,7 @@
__INIT_RETAIN(domain##__##name, retained)
#define __INIT_EXTERNAL(type, global, name, retained)\
{\
+ type* __GET_GLOBAL_##global();\
name.value = __GET_GLOBAL_##global();\
__INIT_RETAIN(name, retained)\
}
--- a/stage4/generate_c/generate_c.cc Wed Mar 26 13:20:45 2014 +0100
+++ b/stage4/generate_c/generate_c.cc Thu Mar 27 09:52:13 2014 +0100
@@ -1326,6 +1326,7 @@
/* (A) Function declaration... */
/* (A.1) Function return type */
s4o.print("// FUNCTION\n");
+ s4o.print("static ");
symbol->type_name->accept(*this); /* return type */
s4o.print(" ");
/* (A.2) Function name */
--- a/stage4/generate_c/generate_c_inlinefcall.cc Wed Mar 26 13:20:45 2014 +0100
+++ b/stage4/generate_c/generate_c_inlinefcall.cc Thu Mar 27 09:52:13 2014 +0100
@@ -120,7 +120,7 @@
}
s4o.print(s4o.indent_spaces);
- s4o.print("inline ");
+ s4o.print("static inline ");
function_type_prefix->accept(*this);
s4o.print(" __");
fbname->accept(*this);