X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=cint%2Frun_exams.cpp;h=a23a312f50649eed7eed5a7f3f18e2c77a79fea7;hp=6225d73b057ace968ae2381a8be43367aded297b;hb=fb11f25f728b95c3ef3d97b558d80e87d95fdd0c;hpb=bd2d7351b89743eb68ce7d3bfa7ab62c331f9522 diff --git a/cint/run_exams.cpp b/cint/run_exams.cpp index 6225d73b..a23a312f 100644 --- a/cint/run_exams.cpp +++ b/cint/run_exams.cpp @@ -14,23 +14,23 @@ extern char **environ; int main(int argc, char * *argv) { - // what to start - std::string binprog = "./ginaccint.bin"; - - // extend LD_LIBRARY_PATH by ../ginac/.libs, so ginaccint.bin really finds libginac - const char * LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH"); - if (LD_LIBRARY_PATH == NULL) - setenv("LD_LIBRARY_PATH", "../ginac/.libs", 1); - else - setenv("LD_LIBRARY_PATH", (std::string(LD_LIBRARY_PATH)+':'+"../ginac/.libs").c_str(), 1); - - // hard-wire CINTSYSDIR, inherited from configure - setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 1); - - // execute the real thing - int error = execve(binprog.c_str(), argv, environ); - - // only gets here on error - std::cerr << argv[0] << ": cannot exec " << binprog << std::endl; - return error; + // what to start + std::string binprog = "./ginaccint.bin"; + + // extend LD_LIBRARY_PATH by ../ginac/.libs, so ginaccint.bin really finds libginac + const char * LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH"); + if (LD_LIBRARY_PATH == NULL) + setenv("LD_LIBRARY_PATH", "../ginac/.libs", 1); + else + setenv("LD_LIBRARY_PATH", (std::string(LD_LIBRARY_PATH)+':'+"../ginac/.libs").c_str(), 1); + + // hard-wire CINTSYSDIR, inherited from configure + setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 1); + + // execute the real thing + int error = execve(binprog.c_str(), argv, environ); + + // only gets here on error + std::cerr << argv[0] << ": cannot exec " << binprog << std::endl; + return error; }