Fossil SCM

Provide an implementation for popen() and pclose() on Windows to fix the build.

drh 2018-06-21 15:02 trunk
Commit 565b5ff0c29e6b3198f167f171279c1ccc6959ceb47d7ad2c78aa3cb4b6d6c6d
1 file changed +7
--- src/email.c
+++ src/email.c
@@ -172,10 +172,17 @@
172172
k = translateBase64(blob_buffer(pMsg)+i, i+54<n ? 54 : n-i, zBuf);
173173
blob_append(pOut, zBuf, k);
174174
blob_append(pOut, "\r\n", 2);
175175
}
176176
}
177
+
178
+#if defined(_WIN32) || defined(WIN32)
179
+# undef popen
180
+# define popen _popen
181
+# undef pclose
182
+# define pclose _pclose
183
+#endif
177184
178185
/*
179186
** Send an email message using whatever sending mechanism is configured
180187
** by these settings:
181188
**
182189
--- src/email.c
+++ src/email.c
@@ -172,10 +172,17 @@
172 k = translateBase64(blob_buffer(pMsg)+i, i+54<n ? 54 : n-i, zBuf);
173 blob_append(pOut, zBuf, k);
174 blob_append(pOut, "\r\n", 2);
175 }
176 }
 
 
 
 
 
 
 
177
178 /*
179 ** Send an email message using whatever sending mechanism is configured
180 ** by these settings:
181 **
182
--- src/email.c
+++ src/email.c
@@ -172,10 +172,17 @@
172 k = translateBase64(blob_buffer(pMsg)+i, i+54<n ? 54 : n-i, zBuf);
173 blob_append(pOut, zBuf, k);
174 blob_append(pOut, "\r\n", 2);
175 }
176 }
177
178 #if defined(_WIN32) || defined(WIN32)
179 # undef popen
180 # define popen _popen
181 # undef pclose
182 # define pclose _pclose
183 #endif
184
185 /*
186 ** Send an email message using whatever sending mechanism is configured
187 ** by these settings:
188 **
189

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button