]> Shamusworld >> Repos - rmac/blobdiff - dirent_lose.h
Fix to placate the Visual Studio(TM) gods.
[rmac] / dirent_lose.h
diff --git a/dirent_lose.h b/dirent_lose.h
new file mode 100644 (file)
index 0000000..3e6bef2
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __DIRENT_LOSE_H__
+#define __DIRENT_LOSE_H__
+
+#if defined(WIN32) || defined(WIN64)
+
+// Microsoft™ Windows™ dependent code
+
+// This is only needed to keep the compiler from throwing a fit, it's not meant
+// to be used except as a sentinel (NULL/non-NULL).
+typedef struct { int i; /* dummy member */ } DIR;
+
+// These are the only two functions used from <dirent.h>
+DIR * opendir(const char *);
+int closedir(DIR *);
+
+#endif
+
+#endif // __DIRENT_LOSE_H__