--- a/targets/Linux/plc_Linux_main.c Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/Linux/plc_Linux_main.c Tue Feb 01 17:28:41 2011 +0100
@@ -8,6 +8,7 @@
#include <signal.h>
#include <stdlib.h>
#include <pthread.h>
+#include <locale.h>
/* provided by POUS.C */
extern unsigned long long common_ticktime__;
@@ -75,6 +76,7 @@
int startPLC(int argc,char **argv)
{
struct sigevent sigev;
+ setlocale(LC_NUMERIC, "C");
/* Define Ttick to 1ms if common_ticktime not defined */
Ttick = common_ticktime__?common_ticktime__:1000000;
--- a/targets/Win32/plc_Win32_main.c Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/Win32/plc_Win32_main.c Tue Feb 01 17:28:41 2011 +0100
@@ -6,6 +6,7 @@
#include <sys/timeb.h>
#include <time.h>
#include <windows.h>
+#include <locale.h>
/* provided by POUS.C */
extern unsigned long long common_ticktime__;
@@ -62,6 +63,7 @@
int startPLC(int argc,char **argv)
{
unsigned long thread_id = 0;
+ setlocale(LC_NUMERIC, "C");
/* Define Ttick to 1ms if common_ticktime not defined */
Ttick = common_ticktime__?common_ticktime__:1000000;
--- a/targets/plc_common_main.c Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/plc_common_main.c Tue Feb 01 17:28:41 2011 +0100
@@ -2,7 +2,6 @@
* Code common to all C targets
**/
-#include <locale.h>
#include "iec_types.h"
/*
* Prototypes of functions provided by generated C softPLC
@@ -67,7 +66,6 @@
{
int res = 0;
init_level = 0;
- setlocale(LC_NUMERIC, "C");
config_init__();
__init_debug();
%(init_calls)s