Changeset 87

Show
Ignore:
Timestamp:
09/11/06 13:51:18 (2 years ago)
Author:
Gregor
Message:

Works on Windows.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bcd.gen/bcd/gen/bcdgen.d

    r84 r87  
    110110int main(char[][] args) 
    111111{ 
     112    // figure out what gccxml to use based on the system 
     113    char[] gccxmlExe; 
     114    version (Windows) { 
     115        gccxmlExe = getDirName(args[0]) ~ "\\gccxml_flags.exe"; 
     116    } else { 
     117        gccxmlExe = "gccxml"; 
     118    } 
     119     
    112120    if (args.length < 3) { 
    113121        writefln("Use:"); 
     
    255263     
    256264    // preprocess it 
    257     if (system("gccxml -E -dD " ~ gccxmlopts ~ " -o out.i " ~ args[1])) { 
     265    if (system(gccxmlExe ~ " -E -dD " ~ gccxmlopts ~ " -o out.i " ~ args[1])) { 
    258266        return 2; 
    259267    } 
     
    262270     
    263271    // xml-ize it 
    264     if (system("gccxml " ~ gccxmlopts ~ 
     272    if (system(gccxmlExe ~ " " ~ gccxmlopts ~ 
    265273               " -fxml=out.xml " ~ args[1])) { 
    266274        return 2; 
     
    16381646} 
    16391647 
    1640 extern (C) int getpid(); 
    1641 extern (C) int kill(int, int); 
     1648version (Windows) {} else { 
     1649    extern (C) int getpid(); 
     1650    extern (C) int kill(int, int); 
     1651
    16421652/** 
    16431653 * Get the type of a node in C[++] and D 
     
    16491659    int xmlrret; 
    16501660     
    1651     if (type == "") kill(getpid(), 11); 
     1661    version (Windows) {} else { 
     1662        if (type == "") kill(getpid(), 11); 
     1663    } 
    16521664     
    16531665    // first find the element matching the type