[Box Backup-dev] COMMIT r263 - box/chris/win32/vc2005-compile-fixes/lib/win32

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Thu, 22 Dec 2005 00:35:52 +0000 (GMT)


Author: chris
Date: 2005-12-22 00:35:50 +0000 (Thu, 22 Dec 2005)
New Revision: 263

Modified:
   box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
Log:
* lib/win32/emu.h
- Only redefine POSIX functions to underscored versions on MSVC
  (still need to check which versions of MSVC - TODO)


Modified: box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h
===================================================================
--- box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2005-12-22 00:35:02 UTC (rev 262)
+++ box/chris/win32/vc2005-compile-fixes/lib/win32/emu.h	2005-12-22 00:35:50 UTC (rev 263)
@@ -32,6 +32,7 @@
 #define SIGALRM SIGVTALRM
 #define ITIMER_VIRTUAL 0
 
+#ifdef _MSC_VER
 // Microsoft decided to deprecate the standard POSIX functions. Great!
 #define open(file,flags,mode) _open(file,flags,mode)
 #define close(fd)             _close(fd)
@@ -44,6 +45,7 @@
 #define getcwd(buf,length)    _getcwd(buf,length)
 #define fileno(struct_file)   _fileno(struct_file)
 #define chdir(dir)            _chdir(dir)
+#endif
 
 int setitimer(int type , struct itimerval *timeout, int);
 void InitTimer(void);