Changeset 599 for CMT/HEAD/source/cmt_system.cxx
- Timestamp:
- Dec 23, 2011, 5:47:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_system.cxx
r597 r599 20 20 #define S_IFDIR _S_IFDIR 21 21 #define USE_GETCWD 1 22 22 #define cwd_env_var "CD" 23 23 #include <sys/types.h> 24 24 #include <sys/stat.h> … … 28 28 29 29 #define stat _stat 30 #define unlink _unlink 31 #define chmod _chmod 32 //#define putenv _putenv 30 33 #define WEXITSTATUS(w) (w) 31 #include <stdlib.h>32 34 #define PATH_MAX _MAX_PATH 33 35 … … 40 42 #include <sys/utsname.h> 41 43 #include <limits.h> // define PATH_MAX 44 #define cwd_env_var "PWD" 42 45 #endif 43 46 … … 79 82 char* pwd_env = 0; 80 83 81 pwd_env = ::getenv (cwd_ variable ());84 pwd_env = ::getenv (cwd_env_var); 82 85 // pwd_env = ::getenv ("PWD"); 83 86 … … 157 160 { 158 161 #ifndef WIN32 159 if (putenv (cwd_ variable (), s_dir))162 if (putenv (cwd_env_var, s_dir)) 160 163 // if (putenv ("PWD", s_dir)) 161 164 return (true); … … 739 742 740 743 //-------------------------------------------------- 744 /* 741 745 char CmtSystem::file_separator () 742 746 { … … 747 751 #endif 748 752 } 749 753 */ 750 754 /** 751 755 * Transform all / or \ characters in the text into the current file_separator … … 773 777 774 778 //-------------------------------------------------- 779 /* 775 780 char CmtSystem::path_separator () 776 781 { … … 781 786 #endif 782 787 } 783 788 */ 784 789 //-------------------------------------------------- 790 /* 785 791 char CmtSystem::command_separator () 786 792 { … … 791 797 #endif 792 798 } 793 799 */ 800 /* 794 801 //-------------------------------------------------- 795 802 const char * CmtSystem::cwd_variable () … … 801 808 #endif 802 809 } 803 810 */ 804 811 //-------------------------------------------------- 805 812 const cmt_string& CmtSystem::ev_open () … … 1550 1557 //cerr << "#CmtSystem::putenv> name=" << name << " &v=" << &v << endl; 1551 1558 1559 #ifdef WIN32 1560 int status = ::_putenv ((char*) v.c_str ()); 1561 #else 1552 1562 int status = ::putenv ((char*) v.c_str ()); 1563 #endif 1553 1564 1554 1565 if (status == 0) return (true);
Note: See TracChangeset
for help on using the changeset viewer.