From: Mikko L. <laz...@us...> - 2004-06-12 18:37:12
|
Update of /cvsroot/rtk/rtk/src/core/platform/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29388 Modified Files: File.cpp Log Message: Should compile now Index: File.cpp =================================================================== RCS file: /cvsroot/rtk/rtk/src/core/platform/linux/File.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** File.cpp 12 Jun 2004 18:33:31 -0000 1.2 --- File.cpp 12 Jun 2004 18:37:02 -0000 1.3 *************** *** 172,175 **** --- 172,176 ---- #ifdef UNICODE + // Convert WCHAR -> CHAR, destination allocated in stack! (no need to free) #define W2A(src, dst) do { \ int src_len = rstrlen(src); \ *************** *** 179,183 **** if(wcstombs(_dst, src, src_len)==-1) break; \ _dst[dst_len] = '\0'; \ ! dst = _dst; \ } while(0) #endif --- 180,184 ---- if(wcstombs(_dst, src, src_len)==-1) break; \ _dst[dst_len] = '\0'; \ ! dst = (const char*)_dst; \ } while(0) #endif *************** *** 186,190 **** { const RCHAR *file = _filename.c_str(); ! char *afile = NULL; #ifdef UNICODE --- 187,191 ---- { const RCHAR *file = _filename.c_str(); ! const char *afile = NULL; #ifdef UNICODE *************** *** 234,238 **** //unlock the file ! if (_mode & LOCK) flock(FD, LOCK_UN); //close file --- 235,240 ---- //unlock the file ! if (_mode & LOCKED) ! flock(FD, LOCK_UN); //close file *************** *** 259,263 **** int read_bytes = 0; ! if( (read_bytes=read(_handle, buffer, buffer_len)) >= 0) { _eos = (read_bytes == 0); --- 261,265 ---- int read_bytes = 0; ! if( (read_bytes=read(FD, buffer, buffer_len)) >= 0) { _eos = (read_bytes == 0); *************** *** 277,281 **** _eos = false; ! if( (writen_bytes=write(FD, buffer, buffer_len)) > 0) { return written_bytes; --- 279,283 ---- _eos = false; ! if( (written_bytes=write(FD, buffer, buffer_len)) > 0) { return written_bytes; |