compiler: Fixed __declspec compiling issue on Linux; ide: Fixed crash on null workspace
authorJerome St-Louis <jerome@ecere.com>
Wed, 6 Feb 2013 09:09:24 +0000 (04:09 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sat, 16 Feb 2013 06:02:57 +0000 (01:02 -0500)
52 files changed:
compiler/bootstrap/ecere/bootstrap/AVLTree.c
compiler/bootstrap/ecere/bootstrap/Array.c
compiler/bootstrap/ecere/bootstrap/BTNode.c
compiler/bootstrap/ecere/bootstrap/BinaryTree.c
compiler/bootstrap/ecere/bootstrap/BufferedFile.c
compiler/bootstrap/ecere/bootstrap/BuiltInContainer.c
compiler/bootstrap/ecere/bootstrap/Container.c
compiler/bootstrap/ecere/bootstrap/CustomAVLTree.c
compiler/bootstrap/ecere/bootstrap/DualPipe.c
compiler/bootstrap/ecere/bootstrap/File.c
compiler/bootstrap/ecere/bootstrap/LinkList.c
compiler/bootstrap/ecere/bootstrap/List.c
compiler/bootstrap/ecere/bootstrap/Map.c
compiler/bootstrap/ecere/bootstrap/OldList.c
compiler/bootstrap/ecere/bootstrap/String.c
compiler/bootstrap/ecere/bootstrap/System.c
compiler/bootstrap/ecere/bootstrap/TempFile.c
compiler/bootstrap/ecere/bootstrap/dataTypes.c
compiler/bootstrap/ecere/bootstrap/ecere.main.c
compiler/bootstrap/ecere/bootstrap/i18n.c
compiler/bootstrap/ecere/bootstrap/instance.c
compiler/bootstrap/ecere/bootstrap/memory.c
compiler/bootstrap/ecp/bootstrap/ecp.c
compiler/bootstrap/ecp/bootstrap/ecp.main.c
compiler/bootstrap/ecs/bootstrap/ecs.c
compiler/bootstrap/ecs/bootstrap/ecs.main.c
compiler/bootstrap/libec/bootstrap/ast.c
compiler/bootstrap/libec/bootstrap/copy.c
compiler/bootstrap/libec/bootstrap/dbpass.c
compiler/bootstrap/libec/bootstrap/ec.main.c
compiler/bootstrap/libec/bootstrap/ecdefs.c
compiler/bootstrap/libec/bootstrap/expression.c
compiler/bootstrap/libec/bootstrap/firstPass.c
compiler/bootstrap/libec/bootstrap/freeAst.c
compiler/bootstrap/libec/bootstrap/grammar.c
compiler/bootstrap/libec/bootstrap/lexer.c
compiler/bootstrap/libec/bootstrap/loadSymbols.c
compiler/bootstrap/libec/bootstrap/output.c
compiler/bootstrap/libec/bootstrap/pass0.c
compiler/bootstrap/libec/bootstrap/pass1.c
compiler/bootstrap/libec/bootstrap/pass15.c
compiler/bootstrap/libec/bootstrap/pass16.c
compiler/bootstrap/libec/bootstrap/pass2.c
compiler/bootstrap/libec/bootstrap/pass3.c
compiler/bootstrap/libec/bootstrap/shortcuts.c
compiler/bootstrap/libec/bootstrap/type.c
compiler/ecc/ecc.ec
compiler/libec/precompiled/expression.c
compiler/libec/precompiled/grammar.c
compiler/libec/precompiled/type.c
compiler/libec/src/output.ec
ide/src/designer/CodeEditor.ec

index 4b8e8a9..ee5e029 100644 (file)
@@ -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;
index 97e02cd..0a097e4 100644 (file)
@@ -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;
index 0db5182..e02ec29 100644 (file)
@@ -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;
index e9e2b51..e8fbe71 100644 (file)
@@ -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;
index 51f1cc2..37d91d9 100644 (file)
@@ -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;
index cbf26c2..946c29c 100644 (file)
@@ -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;
index a348eda..af5bcfb 100644 (file)
@@ -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;
index 9ed84d3..e4b8cae 100644 (file)
@@ -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;
index a301ec1..3cd519e 100644 (file)
@@ -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;
index 7abaa5e..b9e0caa 100644 (file)
@@ -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;
index 0fe1f4d..12dc444 100644 (file)
@@ -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;
index d5b3798..9cb09d4 100644 (file)
@@ -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;
index e470b4c..8527804 100644 (file)
@@ -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;
index 7cd0e45..9eb9863 100644 (file)
@@ -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;
index 82a266a..1e45366 100644 (file)
@@ -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;
index 53eacdd..16f4b6b 100644 (file)
@@ -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;
index ecd4f56..b7776aa 100644 (file)
@@ -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;
index 26ba687..52701f3 100644 (file)
@@ -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;
index 3e0e6d8..a3318eb 100644 (file)
@@ -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;
index 901a7fe..9312879 100644 (file)
@@ -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;
index 57933c9..f4daf9c 100644 (file)
@@ -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;
index 70ed27a..b5e2366 100644 (file)
@@ -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;
index 0409be2..2d4e884 100644 (file)
@@ -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;
index 9e23bd1..7e406fb 100644 (file)
@@ -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;
index 71ddd66..186dba4 100644 (file)
@@ -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;
index 91c029a..b852111 100644 (file)
@@ -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;
index 1a2cefa..8fb705f 100644 (file)
@@ -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;
index 131f54d..948a110 100644 (file)
@@ -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;
index 8ac6f68..46cd4d9 100644 (file)
@@ -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;
index b4637fa..70f57e9 100644 (file)
@@ -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;
index d3b6988..d76c8fd 100644 (file)
@@ -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;
index 44c0fc9..f6b9049 100644 (file)
@@ -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;
index 4f31ab9..68ce508 100644 (file)
@@ -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;
index 0455cf3..683a6cb 100644 (file)
@@ -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;
index c89d01c..85c1c1a 100644 (file)
@@ -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;
index b54d186..8a816d1 100644 (file)
@@ -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;
index 9c4e483..16bd0e2 100644 (file)
@@ -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;
index 875a422..50a746e 100644 (file)
@@ -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)
index 51379c9..e77b1af 100644 (file)
@@ -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;
index a092704..53aabd3 100644 (file)
@@ -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;
index 26c83d3..06f9ae4 100644 (file)
@@ -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;
index a747a63..c09c6f2 100644 (file)
@@ -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;
index 54f1da5..8e6288c 100644 (file)
@@ -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;
index f830a41..7481d93 100644 (file)
@@ -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;
index 82321d6..e732248 100644 (file)
@@ -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;
index 2649b11..89f79e5 100644 (file)
@@ -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;
index d473cd6..50d4aba 100644 (file)
@@ -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");
index 79902dd..03dd747 100644 (file)
@@ -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;
index 3010bfa..6337378 100644 (file)
@@ -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;
 
index d89979f..6e524d0 100644 (file)
@@ -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;
index 2443393..b5d8520 100644 (file)
@@ -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)
    {
index 0556883..b8024f5 100644 (file)
@@ -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());