Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/deps/xapian-core/SOURCES/xapian-core-cpp_c_includes.patch
blob: b00242b335ec84b32a3f67db2b171ae64fb23b32 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
--- backends/flint/flint_btreeutil.h
+++ backends/flint/flint_btreeutil.h
@@ -25,7 +25,11 @@
 #include "flint_types.h"
 #include "omassert.h"
 
+#ifdef _MSC_VER
 #include <string.h>  /* memset */
+#else
+#include <cstring>
+#endif
 
 /* The unit of access into the DB files is an unsigned char, which is defined
    as 'byte' with a typedef.
--- backends/flint/flint_spelling.h
+++ backends/flint/flint_spelling.h
@@ -29,7 +29,11 @@
 #include <map>
 #include <set>
 #include <string>
+#ifdef _MSC_VER
 #include <string.h> // For memcpy() and memcmp().
+#else
+#include <cstring>
+#endif
 
 struct fragment {
     char data[4];
--- backends/quartz/btree_util.h
+++ backends/quartz/btree_util.h
@@ -25,7 +25,11 @@
 #include "quartz_types.h"
 #include "omassert.h"
 
+#ifdef _MSC_VER
 #include <string.h>  /* memset */
+#else
+#include <cstring>
+#endif
 #include "safeunistd.h" /* for close() */
 
 #include <string>
--- backends/quartz/quartz_log.h
+++ backends/quartz/quartz_log.h
@@ -26,7 +26,11 @@
 #define OM_HGUARD_QUARTZ_LOG_H
 
 #include <string>
+#ifdef _MSC_VER
 #include <stdio.h>
+#else
+#include <cstdio>
+#endif
 #include <xapian/error.h>
 
 /** Class managing a logfile for quartz.
--- common/omenquireinternal.h
+++ common/omenquireinternal.h
@@ -29,7 +29,11 @@
 #include <xapian/sorter.h>
 #include <xapian/query.h>
 #include <algorithm>
+#ifdef _MSC_VER
 #include <math.h>
+#else
+#include <cmath>
+#endif
 #include <map>
 #include <set>
 
--- common/omtime.h
+++ common/omtime.h
@@ -30,7 +30,11 @@
 #ifdef HAVE_FTIME
 #include <sys/timeb.h>   /* time */
 #endif
+#ifdef _MSC_VER
 #include <time.h>
+#else
+#include <ctime>
+#endif
 
 #include <xapian/types.h>
 
--- common/safeerrno.h
+++ common/safeerrno.h
@@ -31,6 +31,10 @@
 #if defined __DECCXX && defined HAVE_SYS_ERRNO_H
 # include <sys/errno.h>
 #endif
+#ifdef _MSC_VER
 #include <errno.h>
+#else
+#include <cerrno>
+#endif
 
 #endif // XAPIAN_INCLUDED_SAFEERRNO_H
--- common/safesysselect.h
+++ common/safesysselect.h
@@ -35,6 +35,10 @@
 #endif
 
 // On Solaris FDSET uses memset but fails to prototype it.
+#ifdef _MSC_VER
 #include <string.h>
+#else
+#include <cstring>
+#endif
 
 #endif // XAPIAN_INCLUDED_SAFESYSSELECT_H
--- common/stringutils.h
+++ common/stringutils.h
@@ -25,7 +25,11 @@
 
 #include <algorithm>
 #include <string>
+#ifdef _MSC_VER
 #include <string.h>
+#else
+#include <cstring>
+#endif
 
 /** Helper macro for STRINGIZE - the nested call is required because of how
  *  # works in macros.
--- common/utils.h
+++ common/utils.h
@@ -28,7 +28,11 @@
 #include <string>
 using std::string;
 
+#ifdef _MSC_VER
 #include <stdlib.h>
+#else
+#include <cstdlib>
+#endif
 #include <sys/types.h>
 #include "safesysstat.h"
 #include "safeunistd.h"
--- languages/steminternal.h
+++ languages/steminternal.h
@@ -24,7 +24,11 @@
 #include <xapian/base.h>
 #include <xapian/stem.h>
 
+#ifdef _MSC_VER
 #include <stdlib.h>
+#else
+#include <cstdlib>
+#endif
 #include <string>
 
 // FIXME: we might want to make Stem::Internal a virtual base class and have
--- tests/harness/testsuite.h
+++ tests/harness/testsuite.h
@@ -33,7 +33,11 @@
 #include <string>
 #include <vector>
 
+#ifdef _MSC_VER
 #include <float.h> // For DBL_DIG.
+#else
+#include <cfloat>
+#endif
 
 /** Class which is thrown when a test case fails.
  */