pike.git / NT / tools / rntcl

version» Context lines:

pike.git/NT/tools/rntcl:1:   #!/usr/local/bin/pike + // -*- Pike -*-      // RNTCC, a front-end to MS VC++ with options similar to GCC   // Written by Fredrik Hubinette.      inherit "lib.pike";      // Verbose is default for now, this can be turned off one this   // frontend has been refined to where it does not require more   // debugging.   
pike.git/NT/tools/rntcl:31:    return reverse(file);   }      string remove_ext(string file)   {    sscanf(file=reverse(file),"%*s.%s",file,file);    return reverse(file);   }       + array|object paranoia_stat(string f) + { +  for (int i=0; i < 10; i++) { +  array|object st = file_stat(f); +  if (st) return st; +  sleep(0.1); +  } +  return file_stat(f); + } +    int main(int argc, string *argv)   {   // werror("%O\n",argv);    string *ldopts=({"-INCREMENTAL:no"});    string *cflags=({    "-Zm300",    "-F8388608",    "-Ge", -  +  "-GR",    "-D__WIN32__",    "-D_WIN32",    "-D__NT__",   // "-D__STDC__",    "-nologo",    });       string target="exe";    int debug,optimize,share,dynamic;    string output, wantfile;
pike.git/NT/tools/rntcl:115:    target="-";    break;       case "oper_comp":    target="obj";    cflags+=({ "-c" });    break;       case "debug":    cflags+=({ -  "-Z7", +  // "-Z7", +  "-Zi",   // "-Yd",    });    debug=1;    break;       case "optimize":    if(!option[1]) option[1]=1;    switch(optimize=(int)option[1])    {    case 0: optimize=0; break;
pike.git/NT/tools/rntcl:254:    "libcmt.lib","libcmtd.lib",    "msvcrt.lib","msvcrtd.lib"});       string lib=(debug?"libcmtd.lib":"libcmt.lib");    libs-=({ lib });    for(int e=0;e<sizeof(libs);e++)    ldopts+=({"-nodefaultlib:"+libs[e]});          cmd+=({"-link", +  "-fixed:no", +  "-debug",   // "-PDB:NONE",    "-DEBUGTYPE:BOTH",    "-DEBUG",    })    +ldopts;    }       break;       default:
pike.git/NT/tools/rntcl:304:    }       if(ret)    {    werror("CL returned error code %d.\n",ret);    exit(ret);    }       if(wantfile)    { -  if(!file_stat(wantfile)) +  if(!paranoia_stat(wantfile))    {    werror("RNTCL: output file not generated (%s).\n",wantfile);    exit(1);    }    }       if(target=="exe" && !share)    {    rm(output);    Stdio.write_file(output,