From 9eccddbd526a7abba4b687d6c587f82045e15c38 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Wed, 6 Feb 2013 04:09:24 -0500 Subject: [PATCH] compiler: Fixed __declspec compiling issue on Linux; ide: Fixed crash on null workspace --- compiler/bootstrap/ecere/bootstrap/AVLTree.c | 2 ++ compiler/bootstrap/ecere/bootstrap/Array.c | 2 ++ compiler/bootstrap/ecere/bootstrap/BTNode.c | 2 ++ compiler/bootstrap/ecere/bootstrap/BinaryTree.c | 2 ++ compiler/bootstrap/ecere/bootstrap/BufferedFile.c | 2 ++ compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c | 2 ++ compiler/bootstrap/ecere/bootstrap/Container.c | 2 ++ compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c | 2 ++ compiler/bootstrap/ecere/bootstrap/DualPipe.c | 2 ++ compiler/bootstrap/ecere/bootstrap/File.c | 2 ++ compiler/bootstrap/ecere/bootstrap/LinkList.c | 2 ++ compiler/bootstrap/ecere/bootstrap/List.c | 2 ++ compiler/bootstrap/ecere/bootstrap/Map.c | 2 ++ compiler/bootstrap/ecere/bootstrap/OldList.c | 2 ++ compiler/bootstrap/ecere/bootstrap/String.c | 2 ++ compiler/bootstrap/ecere/bootstrap/System.c | 2 ++ compiler/bootstrap/ecere/bootstrap/TempFile.c | 2 ++ compiler/bootstrap/ecere/bootstrap/dataTypes.c | 2 ++ compiler/bootstrap/ecere/bootstrap/ecere.main.c | 2 ++ compiler/bootstrap/ecere/bootstrap/i18n.c | 2 ++ compiler/bootstrap/ecere/bootstrap/instance.c | 1 + compiler/bootstrap/ecere/bootstrap/memory.c | 2 ++ compiler/bootstrap/ecp/bootstrap/ecp.c | 2 ++ compiler/bootstrap/ecp/bootstrap/ecp.main.c | 2 ++ compiler/bootstrap/ecs/bootstrap/ecs.c | 2 ++ compiler/bootstrap/ecs/bootstrap/ecs.main.c | 2 ++ compiler/bootstrap/libec/bootstrap/ast.c | 2 ++ compiler/bootstrap/libec/bootstrap/copy.c | 2 ++ compiler/bootstrap/libec/bootstrap/dbpass.c | 2 ++ compiler/bootstrap/libec/bootstrap/ec.main.c | 2 ++ compiler/bootstrap/libec/bootstrap/ecdefs.c | 2 ++ compiler/bootstrap/libec/bootstrap/expression.c | 2 ++ compiler/bootstrap/libec/bootstrap/firstPass.c | 2 ++ compiler/bootstrap/libec/bootstrap/freeAst.c | 2 ++ compiler/bootstrap/libec/bootstrap/grammar.c | 2 ++ compiler/bootstrap/libec/bootstrap/lexer.c | 2 ++ compiler/bootstrap/libec/bootstrap/loadSymbols.c | 2 ++ compiler/bootstrap/libec/bootstrap/output.c | 4 +++- compiler/bootstrap/libec/bootstrap/pass0.c | 2 ++ compiler/bootstrap/libec/bootstrap/pass1.c | 2 ++ compiler/bootstrap/libec/bootstrap/pass15.c | 2 ++ compiler/bootstrap/libec/bootstrap/pass16.c | 2 ++ compiler/bootstrap/libec/bootstrap/pass2.c | 2 ++ compiler/bootstrap/libec/bootstrap/pass3.c | 2 ++ compiler/bootstrap/libec/bootstrap/shortcuts.c | 2 ++ compiler/bootstrap/libec/bootstrap/type.c | 2 ++ compiler/ecc/ecc.ec | 2 ++ compiler/libec/precompiled/expression.c | 2 ++ compiler/libec/precompiled/grammar.c | 8 +++----- compiler/libec/precompiled/type.c | 2 ++ compiler/libec/src/output.ec | 2 +- ide/src/designer/CodeEditor.ec | 1 + 52 files changed, 103 insertions(+), 7 deletions(-) diff --git a/compiler/bootstrap/ecere/bootstrap/AVLTree.c b/compiler/bootstrap/ecere/bootstrap/AVLTree.c index 4b8e8a9..ee5e029 100644 --- a/compiler/bootstrap/ecere/bootstrap/AVLTree.c +++ b/compiler/bootstrap/ecere/bootstrap/AVLTree.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/Array.c b/compiler/bootstrap/ecere/bootstrap/Array.c index 97e02cd..0a097e4 100644 --- a/compiler/bootstrap/ecere/bootstrap/Array.c +++ b/compiler/bootstrap/ecere/bootstrap/Array.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/BTNode.c b/compiler/bootstrap/ecere/bootstrap/BTNode.c index 0db5182..e02ec29 100644 --- a/compiler/bootstrap/ecere/bootstrap/BTNode.c +++ b/compiler/bootstrap/ecere/bootstrap/BTNode.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/BinaryTree.c b/compiler/bootstrap/ecere/bootstrap/BinaryTree.c index e9e2b51..e8fbe71 100644 --- a/compiler/bootstrap/ecere/bootstrap/BinaryTree.c +++ b/compiler/bootstrap/ecere/bootstrap/BinaryTree.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/BufferedFile.c b/compiler/bootstrap/ecere/bootstrap/BufferedFile.c index 51f1cc2..37d91d9 100644 --- a/compiler/bootstrap/ecere/bootstrap/BufferedFile.c +++ b/compiler/bootstrap/ecere/bootstrap/BufferedFile.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c b/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c index cbf26c2..946c29c 100644 --- a/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c +++ b/compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/Container.c b/compiler/bootstrap/ecere/bootstrap/Container.c index a348eda..af5bcfb 100644 --- a/compiler/bootstrap/ecere/bootstrap/Container.c +++ b/compiler/bootstrap/ecere/bootstrap/Container.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c b/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c index 9ed84d3..e4b8cae 100644 --- a/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c +++ b/compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/DualPipe.c b/compiler/bootstrap/ecere/bootstrap/DualPipe.c index a301ec1..3cd519e 100644 --- a/compiler/bootstrap/ecere/bootstrap/DualPipe.c +++ b/compiler/bootstrap/ecere/bootstrap/DualPipe.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/File.c b/compiler/bootstrap/ecere/bootstrap/File.c index 7abaa5e..b9e0caa 100644 --- a/compiler/bootstrap/ecere/bootstrap/File.c +++ b/compiler/bootstrap/ecere/bootstrap/File.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/LinkList.c b/compiler/bootstrap/ecere/bootstrap/LinkList.c index 0fe1f4d..12dc444 100644 --- a/compiler/bootstrap/ecere/bootstrap/LinkList.c +++ b/compiler/bootstrap/ecere/bootstrap/LinkList.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/List.c b/compiler/bootstrap/ecere/bootstrap/List.c index d5b3798..9cb09d4 100644 --- a/compiler/bootstrap/ecere/bootstrap/List.c +++ b/compiler/bootstrap/ecere/bootstrap/List.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/Map.c b/compiler/bootstrap/ecere/bootstrap/Map.c index e470b4c..8527804 100644 --- a/compiler/bootstrap/ecere/bootstrap/Map.c +++ b/compiler/bootstrap/ecere/bootstrap/Map.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/OldList.c b/compiler/bootstrap/ecere/bootstrap/OldList.c index 7cd0e45..9eb9863 100644 --- a/compiler/bootstrap/ecere/bootstrap/OldList.c +++ b/compiler/bootstrap/ecere/bootstrap/OldList.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/String.c b/compiler/bootstrap/ecere/bootstrap/String.c index 82a266a..1e45366 100644 --- a/compiler/bootstrap/ecere/bootstrap/String.c +++ b/compiler/bootstrap/ecere/bootstrap/String.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/System.c b/compiler/bootstrap/ecere/bootstrap/System.c index 53eacdd..16f4b6b 100644 --- a/compiler/bootstrap/ecere/bootstrap/System.c +++ b/compiler/bootstrap/ecere/bootstrap/System.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/TempFile.c b/compiler/bootstrap/ecere/bootstrap/TempFile.c index ecd4f56..b7776aa 100644 --- a/compiler/bootstrap/ecere/bootstrap/TempFile.c +++ b/compiler/bootstrap/ecere/bootstrap/TempFile.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/dataTypes.c b/compiler/bootstrap/ecere/bootstrap/dataTypes.c index 26ba687..52701f3 100644 --- a/compiler/bootstrap/ecere/bootstrap/dataTypes.c +++ b/compiler/bootstrap/ecere/bootstrap/dataTypes.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/ecere.main.c b/compiler/bootstrap/ecere/bootstrap/ecere.main.c index 3e0e6d8..a3318eb 100644 --- a/compiler/bootstrap/ecere/bootstrap/ecere.main.c +++ b/compiler/bootstrap/ecere/bootstrap/ecere.main.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/i18n.c b/compiler/bootstrap/ecere/bootstrap/i18n.c index 901a7fe..9312879 100644 --- a/compiler/bootstrap/ecere/bootstrap/i18n.c +++ b/compiler/bootstrap/ecere/bootstrap/i18n.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecere/bootstrap/instance.c b/compiler/bootstrap/ecere/bootstrap/instance.c index 57933c9..f4daf9c 100644 --- a/compiler/bootstrap/ecere/bootstrap/instance.c +++ b/compiler/bootstrap/ecere/bootstrap/instance.c @@ -17,6 +17,7 @@ typedef unsigned long long uint64; #define __declspec(x) __attribute__((x)) #define stdcall __attribute__((__stdcall__)) #else +#define __declspec(x) #define stdcall #endif typedef long long int64; diff --git a/compiler/bootstrap/ecere/bootstrap/memory.c b/compiler/bootstrap/ecere/bootstrap/memory.c index 70ed27a..b5e2366 100644 --- a/compiler/bootstrap/ecere/bootstrap/memory.c +++ b/compiler/bootstrap/ecere/bootstrap/memory.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecp/bootstrap/ecp.c b/compiler/bootstrap/ecp/bootstrap/ecp.c index 0409be2..2d4e884 100644 --- a/compiler/bootstrap/ecp/bootstrap/ecp.c +++ b/compiler/bootstrap/ecp/bootstrap/ecp.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecp/bootstrap/ecp.main.c b/compiler/bootstrap/ecp/bootstrap/ecp.main.c index 9e23bd1..7e406fb 100644 --- a/compiler/bootstrap/ecp/bootstrap/ecp.main.c +++ b/compiler/bootstrap/ecp/bootstrap/ecp.main.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecs/bootstrap/ecs.c b/compiler/bootstrap/ecs/bootstrap/ecs.c index 71ddd66..186dba4 100644 --- a/compiler/bootstrap/ecs/bootstrap/ecs.c +++ b/compiler/bootstrap/ecs/bootstrap/ecs.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/ecs/bootstrap/ecs.main.c b/compiler/bootstrap/ecs/bootstrap/ecs.main.c index 91c029a..b852111 100644 --- a/compiler/bootstrap/ecs/bootstrap/ecs.main.c +++ b/compiler/bootstrap/ecs/bootstrap/ecs.main.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/ast.c b/compiler/bootstrap/libec/bootstrap/ast.c index 1a2cefa..8fb705f 100644 --- a/compiler/bootstrap/libec/bootstrap/ast.c +++ b/compiler/bootstrap/libec/bootstrap/ast.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/copy.c b/compiler/bootstrap/libec/bootstrap/copy.c index 131f54d..948a110 100644 --- a/compiler/bootstrap/libec/bootstrap/copy.c +++ b/compiler/bootstrap/libec/bootstrap/copy.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/dbpass.c b/compiler/bootstrap/libec/bootstrap/dbpass.c index 8ac6f68..46cd4d9 100644 --- a/compiler/bootstrap/libec/bootstrap/dbpass.c +++ b/compiler/bootstrap/libec/bootstrap/dbpass.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/ec.main.c b/compiler/bootstrap/libec/bootstrap/ec.main.c index b4637fa..70f57e9 100644 --- a/compiler/bootstrap/libec/bootstrap/ec.main.c +++ b/compiler/bootstrap/libec/bootstrap/ec.main.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/ecdefs.c b/compiler/bootstrap/libec/bootstrap/ecdefs.c index d3b6988..d76c8fd 100644 --- a/compiler/bootstrap/libec/bootstrap/ecdefs.c +++ b/compiler/bootstrap/libec/bootstrap/ecdefs.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/expression.c b/compiler/bootstrap/libec/bootstrap/expression.c index 44c0fc9..f6b9049 100644 --- a/compiler/bootstrap/libec/bootstrap/expression.c +++ b/compiler/bootstrap/libec/bootstrap/expression.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/firstPass.c b/compiler/bootstrap/libec/bootstrap/firstPass.c index 4f31ab9..68ce508 100644 --- a/compiler/bootstrap/libec/bootstrap/firstPass.c +++ b/compiler/bootstrap/libec/bootstrap/firstPass.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/freeAst.c b/compiler/bootstrap/libec/bootstrap/freeAst.c index 0455cf3..683a6cb 100644 --- a/compiler/bootstrap/libec/bootstrap/freeAst.c +++ b/compiler/bootstrap/libec/bootstrap/freeAst.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/grammar.c b/compiler/bootstrap/libec/bootstrap/grammar.c index c89d01c..85c1c1a 100644 --- a/compiler/bootstrap/libec/bootstrap/grammar.c +++ b/compiler/bootstrap/libec/bootstrap/grammar.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/lexer.c b/compiler/bootstrap/libec/bootstrap/lexer.c index b54d186..8a816d1 100644 --- a/compiler/bootstrap/libec/bootstrap/lexer.c +++ b/compiler/bootstrap/libec/bootstrap/lexer.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/loadSymbols.c b/compiler/bootstrap/libec/bootstrap/loadSymbols.c index 9c4e483..16bd0e2 100644 --- a/compiler/bootstrap/libec/bootstrap/loadSymbols.c +++ b/compiler/bootstrap/libec/bootstrap/loadSymbols.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/output.c b/compiler/bootstrap/libec/bootstrap/output.c index 875a422..50a746e 100644 --- a/compiler/bootstrap/libec/bootstrap/output.c +++ b/compiler/bootstrap/libec/bootstrap/output.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; @@ -2685,7 +2687,7 @@ void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ece { struct External * external; -outputLine = 26; +outputLine = 28; for(external = ast->first; external; external = external->next) { switch(external->type) diff --git a/compiler/bootstrap/libec/bootstrap/pass0.c b/compiler/bootstrap/libec/bootstrap/pass0.c index 51379c9..e77b1af 100644 --- a/compiler/bootstrap/libec/bootstrap/pass0.c +++ b/compiler/bootstrap/libec/bootstrap/pass0.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/pass1.c b/compiler/bootstrap/libec/bootstrap/pass1.c index a092704..53aabd3 100644 --- a/compiler/bootstrap/libec/bootstrap/pass1.c +++ b/compiler/bootstrap/libec/bootstrap/pass1.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/pass15.c b/compiler/bootstrap/libec/bootstrap/pass15.c index 26c83d3..06f9ae4 100644 --- a/compiler/bootstrap/libec/bootstrap/pass15.c +++ b/compiler/bootstrap/libec/bootstrap/pass15.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/pass16.c b/compiler/bootstrap/libec/bootstrap/pass16.c index a747a63..c09c6f2 100644 --- a/compiler/bootstrap/libec/bootstrap/pass16.c +++ b/compiler/bootstrap/libec/bootstrap/pass16.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/pass2.c b/compiler/bootstrap/libec/bootstrap/pass2.c index 54f1da5..8e6288c 100644 --- a/compiler/bootstrap/libec/bootstrap/pass2.c +++ b/compiler/bootstrap/libec/bootstrap/pass2.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/pass3.c b/compiler/bootstrap/libec/bootstrap/pass3.c index f830a41..7481d93 100644 --- a/compiler/bootstrap/libec/bootstrap/pass3.c +++ b/compiler/bootstrap/libec/bootstrap/pass3.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/shortcuts.c b/compiler/bootstrap/libec/bootstrap/shortcuts.c index 82321d6..e732248 100644 --- a/compiler/bootstrap/libec/bootstrap/shortcuts.c +++ b/compiler/bootstrap/libec/bootstrap/shortcuts.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/bootstrap/libec/bootstrap/type.c b/compiler/bootstrap/libec/bootstrap/type.c index 2649b11..89f79e5 100644 --- a/compiler/bootstrap/libec/bootstrap/type.c +++ b/compiler/bootstrap/libec/bootstrap/type.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/ecc/ecc.ec b/compiler/ecc/ecc.ec index d473cd6..50d4aba 100644 --- a/compiler/ecc/ecc.ec +++ b/compiler/ecc/ecc.ec @@ -524,6 +524,8 @@ class CompilerApp : Application output.Printf("#define strcasecmp stricmp\n"); output.Printf("#define strncasecmp strnicmp\n"); output.Printf("#define __declspec(x) __attribute__((x))\n"); + output.Printf("#else\n"); + output.Printf("#define __declspec(x)\n"); output.Printf("#endif\n"); output.Printf("typedef long long int64;\n"); output.Printf("typedef unsigned long long uint64;\n"); diff --git a/compiler/libec/precompiled/expression.c b/compiler/libec/precompiled/expression.c index 79902dd..03dd747 100644 --- a/compiler/libec/precompiled/expression.c +++ b/compiler/libec/precompiled/expression.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/libec/precompiled/grammar.c b/compiler/libec/precompiled/grammar.c index 3010bfa..6337378 100644 --- a/compiler/libec/precompiled/grammar.c +++ b/compiler/libec/precompiled/grammar.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; @@ -2746,11 +2748,7 @@ extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__ extern void Compiler_Error(char * format, ...); -extern -#if defined(__WIN32__) -__declspec(dllexport) -#endif -char * __ecereNameSpace__ecere__GetTranslatedString(struct __ecereNameSpace__ecere__com__Instance * module, char * string, char * stringAndContext); +extern __declspec(dllexport) char * __ecereNameSpace__ecere__GetTranslatedString(struct __ecereNameSpace__ecere__com__Instance * module, char * string, char * stringAndContext); extern struct __ecereNameSpace__ecere__com__Instance * __thisModule; diff --git a/compiler/libec/precompiled/type.c b/compiler/libec/precompiled/type.c index d89979f..6e524d0 100644 --- a/compiler/libec/precompiled/type.c +++ b/compiler/libec/precompiled/type.c @@ -10,6 +10,8 @@ typedef unsigned long long uint64; #define strcasecmp stricmp #define strncasecmp strnicmp #define __declspec(x) __attribute__((x)) +#else +#define __declspec(x) #endif typedef long long int64; typedef unsigned long long uint64; diff --git a/compiler/libec/src/output.ec b/compiler/libec/src/output.ec index 2443393..b5d8520 100644 --- a/compiler/libec/src/output.ec +++ b/compiler/libec/src/output.ec @@ -1494,7 +1494,7 @@ public void OutputTree(OldList ast, File f) { External external; - outputLine = 26; + outputLine = 28; for(external = ast.first; external; external = external.next) { diff --git a/ide/src/designer/CodeEditor.ec b/ide/src/designer/CodeEditor.ec index 0556883..b8024f5 100644 --- a/ide/src/designer/CodeEditor.ec +++ b/ide/src/designer/CodeEditor.ec @@ -2665,6 +2665,7 @@ class CodeEditor : Window printf("classes.count: %d\n", globalContext.classes.count); #endif + if(ide.workspace) { CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler); SetTargetBits(compiler.supportsBitDepth ? 32 : GetHostBits()); -- 1.8.3.1