Changeset 93 for bdm/stat/loggers.cpp
- Timestamp:
- 05/07/08 13:59:02 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/loggers.cpp
r92 r93 1 1 #include <itpp/itbase.h> 2 2 #include "loggers.h" 3 #include "../osutils.h" 3 4 4 #include <sys/types.h>5 #include <sys/stat.h>6 5 #include <fcntl.h> 7 #include <errno.h>8 9 extern int errno;10 11 void get_fname ( char* filename, string &dirname, string &f ) {12 #ifdef WIN3213 sprintf ( filename,"%s\\%s",dirname.c_str(),f.c_str() );14 #else15 sprintf ( filename,"%s/%s",dirname.c_str() ,f.c_str() );16 #endif17 }18 6 19 7 void dirfilelog::init() { … … 27 15 28 16 // Initialize directory 29 if ( mkdir ( dirname.c_str(),00755 ) <0 ) { 30 if ( errno==EEXIST ) it_warning ( "rewriting directory" ); 31 else it_error ( "dirfilelog:: cannot create directory" ); 32 } 17 makedir(dirname); // 33 18 34 19 // directory OK, or it can be overwritten