Changeset 506
- Timestamp:
- 08/30/05 11:47:07 (8 years ago)
- Files:
-
- 1 modified
-
ossie/trunk/ossie/framework/FileSystem_impl.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ossie/trunk/ossie/framework/FileSystem_impl.cpp
r501 r506 23 23 /* SCA */ 24 24 25 #ifdef HAVE_SYS_TYPES_H26 25 #include <sys/types.h> 27 #endif28 29 #ifdef HAVE_SYS_STAT_H30 26 #include <sys/stat.h> 31 #endif32 33 27 #include <fcntl.h> 34 28 29 #include <string.h> 30 #ifdef __linux__ 31 #include <dirent.h> 32 #else 33 #include "ossie/dirent.h" 34 #include <direct.h> 35 #endif 36 37 #include "ossie/FileSystem_impl.h" 38 35 39 #ifdef HAVE_UNISTD_H 36 #include <unistd.h> 37 #endif 38 39 #ifdef HAVE_STRING_H 40 #include <string.h> 41 #endif 42 43 #ifdef HAVE_DIRENT_H 44 #include <dirent.h> 45 #endif 46 47 #include "ossie/FileSystem_impl.h" 40 #include <unistd.h> 41 #else 42 #include <iostream> 43 #include <io.h> 44 // #include <process.h> 45 // #include <stdexcept> 46 // #include <io.h> 47 // #include <string.h> 48 using namespace std; 49 #endif 48 50 49 51 FileSystem_impl::FileSystem_impl () 50 52 { 51 53 root = new char[MAX_CWD_LEN]; 54 #ifdef __linux__ 52 55 root = getcwd (root, MAX_CWD_LEN); 56 #else 57 root = _getcwd (root, MAX_CWD_LEN); 58 #endif 59 53 60 init (); 54 61 } … … 83 90 84 91 PortableServer::ObjectId_var oid = _root_poa->activate_object (this); 92 93 cout<<"Finished File System init"<<endl; 85 94 }; 86 95 … … 245 254 /* designate hard-coded security permissions, may need something else here */ 246 255 247 int fp = creat (fileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); 256 #ifdef __linux__ 257 int fp = creat (fileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); 258 #else 259 int fp = _creat (fileName, S_IREAD | S_IWRITE); 260 #endif 248 261 249 262 if (fp >= 0) … … 285 298 oFlag = O_WRONLY; 286 299 287 int fp = ::open (fileName, oFlag, 0, NULL); 300 #ifdef __linux__ 301 int fp = ::open (fileName, oFlag, 0, NULL); 302 #else 303 int fp = _open (fileName, oFlag, 0, NULL); 304 #endif 288 305 289 306 CF::File_ptr file = NULL; … … 315 332 char *dname = this->appendFileName (this->root, directoryName); 316 333 317 int check = ::mkdir (dname, 0755); 334 #ifdef __linux__ 335 int check = ::mkdir (dname, 0755); 336 #else 337 int check = _mkdir (dname); 338 #endif 318 339 319 340 delete dname;