Ignore:
Timestamp:
Sep 28, 2010, 1:19:10 PM (14 years ago)
Author:
rosiere
Message:

1) compatible gcc 4.4.3
2) Translation file in MORPHEO_PREFIX directory

Location:
trunk/IPs/systemC/processor/Morpheo/Common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h

    r137 r144  
    4747  // Environment variable
    4848  extern std::string MORPHEO_HOME;
    49   extern std::string MORPHEO_TOPLEVEL;
     49  extern std::string MORPHEO_PREFIX;
    5050  extern std::string MORPHEO_VERSION;
    5151  extern std::string MORPHEO_HEADER;
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Basename.cpp

    r143 r144  
    1313  std::string basename (std::string str, bool keep_extension)
    1414  {
    15     std::string res = ::basename(str.c_str());
     15    std::string res = ::basename(const_cast<char *>(str.c_str()));
    1616   
    1717    if (not keep_extension)
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Environment.cpp

    r137 r144  
    1111#include "Common/include/Message.h"
    1212#include <sys/stat.h>
     13#include <errno.h>
    1314
    1415namespace morpheo {
     
    1617static bool environment_initialized;
    1718std::string MORPHEO_HOME;
    18 std::string MORPHEO_TOPLEVEL;
     19std::string MORPHEO_PREFIX;
    1920std::string MORPHEO_VERSION;
    2021std::string MORPHEO_HEADER;
     
    2829    {
    2930      {
    30         char * TOPLEVEL = getenv("MORPHEO_TOPLEVEL");
     31        char * PREFIX = getenv("MORPHEO_PREFIX");
    3132       
    32         if (TOPLEVEL == NULL)
     33        if (PREFIX == NULL)
    3334          throw ERRORMORPHEO(FUNCTION,_("Error morpheo environment is not positioned.\n"));
    3435
    35         MORPHEO_TOPLEVEL = TOPLEVEL;
     36        MORPHEO_PREFIX = PREFIX;
    3637      }
    3738
     
    9192  if (chdir(dir.c_str())!=0)
    9293    throw ERRORMORPHEO(FUNCTION,toString(_("Error in opening directory \"%s\".\n"),dir.c_str()));
    93   chdir(pwd);
     94
     95  assert(chdir(pwd)==0);
    9496}
    9597
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp

    r131 r144  
    2323        environment();
    2424       
    25         std::string dirname = MORPHEO_TOPLEVEL;
    26         dirname += "/IPs/systemC/processor/Morpheo/locale";
     25        std::string dirname = MORPHEO_PREFIX;
     26        dirname += "/locale";
    2727
    2828        if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL)
Note: See TracChangeset for help on using the changeset viewer.