[Box Backup-dev] COMMIT r306 - box/chris/win32/type-changes/lib/win32

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Jan 6 19:52:53 GMT 2006


Author: chris
Date: 2006-01-06 19:52:51 +0000 (Fri, 06 Jan 2006)
New Revision: 306

Modified:
   box/chris/win32/type-changes/lib/win32/emu.h
Log:
* lib/win32/emu.h
- Reverted win32 fixes that don't affect other platforms


Modified: box/chris/win32/type-changes/lib/win32/emu.h
===================================================================
--- box/chris/win32/type-changes/lib/win32/emu.h	2006-01-06 19:46:58 UTC (rev 305)
+++ box/chris/win32/type-changes/lib/win32/emu.h	2006-01-06 19:52:51 UTC (rev 306)
@@ -3,7 +3,7 @@
 #if ! defined EMU_INCLUDE && defined WIN32
 #define EMU_INCLUDE
 
-// #define _STAT_DEFINED
+#define _STAT_DEFINED
 #define _INO_T_DEFINED
 
 #include <winsock2.h>
@@ -27,19 +27,12 @@
 	( *(_result) = *gmtime( (_clock) ), \
 	(_result) )
 
+
 //signal in unix SIGVTALRM does not exist in win32 - but looking at the 
 #define SIGVTALRM 254
 #define SIGALRM SIGVTALRM
 #define ITIMER_VIRTUAL 0
 
-// Microsoft decided to deprecate the standard POSIX functions. Great!
-#define open(file,flags,mode) _open(file,flags,mode)
-#define close(fd)             _close(fd)
-#define dup(fd)               _dup(fd)
-#define read(fd,buf,count)    _read(fd,buf,count)
-#define write(fd,buf,count)   _write(fd,buf,count)
-#define lseek(fd,off,whence)  _lseek(fd,off,whence)
-
 int setitimer(int type , struct itimerval *timeout, int);
 void InitTimer(void);
 void FiniTimer(void);
@@ -185,7 +178,7 @@
 			str = str.substr(index+1, str.size());
 		}
 
-		index = (int)str.find('-');
+		index = str.find('-');
 
 		if ( index == -1 ) return -1;
 
@@ -194,7 +187,7 @@
 		optind ++;
 		str = args[optind];
 	}
-	while ( ( opttolookfor = (int)interestin.find(opt)) == -1 );
+	while ( ( opttolookfor = interestin.find(opt)) == -1 );
 
 	if ( interestin[opttolookfor+1] == ':' ) 
 	{
@@ -264,7 +257,7 @@
 
 inline int mkdir(const char *pathname, mode_t mode)
 {
-	return _mkdir(pathname);
+	return mkdir(pathname);
 }
 
 #ifdef __MINGW32__
@@ -365,7 +358,6 @@
 	TCHAR f_mntonname[MAX_PATH];
 };
 
-#if 0
 // I think this should get us going
 // Although there is a warning about 
 // mount points in win32 can now exists - which means inode number can be 
@@ -389,7 +381,6 @@
 #ifndef __MINGW32__
 typedef u_int64_t _ino_t;
 #endif
-#endif
 
 int ourstat(const char * name, struct stat * st);
 int ourfstat(HANDLE file, struct stat * st);




More information about the Boxbackup-dev mailing list