compiler/bootstrap: Fixes
[sdk] / compiler / libec / src / ecdefs.ec
index 595a121..7b55810 100644 (file)
@@ -232,30 +232,31 @@ public void FixModuleName(char *moduleName)
 // todo support %var% variables for windows and $var for linux?
 public char * PassArg(char * output, const char * input)
 {
-#ifdef __WIN32__
-//define windowsFileNameCharsNeedEscaping = " !%&'()+,;=[]^`{}~"; // "#$-.@_" are ok
-   const char * escChars = " !\"%&'()+,;=[]^`{}~"; // windowsFileNameCharsNeedEscaping;
-   const char * escCharsQuoted = "\"";
-#else
-//define linuxFileNameCharsNeedEscaping = " !\"$&'()*:;<=>?[\\`{|"; // "#%+,-.@]^_}~" are ok
-   const char * escChars = " !\"$&'()*:;<=>?[\\`{|"; // linuxFileNameCharsNeedEscaping;
-   const char * escCharsQuoted = "\"()$";
-#endif
+   const char * escChars, * escCharsQuoted;
    bool quoting = false;
    char *o = output;
    const char *i = input, *l = input;
-#ifdef __WIN32__
-   while(*l && !strchr(escChars, *l)) l++;
-   if(*l) quoting = true;
-#else
-   if(*i == '-')
+   if(__runtimePlatform == win32)
    {
-      l++;
+//define windowsFileNameCharsNeedEscaping = " !%&'()+,;=[]^`{}~"; // "#$-.@_" are ok
+      escChars = " !\"%&'()+,;=[]^`{}~"; // windowsFileNameCharsNeedEscaping;
+      escCharsQuoted = "\"";
       while(*l && !strchr(escChars, *l)) l++;
       if(*l) quoting = true;
-      *o++ = *i++;
    }
-#endif
+//define linuxFileNameCharsNeedEscaping = " !\"$&'()*:;<=>?[\\`{|"; // "#%+,-.@]^_}~" are ok
+   else
+   {
+      escChars = " !\"$&'()*:;<=>?[\\`{|"; // linuxFileNameCharsNeedEscaping;
+      escCharsQuoted = "\"()$";
+      if(*i == '-')
+      {
+         l++;
+         while(*l && !strchr(escChars, *l)) l++;
+         if(*l) quoting = true;
+         *o++ = *i++;
+      }
+   }
    if(quoting)
       *o++ = '\"';
    while(*i)
@@ -493,6 +494,7 @@ public:
          char * name;
          Symbol symbol;
          OldList/*<TemplateArgument>*/ * templateArgs;
+         Specifier nsSpec;
       };
       struct
       {
@@ -1301,6 +1303,7 @@ public:
    Context ctx;
    int isIterator;
    Expression propCategory;
+   bool mustRegister;   // Must register the class within the RegisterClass (also used to check whether this class is declared in this module)
 };
 
 // For the .imp file:
@@ -1429,6 +1432,7 @@ public:
    bool typedByReference:1;      // Originally typed by reference, regardless of class type
    bool casted:1;
    bool pointerAlignment:1; // true if the alignment is the pointer size
+   bool isLong:1;    // true if this is truly a long set as a int/int64 (need to improve long support)
    // bool wasThisClass:1;
    // TODO: Add _Complex & _Imaginary support
    // bool complex:1, imaginary:1;