diff options
Diffstat (limited to 'src/include/platform_interface.h')
-rw-r--r-- | src/include/platform_interface.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/platform_interface.h b/src/include/platform_interface.h index aa8d7317..cf08e8dc 100644 --- a/src/include/platform_interface.h +++ b/src/include/platform_interface.h | |||
@@ -161,12 +161,12 @@ typedef int _MHD_socket_funcs_size; | |||
161 | #define MHD_pipe_write_(fd, ptr, sz) send((fd), (const char*)(ptr), (sz), 0) | 161 | #define MHD_pipe_write_(fd, ptr, sz) send((fd), (const char*)(ptr), (sz), 0) |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | /* MHD_pipe_read_ read data from real pipe (!MHD_DONT_USE_PIPES) / | 164 | /* MHD_pipe_drain_ drain data from real pipe (!MHD_DONT_USE_PIPES) / |
165 | * read data from emulated pipe (MHD_DONT_USE_PIPES) */ | 165 | * drain data from emulated pipe (MHD_DONT_USE_PIPES) */ |
166 | #ifndef MHD_DONT_USE_PIPES | 166 | #ifndef MHD_DONT_USE_PIPES |
167 | #define MHD_pipe_read_(fd, ptr, sz) read((fd), (void*)(ptr), (sz)) | 167 | #define MHD_pipe_drain_(fd) do { char tmp; while (0 < read((fd), &tmp, sizeof (tmp))) ; } while (0) |
168 | #else | 168 | #else |
169 | #define MHD_pipe_read_(fd, ptr, sz) recv((fd), (char*)(ptr), (sz), 0) | 169 | #define MHD_pipe_drain_(fd) do { char tmp; while (0 < recv((fd), &tmp, sizeof (tmp))) ; } while (0) |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | /* MHD_pipe_close_(fd) close any FDs (non-W32) / | 172 | /* MHD_pipe_close_(fd) close any FDs (non-W32) / |