summaryrefslogtreecommitdiff
path: root/src/strife/m_saves.c
diff options
context:
space:
mode:
authorJames Haley2011-01-30 04:10:32 +0000
committerJames Haley2011-01-30 04:10:32 +0000
commit5201de4ff2e4f236c5cf2be064aa506e376b80cb (patch)
tree3ffe5e4c38b1ebd424ac185f7998650a3f71fc4c /src/strife/m_saves.c
parent9e803d93fa38e86999e1780068b3ee39b430c570 (diff)
downloadchocolate-doom-5201de4ff2e4f236c5cf2be064aa506e376b80cb.tar.gz
chocolate-doom-5201de4ff2e4f236c5cf2be064aa506e376b80cb.tar.bz2
chocolate-doom-5201de4ff2e4f236c5cf2be064aa506e376b80cb.zip
Add win_opendir.c module for MSVC++ builds which contains public domain
implementation of POSIX opendir/readdir/closedir API derived from the MinGW libc extensions source. Will be needed for hub save maintenance. Subversion-branch: /branches/strife-branch Subversion-revision: 2241
Diffstat (limited to 'src/strife/m_saves.c')
-rw-r--r--src/strife/m_saves.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/strife/m_saves.c b/src/strife/m_saves.c
index bec0fede..f845598e 100644
--- a/src/strife/m_saves.c
+++ b/src/strife/m_saves.c
@@ -28,6 +28,16 @@
//
//-----------------------------------------------------------------------------
+// For GNU C and POSIX targets, dirent.h should be available. Otherwise, for
+// Visual C++, we need to include the win_opendir module.
+#if defined(_MSC_VER)
+#include <win_opendir.h>
+#elif defined(__GNUC__) || defined(POSIX)
+#include <dirent.h>
+#else
+#error Need an include for dirent.h!
+#endif
+
#include "z_zone.h"
#include "i_system.h"
#include "d_player.h"