summaryrefslogtreecommitdiff
path: root/src/include/platform_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/platform_interface.h')
-rw-r--r--src/include/platform_interface.h60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/include/platform_interface.h b/src/include/platform_interface.h
index fa84bcd5..b641a002 100644
--- a/src/include/platform_interface.h
+++ b/src/include/platform_interface.h
@@ -27,7 +27,6 @@
#define MHD_PLATFORM_INTERFACE_H
#include "platform.h"
-#include "../microhttpd/mhd_sockets.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "w32functions.h"
#endif
@@ -47,65 +46,6 @@
#endif /* ! _WIN32*/
#endif /* ! HAVE_SNPRINTF */
-/* MHD_pipe_ create pipe (!MHD_DONT_USE_PIPES) /
- * create two connected sockets (MHD_DONT_USE_PIPES) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_(fdarr) pipe((fdarr))
-#else /* MHD_DONT_USE_PIPES */
-#if !defined(_WIN32) || defined(__CYGWIN__)
-#define MHD_pipe_(fdarr) socketpair(AF_LOCAL, SOCK_STREAM, 0, (fdarr))
-#else /* !defined(_WIN32) || defined(__CYGWIN__) */
-#define MHD_pipe_(fdarr) MHD_W32_pair_of_sockets_((fdarr))
-#endif /* !defined(_WIN32) || defined(__CYGWIN__) */
-#endif /* MHD_DONT_USE_PIPES */
-
-/* MHD_pipe_errno_ is errno of last function (!MHD_DONT_USE_PIPES) /
- * errno of last emulated pipe function (MHD_DONT_USE_PIPES) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_errno_ errno
-#else
-#define MHD_pipe_errno_ MHD_socket_errno_
-#endif
-
-/* MHD_pipe_last_strerror_ is description string of last errno (!MHD_DONT_USE_PIPES) /
- * description string of last pipe error (MHD_DONT_USE_PIPES) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_last_strerror_() strerror(errno)
-#else
-#define MHD_pipe_last_strerror_() MHD_socket_last_strerr_()
-#endif
-
-/* MHD_pipe_write_ write data to real pipe (!MHD_DONT_USE_PIPES) /
- * write data to emulated pipe (MHD_DONT_USE_PIPES) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_write_(fd, ptr, sz) write((fd), (const void*)(ptr), (sz))
-#else
-#define MHD_pipe_write_(fd, ptr, sz) send((fd), (const char*)(ptr), (sz), 0)
-#endif
-
-/* MHD_pipe_drain_ drain data from real pipe (!MHD_DONT_USE_PIPES) /
- * drain data from emulated pipe (MHD_DONT_USE_PIPES) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_drain_(fd) do { long tmp; while (0 < read((fd), (void*)&tmp, sizeof (tmp))) ; } while (0)
-#else
-#define MHD_pipe_drain_(fd) do { long tmp; while (0 < recv((fd), (void*)&tmp, sizeof (tmp), 0)) ; } while (0)
-#endif
-
-/* MHD_pipe_close_(fd) close any FDs (non-W32) /
- * close emulated pipe FDs (W32) */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_pipe_close_(fd) close((fd))
-#else
-#define MHD_pipe_close_(fd) MHD_socket_close_((fd))
-#endif
-
-/* MHD_INVALID_PIPE_ is a value of bad pipe FD */
-#ifndef MHD_DONT_USE_PIPES
-#define MHD_INVALID_PIPE_ (-1)
-#else
-#define MHD_INVALID_PIPE_ MHD_INVALID_SOCKET
-#endif
-
#if !defined(_WIN32) || defined(__CYGWIN__)
#define MHD_random_() random()
#else