[Box Backup-commit] COMMIT r1505 - box/chris/merge/test/bbackupd

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Mar 25 16:53:40 BST 2007


Author: chris
Date: 2007-03-25 16:53:39 +0100 (Sun, 25 Mar 2007)
New Revision: 1505

Modified:
   box/chris/merge/test/bbackupd/testbbackupd.cpp
Log:
Only include headers on systems which have them


Modified: box/chris/merge/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-03-25 01:16:53 UTC (rev 1504)
+++ box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-03-25 15:53:39 UTC (rev 1505)
@@ -9,22 +9,33 @@
 
 #include "Box.h"
 
-#include <dirent.h>
+// do not include MinGW's dirent.h on Win32, 
+// as we override some of it in lib/win32.
+
+#ifndef WIN32
+	#include <dirent.h>
+#endif
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <limits.h>
 #include <string.h>
-#include <sys/wait.h>
 #include <unistd.h>
+
+#ifdef HAVE_SYS_WAIT_H
+	#include <sys/wait.h>
+#endif
+
 #ifdef HAVE_SYS_XATTR_H
-#include <cerrno>
-#include <sys/xattr.h>
+	#include <cerrno>
+	#include <sys/xattr.h>
 #endif
+
 #include <map>
 
 #ifdef HAVE_SYSCALL
-#include <sys/syscall.h>
+	#include <sys/syscall.h>
 #endif
 
 #include "Test.h"




More information about the Boxbackup-commit mailing list