# HG changeset patch
# User Edouard Tisserant
# Date 1395910333 -3600
# Node ID a51a3bb4d613413ad4695ad8de2f19fba94fab9f
# Parent  f1b501f47c1fc93bd39467d2ff632a8628da5008
More static declarations in POUS.c in order to avoid conflicting symbol definitions with new POUS.c inclusion scheme

diff -r f1b501f47c1f -r a51a3bb4d613 lib/accessor.h
--- 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)\
     }
diff -r f1b501f47c1f -r a51a3bb4d613 stage4/generate_c/generate_c.cc
--- 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 */
diff -r f1b501f47c1f -r a51a3bb4d613 stage4/generate_c/generate_c_inlinefcall.cc
--- 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);