summarylogtreecommitdiffstats
path: root/0005-windows-sub-dicts-paths.patch
blob: 6887b2df99d761acef495a25b0a88121e0bc329b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff -aurN 0004/src/tools/hunspell.cxx 0005/src/tools/hunspell.cxx
--- 0004/src/tools/hunspell.cxx
+++ 0005/src/tools/hunspell.cxx
@@ -104,6 +104,12 @@
 #endif
 #define PATHSEP ";"
 
+#ifdef __MINGW32__
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <unistd.h>
+#endif
 #include "textparser.hxx"
 #include "htmlparser.hxx"
 #include "latexparser.hxx"
@@ -1812,7 +1818,7 @@
   return NULL;
 }
 
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
 int listdicpath(char* dir, int len) {
   std::string buf;
   const char* sep = (len == 0) ? "" : DIRSEP;
@@ -1847,7 +1853,7 @@
     if (name) {
       res = exist2(begin, end - begin, name, ext);
     } else {
-#ifndef WIN32
+#if !defined(WIN32) || defined(__MINGW32__)
       listdicpath(begin, end - begin);
 #endif
     }