From ae263b4ff3dee3b575fa789e14d078130e66074e Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 3 Feb 2012 15:21:20 +0100 Subject: [PATCH] Fix compilation errors about multiple definition of `automaton'. --- examples/msg/mc/automatonparse_promela.c | 1 + examples/msg/mc/automatonparse_promela.h | 4 ++-- include/xbt/automatonparse_promela.h | 4 ++-- src/xbt/automatonparse_promela.c | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/msg/mc/automatonparse_promela.c b/examples/msg/mc/automatonparse_promela.c index 88c2cafa53..128a87469d 100644 --- a/examples/msg/mc/automatonparse_promela.c +++ b/examples/msg/mc/automatonparse_promela.c @@ -1,5 +1,6 @@ #include "xbt/automatonparse_promela.h" +xbt_automaton_t automaton; char* state_id_src; void init(){ diff --git a/examples/msg/mc/automatonparse_promela.h b/examples/msg/mc/automatonparse_promela.h index cb4fc9cb54..c80c34db2b 100644 --- a/examples/msg/mc/automatonparse_promela.h +++ b/examples/msg/mc/automatonparse_promela.h @@ -5,10 +5,10 @@ #include #include "xbt/automaton.h" -xbt_automaton_t automaton; - SG_BEGIN_DECL() +XBT_PUBLIC_DATA(xbt_automaton_t) automaton; + XBT_PUBLIC(void) init(void); XBT_PUBLIC(void) new_state(char* id, int src); diff --git a/include/xbt/automatonparse_promela.h b/include/xbt/automatonparse_promela.h index cb4fc9cb54..c80c34db2b 100644 --- a/include/xbt/automatonparse_promela.h +++ b/include/xbt/automatonparse_promela.h @@ -5,10 +5,10 @@ #include #include "xbt/automaton.h" -xbt_automaton_t automaton; - SG_BEGIN_DECL() +XBT_PUBLIC_DATA(xbt_automaton_t) automaton; + XBT_PUBLIC(void) init(void); XBT_PUBLIC(void) new_state(char* id, int src); diff --git a/src/xbt/automatonparse_promela.c b/src/xbt/automatonparse_promela.c index 88c2cafa53..128a87469d 100644 --- a/src/xbt/automatonparse_promela.c +++ b/src/xbt/automatonparse_promela.c @@ -1,5 +1,6 @@ #include "xbt/automatonparse_promela.h" +xbt_automaton_t automaton; char* state_id_src; void init(){ -- 2.20.1