Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    rfcd1a469 re35a32b  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 14 21:55:12 2021
    13 // Update Count     : 467
     12// Last Modified On : Sat Jan 16 07:30:19 2021
     13// Update Count     : 442
    1414//
    1515
     
    9494        // get executable path from /proc/self/exe
    9595        ssize_t size = readlink("/proc/self/exe", const_cast<char*>(abspath.c_str()), abspath.size());
    96         if ( size <= 0 ) {
     96        if(size <= 0) {
    9797                std::cerr << "Error could not evaluate absolute path from /proc/self/exe" << std::endl;
    9898                std::cerr << "Failed with " << std::strerror(errno) << std::endl;
    9999                std::exit(1);
    100         } // if
     100        }
    101101
    102102        // Trim extra characters
     
    104104
    105105        // Are we installed
    106         if ( abspath.rfind(CFA_BINDIR, 0) == 0 ) { return Installed; }
     106        if(abspath.rfind(CFA_BINDIR  , 0) == 0) { return Installed; }
    107107
    108108        // Is this the build tree
    109         if ( abspath.rfind(TOP_BUILDDIR, 0 ) == 0 ) { return BuildTree; }
     109        if(abspath.rfind(TOP_BUILDDIR, 0) == 0) { return BuildTree; }
    110110
    111111        // Does this look like distcc
    112         if ( abspath.find( "/.cfadistcc/" ) != std::string::npos ) { return Distributed; }
     112        if(abspath.find("/.cfadistcc/") != std::string::npos) { return Distributed; }
    113113
    114114        // None of the above? Give up since we don't know where the prelude or include directories are
     
    188188                                        i += 1;
    189189                                        if ( i == argc ) continue;                      // next argument available ?
    190                                         Putenv( argv, argv[i] );                        // make available for cc1
     190                                        Putenv( argv, argv[i] );
    191191                                } else if ( arg[5] == ',' ) {                   // CFA specific arguments
    192                                         string xcfargs = arg.substr( 6 ) + ","; // add sentinel
    193                                         for ( ;; ) {
    194                                                 size_t posn = xcfargs.find_first_of( "," ); // find separator
    195                                           if ( posn == string::npos ) break; // any characters left ?
    196                                                 string xcfarg = xcfargs.substr( 0, posn ); // remove XCFA argument
    197                                                 Putenv( argv, xcfarg );                 // make available for cc1
    198                                                 xcfargs.erase( 0, posn + 1 );   // remove first argument and comma
    199                                         } // for
     192                                        Putenv( argv, argv[i] + 6 );
    200193                                } else {                                                                // CFA specific arguments
    201                                         assert( false );                                        // this does not make sense
    202194                                        args[nargs++] = argv[i];
    203195                                } // if
     
    372364        args[nargs++] = "stdbool.h";
    373365
    374         if ( compiling_libs ) {
     366        if( compiling_libs ) {
    375367                Putenv( argv, "-t" );
    376368        } // if
Note: See TracChangeset for help on using the changeset viewer.