Ignore:
Timestamp:
Dec 23, 2011, 5:47:15 PM (13 years ago)
Author:
rybkin
Message:

See C.L. 476

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_system.cxx

    r597 r599  
    2020#define S_IFDIR _S_IFDIR
    2121#define USE_GETCWD 1
    22 
     22#define cwd_env_var "CD"
    2323#include <sys/types.h>
    2424#include <sys/stat.h>
     
    2828
    2929#define stat _stat
     30#define unlink _unlink
     31#define chmod _chmod
     32//#define putenv _putenv
    3033#define WEXITSTATUS(w) (w)
    31 #include <stdlib.h>
    3234#define PATH_MAX _MAX_PATH
    3335
     
    4042#include <sys/utsname.h>
    4143#include <limits.h> // define PATH_MAX
     44#define cwd_env_var "PWD"
    4245#endif
    4346
     
    7982  char* pwd_env = 0;
    8083
    81   pwd_env = ::getenv (cwd_variable ()); 
     84  pwd_env = ::getenv (cwd_env_var); 
    8285  //  pwd_env = ::getenv ("PWD"); 
    8386
     
    157160    {
    158161#ifndef WIN32
    159       if (putenv (cwd_variable (), s_dir))
     162      if (putenv (cwd_env_var, s_dir))
    160163        //      if (putenv ("PWD", s_dir))
    161164        return (true);
     
    739742
    740743//--------------------------------------------------
     744/*
    741745char CmtSystem::file_separator ()
    742746{
     
    747751#endif
    748752}
    749 
     753*/
    750754/**
    751755 *  Transform all / or \ characters in the text into the current file_separator
     
    773777
    774778//--------------------------------------------------
     779/*
    775780char CmtSystem::path_separator ()
    776781{
     
    781786#endif
    782787}
    783 
     788*/
    784789//--------------------------------------------------
     790 /*
    785791char CmtSystem::command_separator ()
    786792{
     
    791797#endif
    792798}
    793 
     799 */
     800/*
    794801//--------------------------------------------------
    795802const char * CmtSystem::cwd_variable ()
     
    801808#endif
    802809}
    803 
     810*/
    804811//--------------------------------------------------
    805812const cmt_string& CmtSystem::ev_open ()
     
    15501557    //cerr << "#CmtSystem::putenv> name=" << name << " &v=" << &v << endl;
    15511558
     1559#ifdef WIN32
     1560    int status = ::_putenv ((char*) v.c_str ());
     1561#else
    15521562    int status = ::putenv ((char*) v.c_str ());
     1563#endif
    15531564
    15541565    if (status == 0) return (true);
Note: See TracChangeset for help on using the changeset viewer.