[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/CMakeLists.txt b/ap/lib/libcurl/curl-7.54.1/tests/server/CMakeLists.txt
new file mode 100644
index 0000000..00f5242
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/CMakeLists.txt
@@ -0,0 +1,62 @@
+set(TARGET_LABEL_PREFIX "Test server ")
+
+function(SETUP_EXECUTABLE TEST_NAME)    # ARGN are the files in the test
+  add_executable( ${TEST_NAME} ${ARGN} )
+  string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
+
+  include_directories(
+    ${CURL_SOURCE_DIR}/lib      # To be able to reach "curl_setup_once.h"
+    ${CURL_BINARY_DIR}/lib      # To be able to reach "curl_config.h"
+    ${CURL_BINARY_DIR}/include  # To be able to reach "curl/curlbuild.h"
+    )
+  if(USE_ARES)
+    include_directories(${CARES_INCLUDE_DIR})
+  endif()
+
+  target_link_libraries(${TEST_NAME} ${CURL_LIBS})
+
+  # Test servers simply are standalone programs that do not use libcurl
+  # library.  For convinience and to ease portability of these servers,
+  # some source code files from the libcurl subdirectory are also used
+  # to build the servers.  In order to achieve proper linkage of these
+  # files on Win32 targets it is necessary to build the test servers
+  # with CURL_STATICLIB defined, independently of how libcurl is built.
+  if(NOT CURL_STATICLIB)
+    set_target_properties(${TEST_NAME} PROPERTIES
+      COMPILE_DEFINITIONS CURL_STATICLIB)       # ${UPPER_TEST_NAME}
+  endif()
+  set_target_properties(${TEST_NAME} PROPERTIES
+    PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
+
+  # Add the postfix to the executable since it is not added
+  # automatically as for modules and shared libraries
+  set_target_properties(${TEST_NAME} PROPERTIES
+    DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
+
+endfunction()
+
+
+transform_makefile_inc("Makefile.inc"
+  "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
+include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
+
+foreach(EXECUTABLE_NAME ${noinst_PROGRAMS})
+  setup_executable(${EXECUTABLE_NAME} ${${EXECUTABLE_NAME}_SOURCES})
+endforeach()
+
+
+# SET(useful
+# getpart.c getpart.h
+# ${CURL_SOURCE_DIR}/lib/strequal.c
+# ${CURL_SOURCE_DIR}/lib/base64.c
+# ${CURL_SOURCE_DIR}/lib/mprintf.c
+# ${CURL_SOURCE_DIR}/lib/memdebug.c
+# ${CURL_SOURCE_DIR}/lib/timeval.c
+# )
+
+# SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful})
+# SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful})
+# SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful} ${CURL_SOURCE_DIR}/lib/inet_pton.c)
+# SETUP_EXECUTABLE(getpart testpart.c ${useful})
+# SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h)
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.am b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.am
new file mode 100644
index 0000000..6204038
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.am
@@ -0,0 +1,71 @@
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+
+if USE_EMBEDDED_ARES
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib            \
+              -I$(top_builddir)/ares         \
+              -I$(top_srcdir)/ares
+else
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+              -I$(top_builddir)/include      \
+              -I$(top_srcdir)/include        \
+              -I$(top_builddir)/lib          \
+              -I$(top_srcdir)/lib
+endif
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+if DOING_NATIVE_WINDOWS
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
+# Makefile.inc provides neat definitions
+include Makefile.inc
+
+EXTRA_DIST = base64.pl Makefile.inc CMakeLists.txt
+
+checksrc:
+	@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.in b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.in
new file mode 100644
index 0000000..e500a3e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.in
@@ -0,0 +1,2129 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@DOING_NATIVE_WINDOWS_TRUE@am__append_1 = -DCURL_STATICLIB
+noinst_PROGRAMS = getpart$(EXEEXT) resolve$(EXEEXT) rtspd$(EXEEXT) \
+	sockfilt$(EXEEXT) sws$(EXEEXT) tftpd$(EXEEXT) \
+	fake_ntlm$(EXEEXT)
+subdir = tests/server
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+	$(top_srcdir)/m4/curl-compilers.m4 \
+	$(top_srcdir)/m4/curl-confopts.m4 \
+	$(top_srcdir)/m4/curl-functions.m4 \
+	$(top_srcdir)/m4/curl-openssl.m4 \
+	$(top_srcdir)/m4/curl-override.m4 \
+	$(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/m4/xc-am-iface.m4 \
+	$(top_srcdir)/m4/xc-cc-check.m4 \
+	$(top_srcdir)/m4/xc-lt-iface.m4 \
+	$(top_srcdir)/m4/xc-translit.m4 \
+	$(top_srcdir)/m4/xc-val-flgs.m4 \
+	$(top_srcdir)/m4/zz40-xc-ovr.m4 \
+	$(top_srcdir)/m4/zz50-xc-ovr.m4 \
+	$(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
+	$(top_builddir)/include/curl/curlbuild.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = ../../lib/fake_ntlm-mprintf.$(OBJEXT) \
+	../../lib/fake_ntlm-nonblock.$(OBJEXT) \
+	../../lib/fake_ntlm-strtoofft.$(OBJEXT) \
+	../../lib/fake_ntlm-timeval.$(OBJEXT) \
+	../../lib/fake_ntlm-warnless.$(OBJEXT)
+am__objects_2 =
+am__objects_3 = fake_ntlm-getpart.$(OBJEXT) \
+	../../lib/fake_ntlm-base64.$(OBJEXT) \
+	../../lib/fake_ntlm-memdebug.$(OBJEXT)
+am__objects_4 = fake_ntlm-util.$(OBJEXT)
+am_fake_ntlm_OBJECTS = $(am__objects_1) $(am__objects_2) \
+	$(am__objects_3) $(am__objects_4) \
+	fake_ntlm-fake_ntlm.$(OBJEXT)
+fake_ntlm_OBJECTS = $(am_fake_ntlm_OBJECTS)
+fake_ntlm_DEPENDENCIES =
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+fake_ntlm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(fake_ntlm_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_5 = ../../lib/getpart-mprintf.$(OBJEXT) \
+	../../lib/getpart-nonblock.$(OBJEXT) \
+	../../lib/getpart-strtoofft.$(OBJEXT) \
+	../../lib/getpart-timeval.$(OBJEXT) \
+	../../lib/getpart-warnless.$(OBJEXT)
+am__objects_6 = getpart-getpart.$(OBJEXT) \
+	../../lib/getpart-base64.$(OBJEXT) \
+	../../lib/getpart-memdebug.$(OBJEXT)
+am_getpart_OBJECTS = $(am__objects_5) $(am__objects_2) \
+	$(am__objects_6) getpart-testpart.$(OBJEXT)
+getpart_OBJECTS = $(am_getpart_OBJECTS)
+getpart_DEPENDENCIES =
+getpart_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(getpart_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_7 = ../../lib/resolve-mprintf.$(OBJEXT) \
+	../../lib/resolve-nonblock.$(OBJEXT) \
+	../../lib/resolve-strtoofft.$(OBJEXT) \
+	../../lib/resolve-timeval.$(OBJEXT) \
+	../../lib/resolve-warnless.$(OBJEXT)
+am__objects_8 = resolve-getpart.$(OBJEXT) \
+	../../lib/resolve-base64.$(OBJEXT) \
+	../../lib/resolve-memdebug.$(OBJEXT)
+am__objects_9 = resolve-util.$(OBJEXT)
+am_resolve_OBJECTS = $(am__objects_7) $(am__objects_2) \
+	$(am__objects_8) $(am__objects_9) resolve-resolve.$(OBJEXT)
+resolve_OBJECTS = $(am_resolve_OBJECTS)
+resolve_DEPENDENCIES =
+resolve_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(resolve_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_10 = ../../lib/rtspd-mprintf.$(OBJEXT) \
+	../../lib/rtspd-nonblock.$(OBJEXT) \
+	../../lib/rtspd-strtoofft.$(OBJEXT) \
+	../../lib/rtspd-timeval.$(OBJEXT) \
+	../../lib/rtspd-warnless.$(OBJEXT)
+am__objects_11 = rtspd-getpart.$(OBJEXT) \
+	../../lib/rtspd-base64.$(OBJEXT) \
+	../../lib/rtspd-memdebug.$(OBJEXT)
+am__objects_12 = rtspd-util.$(OBJEXT)
+am_rtspd_OBJECTS = $(am__objects_10) $(am__objects_2) \
+	$(am__objects_11) $(am__objects_12) rtspd-rtspd.$(OBJEXT)
+rtspd_OBJECTS = $(am_rtspd_OBJECTS)
+rtspd_DEPENDENCIES =
+rtspd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(rtspd_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_13 = ../../lib/sockfilt-mprintf.$(OBJEXT) \
+	../../lib/sockfilt-nonblock.$(OBJEXT) \
+	../../lib/sockfilt-strtoofft.$(OBJEXT) \
+	../../lib/sockfilt-timeval.$(OBJEXT) \
+	../../lib/sockfilt-warnless.$(OBJEXT)
+am__objects_14 = sockfilt-getpart.$(OBJEXT) \
+	../../lib/sockfilt-base64.$(OBJEXT) \
+	../../lib/sockfilt-memdebug.$(OBJEXT)
+am__objects_15 = sockfilt-util.$(OBJEXT)
+am_sockfilt_OBJECTS = $(am__objects_13) $(am__objects_2) \
+	$(am__objects_14) $(am__objects_15) \
+	sockfilt-sockfilt.$(OBJEXT) \
+	../../lib/sockfilt-inet_pton.$(OBJEXT)
+sockfilt_OBJECTS = $(am_sockfilt_OBJECTS)
+sockfilt_DEPENDENCIES =
+sockfilt_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(sockfilt_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_16 = ../../lib/sws-mprintf.$(OBJEXT) \
+	../../lib/sws-nonblock.$(OBJEXT) \
+	../../lib/sws-strtoofft.$(OBJEXT) \
+	../../lib/sws-timeval.$(OBJEXT) \
+	../../lib/sws-warnless.$(OBJEXT)
+am__objects_17 = sws-getpart.$(OBJEXT) ../../lib/sws-base64.$(OBJEXT) \
+	../../lib/sws-memdebug.$(OBJEXT)
+am__objects_18 = sws-util.$(OBJEXT)
+am_sws_OBJECTS = $(am__objects_16) $(am__objects_2) $(am__objects_17) \
+	$(am__objects_18) sws-sws.$(OBJEXT) \
+	../../lib/sws-inet_pton.$(OBJEXT)
+sws_OBJECTS = $(am_sws_OBJECTS)
+sws_DEPENDENCIES =
+sws_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(sws_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_19 = ../../lib/tftpd-mprintf.$(OBJEXT) \
+	../../lib/tftpd-nonblock.$(OBJEXT) \
+	../../lib/tftpd-strtoofft.$(OBJEXT) \
+	../../lib/tftpd-timeval.$(OBJEXT) \
+	../../lib/tftpd-warnless.$(OBJEXT)
+am__objects_20 = tftpd-getpart.$(OBJEXT) \
+	../../lib/tftpd-base64.$(OBJEXT) \
+	../../lib/tftpd-memdebug.$(OBJEXT)
+am__objects_21 = tftpd-util.$(OBJEXT)
+am_tftpd_OBJECTS = $(am__objects_19) $(am__objects_2) \
+	$(am__objects_20) $(am__objects_21) tftpd-tftpd.$(OBJEXT)
+tftpd_OBJECTS = $(am_tftpd_OBJECTS)
+tftpd_DEPENDENCIES =
+tftpd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tftpd_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = 
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(fake_ntlm_SOURCES) $(getpart_SOURCES) $(resolve_SOURCES) \
+	$(rtspd_SOURCES) $(sockfilt_SOURCES) $(sws_SOURCES) \
+	$(tftpd_SOURCES)
+DIST_SOURCES = $(fake_ntlm_SOURCES) $(getpart_SOURCES) \
+	$(resolve_SOURCES) $(rtspd_SOURCES) $(sockfilt_SOURCES) \
+	$(sws_SOURCES) $(tftpd_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \
+	$(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMB = @CURL_DISABLE_SMB@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
+GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
+LIBOBJS = @LIBOBJS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_ENABLED = @SSL_ENABLED@
+SSL_LIBS = @SSL_LIBS@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_MBEDTLS = @USE_MBEDTLS@
+USE_NGHTTP2 = @USE_NGHTTP2@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+#                                  _   _ ____  _
+#  Project                     ___| | | |  _ \| |
+#                             / __| | | | |_) | |
+#                            | (__| |_| |  _ <| |___
+#                             \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_FALSE@	-I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_FALSE@	-I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@	-I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_FALSE@	-I$(top_srcdir)/lib $(am__append_1)
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
+# $(top_srcdir)/ares is for in-tree c-ares's external include files
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_builddir)/include \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_builddir)/lib \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_srcdir)/lib \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_builddir)/ares \
+@USE_EMBEDDED_ARES_TRUE@	-I$(top_srcdir)/ares $(am__append_1)
+CURLX_SRCS = \
+ ../../lib/mprintf.c \
+ ../../lib/nonblock.c \
+ ../../lib/strtoofft.c \
+ ../../lib/timeval.c \
+ ../../lib/warnless.c
+
+CURLX_HDRS = \
+ ../../lib/curlx.h \
+ ../../lib/nonblock.h \
+ ../../lib/strtoofft.h \
+ ../../lib/timeval.h \
+ ../../lib/warnless.h
+
+USEFUL = \
+ getpart.c \
+ getpart.h \
+ server_setup.h \
+ ../../lib/base64.c \
+ ../../lib/curl_base64.h \
+ ../../lib/memdebug.c \
+ ../../lib/memdebug.h
+
+UTIL = \
+ util.c \
+ util.h
+
+getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
+ testpart.c
+
+getpart_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+getpart_CFLAGS = $(AM_CFLAGS)
+resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ resolve.c
+
+resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+resolve_CFLAGS = $(AM_CFLAGS)
+rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ rtspd.c
+
+rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+rtspd_CFLAGS = $(AM_CFLAGS)
+sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ sockfilt.c \
+ ../../lib/inet_pton.c
+
+sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+sockfilt_CFLAGS = $(AM_CFLAGS)
+sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ sws.c \
+ ../../lib/inet_pton.c
+
+sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+sws_CFLAGS = $(AM_CFLAGS)
+tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ tftpd.c \
+ tftp.h
+
+tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+tftpd_CFLAGS = $(AM_CFLAGS)
+fake_ntlm_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ fake_ntlm.c
+
+fake_ntlm_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+fake_ntlm_CFLAGS = $(AM_CFLAGS)
+
+# Makefile.inc provides neat definitions
+EXTRA_DIST = base64.pl Makefile.inc CMakeLists.txt
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/server/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign tests/server/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+$(srcdir)/Makefile.inc $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+../../lib/$(am__dirstamp):
+	@$(MKDIR_P) ../../lib
+	@: > ../../lib/$(am__dirstamp)
+../../lib/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) ../../lib/$(DEPDIR)
+	@: > ../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/fake_ntlm-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+fake_ntlm$(EXEEXT): $(fake_ntlm_OBJECTS) $(fake_ntlm_DEPENDENCIES) $(EXTRA_fake_ntlm_DEPENDENCIES) 
+	@rm -f fake_ntlm$(EXEEXT)
+	$(AM_V_CCLD)$(fake_ntlm_LINK) $(fake_ntlm_OBJECTS) $(fake_ntlm_LDADD) $(LIBS)
+../../lib/getpart-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/getpart-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+getpart$(EXEEXT): $(getpart_OBJECTS) $(getpart_DEPENDENCIES) $(EXTRA_getpart_DEPENDENCIES) 
+	@rm -f getpart$(EXEEXT)
+	$(AM_V_CCLD)$(getpart_LINK) $(getpart_OBJECTS) $(getpart_LDADD) $(LIBS)
+../../lib/resolve-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/resolve-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) $(EXTRA_resolve_DEPENDENCIES) 
+	@rm -f resolve$(EXEEXT)
+	$(AM_V_CCLD)$(resolve_LINK) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
+../../lib/rtspd-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/rtspd-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+rtspd$(EXEEXT): $(rtspd_OBJECTS) $(rtspd_DEPENDENCIES) $(EXTRA_rtspd_DEPENDENCIES) 
+	@rm -f rtspd$(EXEEXT)
+	$(AM_V_CCLD)$(rtspd_LINK) $(rtspd_OBJECTS) $(rtspd_LDADD) $(LIBS)
+../../lib/sockfilt-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sockfilt-inet_pton.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+sockfilt$(EXEEXT): $(sockfilt_OBJECTS) $(sockfilt_DEPENDENCIES) $(EXTRA_sockfilt_DEPENDENCIES) 
+	@rm -f sockfilt$(EXEEXT)
+	$(AM_V_CCLD)$(sockfilt_LINK) $(sockfilt_OBJECTS) $(sockfilt_LDADD) $(LIBS)
+../../lib/sws-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/sws-inet_pton.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+sws$(EXEEXT): $(sws_OBJECTS) $(sws_DEPENDENCIES) $(EXTRA_sws_DEPENDENCIES) 
+	@rm -f sws$(EXEEXT)
+	$(AM_V_CCLD)$(sws_LINK) $(sws_OBJECTS) $(sws_LDADD) $(LIBS)
+../../lib/tftpd-mprintf.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-nonblock.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-strtoofft.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-timeval.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-base64.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+../../lib/tftpd-memdebug.$(OBJEXT): ../../lib/$(am__dirstamp) \
+	../../lib/$(DEPDIR)/$(am__dirstamp)
+
+tftpd$(EXEEXT): $(tftpd_OBJECTS) $(tftpd_DEPENDENCIES) $(EXTRA_tftpd_DEPENDENCIES) 
+	@rm -f tftpd$(EXEEXT)
+	$(AM_V_CCLD)$(tftpd_LINK) $(tftpd_OBJECTS) $(tftpd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+	-rm -f ../../lib/*.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/fake_ntlm-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/getpart-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/resolve-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/rtspd-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-inet_pton.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sockfilt-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-inet_pton.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/sws-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-base64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-memdebug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-mprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-nonblock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-strtoofft.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/tftpd-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-fake_ntlm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fake_ntlm-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-testpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-resolve.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-rtspd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-sockfilt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-sws.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-getpart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-tftpd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-util.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+../../lib/fake_ntlm-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Tpo -c -o ../../lib/fake_ntlm-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Tpo ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/fake_ntlm-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/fake_ntlm-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Tpo -c -o ../../lib/fake_ntlm-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Tpo ../../lib/$(DEPDIR)/fake_ntlm-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/fake_ntlm-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/fake_ntlm-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Tpo -c -o ../../lib/fake_ntlm-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Tpo ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/fake_ntlm-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/fake_ntlm-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Tpo -c -o ../../lib/fake_ntlm-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Tpo ../../lib/$(DEPDIR)/fake_ntlm-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/fake_ntlm-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/fake_ntlm-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Tpo -c -o ../../lib/fake_ntlm-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Tpo ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/fake_ntlm-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/fake_ntlm-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Tpo -c -o ../../lib/fake_ntlm-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Tpo ../../lib/$(DEPDIR)/fake_ntlm-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/fake_ntlm-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/fake_ntlm-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-timeval.Tpo -c -o ../../lib/fake_ntlm-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-timeval.Tpo ../../lib/$(DEPDIR)/fake_ntlm-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/fake_ntlm-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/fake_ntlm-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-timeval.Tpo -c -o ../../lib/fake_ntlm-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-timeval.Tpo ../../lib/$(DEPDIR)/fake_ntlm-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/fake_ntlm-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/fake_ntlm-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-warnless.Tpo -c -o ../../lib/fake_ntlm-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-warnless.Tpo ../../lib/$(DEPDIR)/fake_ntlm-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/fake_ntlm-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/fake_ntlm-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-warnless.Tpo -c -o ../../lib/fake_ntlm-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-warnless.Tpo ../../lib/$(DEPDIR)/fake_ntlm-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/fake_ntlm-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+fake_ntlm-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-getpart.o -MD -MP -MF $(DEPDIR)/fake_ntlm-getpart.Tpo -c -o fake_ntlm-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-getpart.Tpo $(DEPDIR)/fake_ntlm-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='fake_ntlm-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+fake_ntlm-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-getpart.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-getpart.Tpo -c -o fake_ntlm-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-getpart.Tpo $(DEPDIR)/fake_ntlm-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='fake_ntlm-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/fake_ntlm-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-base64.Tpo -c -o ../../lib/fake_ntlm-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-base64.Tpo ../../lib/$(DEPDIR)/fake_ntlm-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/fake_ntlm-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/fake_ntlm-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-base64.Tpo -c -o ../../lib/fake_ntlm-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-base64.Tpo ../../lib/$(DEPDIR)/fake_ntlm-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/fake_ntlm-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/fake_ntlm-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Tpo -c -o ../../lib/fake_ntlm-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Tpo ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/fake_ntlm-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/fake_ntlm-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT ../../lib/fake_ntlm-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Tpo -c -o ../../lib/fake_ntlm-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Tpo ../../lib/$(DEPDIR)/fake_ntlm-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/fake_ntlm-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o ../../lib/fake_ntlm-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+fake_ntlm-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-util.o -MD -MP -MF $(DEPDIR)/fake_ntlm-util.Tpo -c -o fake_ntlm-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-util.Tpo $(DEPDIR)/fake_ntlm-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='fake_ntlm-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+fake_ntlm-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-util.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-util.Tpo -c -o fake_ntlm-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-util.Tpo $(DEPDIR)/fake_ntlm-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='fake_ntlm-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+fake_ntlm-fake_ntlm.o: fake_ntlm.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-fake_ntlm.o -MD -MP -MF $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo -c -o fake_ntlm-fake_ntlm.o `test -f 'fake_ntlm.c' || echo '$(srcdir)/'`fake_ntlm.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo $(DEPDIR)/fake_ntlm-fake_ntlm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fake_ntlm.c' object='fake_ntlm-fake_ntlm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-fake_ntlm.o `test -f 'fake_ntlm.c' || echo '$(srcdir)/'`fake_ntlm.c
+
+fake_ntlm-fake_ntlm.obj: fake_ntlm.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -MT fake_ntlm-fake_ntlm.obj -MD -MP -MF $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo -c -o fake_ntlm-fake_ntlm.obj `if test -f 'fake_ntlm.c'; then $(CYGPATH_W) 'fake_ntlm.c'; else $(CYGPATH_W) '$(srcdir)/fake_ntlm.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/fake_ntlm-fake_ntlm.Tpo $(DEPDIR)/fake_ntlm-fake_ntlm.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fake_ntlm.c' object='fake_ntlm-fake_ntlm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fake_ntlm_CFLAGS) $(CFLAGS) -c -o fake_ntlm-fake_ntlm.obj `if test -f 'fake_ntlm.c'; then $(CYGPATH_W) 'fake_ntlm.c'; else $(CYGPATH_W) '$(srcdir)/fake_ntlm.c'; fi`
+
+../../lib/getpart-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-mprintf.Tpo -c -o ../../lib/getpart-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-mprintf.Tpo ../../lib/$(DEPDIR)/getpart-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/getpart-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/getpart-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-mprintf.Tpo -c -o ../../lib/getpart-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-mprintf.Tpo ../../lib/$(DEPDIR)/getpart-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/getpart-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/getpart-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-nonblock.Tpo -c -o ../../lib/getpart-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-nonblock.Tpo ../../lib/$(DEPDIR)/getpart-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/getpart-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/getpart-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-nonblock.Tpo -c -o ../../lib/getpart-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-nonblock.Tpo ../../lib/$(DEPDIR)/getpart-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/getpart-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/getpart-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-strtoofft.Tpo -c -o ../../lib/getpart-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-strtoofft.Tpo ../../lib/$(DEPDIR)/getpart-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/getpart-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/getpart-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-strtoofft.Tpo -c -o ../../lib/getpart-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-strtoofft.Tpo ../../lib/$(DEPDIR)/getpart-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/getpart-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/getpart-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-timeval.Tpo -c -o ../../lib/getpart-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-timeval.Tpo ../../lib/$(DEPDIR)/getpart-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/getpart-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/getpart-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-timeval.Tpo -c -o ../../lib/getpart-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-timeval.Tpo ../../lib/$(DEPDIR)/getpart-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/getpart-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/getpart-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-warnless.Tpo -c -o ../../lib/getpart-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-warnless.Tpo ../../lib/$(DEPDIR)/getpart-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/getpart-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/getpart-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-warnless.Tpo -c -o ../../lib/getpart-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-warnless.Tpo ../../lib/$(DEPDIR)/getpart-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/getpart-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+getpart-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.o -MD -MP -MF $(DEPDIR)/getpart-getpart.Tpo -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/getpart-getpart.Tpo $(DEPDIR)/getpart-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='getpart-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+getpart-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-getpart.obj -MD -MP -MF $(DEPDIR)/getpart-getpart.Tpo -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/getpart-getpart.Tpo $(DEPDIR)/getpart-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='getpart-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/getpart-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-base64.Tpo -c -o ../../lib/getpart-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-base64.Tpo ../../lib/$(DEPDIR)/getpart-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/getpart-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/getpart-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-base64.Tpo -c -o ../../lib/getpart-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-base64.Tpo ../../lib/$(DEPDIR)/getpart-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/getpart-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/getpart-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/getpart-memdebug.Tpo -c -o ../../lib/getpart-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-memdebug.Tpo ../../lib/$(DEPDIR)/getpart-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/getpart-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/getpart-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT ../../lib/getpart-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/getpart-memdebug.Tpo -c -o ../../lib/getpart-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/getpart-memdebug.Tpo ../../lib/$(DEPDIR)/getpart-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/getpart-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o ../../lib/getpart-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+getpart-testpart.o: testpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.o -MD -MP -MF $(DEPDIR)/getpart-testpart.Tpo -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/getpart-testpart.Tpo $(DEPDIR)/getpart-testpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testpart.c' object='getpart-testpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.o `test -f 'testpart.c' || echo '$(srcdir)/'`testpart.c
+
+getpart-testpart.obj: testpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-testpart.obj -MD -MP -MF $(DEPDIR)/getpart-testpart.Tpo -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/getpart-testpart.Tpo $(DEPDIR)/getpart-testpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testpart.c' object='getpart-testpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-testpart.obj `if test -f 'testpart.c'; then $(CYGPATH_W) 'testpart.c'; else $(CYGPATH_W) '$(srcdir)/testpart.c'; fi`
+
+../../lib/resolve-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-mprintf.Tpo -c -o ../../lib/resolve-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-mprintf.Tpo ../../lib/$(DEPDIR)/resolve-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/resolve-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/resolve-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-mprintf.Tpo -c -o ../../lib/resolve-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-mprintf.Tpo ../../lib/$(DEPDIR)/resolve-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/resolve-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/resolve-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-nonblock.Tpo -c -o ../../lib/resolve-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-nonblock.Tpo ../../lib/$(DEPDIR)/resolve-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/resolve-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/resolve-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-nonblock.Tpo -c -o ../../lib/resolve-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-nonblock.Tpo ../../lib/$(DEPDIR)/resolve-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/resolve-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/resolve-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-strtoofft.Tpo -c -o ../../lib/resolve-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-strtoofft.Tpo ../../lib/$(DEPDIR)/resolve-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/resolve-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/resolve-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-strtoofft.Tpo -c -o ../../lib/resolve-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-strtoofft.Tpo ../../lib/$(DEPDIR)/resolve-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/resolve-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/resolve-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-timeval.Tpo -c -o ../../lib/resolve-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-timeval.Tpo ../../lib/$(DEPDIR)/resolve-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/resolve-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/resolve-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-timeval.Tpo -c -o ../../lib/resolve-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-timeval.Tpo ../../lib/$(DEPDIR)/resolve-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/resolve-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/resolve-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-warnless.Tpo -c -o ../../lib/resolve-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-warnless.Tpo ../../lib/$(DEPDIR)/resolve-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/resolve-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/resolve-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-warnless.Tpo -c -o ../../lib/resolve-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-warnless.Tpo ../../lib/$(DEPDIR)/resolve-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/resolve-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+resolve-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.o -MD -MP -MF $(DEPDIR)/resolve-getpart.Tpo -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-getpart.Tpo $(DEPDIR)/resolve-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='resolve-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+resolve-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-getpart.obj -MD -MP -MF $(DEPDIR)/resolve-getpart.Tpo -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-getpart.Tpo $(DEPDIR)/resolve-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='resolve-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/resolve-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-base64.Tpo -c -o ../../lib/resolve-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-base64.Tpo ../../lib/$(DEPDIR)/resolve-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/resolve-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/resolve-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-base64.Tpo -c -o ../../lib/resolve-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-base64.Tpo ../../lib/$(DEPDIR)/resolve-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/resolve-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/resolve-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/resolve-memdebug.Tpo -c -o ../../lib/resolve-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-memdebug.Tpo ../../lib/$(DEPDIR)/resolve-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/resolve-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/resolve-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT ../../lib/resolve-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/resolve-memdebug.Tpo -c -o ../../lib/resolve-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/resolve-memdebug.Tpo ../../lib/$(DEPDIR)/resolve-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/resolve-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o ../../lib/resolve-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+resolve-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.o -MD -MP -MF $(DEPDIR)/resolve-util.Tpo -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-util.Tpo $(DEPDIR)/resolve-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='resolve-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+resolve-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-util.obj -MD -MP -MF $(DEPDIR)/resolve-util.Tpo -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-util.Tpo $(DEPDIR)/resolve-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='resolve-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+resolve-resolve.o: resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.o -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+
+resolve-resolve.obj: resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.obj -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+
+../../lib/rtspd-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-mprintf.Tpo -c -o ../../lib/rtspd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-mprintf.Tpo ../../lib/$(DEPDIR)/rtspd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/rtspd-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/rtspd-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-mprintf.Tpo -c -o ../../lib/rtspd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-mprintf.Tpo ../../lib/$(DEPDIR)/rtspd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/rtspd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/rtspd-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-nonblock.Tpo -c -o ../../lib/rtspd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-nonblock.Tpo ../../lib/$(DEPDIR)/rtspd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/rtspd-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/rtspd-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-nonblock.Tpo -c -o ../../lib/rtspd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-nonblock.Tpo ../../lib/$(DEPDIR)/rtspd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/rtspd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/rtspd-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-strtoofft.Tpo -c -o ../../lib/rtspd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-strtoofft.Tpo ../../lib/$(DEPDIR)/rtspd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/rtspd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/rtspd-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-strtoofft.Tpo -c -o ../../lib/rtspd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-strtoofft.Tpo ../../lib/$(DEPDIR)/rtspd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/rtspd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/rtspd-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-timeval.Tpo -c -o ../../lib/rtspd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-timeval.Tpo ../../lib/$(DEPDIR)/rtspd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/rtspd-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/rtspd-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-timeval.Tpo -c -o ../../lib/rtspd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-timeval.Tpo ../../lib/$(DEPDIR)/rtspd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/rtspd-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/rtspd-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-warnless.Tpo -c -o ../../lib/rtspd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-warnless.Tpo ../../lib/$(DEPDIR)/rtspd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/rtspd-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/rtspd-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-warnless.Tpo -c -o ../../lib/rtspd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-warnless.Tpo ../../lib/$(DEPDIR)/rtspd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/rtspd-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+rtspd-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.o -MD -MP -MF $(DEPDIR)/rtspd-getpart.Tpo -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-getpart.Tpo $(DEPDIR)/rtspd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='rtspd-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+rtspd-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-getpart.obj -MD -MP -MF $(DEPDIR)/rtspd-getpart.Tpo -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-getpart.Tpo $(DEPDIR)/rtspd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='rtspd-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/rtspd-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-base64.Tpo -c -o ../../lib/rtspd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-base64.Tpo ../../lib/$(DEPDIR)/rtspd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/rtspd-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/rtspd-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-base64.Tpo -c -o ../../lib/rtspd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-base64.Tpo ../../lib/$(DEPDIR)/rtspd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/rtspd-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/rtspd-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-memdebug.Tpo -c -o ../../lib/rtspd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-memdebug.Tpo ../../lib/$(DEPDIR)/rtspd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/rtspd-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/rtspd-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT ../../lib/rtspd-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/rtspd-memdebug.Tpo -c -o ../../lib/rtspd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/rtspd-memdebug.Tpo ../../lib/$(DEPDIR)/rtspd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/rtspd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o ../../lib/rtspd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+rtspd-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.o -MD -MP -MF $(DEPDIR)/rtspd-util.Tpo -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-util.Tpo $(DEPDIR)/rtspd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='rtspd-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+rtspd-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-util.obj -MD -MP -MF $(DEPDIR)/rtspd-util.Tpo -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-util.Tpo $(DEPDIR)/rtspd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='rtspd-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+rtspd-rtspd.o: rtspd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.o -MD -MP -MF $(DEPDIR)/rtspd-rtspd.Tpo -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-rtspd.Tpo $(DEPDIR)/rtspd-rtspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtspd.c' object='rtspd-rtspd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.o `test -f 'rtspd.c' || echo '$(srcdir)/'`rtspd.c
+
+rtspd-rtspd.obj: rtspd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-rtspd.obj -MD -MP -MF $(DEPDIR)/rtspd-rtspd.Tpo -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtspd-rtspd.Tpo $(DEPDIR)/rtspd-rtspd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtspd.c' object='rtspd-rtspd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-rtspd.obj `if test -f 'rtspd.c'; then $(CYGPATH_W) 'rtspd.c'; else $(CYGPATH_W) '$(srcdir)/rtspd.c'; fi`
+
+../../lib/sockfilt-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-mprintf.Tpo -c -o ../../lib/sockfilt-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-mprintf.Tpo ../../lib/$(DEPDIR)/sockfilt-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/sockfilt-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/sockfilt-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-mprintf.Tpo -c -o ../../lib/sockfilt-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-mprintf.Tpo ../../lib/$(DEPDIR)/sockfilt-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/sockfilt-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/sockfilt-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-nonblock.Tpo -c -o ../../lib/sockfilt-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-nonblock.Tpo ../../lib/$(DEPDIR)/sockfilt-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/sockfilt-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/sockfilt-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-nonblock.Tpo -c -o ../../lib/sockfilt-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-nonblock.Tpo ../../lib/$(DEPDIR)/sockfilt-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/sockfilt-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/sockfilt-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-strtoofft.Tpo -c -o ../../lib/sockfilt-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-strtoofft.Tpo ../../lib/$(DEPDIR)/sockfilt-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/sockfilt-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/sockfilt-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-strtoofft.Tpo -c -o ../../lib/sockfilt-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-strtoofft.Tpo ../../lib/$(DEPDIR)/sockfilt-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/sockfilt-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/sockfilt-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-timeval.Tpo -c -o ../../lib/sockfilt-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-timeval.Tpo ../../lib/$(DEPDIR)/sockfilt-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/sockfilt-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/sockfilt-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-timeval.Tpo -c -o ../../lib/sockfilt-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-timeval.Tpo ../../lib/$(DEPDIR)/sockfilt-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/sockfilt-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/sockfilt-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-warnless.Tpo -c -o ../../lib/sockfilt-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-warnless.Tpo ../../lib/$(DEPDIR)/sockfilt-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/sockfilt-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/sockfilt-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-warnless.Tpo -c -o ../../lib/sockfilt-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-warnless.Tpo ../../lib/$(DEPDIR)/sockfilt-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/sockfilt-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+sockfilt-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.o -MD -MP -MF $(DEPDIR)/sockfilt-getpart.Tpo -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-getpart.Tpo $(DEPDIR)/sockfilt-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='sockfilt-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+sockfilt-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-getpart.obj -MD -MP -MF $(DEPDIR)/sockfilt-getpart.Tpo -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-getpart.Tpo $(DEPDIR)/sockfilt-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='sockfilt-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/sockfilt-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-base64.Tpo -c -o ../../lib/sockfilt-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-base64.Tpo ../../lib/$(DEPDIR)/sockfilt-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/sockfilt-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/sockfilt-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-base64.Tpo -c -o ../../lib/sockfilt-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-base64.Tpo ../../lib/$(DEPDIR)/sockfilt-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/sockfilt-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/sockfilt-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-memdebug.Tpo -c -o ../../lib/sockfilt-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-memdebug.Tpo ../../lib/$(DEPDIR)/sockfilt-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/sockfilt-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/sockfilt-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-memdebug.Tpo -c -o ../../lib/sockfilt-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-memdebug.Tpo ../../lib/$(DEPDIR)/sockfilt-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/sockfilt-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+sockfilt-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.o -MD -MP -MF $(DEPDIR)/sockfilt-util.Tpo -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-util.Tpo $(DEPDIR)/sockfilt-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='sockfilt-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+sockfilt-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-util.obj -MD -MP -MF $(DEPDIR)/sockfilt-util.Tpo -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-util.Tpo $(DEPDIR)/sockfilt-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='sockfilt-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+sockfilt-sockfilt.o: sockfilt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.o -MD -MP -MF $(DEPDIR)/sockfilt-sockfilt.Tpo -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-sockfilt.Tpo $(DEPDIR)/sockfilt-sockfilt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sockfilt.c' object='sockfilt-sockfilt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.o `test -f 'sockfilt.c' || echo '$(srcdir)/'`sockfilt.c
+
+sockfilt-sockfilt.obj: sockfilt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-sockfilt.obj -MD -MP -MF $(DEPDIR)/sockfilt-sockfilt.Tpo -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sockfilt-sockfilt.Tpo $(DEPDIR)/sockfilt-sockfilt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sockfilt.c' object='sockfilt-sockfilt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-sockfilt.obj `if test -f 'sockfilt.c'; then $(CYGPATH_W) 'sockfilt.c'; else $(CYGPATH_W) '$(srcdir)/sockfilt.c'; fi`
+
+../../lib/sockfilt-inet_pton.o: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-inet_pton.o -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-inet_pton.Tpo -c -o ../../lib/sockfilt-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-inet_pton.Tpo ../../lib/$(DEPDIR)/sockfilt-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/inet_pton.c' object='../../lib/sockfilt-inet_pton.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+
+../../lib/sockfilt-inet_pton.obj: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT ../../lib/sockfilt-inet_pton.obj -MD -MP -MF ../../lib/$(DEPDIR)/sockfilt-inet_pton.Tpo -c -o ../../lib/sockfilt-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sockfilt-inet_pton.Tpo ../../lib/$(DEPDIR)/sockfilt-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/inet_pton.c' object='../../lib/sockfilt-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o ../../lib/sockfilt-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+
+../../lib/sws-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-mprintf.Tpo -c -o ../../lib/sws-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-mprintf.Tpo ../../lib/$(DEPDIR)/sws-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/sws-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/sws-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-mprintf.Tpo -c -o ../../lib/sws-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-mprintf.Tpo ../../lib/$(DEPDIR)/sws-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/sws-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/sws-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-nonblock.Tpo -c -o ../../lib/sws-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-nonblock.Tpo ../../lib/$(DEPDIR)/sws-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/sws-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/sws-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-nonblock.Tpo -c -o ../../lib/sws-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-nonblock.Tpo ../../lib/$(DEPDIR)/sws-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/sws-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/sws-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-strtoofft.Tpo -c -o ../../lib/sws-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-strtoofft.Tpo ../../lib/$(DEPDIR)/sws-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/sws-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/sws-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-strtoofft.Tpo -c -o ../../lib/sws-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-strtoofft.Tpo ../../lib/$(DEPDIR)/sws-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/sws-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/sws-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-timeval.Tpo -c -o ../../lib/sws-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-timeval.Tpo ../../lib/$(DEPDIR)/sws-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/sws-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/sws-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-timeval.Tpo -c -o ../../lib/sws-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-timeval.Tpo ../../lib/$(DEPDIR)/sws-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/sws-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/sws-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-warnless.Tpo -c -o ../../lib/sws-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-warnless.Tpo ../../lib/$(DEPDIR)/sws-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/sws-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/sws-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-warnless.Tpo -c -o ../../lib/sws-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-warnless.Tpo ../../lib/$(DEPDIR)/sws-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/sws-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+sws-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.o -MD -MP -MF $(DEPDIR)/sws-getpart.Tpo -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-getpart.Tpo $(DEPDIR)/sws-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='sws-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+sws-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-getpart.obj -MD -MP -MF $(DEPDIR)/sws-getpart.Tpo -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-getpart.Tpo $(DEPDIR)/sws-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='sws-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/sws-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-base64.Tpo -c -o ../../lib/sws-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-base64.Tpo ../../lib/$(DEPDIR)/sws-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/sws-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/sws-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-base64.Tpo -c -o ../../lib/sws-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-base64.Tpo ../../lib/$(DEPDIR)/sws-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/sws-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/sws-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-memdebug.Tpo -c -o ../../lib/sws-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-memdebug.Tpo ../../lib/$(DEPDIR)/sws-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/sws-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/sws-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-memdebug.Tpo -c -o ../../lib/sws-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-memdebug.Tpo ../../lib/$(DEPDIR)/sws-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/sws-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+sws-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.o -MD -MP -MF $(DEPDIR)/sws-util.Tpo -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-util.Tpo $(DEPDIR)/sws-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='sws-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+sws-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-util.obj -MD -MP -MF $(DEPDIR)/sws-util.Tpo -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-util.Tpo $(DEPDIR)/sws-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='sws-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+sws-sws.o: sws.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.o -MD -MP -MF $(DEPDIR)/sws-sws.Tpo -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-sws.Tpo $(DEPDIR)/sws-sws.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sws.c' object='sws-sws.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.o `test -f 'sws.c' || echo '$(srcdir)/'`sws.c
+
+sws-sws.obj: sws.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-sws.obj -MD -MP -MF $(DEPDIR)/sws-sws.Tpo -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/sws-sws.Tpo $(DEPDIR)/sws-sws.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sws.c' object='sws-sws.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-sws.obj `if test -f 'sws.c'; then $(CYGPATH_W) 'sws.c'; else $(CYGPATH_W) '$(srcdir)/sws.c'; fi`
+
+../../lib/sws-inet_pton.o: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-inet_pton.o -MD -MP -MF ../../lib/$(DEPDIR)/sws-inet_pton.Tpo -c -o ../../lib/sws-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-inet_pton.Tpo ../../lib/$(DEPDIR)/sws-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/inet_pton.c' object='../../lib/sws-inet_pton.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-inet_pton.o `test -f '../../lib/inet_pton.c' || echo '$(srcdir)/'`../../lib/inet_pton.c
+
+../../lib/sws-inet_pton.obj: ../../lib/inet_pton.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT ../../lib/sws-inet_pton.obj -MD -MP -MF ../../lib/$(DEPDIR)/sws-inet_pton.Tpo -c -o ../../lib/sws-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/sws-inet_pton.Tpo ../../lib/$(DEPDIR)/sws-inet_pton.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/inet_pton.c' object='../../lib/sws-inet_pton.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o ../../lib/sws-inet_pton.obj `if test -f '../../lib/inet_pton.c'; then $(CYGPATH_W) '../../lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/inet_pton.c'; fi`
+
+../../lib/tftpd-mprintf.o: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-mprintf.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-mprintf.Tpo -c -o ../../lib/tftpd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-mprintf.Tpo ../../lib/$(DEPDIR)/tftpd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/tftpd-mprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-mprintf.o `test -f '../../lib/mprintf.c' || echo '$(srcdir)/'`../../lib/mprintf.c
+
+../../lib/tftpd-mprintf.obj: ../../lib/mprintf.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-mprintf.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-mprintf.Tpo -c -o ../../lib/tftpd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-mprintf.Tpo ../../lib/$(DEPDIR)/tftpd-mprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/mprintf.c' object='../../lib/tftpd-mprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-mprintf.obj `if test -f '../../lib/mprintf.c'; then $(CYGPATH_W) '../../lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/mprintf.c'; fi`
+
+../../lib/tftpd-nonblock.o: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-nonblock.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-nonblock.Tpo -c -o ../../lib/tftpd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-nonblock.Tpo ../../lib/$(DEPDIR)/tftpd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/tftpd-nonblock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-nonblock.o `test -f '../../lib/nonblock.c' || echo '$(srcdir)/'`../../lib/nonblock.c
+
+../../lib/tftpd-nonblock.obj: ../../lib/nonblock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-nonblock.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-nonblock.Tpo -c -o ../../lib/tftpd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-nonblock.Tpo ../../lib/$(DEPDIR)/tftpd-nonblock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/nonblock.c' object='../../lib/tftpd-nonblock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-nonblock.obj `if test -f '../../lib/nonblock.c'; then $(CYGPATH_W) '../../lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/nonblock.c'; fi`
+
+../../lib/tftpd-strtoofft.o: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-strtoofft.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-strtoofft.Tpo -c -o ../../lib/tftpd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-strtoofft.Tpo ../../lib/$(DEPDIR)/tftpd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/tftpd-strtoofft.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-strtoofft.o `test -f '../../lib/strtoofft.c' || echo '$(srcdir)/'`../../lib/strtoofft.c
+
+../../lib/tftpd-strtoofft.obj: ../../lib/strtoofft.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-strtoofft.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-strtoofft.Tpo -c -o ../../lib/tftpd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-strtoofft.Tpo ../../lib/$(DEPDIR)/tftpd-strtoofft.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/strtoofft.c' object='../../lib/tftpd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-strtoofft.obj `if test -f '../../lib/strtoofft.c'; then $(CYGPATH_W) '../../lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/strtoofft.c'; fi`
+
+../../lib/tftpd-timeval.o: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-timeval.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-timeval.Tpo -c -o ../../lib/tftpd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-timeval.Tpo ../../lib/$(DEPDIR)/tftpd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/tftpd-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-timeval.o `test -f '../../lib/timeval.c' || echo '$(srcdir)/'`../../lib/timeval.c
+
+../../lib/tftpd-timeval.obj: ../../lib/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-timeval.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-timeval.Tpo -c -o ../../lib/tftpd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-timeval.Tpo ../../lib/$(DEPDIR)/tftpd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/timeval.c' object='../../lib/tftpd-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-timeval.obj `if test -f '../../lib/timeval.c'; then $(CYGPATH_W) '../../lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/timeval.c'; fi`
+
+../../lib/tftpd-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-warnless.Tpo -c -o ../../lib/tftpd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-warnless.Tpo ../../lib/$(DEPDIR)/tftpd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/tftpd-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/tftpd-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-warnless.Tpo -c -o ../../lib/tftpd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-warnless.Tpo ../../lib/$(DEPDIR)/tftpd-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/warnless.c' object='../../lib/tftpd-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+tftpd-getpart.o: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.o -MD -MP -MF $(DEPDIR)/tftpd-getpart.Tpo -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-getpart.Tpo $(DEPDIR)/tftpd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='tftpd-getpart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.o `test -f 'getpart.c' || echo '$(srcdir)/'`getpart.c
+
+tftpd-getpart.obj: getpart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-getpart.obj -MD -MP -MF $(DEPDIR)/tftpd-getpart.Tpo -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-getpart.Tpo $(DEPDIR)/tftpd-getpart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='getpart.c' object='tftpd-getpart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-getpart.obj `if test -f 'getpart.c'; then $(CYGPATH_W) 'getpart.c'; else $(CYGPATH_W) '$(srcdir)/getpart.c'; fi`
+
+../../lib/tftpd-base64.o: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-base64.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-base64.Tpo -c -o ../../lib/tftpd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-base64.Tpo ../../lib/$(DEPDIR)/tftpd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/tftpd-base64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-base64.o `test -f '../../lib/base64.c' || echo '$(srcdir)/'`../../lib/base64.c
+
+../../lib/tftpd-base64.obj: ../../lib/base64.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-base64.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-base64.Tpo -c -o ../../lib/tftpd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-base64.Tpo ../../lib/$(DEPDIR)/tftpd-base64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/base64.c' object='../../lib/tftpd-base64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-base64.obj `if test -f '../../lib/base64.c'; then $(CYGPATH_W) '../../lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/base64.c'; fi`
+
+../../lib/tftpd-memdebug.o: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-memdebug.o -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-memdebug.Tpo -c -o ../../lib/tftpd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-memdebug.Tpo ../../lib/$(DEPDIR)/tftpd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/tftpd-memdebug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-memdebug.o `test -f '../../lib/memdebug.c' || echo '$(srcdir)/'`../../lib/memdebug.c
+
+../../lib/tftpd-memdebug.obj: ../../lib/memdebug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT ../../lib/tftpd-memdebug.obj -MD -MP -MF ../../lib/$(DEPDIR)/tftpd-memdebug.Tpo -c -o ../../lib/tftpd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/tftpd-memdebug.Tpo ../../lib/$(DEPDIR)/tftpd-memdebug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../../lib/memdebug.c' object='../../lib/tftpd-memdebug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o ../../lib/tftpd-memdebug.obj `if test -f '../../lib/memdebug.c'; then $(CYGPATH_W) '../../lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/memdebug.c'; fi`
+
+tftpd-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.o -MD -MP -MF $(DEPDIR)/tftpd-util.Tpo -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-util.Tpo $(DEPDIR)/tftpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='tftpd-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+tftpd-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-util.obj -MD -MP -MF $(DEPDIR)/tftpd-util.Tpo -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-util.Tpo $(DEPDIR)/tftpd-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='tftpd-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+tftpd-tftpd.o: tftpd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.o -MD -MP -MF $(DEPDIR)/tftpd-tftpd.Tpo -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-tftpd.Tpo $(DEPDIR)/tftpd-tftpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tftpd.c' object='tftpd-tftpd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.o `test -f 'tftpd.c' || echo '$(srcdir)/'`tftpd.c
+
+tftpd-tftpd.obj: tftpd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-tftpd.obj -MD -MP -MF $(DEPDIR)/tftpd-tftpd.Tpo -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/tftpd-tftpd.Tpo $(DEPDIR)/tftpd-tftpd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tftpd.c' object='tftpd-tftpd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-tftpd.obj `if test -f 'tftpd.c'; then $(CYGPATH_W) 'tftpd.c'; else $(CYGPATH_W) '$(srcdir)/tftpd.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+@CURLDEBUG_FALSE@all-local:
+all-am: Makefile $(PROGRAMS) all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f ../../lib/$(DEPDIR)/$(am__dirstamp)
+	-rm -f ../../lib/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ../../lib/$(DEPDIR) ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ../../lib/$(DEPDIR) ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+	clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+	ctags ctags-am distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+checksrc:
+	@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+# for debug builds, we scan the sources on all regular make invokes
+@CURLDEBUG_TRUE@all-local: checksrc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.inc b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.inc
new file mode 100644
index 0000000..c3ea664
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/Makefile.inc
@@ -0,0 +1,70 @@
+noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd fake_ntlm
+
+CURLX_SRCS = \
+ ../../lib/mprintf.c \
+ ../../lib/nonblock.c \
+ ../../lib/strtoofft.c \
+ ../../lib/timeval.c \
+ ../../lib/warnless.c
+
+CURLX_HDRS = \
+ ../../lib/curlx.h \
+ ../../lib/nonblock.h \
+ ../../lib/strtoofft.h \
+ ../../lib/timeval.h \
+ ../../lib/warnless.h
+
+USEFUL = \
+ getpart.c \
+ getpart.h \
+ server_setup.h \
+ ../../lib/base64.c \
+ ../../lib/curl_base64.h \
+ ../../lib/memdebug.c \
+ ../../lib/memdebug.h
+
+UTIL = \
+ util.c \
+ util.h
+
+getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
+ testpart.c
+getpart_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+getpart_CFLAGS = $(AM_CFLAGS)
+
+resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ resolve.c
+resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+resolve_CFLAGS = $(AM_CFLAGS)
+
+rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ rtspd.c
+rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+rtspd_CFLAGS = $(AM_CFLAGS)
+
+sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ sockfilt.c \
+ ../../lib/inet_pton.c
+sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+sockfilt_CFLAGS = $(AM_CFLAGS)
+
+sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ sws.c \
+ ../../lib/inet_pton.c
+sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+sws_CFLAGS = $(AM_CFLAGS)
+
+tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ server_sockaddr.h \
+ tftpd.c \
+ tftp.h
+tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+tftpd_CFLAGS = $(AM_CFLAGS)
+
+fake_ntlm_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
+ fake_ntlm.c
+fake_ntlm_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
+fake_ntlm_CFLAGS = $(AM_CFLAGS)
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/base64.pl b/ap/lib/libcurl/curl-7.54.1/tests/server/base64.pl
new file mode 100644
index 0000000..2eab1fa
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/base64.pl
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use MIME::Base64 qw(encode_base64);
+
+my $buf;
+while(read(STDIN, $buf, 60*57)) {
+    my $enc = encode_base64($buf);
+    print "$enc";
+}
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/fake_ntlm.c b/ap/lib/libcurl/curl-7.54.1/tests/server/fake_ntlm.c
new file mode 100644
index 0000000..0d1b3e1
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/fake_ntlm.c
@@ -0,0 +1,284 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2010, Mandy Wu, <mandy.wu@intel.com>
+ * Copyright (C) 2011 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/*
+ * This is a fake ntlm_auth, which is used for testing NTLM single-sign-on.
+ * When DEBUGBUILD is defined, libcurl invoke this tool instead of real winbind
+ * daemon helper /usr/bin/ntlm_auth. This tool will accept commands and
+ * responses with a pre-written string saved in test case test2005.
+ */
+
+#define ENABLE_CURLX_PRINTF
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#define LOGFILE "log/fake_ntlm%d.log"
+
+const char *serverlogfile;
+
+/*
+ * Returns an allocated buffer with printable representation of input
+ * buffer contents or returns NULL on out of memory condition.
+ */
+static char *printable(char *inbuf, size_t inlength)
+{
+  char *outbuf;
+  char *newbuf;
+  size_t newsize;
+  size_t outsize;
+  size_t outincr = 0;
+  size_t i, o = 0;
+
+#define HEX_FMT_STR  "[0x%02X]"
+#define HEX_STR_LEN  6
+#define NOTHING_STR  "[NOTHING]"
+#define NOTHING_LEN  9
+
+  if(!inlength)
+    inlength = strlen(inbuf);
+
+  if(inlength) {
+    outincr = ((inlength/2) < (HEX_STR_LEN+1)) ? HEX_STR_LEN+1 : inlength/2;
+    outsize = inlength + outincr;
+  }
+  else
+    outsize = NOTHING_LEN + 1;
+
+  outbuf = malloc(outsize);
+  if(!outbuf)
+    return NULL;
+
+  if(!inlength) {
+    snprintf(&outbuf[0], outsize, "%s", NOTHING_STR);
+    return outbuf;
+  }
+
+  for(i=0; i<inlength; i++) {
+
+    if(o > outsize - (HEX_STR_LEN + 1)) {
+      newsize = outsize + outincr;
+      newbuf = realloc(outbuf, newsize);
+      if(!newbuf) {
+        free(outbuf);
+        return NULL;
+      }
+      outbuf = newbuf;
+      outsize = newsize;
+    }
+
+    if((inbuf[i] > 0x20) && (inbuf[i] < 0x7F)) {
+      outbuf[o] = inbuf[i];
+      o++;
+    }
+    else {
+      snprintf(&outbuf[o], outsize - o, HEX_FMT_STR, inbuf[i]);
+      o += HEX_STR_LEN;
+    }
+
+  }
+  outbuf[o] = '\0';
+
+  return outbuf;
+}
+
+int main(int argc, char *argv[])
+{
+  char buf[1024];
+  char logfilename[256];
+  FILE *stream;
+  char *filename;
+  int error;
+  char *type1_input = NULL, *type3_input = NULL;
+  char *type1_output = NULL, *type3_output = NULL;
+  size_t size = 0;
+  long testnum;
+  const char *env;
+  int arg = 1;
+  const char *helper_user = "unknown";
+  const char *helper_proto = "unknown";
+  const char *helper_domain = "unknown";
+  bool use_cached_creds = FALSE;
+  char *msgbuf;
+
+  buf[0] = '\0';
+
+  while(argc > arg) {
+    if(!strcmp("--use-cached-creds", argv[arg])) {
+      use_cached_creds = TRUE;
+      arg++;
+    }
+    else if(!strcmp("--helper-protocol", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_proto = argv[arg++];
+    }
+    else if(!strcmp("--username", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_user = argv[arg++];
+    }
+    else if(!strcmp("--domain", argv[arg])) {
+      arg++;
+      if(argc > arg)
+        helper_domain = argv[arg++];
+    }
+    else {
+      puts("Usage: fake_ntlm [option]\n"
+           " --use-cached-creds\n"
+           " --helper-protocol [protocol]\n"
+           " --username [username]\n"
+           " --domain [domain]");
+      exit(1);
+    }
+  }
+
+  env = getenv("CURL_NTLM_AUTH_TESTNUM");
+  if(env) {
+    char *endptr;
+    long lnum = strtol(env, &endptr, 10);
+    if((endptr != env + strlen(env)) || (lnum < 1L)) {
+      fprintf(stderr, "Test number not valid in CURL_NTLM_AUTH_TESTNUM");
+      exit(1);
+    }
+    testnum = lnum;
+  }
+  else {
+    fprintf(stderr, "Test number not specified in CURL_NTLM_AUTH_TESTNUM");
+    exit(1);
+  }
+
+  /* logmsg cannot be used until this file name is set */
+  snprintf(logfilename, sizeof(logfilename), LOGFILE, testnum);
+  serverlogfile = logfilename;
+
+  logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)",
+         helper_user, helper_proto, helper_domain,
+         (use_cached_creds) ? "yes" : "no");
+
+  env = getenv("CURL_NTLM_AUTH_SRCDIR");
+  if(env) {
+    path = env;
+  }
+
+  filename = test2file(testnum);
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", filename);
+    logmsg("Couldn't open test file %ld", testnum);
+    exit(1);
+  }
+  else {
+    /* get the ntlm_auth input/output */
+    error = getpart(&type1_input, &size, "ntlm_auth_type1", "input", stream);
+    fclose(stream);
+    if(error || size == 0) {
+      logmsg("getpart() type 1 input failed with error: %d", error);
+      exit(1);
+    }
+  }
+
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", filename);
+    logmsg("Couldn't open test file %ld", testnum);
+    exit(1);
+  }
+  else {
+    size = 0;
+    error = getpart(&type3_input, &size, "ntlm_auth_type3", "input", stream);
+    fclose(stream);
+    if(error || size == 0) {
+      logmsg("getpart() type 3 input failed with error: %d", error);
+      exit(1);
+    }
+  }
+
+  while(fgets(buf, sizeof(buf), stdin)) {
+    if(strcmp(buf, type1_input) == 0) {
+      stream=fopen(filename, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", filename);
+        logmsg("Couldn't open test file %ld", testnum);
+        exit(1);
+      }
+      else {
+        size = 0;
+        error = getpart(&type1_output, &size, "ntlm_auth_type1", "output",
+                        stream);
+        fclose(stream);
+        if(error || size == 0) {
+          logmsg("getpart() type 1 output failed with error: %d", error);
+          exit(1);
+        }
+      }
+      printf("%s", type1_output);
+      fflush(stdout);
+    }
+    else if(strncmp(buf, type3_input, strlen(type3_input)) == 0) {
+      stream=fopen(filename, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", filename);
+        logmsg("Couldn't open test file %ld", testnum);
+        exit(1);
+      }
+      else {
+        size = 0;
+        error = getpart(&type3_output, &size, "ntlm_auth_type3", "output",
+                        stream);
+        fclose(stream);
+        if(error || size == 0) {
+          logmsg("getpart() type 3 output failed with error: %d", error);
+          exit(1);
+        }
+      }
+      printf("%s", type3_output);
+      fflush(stdout);
+    }
+    else {
+      printf("Unknown request\n");
+      msgbuf = printable(buf, 0);
+      if(msgbuf) {
+        logmsg("invalid input: '%s'\n", msgbuf);
+        free(msgbuf);
+      }
+      else
+        logmsg("OOM formatting invalid input: '%s'\n", buf);
+      exit(1);
+    }
+  }
+  logmsg("Exit");
+  return 1;
+}
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.c b/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.c
new file mode 100644
index 0000000..bb8351b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.c
@@ -0,0 +1,454 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+#include "getpart.h"
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+
+/* just to please curl_base64.h we create a fake struct */
+struct Curl_easy {
+  int fake;
+};
+
+#include "curl_base64.h"
+#include "curl_memory.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#define EAT_SPACE(p) while(*(p) && ISSPACE(*(p))) (p)++
+
+#define EAT_WORD(p)  while(*(p) && !ISSPACE(*(p)) && ('>' != *(p))) (p)++
+
+#ifdef DEBUG_GETPART
+#define show(x) printf x
+#else
+#define show(x) Curl_nop_stmt
+#endif
+
+#if defined(_MSC_VER) && defined(_DLL)
+#  pragma warning(disable:4232) /* MSVC extension, dllimport identity */
+#endif
+
+curl_malloc_callback Curl_cmalloc = (curl_malloc_callback)malloc;
+curl_free_callback Curl_cfree = (curl_free_callback)free;
+curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
+curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)strdup;
+curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#if defined(WIN32) && defined(UNICODE)
+curl_wcsdup_callback Curl_cwcsdup = (curl_wcsdup_callback)_wcsdup;
+#endif
+
+#if defined(_MSC_VER) && defined(_DLL)
+#  pragma warning(default:4232) /* MSVC extension, dllimport identity */
+#endif
+
+/*
+ * readline()
+ *
+ * Reads a complete line from a file into a dynamically allocated buffer.
+ *
+ * Calling function may call this multiple times with same 'buffer'
+ * and 'bufsize' pointers to avoid multiple buffer allocations. Buffer
+ * will be reallocated and 'bufsize' increased until whole line fits in
+ * buffer before returning it.
+ *
+ * Calling function is responsible to free allocated buffer.
+ *
+ * This function may return:
+ *   GPE_OUT_OF_MEMORY
+ *   GPE_END_OF_FILE
+ *   GPE_OK
+ */
+
+static int readline(char **buffer, size_t *bufsize, FILE *stream)
+{
+  size_t offset = 0;
+  size_t length;
+  char *newptr;
+
+  if(!*buffer) {
+    *buffer = malloc(128);
+    if(!*buffer)
+      return GPE_OUT_OF_MEMORY;
+    *bufsize = 128;
+  }
+
+  for(;;) {
+    int bytestoread = curlx_uztosi(*bufsize - offset);
+
+    if(!fgets(*buffer + offset, bytestoread, stream))
+      return (offset != 0) ? GPE_OK : GPE_END_OF_FILE;
+
+    length = offset + strlen(*buffer + offset);
+    if(*(*buffer + length - 1) == '\n')
+      break;
+    offset = length;
+    if(length < *bufsize - 1)
+      continue;
+
+    newptr = realloc(*buffer, *bufsize * 2);
+    if(!newptr)
+      return GPE_OUT_OF_MEMORY;
+    *buffer = newptr;
+    *bufsize *= 2;
+  }
+
+  return GPE_OK;
+}
+
+/*
+ * appenddata()
+ *
+ * This appends data from a given source buffer to the end of the used part of
+ * a destination buffer. Arguments relative to the destination buffer are, the
+ * address of a pointer to the destination buffer 'dst_buf', the length of data
+ * in destination buffer excluding potential null string termination 'dst_len',
+ * the allocated size of destination buffer 'dst_alloc'. All three destination
+ * buffer arguments may be modified by this function. Arguments relative to the
+ * source buffer are, a pointer to the source buffer 'src_buf' and indication
+ * whether the source buffer is base64 encoded or not 'src_b64'.
+ *
+ * If the source buffer is indicated to be base64 encoded, this appends the
+ * decoded data, binary or whatever, to the destination. The source buffer
+ * may not hold binary data, only a null terminated string is valid content.
+ *
+ * Destination buffer will be enlarged and relocated as needed.
+ *
+ * Calling function is responsible to provide preallocated destination
+ * buffer and also to deallocate it when no longer needed.
+ *
+ * This function may return:
+ *   GPE_OUT_OF_MEMORY
+ *   GPE_OK
+ */
+
+static int appenddata(char  **dst_buf,   /* dest buffer */
+                      size_t *dst_len,   /* dest buffer data length */
+                      size_t *dst_alloc, /* dest buffer allocated size */
+                      char   *src_buf,   /* source buffer */
+                      int     src_b64)   /* != 0 if source is base64 encoded */
+{
+  size_t need_alloc = 0;
+  size_t src_len = strlen(src_buf);
+
+  if(!src_len)
+    return GPE_OK;
+
+  need_alloc = src_len + *dst_len + 1;
+
+  if(src_b64) {
+    if(src_buf[src_len - 1] == '\r')
+      src_len--;
+
+    if(src_buf[src_len - 1] == '\n')
+      src_len--;
+  }
+
+  /* enlarge destination buffer if required */
+  if(need_alloc > *dst_alloc) {
+    size_t newsize = need_alloc * 2;
+    char *newptr = realloc(*dst_buf, newsize);
+    if(!newptr) {
+      return GPE_OUT_OF_MEMORY;
+    }
+    *dst_alloc = newsize;
+    *dst_buf = newptr;
+  }
+
+  /* memcpy to support binary blobs */
+  memcpy(*dst_buf + *dst_len, src_buf, src_len);
+  *dst_len += src_len;
+  *(*dst_buf + *dst_len) = '\0';
+
+  return GPE_OK;
+}
+
+static int decodedata(char  **buf,   /* dest buffer */
+                      size_t *len)   /* dest buffer data length */
+{
+  CURLcode error = CURLE_OK;
+  unsigned char *buf64 = NULL;
+  size_t src_len = 0;
+
+  if(!*len)
+    return GPE_OK;
+
+  /* base64 decode the given buffer */
+  error = Curl_base64_decode(*buf, &buf64, &src_len);
+  if(error)
+    return GPE_OUT_OF_MEMORY;
+
+  if(!src_len) {
+    /*
+    ** currently there is no way to tell apart an OOM condition in
+    ** Curl_base64_decode() from zero length decoded data. For now,
+    ** let's just assume it is an OOM condition, currently we have
+    ** no input for this function that decodes to zero length data.
+    */
+    free(buf64);
+
+    return GPE_OUT_OF_MEMORY;
+  }
+
+  /* memcpy to support binary blobs */
+  memcpy(*buf, buf64, src_len);
+  *len = src_len;
+  *(*buf + src_len) = '\0';
+
+  free(buf64);
+
+  return GPE_OK;
+}
+
+/*
+ * getpart()
+ *
+ * This returns whole contents of specified XML-like section and subsection
+ * from the given file. This is mostly used to retrieve a specific part from
+ * a test definition file for consumption by test suite servers.
+ *
+ * Data is returned in a dynamically allocated buffer, a pointer to this data
+ * and the size of the data is stored at the addresses that caller specifies.
+ *
+ * If the returned data is a string the returned size will be the length of
+ * the string excluding null termination. Otherwise it will just be the size
+ * of the returned binary data.
+ *
+ * Calling function is responsible to free returned buffer.
+ *
+ * This function may return:
+ *   GPE_NO_BUFFER_SPACE
+ *   GPE_OUT_OF_MEMORY
+ *   GPE_OK
+ */
+
+int getpart(char **outbuf, size_t *outlen,
+            const char *main, const char *sub, FILE *stream)
+{
+# define MAX_TAG_LEN 79
+  char couter[MAX_TAG_LEN+1]; /* current outermost section */
+  char cmain[MAX_TAG_LEN+1];  /* current main section */
+  char csub[MAX_TAG_LEN+1];   /* current sub section */
+  char ptag[MAX_TAG_LEN+1];   /* potential tag */
+  char patt[MAX_TAG_LEN+1];   /* potential attributes */
+  char *buffer = NULL;
+  char *ptr;
+  char *end;
+  union {
+    ssize_t sig;
+     size_t uns;
+  } len;
+  size_t bufsize = 0;
+  size_t outalloc = 256;
+  int in_wanted_part = 0;
+  int base64 = 0;
+  int error;
+
+  enum {
+    STATE_OUTSIDE = 0,
+    STATE_OUTER   = 1,
+    STATE_INMAIN  = 2,
+    STATE_INSUB   = 3,
+    STATE_ILLEGAL = 4
+  } state = STATE_OUTSIDE;
+
+  *outlen = 0;
+  *outbuf = malloc(outalloc);
+  if(!*outbuf)
+    return GPE_OUT_OF_MEMORY;
+  *(*outbuf) = '\0';
+
+  couter[0] = cmain[0] = csub[0] = ptag[0] = patt[0] = '\0';
+
+  while((error = readline(&buffer, &bufsize, stream)) == GPE_OK) {
+
+    ptr = buffer;
+    EAT_SPACE(ptr);
+
+    if('<' != *ptr) {
+      if(in_wanted_part) {
+        show(("=> %s", buffer));
+        error = appenddata(outbuf, outlen, &outalloc, buffer, base64);
+        if(error)
+          break;
+      }
+      continue;
+    }
+
+    ptr++;
+
+    if('/' == *ptr) {
+      /*
+      ** closing section tag
+      */
+
+      ptr++;
+      end = ptr;
+      EAT_WORD(end);
+      len.sig = end - ptr;
+      if(len.sig > MAX_TAG_LEN) {
+        error = GPE_NO_BUFFER_SPACE;
+        break;
+      }
+      memcpy(ptag, ptr, len.uns);
+      ptag[len.uns] = '\0';
+
+      if((STATE_INSUB == state) && !strcmp(csub, ptag)) {
+        /* end of current sub section */
+        state = STATE_INMAIN;
+        csub[0] = '\0';
+        if(in_wanted_part) {
+          /* end of wanted part */
+          in_wanted_part = 0;
+
+          /* Do we need to base64 decode the data? */
+          if(base64) {
+            error = decodedata(outbuf, outlen);
+            if(error)
+              return error;
+          }
+          break;
+        }
+      }
+      else if((STATE_INMAIN == state) && !strcmp(cmain, ptag)) {
+        /* end of current main section */
+        state = STATE_OUTER;
+        cmain[0] = '\0';
+        if(in_wanted_part) {
+          /* end of wanted part */
+          in_wanted_part = 0;
+
+          /* Do we need to base64 decode the data? */
+          if(base64) {
+            error = decodedata(outbuf, outlen);
+            if(error)
+              return error;
+          }
+          break;
+        }
+      }
+      else if((STATE_OUTER == state) && !strcmp(couter, ptag)) {
+        /* end of outermost file section */
+        state = STATE_OUTSIDE;
+        couter[0] = '\0';
+        if(in_wanted_part) {
+          /* end of wanted part */
+          in_wanted_part = 0;
+          break;
+        }
+      }
+
+    }
+    else if(!in_wanted_part) {
+      /*
+      ** opening section tag
+      */
+
+      /* get potential tag */
+      end = ptr;
+      EAT_WORD(end);
+      len.sig = end - ptr;
+      if(len.sig > MAX_TAG_LEN) {
+        error = GPE_NO_BUFFER_SPACE;
+        break;
+      }
+      memcpy(ptag, ptr, len.uns);
+      ptag[len.uns] = '\0';
+
+      /* ignore comments, doctypes and xml declarations */
+      if(('!' == ptag[0]) || ('?' == ptag[0])) {
+        show(("* ignoring (%s)", buffer));
+        continue;
+      }
+
+      /* get all potential attributes */
+      ptr = end;
+      EAT_SPACE(ptr);
+      end = ptr;
+      while(*end && ('>' != *end))
+        end++;
+      len.sig = end - ptr;
+      if(len.sig > MAX_TAG_LEN) {
+        error = GPE_NO_BUFFER_SPACE;
+        break;
+      }
+      memcpy(patt, ptr, len.uns);
+      patt[len.uns] = '\0';
+
+      if(STATE_OUTSIDE == state) {
+        /* outermost element (<testcase>) */
+        strcpy(couter, ptag);
+        state = STATE_OUTER;
+        continue;
+      }
+      else if(STATE_OUTER == state) {
+        /* start of a main section */
+        strcpy(cmain, ptag);
+        state = STATE_INMAIN;
+        continue;
+      }
+      else if(STATE_INMAIN == state) {
+        /* start of a sub section */
+        strcpy(csub, ptag);
+        state = STATE_INSUB;
+        if(!strcmp(cmain, main) && !strcmp(csub, sub)) {
+          /* start of wanted part */
+          in_wanted_part = 1;
+          if(strstr(patt, "base64="))
+              /* bit rough test, but "mostly" functional, */
+              /* treat wanted part data as base64 encoded */
+              base64 = 1;
+        }
+        continue;
+      }
+
+    }
+
+    if(in_wanted_part) {
+      show(("=> %s", buffer));
+      error = appenddata(outbuf, outlen, &outalloc, buffer, base64);
+      if(error)
+        break;
+    }
+
+  } /* while */
+
+  free(buffer);
+
+  if(error != GPE_OK) {
+    if(error == GPE_END_OF_FILE)
+      error = GPE_OK;
+    else {
+      free(*outbuf);
+      *outbuf = NULL;
+      *outlen = 0;
+    }
+  }
+
+  return error;
+}
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.h b/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.h
new file mode 100644
index 0000000..2773685
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/getpart.h
@@ -0,0 +1,34 @@
+#ifndef HEADER_CURL_SERVER_GETPART_H
+#define HEADER_CURL_SERVER_GETPART_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+#define GPE_NO_BUFFER_SPACE -2
+#define GPE_OUT_OF_MEMORY   -1
+#define GPE_OK               0
+#define GPE_END_OF_FILE      1
+
+int getpart(char **outbuf, size_t *outlen,
+            const char *main, const char *sub, FILE *stream);
+
+#endif /* HEADER_CURL_SERVER_GETPART_H */
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/resolve.c b/ap/lib/libcurl/curl-7.54.1/tests/server/resolve.c
new file mode 100644
index 0000000..206245a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/resolve.c
@@ -0,0 +1,154 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/* Purpose
+ *
+ * Resolve the given name, using system name resolve functions (NOT any
+ * function provided by libcurl). Used to see if the name exists and thus if
+ * we can allow a test case to use it for testing.
+ *
+ * Like if 'localhost' actual exists etc.
+ *
+ */
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef _XOPEN_SOURCE_EXTENDED
+/* This define is "almost" required to build on HPUX 11 */
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "util.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+static bool use_ipv6 = FALSE;
+static const char *ipv_inuse = "IPv4";
+
+const char *serverlogfile=""; /* for a util.c function we don't use */
+
+int main(int argc, char *argv[])
+{
+  int arg=1;
+  const char *host = NULL;
+  int rc = 0;
+
+  while(argc>arg) {
+    if(!strcmp("--version", argv[arg])) {
+      printf("resolve IPv4%s\n",
+#ifdef ENABLE_IPV6
+             "/IPv6"
+#else
+             ""
+#endif
+             );
+      return 0;
+    }
+    else if(!strcmp("--ipv6", argv[arg])) {
+      ipv_inuse = "IPv6";
+      use_ipv6 = TRUE;
+      arg++;
+    }
+    else if(!strcmp("--ipv4", argv[arg])) {
+      /* for completeness, we support this option as well */
+      ipv_inuse = "IPv4";
+      use_ipv6 = FALSE;
+      arg++;
+    }
+    else {
+      host = argv[arg++];
+    }
+  }
+  if(!host) {
+    puts("Usage: resolve [option] <host>\n"
+         " --version\n"
+         " --ipv4"
+#ifdef ENABLE_IPV6
+         "\n --ipv6"
+#endif
+         );
+    return 1;
+  }
+
+#ifdef WIN32
+  win32_init();
+  atexit(win32_cleanup);
+#endif
+
+  if(!use_ipv6) {
+    /* gethostbyname() resolve */
+    struct hostent *he;
+
+    he = gethostbyname(host);
+
+    rc = !he;
+  }
+  else {
+#ifdef ENABLE_IPV6
+    /* Check that the system has IPv6 enabled before checking the resolver */
+    curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
+    if(s == CURL_SOCKET_BAD)
+      /* an IPv6 address was requested and we can't get/use one */
+      rc = -1;
+    else {
+      sclose(s);
+    }
+
+    if(rc == 0) {
+      /* getaddrinfo() resolve */
+      struct addrinfo *ai;
+      struct addrinfo hints;
+
+      memset(&hints, 0, sizeof(hints));
+      hints.ai_family = PF_INET6;
+      hints.ai_socktype = SOCK_STREAM;
+      hints.ai_flags = AI_CANONNAME;
+      /* Use parenthesis around functions to stop them from being replaced by
+         the macro in memdebug.h */
+      rc = (getaddrinfo)(host, "80", &hints, &ai);
+      if(rc == 0)
+        (freeaddrinfo)(ai);
+    }
+
+#else
+    puts("IPv6 support has been disabled in this program");
+    return 1;
+#endif
+  }
+  if(rc)
+    printf("Resolving %s '%s' didn't work\n", ipv_inuse, host);
+
+  return !!rc;
+}
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/rtspd.c b/ap/lib/libcurl/curl-7.54.1/tests/server/rtspd.c
new file mode 100644
index 0000000..ae42f5a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/rtspd.c
@@ -0,0 +1,1483 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/*
+ * curl's test suite Real Time Streaming Protocol (RTSP) server.
+ *
+ * This source file was started based on curl's HTTP test suite server.
+ */
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h> /* for TCP_NODELAY */
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+#include "server_sockaddr.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  ERANGE
+#define ERANGE  34 /* errno.h value */
+#endif
+
+#ifdef ENABLE_IPV6
+static bool use_ipv6 = FALSE;
+#endif
+static const char *ipv_inuse = "IPv4";
+static int serverlogslocked = 0;
+
+#define REQBUFSIZ 150000
+#define REQBUFSIZ_TXT "149999"
+
+static long prevtestno=-1;    /* previous test number we served */
+static long prevpartno=-1;    /* previous part number we served */
+static bool prevbounce=FALSE; /* instructs the server to increase the part
+                                 number for a test in case the identical
+                                 testno+partno request shows up again */
+
+#define RCMD_NORMALREQ 0 /* default request, use the tests file normally */
+#define RCMD_IDLE      1 /* told to sit idle */
+#define RCMD_STREAM    2 /* told to stream */
+
+typedef enum {
+  RPROT_NONE = 0,
+  RPROT_RTSP = 1,
+  RPROT_HTTP = 2
+} reqprot_t;
+
+#define SET_RTP_PKT_CHN(p,c)  ((p)[1] = (unsigned char)((c) & 0xFF))
+
+#define SET_RTP_PKT_LEN(p,l) (((p)[2] = (unsigned char)(((l) >> 8) & 0xFF)), \
+                              ((p)[3] = (unsigned char)((l) & 0xFF)))
+
+struct httprequest {
+  char reqbuf[REQBUFSIZ]; /* buffer area for the incoming request */
+  size_t checkindex; /* where to start checking of the request */
+  size_t offset;     /* size of the incoming request */
+  long testno;       /* test number found in the request */
+  long partno;       /* part number found in the request */
+  bool open;      /* keep connection open info, as found in the request */
+  bool auth_req;  /* authentication required, don't wait for body unless
+                     there's an Authorization header */
+  bool auth;      /* Authorization header present in the incoming request */
+  size_t cl;      /* Content-Length of the incoming request */
+  bool digest;    /* Authorization digest header found */
+  bool ntlm;      /* Authorization ntlm header found */
+  int pipe;       /* if non-zero, expect this many requests to do a "piped"
+                     request/response */
+  int skip;       /* if non-zero, the server is instructed to not read this
+                     many bytes from a PUT/POST request. Ie the client sends N
+                     bytes said in Content-Length, but the server only reads N
+                     - skip bytes. */
+  int rcmd;       /* doing a special command, see defines above */
+  reqprot_t protocol; /* request protocol, HTTP or RTSP */
+  int prot_version;   /* HTTP or RTSP version (major*10 + minor) */
+  bool pipelining;    /* true if request is pipelined */
+  char *rtp_buffer;
+  size_t rtp_buffersize;
+};
+
+static int ProcessRequest(struct httprequest *req);
+static void storerequest(char *reqbuf, size_t totalsize);
+
+#define DEFAULT_PORT 8999
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/rtspd.log"
+#endif
+
+const char *serverlogfile = DEFAULT_LOGFILE;
+
+#define RTSPDVERSION "curl test suite RTSP server/0.1"
+
+#define REQUEST_DUMP  "log/server.input"
+#define RESPONSE_DUMP "log/server.response"
+
+/* very-big-path support */
+#define MAXDOCNAMELEN 140000
+#define MAXDOCNAMELEN_TXT "139999"
+
+#define REQUEST_KEYWORD_SIZE 256
+#define REQUEST_KEYWORD_SIZE_TXT "255"
+
+#define CMD_AUTH_REQUIRED "auth_required"
+
+/* 'idle' means that it will accept the request fine but never respond
+   any data. Just keep the connection alive. */
+#define CMD_IDLE "idle"
+
+/* 'stream' means to send a never-ending stream of data */
+#define CMD_STREAM "stream"
+
+#define END_OF_HEADERS "\r\n\r\n"
+
+enum {
+  DOCNUMBER_NOTHING = -7,
+  DOCNUMBER_QUIT    = -6,
+  DOCNUMBER_BADCONNECT = -5,
+  DOCNUMBER_INTERNAL= -4,
+  DOCNUMBER_CONNECT = -3,
+  DOCNUMBER_WERULEZ = -2,
+  DOCNUMBER_404     = -1
+};
+
+
+/* sent as reply to a QUIT */
+static const char *docquit =
+"HTTP/1.1 200 Goodbye" END_OF_HEADERS;
+
+/* sent as reply to a CONNECT */
+static const char *docconnect =
+"HTTP/1.1 200 Mighty fine indeed" END_OF_HEADERS;
+
+/* sent as reply to a "bad" CONNECT */
+static const char *docbadconnect =
+"HTTP/1.1 501 Forbidden you fool" END_OF_HEADERS;
+
+/* send back this on HTTP 404 file not found */
+static const char *doc404_HTTP = "HTTP/1.1 404 Not Found\r\n"
+    "Server: " RTSPDVERSION "\r\n"
+    "Connection: close\r\n"
+    "Content-Type: text/html"
+    END_OF_HEADERS
+    "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
+    "<HTML><HEAD>\n"
+    "<TITLE>404 Not Found</TITLE>\n"
+    "</HEAD><BODY>\n"
+    "<H1>Not Found</H1>\n"
+    "The requested URL was not found on this server.\n"
+    "<P><HR><ADDRESS>" RTSPDVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
+
+/* send back this on RTSP 404 file not found */
+static const char *doc404_RTSP = "RTSP/1.0 404 Not Found\r\n"
+    "Server: " RTSPDVERSION
+    END_OF_HEADERS;
+
+/* Default size to send away fake RTP data */
+#define RTP_DATA_SIZE 12
+static const char *RTP_DATA = "$_1234\n\0asdf";
+
+/* do-nothing macro replacement for systems which lack siginterrupt() */
+
+#ifndef HAVE_SIGINTERRUPT
+#define siginterrupt(x,y) do {} while(0)
+#endif
+
+/* vars used to keep around previous signal handlers */
+
+typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+
+#ifdef SIGHUP
+static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGPIPE
+static SIGHANDLER_T old_sigpipe_handler = SIG_ERR;
+#endif
+
+#ifdef SIGALRM
+static SIGHANDLER_T old_sigalrm_handler = SIG_ERR;
+#endif
+
+#ifdef SIGINT
+static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGTERM
+static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
+#endif
+
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
+/* var which if set indicates that the program should finish execution */
+
+SIG_ATOMIC_T got_exit_signal = 0;
+
+/* if next is set indicates the first signal handled in exit_signal_handler */
+
+static volatile int exit_signal = 0;
+
+/* signal handler that will be triggered to indicate that the program
+  should finish its execution in a controlled manner as soon as possible.
+  The first time this is called it will set got_exit_signal to one and
+  store in exit_signal the signal that triggered its execution. */
+
+static RETSIGTYPE exit_signal_handler(int signum)
+{
+  int old_errno = errno;
+  if(got_exit_signal == 0) {
+    got_exit_signal = 1;
+    exit_signal = signum;
+  }
+  (void)signal(signum, exit_signal_handler);
+  errno = old_errno;
+}
+
+static void install_signal_handlers(void)
+{
+#ifdef SIGHUP
+  /* ignore SIGHUP signal */
+  old_sighup_handler = signal(SIGHUP, SIG_IGN);
+  if(old_sighup_handler == SIG_ERR)
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
+#endif
+#ifdef SIGPIPE
+  /* ignore SIGPIPE signal */
+  old_sigpipe_handler = signal(SIGPIPE, SIG_IGN);
+  if(old_sigpipe_handler == SIG_ERR)
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
+#endif
+#ifdef SIGALRM
+  /* ignore SIGALRM signal */
+  old_sigalrm_handler = signal(SIGALRM, SIG_IGN);
+  if(old_sigalrm_handler == SIG_ERR)
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
+#endif
+#ifdef SIGINT
+  /* handle SIGINT signal with our exit_signal_handler */
+  old_sigint_handler = signal(SIGINT, exit_signal_handler);
+  if(old_sigint_handler == SIG_ERR)
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGINT, 1);
+#endif
+#ifdef SIGTERM
+  /* handle SIGTERM signal with our exit_signal_handler */
+  old_sigterm_handler = signal(SIGTERM, exit_signal_handler);
+  if(old_sigterm_handler == SIG_ERR)
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGTERM, 1);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler);
+  if(old_sigbreak_handler == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
+}
+
+static void restore_signal_handlers(void)
+{
+#ifdef SIGHUP
+  if(SIG_ERR != old_sighup_handler)
+    (void)signal(SIGHUP, old_sighup_handler);
+#endif
+#ifdef SIGPIPE
+  if(SIG_ERR != old_sigpipe_handler)
+    (void)signal(SIGPIPE, old_sigpipe_handler);
+#endif
+#ifdef SIGALRM
+  if(SIG_ERR != old_sigalrm_handler)
+    (void)signal(SIGALRM, old_sigalrm_handler);
+#endif
+#ifdef SIGINT
+  if(SIG_ERR != old_sigint_handler)
+    (void)signal(SIGINT, old_sigint_handler);
+#endif
+#ifdef SIGTERM
+  if(SIG_ERR != old_sigterm_handler)
+    (void)signal(SIGTERM, old_sigterm_handler);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+static int ProcessRequest(struct httprequest *req)
+{
+  char *line=&req->reqbuf[req->checkindex];
+  bool chunked = FALSE;
+  static char request[REQUEST_KEYWORD_SIZE];
+  static char doc[MAXDOCNAMELEN];
+  static char prot_str[5];
+  char logbuf[256];
+  int prot_major, prot_minor;
+  char *end;
+  int error;
+  end = strstr(line, END_OF_HEADERS);
+
+  logmsg("ProcessRequest() called with testno %ld and line [%s]",
+         req->testno, line);
+
+  /* try to figure out the request characteristics as soon as possible, but
+     only once! */
+  if((req->testno == DOCNUMBER_NOTHING) &&
+     sscanf(line,
+            "%" REQUEST_KEYWORD_SIZE_TXT"s %" MAXDOCNAMELEN_TXT "s %4s/%d.%d",
+            request,
+            doc,
+            prot_str,
+            &prot_major,
+            &prot_minor) == 5) {
+    char *ptr;
+
+    if(!strcmp(prot_str, "HTTP")) {
+      req->protocol = RPROT_HTTP;
+    }
+    else if(!strcmp(prot_str, "RTSP")) {
+      req->protocol = RPROT_RTSP;
+    }
+    else {
+      req->protocol = RPROT_NONE;
+      logmsg("got unknown protocol %s", prot_str);
+      return 1;
+    }
+
+    req->prot_version = prot_major*10 + prot_minor;
+
+    /* find the last slash */
+    ptr = strrchr(doc, '/');
+
+    /* get the number after it */
+    if(ptr) {
+      FILE *stream;
+      char *filename;
+
+      if((strlen(doc) + strlen(request)) < 200)
+        snprintf(logbuf, sizeof(logbuf), "Got request: %s %s %s/%d.%d",
+                 request, doc, prot_str, prot_major, prot_minor);
+      else
+        snprintf(logbuf, sizeof(logbuf), "Got a *HUGE* request %s/%d.%d",
+                prot_str, prot_major, prot_minor);
+      logmsg("%s", logbuf);
+
+      if(!strncmp("/verifiedserver", ptr, 15)) {
+        logmsg("Are-we-friendly question received");
+        req->testno = DOCNUMBER_WERULEZ;
+        return 1; /* done */
+      }
+
+      if(!strncmp("/quit", ptr, 5)) {
+        logmsg("Request-to-quit received");
+        req->testno = DOCNUMBER_QUIT;
+        return 1; /* done */
+      }
+
+      ptr++; /* skip the slash */
+
+      /* skip all non-numericals following the slash */
+      while(*ptr && !ISDIGIT(*ptr))
+        ptr++;
+
+      req->testno = strtol(ptr, &ptr, 10);
+
+      if(req->testno > 10000) {
+        req->partno = req->testno % 10000;
+        req->testno /= 10000;
+      }
+      else
+        req->partno = 0;
+
+      snprintf(logbuf, sizeof(logbuf), "Requested test number %ld part %ld",
+               req->testno, req->partno);
+      logmsg("%s", logbuf);
+
+      filename = test2file(req->testno);
+
+      stream=fopen(filename, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", filename);
+        logmsg("Couldn't open test file %ld", req->testno);
+        req->open = FALSE; /* closes connection */
+        return 1; /* done */
+      }
+      else {
+        char *cmd = NULL;
+        size_t cmdsize = 0;
+        int num=0;
+
+        int rtp_channel = 0;
+        int rtp_size = 0;
+        int rtp_partno = -1;
+        int i = 0;
+        char *rtp_scratch = NULL;
+
+        /* get the custom server control "commands" */
+        error = getpart(&cmd, &cmdsize, "reply", "servercmd", stream);
+        fclose(stream);
+        if(error) {
+          logmsg("getpart() failed with error: %d", error);
+          req->open = FALSE; /* closes connection */
+          return 1; /* done */
+        }
+        ptr = cmd;
+
+        if(cmdsize) {
+          logmsg("Found a reply-servercmd section!");
+          do {
+            if(!strncmp(CMD_AUTH_REQUIRED, ptr, strlen(CMD_AUTH_REQUIRED))) {
+              logmsg("instructed to require authorization header");
+              req->auth_req = TRUE;
+            }
+            else if(!strncmp(CMD_IDLE, ptr, strlen(CMD_IDLE))) {
+              logmsg("instructed to idle");
+              req->rcmd = RCMD_IDLE;
+              req->open = TRUE;
+            }
+            else if(!strncmp(CMD_STREAM, ptr, strlen(CMD_STREAM))) {
+              logmsg("instructed to stream");
+              req->rcmd = RCMD_STREAM;
+            }
+            else if(1 == sscanf(ptr, "pipe: %d", &num)) {
+              logmsg("instructed to allow a pipe size of %d", num);
+              if(num < 0)
+                logmsg("negative pipe size ignored");
+              else if(num > 0)
+                req->pipe = num-1; /* decrease by one since we don't count the
+                                      first request in this number */
+            }
+            else if(1 == sscanf(ptr, "skip: %d", &num)) {
+              logmsg("instructed to skip this number of bytes %d", num);
+              req->skip = num;
+            }
+            else if(3 == sscanf(ptr, "rtp: part %d channel %d size %d",
+                                &rtp_partno, &rtp_channel, &rtp_size)) {
+
+              if(rtp_partno == req->partno) {
+                logmsg("RTP: part %d channel %d size %d",
+                       rtp_partno, rtp_channel, rtp_size);
+
+                /* Make our scratch buffer enough to fit all the
+                 * desired data and one for padding */
+                rtp_scratch = malloc(rtp_size + 4 + RTP_DATA_SIZE);
+
+                /* RTP is signalled with a $ */
+                rtp_scratch[0] = '$';
+
+                /* The channel follows and is one byte */
+                SET_RTP_PKT_CHN(rtp_scratch, rtp_channel);
+
+                /* Length follows and is a two byte short in network order */
+                SET_RTP_PKT_LEN(rtp_scratch, rtp_size);
+
+                /* Fill it with junk data */
+                for(i = 0; i < rtp_size; i+= RTP_DATA_SIZE) {
+                  memcpy(rtp_scratch + 4 + i, RTP_DATA, RTP_DATA_SIZE);
+                }
+
+                if(req->rtp_buffer == NULL) {
+                  req->rtp_buffer = rtp_scratch;
+                  req->rtp_buffersize = rtp_size + 4;
+                }
+                else {
+                  req->rtp_buffer = realloc(req->rtp_buffer,
+                                            req->rtp_buffersize +
+                                            rtp_size + 4);
+                  memcpy(req->rtp_buffer + req->rtp_buffersize, rtp_scratch,
+                         rtp_size + 4);
+                  req->rtp_buffersize += rtp_size + 4;
+                  free(rtp_scratch);
+                }
+                logmsg("rtp_buffersize is %zu, rtp_size is %d.",
+                       req->rtp_buffersize, rtp_size);
+              }
+            }
+            else {
+              logmsg("funny instruction found: %s", ptr);
+            }
+
+            ptr = strchr(ptr, '\n');
+            if(ptr)
+              ptr++;
+            else
+              ptr = NULL;
+          } while(ptr && *ptr);
+          logmsg("Done parsing server commands");
+        }
+        free(cmd);
+      }
+    }
+    else {
+      if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
+                doc, &prot_major, &prot_minor) == 3) {
+        snprintf(logbuf, sizeof(logbuf),
+                 "Received a CONNECT %s HTTP/%d.%d request",
+                 doc, prot_major, prot_minor);
+        logmsg("%s", logbuf);
+
+        if(req->prot_version == 10)
+          req->open = FALSE; /* HTTP 1.0 closes connection by default */
+
+        if(!strncmp(doc, "bad", 3))
+          /* if the host name starts with bad, we fake an error here */
+          req->testno = DOCNUMBER_BADCONNECT;
+        else if(!strncmp(doc, "test", 4)) {
+          /* if the host name starts with test, the port number used in the
+             CONNECT line will be used as test number! */
+          char *portp = strchr(doc, ':');
+          if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
+            req->testno = strtol(portp+1, NULL, 10);
+          else
+            req->testno = DOCNUMBER_CONNECT;
+        }
+        else
+          req->testno = DOCNUMBER_CONNECT;
+      }
+      else {
+        logmsg("Did not find test number in PATH");
+        req->testno = DOCNUMBER_404;
+      }
+    }
+  }
+
+  if(!end) {
+    /* we don't have a complete request yet! */
+    logmsg("ProcessRequest returned without a complete request");
+    return 0; /* not complete yet */
+  }
+  logmsg("ProcessRequest found a complete request");
+
+  if(req->pipe)
+    /* we do have a full set, advance the checkindex to after the end of the
+       headers, for the pipelining case mostly */
+    req->checkindex += (end - line) + strlen(END_OF_HEADERS);
+
+  /* **** Persistence ****
+   *
+   * If the request is a HTTP/1.0 one, we close the connection unconditionally
+   * when we're done.
+   *
+   * If the request is a HTTP/1.1 one, we MUST check for a "Connection:"
+   * header that might say "close". If it does, we close a connection when
+   * this request is processed. Otherwise, we keep the connection alive for X
+   * seconds.
+   */
+
+  do {
+    if(got_exit_signal)
+      return 1; /* done */
+
+    if((req->cl==0) && strncasecompare("Content-Length:", line, 15)) {
+      /* If we don't ignore content-length, we read it and we read the whole
+         request including the body before we return. If we've been told to
+         ignore the content-length, we will return as soon as all headers
+         have been received */
+      char *endptr;
+      char *ptr = line + 15;
+      unsigned long clen = 0;
+      while(*ptr && ISSPACE(*ptr))
+        ptr++;
+      endptr = ptr;
+      errno = 0;
+      clen = strtoul(ptr, &endptr, 10);
+      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
+        /* this assumes that a zero Content-Length is valid */
+        logmsg("Found invalid Content-Length: (%s) in the request", ptr);
+        req->open = FALSE; /* closes connection */
+        return 1; /* done */
+      }
+      req->cl = clen - req->skip;
+
+      logmsg("Found Content-Length: %lu in the request", clen);
+      if(req->skip)
+        logmsg("... but will abort after %zu bytes", req->cl);
+      break;
+    }
+    else if(strncasecompare("Transfer-Encoding: chunked", line,
+                            strlen("Transfer-Encoding: chunked"))) {
+      /* chunked data coming in */
+      chunked = TRUE;
+    }
+
+    if(chunked) {
+      if(strstr(req->reqbuf, "\r\n0\r\n\r\n"))
+        /* end of chunks reached */
+        return 1; /* done */
+      else
+        return 0; /* not done */
+    }
+
+    line = strchr(line, '\n');
+    if(line)
+      line++;
+
+  } while(line);
+
+  if(!req->auth && strstr(req->reqbuf, "Authorization:")) {
+    req->auth = TRUE; /* Authorization: header present! */
+    if(req->auth_req)
+      logmsg("Authorization header found, as required");
+  }
+
+  if(!req->digest && strstr(req->reqbuf, "Authorization: Digest")) {
+    /* If the client is passing this Digest-header, we set the part number
+       to 1000. Not only to spice up the complexity of this, but to make
+       Digest stuff to work in the test suite. */
+    req->partno += 1000;
+    req->digest = TRUE; /* header found */
+    logmsg("Received Digest request, sending back data %ld", req->partno);
+  }
+  else if(!req->ntlm &&
+          strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAD")) {
+    /* If the client is passing this type-3 NTLM header */
+    req->partno += 1002;
+    req->ntlm = TRUE; /* NTLM found */
+    logmsg("Received NTLM type-3, sending back data %ld", req->partno);
+    if(req->cl) {
+      logmsg("  Expecting %zu POSTed bytes", req->cl);
+    }
+  }
+  else if(!req->ntlm &&
+          strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAB")) {
+    /* If the client is passing this type-1 NTLM header */
+    req->partno += 1001;
+    req->ntlm = TRUE; /* NTLM found */
+    logmsg("Received NTLM type-1, sending back data %ld", req->partno);
+  }
+  else if((req->partno >= 1000) &&
+          strstr(req->reqbuf, "Authorization: Basic")) {
+    /* If the client is passing this Basic-header and the part number is
+       already >=1000, we add 1 to the part number.  This allows simple Basic
+       authentication negotiation to work in the test suite. */
+    req->partno += 1;
+    logmsg("Received Basic request, sending back data %ld", req->partno);
+  }
+  if(strstr(req->reqbuf, "Connection: close"))
+    req->open = FALSE; /* close connection after this request */
+
+  if(!req->pipe &&
+     req->open &&
+     req->prot_version >= 11 &&
+     end &&
+     req->reqbuf + req->offset > end + strlen(END_OF_HEADERS) &&
+     (!strncmp(req->reqbuf, "GET", strlen("GET")) ||
+      !strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) {
+    /* If we have a persistent connection, HTTP version >= 1.1
+       and GET/HEAD request, enable pipelining. */
+    req->checkindex = (end - req->reqbuf) + strlen(END_OF_HEADERS);
+    req->pipelining = TRUE;
+  }
+
+  while(req->pipe) {
+    if(got_exit_signal)
+      return 1; /* done */
+    /* scan for more header ends within this chunk */
+    line = &req->reqbuf[req->checkindex];
+    end = strstr(line, END_OF_HEADERS);
+    if(!end)
+      break;
+    req->checkindex += (end - line) + strlen(END_OF_HEADERS);
+    req->pipe--;
+  }
+
+  /* If authentication is required and no auth was provided, end now. This
+     makes the server NOT wait for PUT/POST data and you can then make the
+     test case send a rejection before any such data has been sent. Test case
+     154 uses this.*/
+  if(req->auth_req && !req->auth)
+    return 1; /* done */
+
+  if(req->cl > 0) {
+    if(req->cl <= req->offset - (end - req->reqbuf) - strlen(END_OF_HEADERS))
+      return 1; /* done */
+    else
+      return 0; /* not complete yet */
+  }
+
+  return 1; /* done */
+}
+
+/* store the entire request in a file */
+static void storerequest(char *reqbuf, size_t totalsize)
+{
+  int res;
+  int error = 0;
+  size_t written;
+  size_t writeleft;
+  FILE *dump;
+
+  if(reqbuf == NULL)
+    return;
+  if(totalsize == 0)
+    return;
+
+  do {
+    dump = fopen(REQUEST_DUMP, "ab");
+  } while((dump == NULL) && ((error = errno) == EINTR));
+  if(dump == NULL) {
+    logmsg("Error opening file %s error: %d %s",
+           REQUEST_DUMP, error, strerror(error));
+    logmsg("Failed to write request input to " REQUEST_DUMP);
+    return;
+  }
+
+  writeleft = totalsize;
+  do {
+    written = fwrite(&reqbuf[totalsize-writeleft],
+                     1, writeleft, dump);
+    if(got_exit_signal)
+      goto storerequest_cleanup;
+    if(written > 0)
+      writeleft -= written;
+  } while((writeleft > 0) && ((error = errno) == EINTR));
+
+  if(writeleft == 0)
+    logmsg("Wrote request (%zu bytes) input to " REQUEST_DUMP, totalsize);
+  else if(writeleft > 0) {
+    logmsg("Error writing file %s error: %d %s",
+           REQUEST_DUMP, error, strerror(error));
+    logmsg("Wrote only (%zu bytes) of (%zu bytes) request input to %s",
+           totalsize-writeleft, totalsize, REQUEST_DUMP);
+  }
+
+storerequest_cleanup:
+
+  do {
+    res = fclose(dump);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error closing file %s error: %d %s",
+           REQUEST_DUMP, error, strerror(error));
+}
+
+/* return 0 on success, non-zero on failure */
+static int get_request(curl_socket_t sock, struct httprequest *req)
+{
+  int error;
+  int fail = 0;
+  int done_processing = 0;
+  char *reqbuf = req->reqbuf;
+  ssize_t got = 0;
+
+  char *pipereq = NULL;
+  size_t pipereq_length = 0;
+
+  if(req->pipelining) {
+    pipereq = reqbuf + req->checkindex;
+    pipereq_length = req->offset - req->checkindex;
+  }
+
+  /*** Init the httprequest structure properly for the upcoming request ***/
+
+  req->checkindex = 0;
+  req->offset = 0;
+  req->testno = DOCNUMBER_NOTHING;
+  req->partno = 0;
+  req->open = TRUE;
+  req->auth_req = FALSE;
+  req->auth = FALSE;
+  req->cl = 0;
+  req->digest = FALSE;
+  req->ntlm = FALSE;
+  req->pipe = 0;
+  req->skip = 0;
+  req->rcmd = RCMD_NORMALREQ;
+  req->protocol = RPROT_NONE;
+  req->prot_version = 0;
+  req->pipelining = FALSE;
+  req->rtp_buffer = NULL;
+  req->rtp_buffersize = 0;
+
+  /*** end of httprequest init ***/
+
+  while(!done_processing && (req->offset < REQBUFSIZ-1)) {
+    if(pipereq_length && pipereq) {
+      memmove(reqbuf, pipereq, pipereq_length);
+      got = curlx_uztosz(pipereq_length);
+      pipereq_length = 0;
+    }
+    else {
+      if(req->skip)
+        /* we are instructed to not read the entire thing, so we make sure to
+           only read what we're supposed to and NOT read the enire thing the
+           client wants to send! */
+        got = sread(sock, reqbuf + req->offset, req->cl);
+      else
+        got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset);
+    }
+    if(got_exit_signal)
+      return 1;
+    if(got == 0) {
+      logmsg("Connection closed by client");
+      fail = 1;
+    }
+    else if(got < 0) {
+      error = SOCKERRNO;
+      logmsg("recv() returned error: (%d) %s", error, strerror(error));
+      fail = 1;
+    }
+    if(fail) {
+      /* dump the request received so far to the external file */
+      reqbuf[req->offset] = '\0';
+      storerequest(reqbuf, req->offset);
+      return 1;
+    }
+
+    logmsg("Read %zd bytes", got);
+
+    req->offset += (size_t)got;
+    reqbuf[req->offset] = '\0';
+
+    done_processing = ProcessRequest(req);
+    if(got_exit_signal)
+      return 1;
+    if(done_processing && req->pipe) {
+      logmsg("Waiting for another piped request");
+      done_processing = 0;
+      req->pipe--;
+    }
+  }
+
+  if((req->offset == REQBUFSIZ-1) && (got > 0)) {
+    logmsg("Request would overflow buffer, closing connection");
+    /* dump request received so far to external file anyway */
+    reqbuf[REQBUFSIZ-1] = '\0';
+    fail = 1;
+  }
+  else if(req->offset > REQBUFSIZ-1) {
+    logmsg("Request buffer overflow, closing connection");
+    /* dump request received so far to external file anyway */
+    reqbuf[REQBUFSIZ-1] = '\0';
+    fail = 1;
+  }
+  else
+    reqbuf[req->offset] = '\0';
+
+  /* dump the request to an external file */
+  storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
+  if(got_exit_signal)
+    return 1;
+
+  return fail; /* return 0 on success */
+}
+
+/* returns -1 on failure */
+static int send_doc(curl_socket_t sock, struct httprequest *req)
+{
+  ssize_t written;
+  size_t count;
+  const char *buffer;
+  char *ptr=NULL;
+  FILE *stream;
+  char *cmd=NULL;
+  size_t cmdsize=0;
+  FILE *dump;
+  bool persistant = TRUE;
+  bool sendfailure = FALSE;
+  size_t responsesize;
+  int error = 0;
+  int res;
+
+  static char weare[256];
+
+  char partbuf[80]="data";
+
+  logmsg("Send response number %ld part %ld", req->testno, req->partno);
+
+  switch(req->rcmd) {
+  default:
+  case RCMD_NORMALREQ:
+    break; /* continue with business as usual */
+  case RCMD_STREAM:
+#define STREAMTHIS "a string to stream 01234567890\n"
+    count = strlen(STREAMTHIS);
+    for(;;) {
+      written = swrite(sock, STREAMTHIS, count);
+      if(got_exit_signal)
+        return -1;
+      if(written != (ssize_t)count) {
+        logmsg("Stopped streaming");
+        break;
+      }
+    }
+    return -1;
+  case RCMD_IDLE:
+    /* Do nothing. Sit idle. Pretend it rains. */
+    return 0;
+  }
+
+  req->open = FALSE;
+
+  if(req->testno < 0) {
+    size_t msglen;
+    char msgbuf[64];
+
+    switch(req->testno) {
+    case DOCNUMBER_QUIT:
+      logmsg("Replying to QUIT");
+      buffer = docquit;
+      break;
+    case DOCNUMBER_WERULEZ:
+      /* we got a "friends?" question, reply back that we sure are */
+      logmsg("Identifying ourselves as friends");
+      snprintf(msgbuf, sizeof(msgbuf), "RTSP_SERVER WE ROOLZ: %ld\r\n",
+               (long)getpid());
+      msglen = strlen(msgbuf);
+      snprintf(weare, sizeof(weare),
+               "HTTP/1.1 200 OK\r\nContent-Length: %zu\r\n\r\n%s",
+               msglen, msgbuf);
+      buffer = weare;
+      break;
+    case DOCNUMBER_INTERNAL:
+      logmsg("Bailing out due to internal error");
+      return -1;
+    case DOCNUMBER_CONNECT:
+      logmsg("Replying to CONNECT");
+      buffer = docconnect;
+      break;
+    case DOCNUMBER_BADCONNECT:
+      logmsg("Replying to a bad CONNECT");
+      buffer = docbadconnect;
+      break;
+    case DOCNUMBER_404:
+    default:
+      logmsg("Replying to with a 404");
+      if(req->protocol == RPROT_HTTP) {
+        buffer = doc404_HTTP;
+      }
+      else {
+        buffer = doc404_RTSP;
+      }
+      break;
+    }
+
+    count = strlen(buffer);
+  }
+  else {
+    char *filename = test2file(req->testno);
+
+    if(0 != req->partno)
+      snprintf(partbuf, sizeof(partbuf), "data%ld", req->partno);
+
+    stream=fopen(filename, "rb");
+    if(!stream) {
+      error = errno;
+      logmsg("fopen() failed with error: %d %s", error, strerror(error));
+      logmsg("Error opening file: %s", filename);
+      logmsg("Couldn't open test file");
+      return 0;
+    }
+    else {
+      error = getpart(&ptr, &count, "reply", partbuf, stream);
+      fclose(stream);
+      if(error) {
+        logmsg("getpart() failed with error: %d", error);
+        return 0;
+      }
+      buffer = ptr;
+    }
+
+    if(got_exit_signal) {
+      free(ptr);
+      return -1;
+    }
+
+    /* re-open the same file again */
+    stream=fopen(filename, "rb");
+    if(!stream) {
+      error = errno;
+      logmsg("fopen() failed with error: %d %s", error, strerror(error));
+      logmsg("Error opening file: %s", filename);
+      logmsg("Couldn't open test file");
+      free(ptr);
+      return 0;
+    }
+    else {
+      /* get the custom server control "commands" */
+      error = getpart(&cmd, &cmdsize, "reply", "postcmd", stream);
+      fclose(stream);
+      if(error) {
+        logmsg("getpart() failed with error: %d", error);
+        free(ptr);
+        return 0;
+      }
+    }
+  }
+
+  if(got_exit_signal) {
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  /* If the word 'swsclose' is present anywhere in the reply chunk, the
+     connection will be closed after the data has been sent to the requesting
+     client... */
+  if(strstr(buffer, "swsclose") || !count) {
+    persistant = FALSE;
+    logmsg("connection close instruction \"swsclose\" found in response");
+  }
+  if(strstr(buffer, "swsbounce")) {
+    prevbounce = TRUE;
+    logmsg("enable \"swsbounce\" in the next request");
+  }
+  else
+    prevbounce = FALSE;
+
+  dump = fopen(RESPONSE_DUMP, "ab");
+  if(!dump) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", RESPONSE_DUMP);
+    logmsg("couldn't create logfile: " RESPONSE_DUMP);
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  responsesize = count;
+  do {
+    /* Ok, we send no more than 200 bytes at a time, just to make sure that
+       larger chunks are split up so that the client will need to do multiple
+       recv() calls to get it and thus we exercise that code better */
+    size_t num = count;
+    if(num > 200)
+      num = 200;
+    written = swrite(sock, buffer, num);
+    if(written < 0) {
+      sendfailure = TRUE;
+      break;
+    }
+    else {
+      logmsg("Sent off %zd bytes", written);
+    }
+    /* write to file as well */
+    fwrite(buffer, 1, (size_t)written, dump);
+    if(got_exit_signal)
+      break;
+
+    count -= written;
+    buffer += written;
+  } while(count>0);
+
+  /* Send out any RTP data */
+  if(req->rtp_buffer) {
+    logmsg("About to write %zu RTP bytes", req->rtp_buffersize);
+    count = req->rtp_buffersize;
+    do {
+      size_t num = count;
+      if(num > 200)
+        num = 200;
+      written = swrite(sock, req->rtp_buffer + (req->rtp_buffersize - count),
+                       num);
+      if(written < 0) {
+        sendfailure = TRUE;
+        break;
+      }
+      count -= written;
+    } while(count > 0);
+
+    free(req->rtp_buffer);
+    req->rtp_buffersize = 0;
+  }
+
+  do {
+    res = fclose(dump);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error closing file %s error: %d %s",
+           RESPONSE_DUMP, error, strerror(error));
+
+  if(got_exit_signal) {
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  if(sendfailure) {
+    logmsg("Sending response failed. Only (%zu bytes) of "
+           "(%zu bytes) were sent",
+           responsesize-count, responsesize);
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP,
+         responsesize);
+  free(ptr);
+
+  if(cmdsize > 0) {
+    char command[32];
+    int quarters;
+    int num;
+    ptr=cmd;
+    do {
+      if(2 == sscanf(ptr, "%31s %d", command, &num)) {
+        if(!strcmp("wait", command)) {
+          logmsg("Told to sleep for %d seconds", num);
+          quarters = num * 4;
+          while(quarters > 0) {
+            quarters--;
+            res = wait_ms(250);
+            if(got_exit_signal)
+              break;
+            if(res) {
+              /* should not happen */
+              error = errno;
+              logmsg("wait_ms() failed with error: (%d) %s",
+                     error, strerror(error));
+              break;
+            }
+          }
+          if(!quarters)
+            logmsg("Continuing after sleeping %d seconds", num);
+        }
+        else
+          logmsg("Unknown command in reply command section");
+      }
+      ptr = strchr(ptr, '\n');
+      if(ptr)
+        ptr++;
+      else
+        ptr = NULL;
+    } while(ptr && *ptr);
+  }
+  free(cmd);
+  req->open = persistant;
+
+  prevtestno = req->testno;
+  prevpartno = req->partno;
+
+  return 0;
+}
+
+
+int main(int argc, char *argv[])
+{
+  srvr_sockaddr_union_t me;
+  curl_socket_t sock = CURL_SOCKET_BAD;
+  curl_socket_t msgsock = CURL_SOCKET_BAD;
+  int wrotepidfile = 0;
+  int flag;
+  unsigned short port = DEFAULT_PORT;
+  const char *pidname = ".rtsp.pid";
+  struct httprequest req;
+  int rc;
+  int error;
+  int arg=1;
+  long pid;
+
+  while(argc>arg) {
+    if(!strcmp("--version", argv[arg])) {
+      printf("rtspd IPv4%s"
+             "\n"
+             ,
+#ifdef ENABLE_IPV6
+             "/IPv6"
+#else
+             ""
+#endif
+             );
+      return 0;
+    }
+    else if(!strcmp("--pidfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        pidname = argv[arg++];
+    }
+    else if(!strcmp("--logfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        serverlogfile = argv[arg++];
+    }
+    else if(!strcmp("--ipv4", argv[arg])) {
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv4";
+      use_ipv6 = FALSE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--ipv6", argv[arg])) {
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv6";
+      use_ipv6 = TRUE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--port", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        char *endptr;
+        unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
+        if((endptr != argv[arg] + strlen(argv[arg])) ||
+           (ulnum < 1025UL) || (ulnum > 65535UL)) {
+          fprintf(stderr, "rtspd: invalid --port argument (%s)\n",
+                  argv[arg]);
+          return 0;
+        }
+        port = curlx_ultous(ulnum);
+        arg++;
+      }
+    }
+    else if(!strcmp("--srcdir", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        path = argv[arg];
+        arg++;
+      }
+    }
+    else {
+      puts("Usage: rtspd [option]\n"
+           " --version\n"
+           " --logfile [file]\n"
+           " --pidfile [file]\n"
+           " --ipv4\n"
+           " --ipv6\n"
+           " --port [port]\n"
+           " --srcdir [path]");
+      return 0;
+    }
+  }
+
+#ifdef WIN32
+  win32_init();
+  atexit(win32_cleanup);
+#endif
+
+  install_signal_handlers();
+
+  pid = (long)getpid();
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6)
+#endif
+    sock = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef ENABLE_IPV6
+  else
+    sock = socket(AF_INET6, SOCK_STREAM, 0);
+#endif
+
+  if(CURL_SOCKET_BAD == sock) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket: (%d) %s",
+           error, strerror(error));
+    goto server_cleanup;
+  }
+
+  flag = 1;
+  if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+            (void *)&flag, sizeof(flag))) {
+    error = SOCKERRNO;
+    logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
+           error, strerror(error));
+    goto server_cleanup;
+  }
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6) {
+#endif
+    memset(&me.sa4, 0, sizeof(me.sa4));
+    me.sa4.sin_family = AF_INET;
+    me.sa4.sin_addr.s_addr = INADDR_ANY;
+    me.sa4.sin_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa4));
+#ifdef ENABLE_IPV6
+  }
+  else {
+    memset(&me.sa6, 0, sizeof(me.sa6));
+    me.sa6.sin6_family = AF_INET6;
+    me.sa6.sin6_addr = in6addr_any;
+    me.sa6.sin6_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa6));
+  }
+#endif /* ENABLE_IPV6 */
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("Error binding socket on port %hu: (%d) %s",
+           port, error, strerror(error));
+    goto server_cleanup;
+  }
+
+  logmsg("Running %s version on port %d", ipv_inuse, (int)port);
+
+  /* start accepting connections */
+  rc = listen(sock, 5);
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("listen() failed with error: (%d) %s",
+           error, strerror(error));
+    goto server_cleanup;
+  }
+
+  /*
+  ** As soon as this server writes its pid file the test harness will
+  ** attempt to connect to this server and initiate its verification.
+  */
+
+  wrotepidfile = write_pidfile(pidname);
+  if(!wrotepidfile)
+    goto server_cleanup;
+
+  for(;;) {
+    msgsock = accept(sock, NULL, NULL);
+
+    if(got_exit_signal)
+      break;
+    if(CURL_SOCKET_BAD == msgsock) {
+      error = SOCKERRNO;
+      logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+             error, strerror(error));
+      break;
+    }
+
+    /*
+    ** As soon as this server acepts a connection from the test harness it
+    ** must set the server logs advisor read lock to indicate that server
+    ** logs should not be read until this lock is removed by this server.
+    */
+
+    set_advisor_read_lock(SERVERLOGS_LOCK);
+    serverlogslocked = 1;
+
+    logmsg("====> Client connect");
+
+#ifdef TCP_NODELAY
+    /*
+     * Disable the Nagle algorithm to make it easier to send out a large
+     * response in many small segments to torture the clients more.
+     */
+    flag = 1;
+    if(setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY,
+                   (void *)&flag, sizeof(flag)) == -1) {
+      logmsg("====> TCP_NODELAY failed");
+    }
+#endif
+
+    /* initialization of httprequest struct is done in get_request(), but due
+       to pipelining treatment the pipelining struct field must be initialized
+       previously to FALSE every time a new connection arrives. */
+
+    req.pipelining = FALSE;
+
+    do {
+      if(got_exit_signal)
+        break;
+
+      if(get_request(msgsock, &req))
+        /* non-zero means error, break out of loop */
+        break;
+
+      if(prevbounce) {
+        /* bounce treatment requested */
+        if((req.testno == prevtestno) &&
+           (req.partno == prevpartno)) {
+          req.partno++;
+          logmsg("BOUNCE part number to %ld", req.partno);
+        }
+        else {
+          prevbounce = FALSE;
+          prevtestno = -1;
+          prevpartno = -1;
+        }
+      }
+
+      send_doc(msgsock, &req);
+      if(got_exit_signal)
+        break;
+
+      if((req.testno < 0) && (req.testno != DOCNUMBER_CONNECT)) {
+        logmsg("special request received, no persistency");
+        break;
+      }
+      if(!req.open) {
+        logmsg("instructed to close connection after server-reply");
+        break;
+      }
+
+      if(req.open)
+        logmsg("=> persistant connection request ended, awaits new request");
+      /* if we got a CONNECT, loop and get another request as well! */
+    } while(req.open || (req.testno == DOCNUMBER_CONNECT));
+
+    if(got_exit_signal)
+      break;
+
+    logmsg("====> Client disconnect");
+    sclose(msgsock);
+    msgsock = CURL_SOCKET_BAD;
+
+    if(serverlogslocked) {
+      serverlogslocked = 0;
+      clear_advisor_read_lock(SERVERLOGS_LOCK);
+    }
+
+    if(req.testno == DOCNUMBER_QUIT)
+      break;
+  }
+
+server_cleanup:
+
+  if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD))
+    sclose(msgsock);
+
+  if(sock != CURL_SOCKET_BAD)
+    sclose(sock);
+
+  if(got_exit_signal)
+    logmsg("signalled to die");
+
+  if(wrotepidfile)
+    unlink(pidname);
+
+  if(serverlogslocked) {
+    serverlogslocked = 0;
+    clear_advisor_read_lock(SERVERLOGS_LOCK);
+  }
+
+  restore_signal_handlers();
+
+  if(got_exit_signal) {
+    logmsg("========> %s rtspd (port: %d pid: %ld) exits with signal (%d)",
+           ipv_inuse, (int)port, pid, exit_signal);
+    /*
+     * To properly set the return status of the process we
+     * must raise the same signal SIGINT or SIGTERM that we
+     * caught and let the old handler take care of it.
+     */
+    raise(exit_signal);
+  }
+
+  logmsg("========> rtspd quits");
+  return 0;
+}
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/server_setup.h b/ap/lib/libcurl/curl-7.54.1/tests/server/server_setup.h
new file mode 100644
index 0000000..76c4623
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/server_setup.h
@@ -0,0 +1,29 @@
+#ifndef HEADER_CURL_SERVER_SETUP_H
+#define HEADER_CURL_SERVER_SETUP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+#include "curl_setup.h" /* portability help from the lib directory */
+
+#endif /* HEADER_CURL_SERVER_SETUP_H */
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/server_sockaddr.h b/ap/lib/libcurl/curl-7.54.1/tests/server/server_sockaddr.h
new file mode 100644
index 0000000..bbcab83
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/server_sockaddr.h
@@ -0,0 +1,41 @@
+#ifndef HEADER_CURL_SERVER_SOCKADDR_H
+#define HEADER_CURL_SERVER_SOCKADDR_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h> /* for sockaddr_un */
+#endif
+
+typedef union {
+  struct sockaddr      sa;
+  struct sockaddr_in   sa4;
+#ifdef ENABLE_IPV6
+  struct sockaddr_in6  sa6;
+#endif
+#ifdef USE_UNIX_SOCKETS
+  struct sockaddr_un   sau;
+#endif
+} srvr_sockaddr_union_t;
+
+#endif /* HEADER_CURL_SERVER_SOCKADDR_H */
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/sockfilt.c b/ap/lib/libcurl/curl-7.54.1/tests/server/sockfilt.c
new file mode 100644
index 0000000..42071a5
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/sockfilt.c
@@ -0,0 +1,1571 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/* Purpose
+ *
+ * 1. Accept a TCP connection on a custom port (IPv4 or IPv6), or connect
+ *    to a given (localhost) port.
+ *
+ * 2. Get commands on STDIN. Pass data on to the TCP stream.
+ *    Get data from TCP stream and pass on to STDOUT.
+ *
+ * This program is made to perform all the socket/stream/connection stuff for
+ * the test suite's (perl) FTP server. Previously the perl code did all of
+ * this by its own, but I decided to let this program do the socket layer
+ * because of several things:
+ *
+ * o We want the perl code to work with rather old perl installations, thus
+ *   we cannot use recent perl modules or features.
+ *
+ * o We want IPv6 support for systems that provide it, and doing optional IPv6
+ *   support in perl seems if not impossible so at least awkward.
+ *
+ * o We want FTP-SSL support, which means that a connection that starts with
+ *   plain sockets needs to be able to "go SSL" in the midst. This would also
+ *   require some nasty perl stuff I'd rather avoid.
+ *
+ * (Source originally based on sws.c)
+ */
+
+/*
+ * Signal handling notes for sockfilt
+ * ----------------------------------
+ *
+ * This program is a single-threaded process.
+ *
+ * This program is intended to be highly portable and as such it must be kept
+ * as simple as possible, due to this the only signal handling mechanisms used
+ * will be those of ANSI C, and used only in the most basic form which is good
+ * enough for the purpose of this program.
+ *
+ * For the above reason and the specific needs of this program signals SIGHUP,
+ * SIGPIPE and SIGALRM will be simply ignored on systems where this can be
+ * done.  If possible, signals SIGINT and SIGTERM will be handled by this
+ * program as an indication to cleanup and finish execution as soon as
+ * possible.  This will be achieved with a single signal handler
+ * 'exit_signal_handler' for both signals.
+ *
+ * The 'exit_signal_handler' upon the first SIGINT or SIGTERM received signal
+ * will just set to one the global var 'got_exit_signal' storing in global var
+ * 'exit_signal' the signal that triggered this change.
+ *
+ * Nothing fancy that could introduce problems is used, the program at certain
+ * points in its normal flow checks if var 'got_exit_signal' is set and in
+ * case this is true it just makes its way out of loops and functions in
+ * structured and well behaved manner to achieve proper program cleanup and
+ * termination.
+ *
+ * Even with the above mechanism implemented it is worthwile to note that
+ * other signals might still be received, or that there might be systems on
+ * which it is not possible to trap and ignore some of the above signals.
+ * This implies that for increased portability and reliability the program
+ * must be coded as if no signal was being ignored or handled at all.  Enjoy
+ * it!
+ */
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "inet_pton.h"
+#include "util.h"
+#include "server_sockaddr.h"
+#include "warnless.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EAGAIN
+#define EAGAIN  11 /* errno.h value */
+#undef  ENOMEM
+#define ENOMEM  12 /* errno.h value */
+#undef  EINVAL
+#define EINVAL  22 /* errno.h value */
+#endif
+
+#define DEFAULT_PORT 8999
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/sockfilt.log"
+#endif
+
+const char *serverlogfile = DEFAULT_LOGFILE;
+
+static bool verbose = FALSE;
+static bool bind_only = FALSE;
+#ifdef ENABLE_IPV6
+static bool use_ipv6 = FALSE;
+#endif
+static const char *ipv_inuse = "IPv4";
+static unsigned short port = DEFAULT_PORT;
+static unsigned short connectport = 0; /* if non-zero, we activate this mode */
+
+enum sockmode {
+  PASSIVE_LISTEN,    /* as a server waiting for connections */
+  PASSIVE_CONNECT,   /* as a server, connected to a client */
+  ACTIVE,            /* as a client, connected to a server */
+  ACTIVE_DISCONNECT  /* as a client, disconnected from server */
+};
+
+/* do-nothing macro replacement for systems which lack siginterrupt() */
+
+#ifndef HAVE_SIGINTERRUPT
+#define siginterrupt(x,y) do {} while(0)
+#endif
+
+/* vars used to keep around previous signal handlers */
+
+typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+
+#ifdef SIGHUP
+static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGPIPE
+static SIGHANDLER_T old_sigpipe_handler = SIG_ERR;
+#endif
+
+#ifdef SIGALRM
+static SIGHANDLER_T old_sigalrm_handler = SIG_ERR;
+#endif
+
+#ifdef SIGINT
+static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGTERM
+static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
+#endif
+
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
+/* var which if set indicates that the program should finish execution */
+
+SIG_ATOMIC_T got_exit_signal = 0;
+
+/* if next is set indicates the first signal handled in exit_signal_handler */
+
+static volatile int exit_signal = 0;
+
+/* signal handler that will be triggered to indicate that the program
+  should finish its execution in a controlled manner as soon as possible.
+  The first time this is called it will set got_exit_signal to one and
+  store in exit_signal the signal that triggered its execution. */
+
+static RETSIGTYPE exit_signal_handler(int signum)
+{
+  int old_errno = errno;
+  if(got_exit_signal == 0) {
+    got_exit_signal = 1;
+    exit_signal = signum;
+  }
+  (void)signal(signum, exit_signal_handler);
+  errno = old_errno;
+}
+
+static void install_signal_handlers(void)
+{
+#ifdef SIGHUP
+  /* ignore SIGHUP signal */
+  old_sighup_handler = signal(SIGHUP, SIG_IGN);
+  if(old_sighup_handler == SIG_ERR)
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
+#endif
+#ifdef SIGPIPE
+  /* ignore SIGPIPE signal */
+  old_sigpipe_handler = signal(SIGPIPE, SIG_IGN);
+  if(old_sigpipe_handler == SIG_ERR)
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
+#endif
+#ifdef SIGALRM
+  /* ignore SIGALRM signal */
+  old_sigalrm_handler = signal(SIGALRM, SIG_IGN);
+  if(old_sigalrm_handler == SIG_ERR)
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
+#endif
+#ifdef SIGINT
+  /* handle SIGINT signal with our exit_signal_handler */
+  old_sigint_handler = signal(SIGINT, exit_signal_handler);
+  if(old_sigint_handler == SIG_ERR)
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGINT, 1);
+#endif
+#ifdef SIGTERM
+  /* handle SIGTERM signal with our exit_signal_handler */
+  old_sigterm_handler = signal(SIGTERM, exit_signal_handler);
+  if(old_sigterm_handler == SIG_ERR)
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGTERM, 1);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler);
+  if(old_sigbreak_handler == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
+}
+
+static void restore_signal_handlers(void)
+{
+#ifdef SIGHUP
+  if(SIG_ERR != old_sighup_handler)
+    (void)signal(SIGHUP, old_sighup_handler);
+#endif
+#ifdef SIGPIPE
+  if(SIG_ERR != old_sigpipe_handler)
+    (void)signal(SIGPIPE, old_sigpipe_handler);
+#endif
+#ifdef SIGALRM
+  if(SIG_ERR != old_sigalrm_handler)
+    (void)signal(SIGALRM, old_sigalrm_handler);
+#endif
+#ifdef SIGINT
+  if(SIG_ERR != old_sigint_handler)
+    (void)signal(SIGINT, old_sigint_handler);
+#endif
+#ifdef SIGTERM
+  if(SIG_ERR != old_sigterm_handler)
+    (void)signal(SIGTERM, old_sigterm_handler);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+#ifdef WIN32
+/*
+ * read-wrapper to support reading from stdin on Windows.
+ */
+static ssize_t read_wincon(int fd, void *buf, size_t count)
+{
+  HANDLE handle = NULL;
+  DWORD mode, rcount = 0;
+  BOOL success;
+
+  if(fd == fileno(stdin)) {
+    handle = GetStdHandle(STD_INPUT_HANDLE);
+  }
+  else {
+    return read(fd, buf, count);
+  }
+
+  if(GetConsoleMode(handle, &mode)) {
+    success = ReadConsole(handle, buf, curlx_uztoul(count), &rcount, NULL);
+  }
+  else {
+    success = ReadFile(handle, buf, curlx_uztoul(count), &rcount, NULL);
+  }
+  if(success) {
+    return rcount;
+  }
+
+  errno = GetLastError();
+  return -1;
+}
+#undef  read
+#define read(a,b,c) read_wincon(a,b,c)
+
+/*
+ * write-wrapper to support writing to stdout and stderr on Windows.
+ */
+static ssize_t write_wincon(int fd, const void *buf, size_t count)
+{
+  HANDLE handle = NULL;
+  DWORD mode, wcount = 0;
+  BOOL success;
+
+  if(fd == fileno(stdout)) {
+    handle = GetStdHandle(STD_OUTPUT_HANDLE);
+  }
+  else if(fd == fileno(stderr)) {
+    handle = GetStdHandle(STD_ERROR_HANDLE);
+  }
+  else {
+    return write(fd, buf, count);
+  }
+
+  if(GetConsoleMode(handle, &mode)) {
+    success = WriteConsole(handle, buf, curlx_uztoul(count), &wcount, NULL);
+  }
+  else {
+    success = WriteFile(handle, buf, curlx_uztoul(count), &wcount, NULL);
+  }
+  if(success) {
+    return wcount;
+  }
+
+  errno = GetLastError();
+  return -1;
+}
+#undef  write
+#define write(a,b,c) write_wincon(a,b,c)
+#endif
+
+/*
+ * fullread is a wrapper around the read() function. This will repeat the call
+ * to read() until it actually has read the complete number of bytes indicated
+ * in nbytes or it fails with a condition that cannot be handled with a simple
+ * retry of the read call.
+ */
+
+static ssize_t fullread(int filedes, void *buffer, size_t nbytes)
+{
+  int error;
+  ssize_t rc;
+  ssize_t nread = 0;
+
+  do {
+    rc = read(filedes, (unsigned char *)buffer + nread, nbytes - nread);
+
+    if(got_exit_signal) {
+      logmsg("signalled to die");
+      return -1;
+    }
+
+    if(rc < 0) {
+      error = errno;
+      if((error == EINTR) || (error == EAGAIN))
+        continue;
+      logmsg("reading from file descriptor: %d,", filedes);
+      logmsg("unrecoverable read() failure: (%d) %s",
+             error, strerror(error));
+      return -1;
+    }
+
+    if(rc == 0) {
+      logmsg("got 0 reading from stdin");
+      return 0;
+    }
+
+    nread += rc;
+
+  } while((size_t)nread < nbytes);
+
+  if(verbose)
+    logmsg("read %zd bytes", nread);
+
+  return nread;
+}
+
+/*
+ * fullwrite is a wrapper around the write() function. This will repeat the
+ * call to write() until it actually has written the complete number of bytes
+ * indicated in nbytes or it fails with a condition that cannot be handled
+ * with a simple retry of the write call.
+ */
+
+static ssize_t fullwrite(int filedes, const void *buffer, size_t nbytes)
+{
+  int error;
+  ssize_t wc;
+  ssize_t nwrite = 0;
+
+  do {
+    wc = write(filedes, (const unsigned char *)buffer + nwrite,
+               nbytes - nwrite);
+
+    if(got_exit_signal) {
+      logmsg("signalled to die");
+      return -1;
+    }
+
+    if(wc < 0) {
+      error = errno;
+      if((error == EINTR) || (error == EAGAIN))
+        continue;
+      logmsg("writing to file descriptor: %d,", filedes);
+      logmsg("unrecoverable write() failure: (%d) %s",
+             error, strerror(error));
+      return -1;
+    }
+
+    if(wc == 0) {
+      logmsg("put 0 writing to stdout");
+      return 0;
+    }
+
+    nwrite += wc;
+
+  } while((size_t)nwrite < nbytes);
+
+  if(verbose)
+    logmsg("wrote %zd bytes", nwrite);
+
+  return nwrite;
+}
+
+/*
+ * read_stdin tries to read from stdin nbytes into the given buffer. This is a
+ * blocking function that will only return TRUE when nbytes have actually been
+ * read or FALSE when an unrecoverable error has been detected. Failure of this
+ * function is an indication that the sockfilt process should terminate.
+ */
+
+static bool read_stdin(void *buffer, size_t nbytes)
+{
+  ssize_t nread = fullread(fileno(stdin), buffer, nbytes);
+  if(nread != (ssize_t)nbytes) {
+    logmsg("exiting...");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+/*
+ * write_stdout tries to write to stdio nbytes from the given buffer. This is a
+ * blocking function that will only return TRUE when nbytes have actually been
+ * written or FALSE when an unrecoverable error has been detected. Failure of
+ * this function is an indication that the sockfilt process should terminate.
+ */
+
+static bool write_stdout(const void *buffer, size_t nbytes)
+{
+  ssize_t nwrite = fullwrite(fileno(stdout), buffer, nbytes);
+  if(nwrite != (ssize_t)nbytes) {
+    logmsg("exiting...");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+static void lograw(unsigned char *buffer, ssize_t len)
+{
+  char data[120];
+  ssize_t i;
+  unsigned char *ptr = buffer;
+  char *optr = data;
+  ssize_t width=0;
+  int left = sizeof(data);
+
+  for(i=0; i<len; i++) {
+    switch(ptr[i]) {
+    case '\n':
+      snprintf(optr, left, "\\n");
+      width += 2;
+      optr += 2;
+      left-=2;
+      break;
+    case '\r':
+      snprintf(optr, left, "\\r");
+      width += 2;
+      optr += 2;
+      left-=2;
+      break;
+    default:
+      snprintf(optr, left, "%c", (ISGRAPH(ptr[i]) ||
+                                  ptr[i]==0x20) ?ptr[i]:'.');
+      width++;
+      optr++;
+      left--;
+      break;
+    }
+
+    if(width>60) {
+      logmsg("'%s'", data);
+      width = 0;
+      optr = data;
+      left = sizeof(data);
+    }
+  }
+  if(width)
+    logmsg("'%s'", data);
+}
+
+#ifdef USE_WINSOCK
+/*
+ * WinSock select() does not support standard file descriptors,
+ * it can only check SOCKETs. The following function is an attempt
+ * to re-create a select() function with support for other handle types.
+ *
+ * select() function with support for WINSOCK2 sockets and all
+ * other handle types supported by WaitForMultipleObjectsEx() as
+ * well as disk files, anonymous and names pipes, and character input.
+ *
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/ms687028.aspx
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/ms741572.aspx
+ */
+struct select_ws_wait_data {
+  HANDLE handle; /* actual handle to wait for during select */
+  HANDLE event;  /* internal event to abort waiting thread */
+};
+static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
+{
+  struct select_ws_wait_data *data;
+  HANDLE handle, handles[2];
+  INPUT_RECORD inputrecord;
+  LARGE_INTEGER size, pos;
+  DWORD type, length;
+
+  /* retrieve handles from internal structure */
+  data = (struct select_ws_wait_data *) lpParameter;
+  if(data) {
+    handle = data->handle;
+    handles[0] = data->event;
+    handles[1] = handle;
+    free(data);
+  }
+  else
+    return -1;
+
+  /* retrieve the type of file to wait on */
+  type = GetFileType(handle);
+  switch(type) {
+    case FILE_TYPE_DISK:
+       /* The handle represents a file on disk, this means:
+        * - WaitForMultipleObjectsEx will always be signalled for it.
+        * - comparison of current position in file and total size of
+        *   the file can be used to check if we reached the end yet.
+        *
+        * Approach: Loop till either the internal event is signalled
+        *           or if the end of the file has already been reached.
+        */
+      while(WaitForMultipleObjectsEx(1, handles, FALSE, 0, FALSE)
+            == WAIT_TIMEOUT) {
+        /* get total size of file */
+        length = 0;
+        size.QuadPart = 0;
+        size.LowPart = GetFileSize(handle, &length);
+        if((size.LowPart != INVALID_FILE_SIZE) ||
+           (GetLastError() == NO_ERROR)) {
+          size.HighPart = length;
+          /* get the current position within the file */
+          pos.QuadPart = 0;
+          pos.LowPart = SetFilePointer(handle, 0, &pos.HighPart,
+                                       FILE_CURRENT);
+          if((pos.LowPart != INVALID_SET_FILE_POINTER) ||
+             (GetLastError() == NO_ERROR)) {
+            /* compare position with size, abort if not equal */
+            if(size.QuadPart == pos.QuadPart) {
+              /* sleep and continue waiting */
+              SleepEx(0, FALSE);
+              continue;
+            }
+          }
+        }
+        /* there is some data available, stop waiting */
+        break;
+      }
+      break;
+
+    case FILE_TYPE_CHAR:
+       /* The handle represents a character input, this means:
+        * - WaitForMultipleObjectsEx will be signalled on any kind of input,
+        *   including mouse and window size events we do not care about.
+        *
+        * Approach: Loop till either the internal event is signalled
+        *           or we get signalled for an actual key-event.
+        */
+      while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE)
+            == WAIT_OBJECT_0 + 1) {
+        /* check if this is an actual console handle */
+        length = 0;
+        if(GetConsoleMode(handle, &length)) {
+          /* retrieve an event from the console buffer */
+          length = 0;
+          if(PeekConsoleInput(handle, &inputrecord, 1, &length)) {
+            /* check if the event is not an actual key-event */
+            if(length == 1 && inputrecord.EventType != KEY_EVENT) {
+              /* purge the non-key-event and continue waiting */
+              ReadConsoleInput(handle, &inputrecord, 1, &length);
+              continue;
+            }
+          }
+        }
+        /* there is some data available, stop waiting */
+        break;
+      }
+      break;
+
+    case FILE_TYPE_PIPE:
+       /* The handle represents an anonymous or named pipe, this means:
+        * - WaitForMultipleObjectsEx will always be signalled for it.
+        * - peek into the pipe and retrieve the amount of data available.
+        *
+        * Approach: Loop till either the internal event is signalled
+        *           or there is data in the pipe available for reading.
+        */
+      while(WaitForMultipleObjectsEx(1, handles, FALSE, 0, FALSE)
+            == WAIT_TIMEOUT) {
+        /* peek into the pipe and retrieve the amount of data available */
+        length = 0;
+        if(PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) {
+          /* if there is no data available, sleep and continue waiting */
+          if(length == 0) {
+            SleepEx(0, FALSE);
+            continue;
+          }
+        }
+        else {
+          /* if the pipe has been closed, sleep and continue waiting */
+          if(GetLastError() == ERROR_BROKEN_PIPE) {
+            SleepEx(0, FALSE);
+            continue;
+          }
+        }
+        /* there is some data available, stop waiting */
+        break;
+      }
+      break;
+
+    default:
+      /* The handle has an unknown type, try to wait on it */
+      WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE);
+      break;
+  }
+
+  return 0;
+}
+static HANDLE select_ws_wait(HANDLE handle, HANDLE event)
+{
+  struct select_ws_wait_data *data;
+  HANDLE thread = NULL;
+
+  /* allocate internal waiting data structure */
+  data = malloc(sizeof(struct select_ws_wait_data));
+  if(data) {
+    data->handle = handle;
+    data->event = event;
+
+    /* launch waiting thread */
+    thread = CreateThread(NULL, 0,
+                          &select_ws_wait_thread,
+                          data, 0, NULL);
+
+    /* free data if thread failed to launch */
+    if(!thread) {
+      free(data);
+    }
+  }
+
+  return thread;
+}
+struct select_ws_data {
+  curl_socket_t fd;      /* the original input handle   (indexed by fds) */
+  curl_socket_t wsasock; /* the internal socket handle  (indexed by wsa) */
+  WSAEVENT wsaevent;     /* the internal WINSOCK2 event (indexed by wsa) */
+  HANDLE thread;         /* the internal threads handle (indexed by thd) */
+};
+static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
+                     fd_set *exceptfds, struct timeval *timeout)
+{
+  DWORD milliseconds, wait, idx;
+  WSANETWORKEVENTS wsanetevents;
+  struct select_ws_data *data;
+  HANDLE handle, *handles;
+  curl_socket_t sock;
+  long networkevents;
+  WSAEVENT wsaevent;
+  int error, fds;
+  HANDLE waitevent = NULL;
+  DWORD nfd = 0, thd = 0, wsa = 0;
+  int ret = 0;
+
+  /* check if the input value is valid */
+  if(nfds < 0) {
+    errno = EINVAL;
+    return -1;
+  }
+
+  /* check if we got descriptors, sleep in case we got none */
+  if(!nfds) {
+    Sleep((timeout->tv_sec*1000)+(DWORD)(((double)timeout->tv_usec)/1000.0));
+    return 0;
+  }
+
+  /* create internal event to signal waiting threads */
+  waitevent = CreateEvent(NULL, TRUE, FALSE, NULL);
+  if(!waitevent) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* allocate internal array for the internal data */
+  data = malloc(nfds * sizeof(struct select_ws_data));
+  if(data == NULL) {
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* allocate internal array for the internal event handles */
+  handles = malloc(nfds * sizeof(HANDLE));
+  if(handles == NULL) {
+    free(data);
+    errno = ENOMEM;
+    return -1;
+  }
+
+  /* clear internal arrays */
+  memset(data, 0, nfds * sizeof(struct select_ws_data));
+  memset(handles, 0, nfds * sizeof(HANDLE));
+
+  /* loop over the handles in the input descriptor sets */
+  for(fds = 0; fds < nfds; fds++) {
+    networkevents = 0;
+    handles[nfd] = 0;
+
+    if(FD_ISSET(fds, readfds))
+      networkevents |= FD_READ|FD_ACCEPT|FD_CLOSE;
+
+    if(FD_ISSET(fds, writefds))
+      networkevents |= FD_WRITE|FD_CONNECT;
+
+    if(FD_ISSET(fds, exceptfds))
+      networkevents |= FD_OOB|FD_CLOSE;
+
+    /* only wait for events for which we actually care */
+    if(networkevents) {
+      data[nfd].fd = curlx_sitosk(fds);
+      if(fds == fileno(stdin)) {
+        handle = GetStdHandle(STD_INPUT_HANDLE);
+        handle = select_ws_wait(handle, waitevent);
+        handles[nfd] = handle;
+        data[thd].thread = handle;
+        thd++;
+      }
+      else if(fds == fileno(stdout)) {
+        handles[nfd] = GetStdHandle(STD_OUTPUT_HANDLE);
+      }
+      else if(fds == fileno(stderr)) {
+        handles[nfd] = GetStdHandle(STD_ERROR_HANDLE);
+      }
+      else {
+        wsaevent = WSACreateEvent();
+        if(wsaevent != WSA_INVALID_EVENT) {
+          error = WSAEventSelect(fds, wsaevent, networkevents);
+          if(error != SOCKET_ERROR) {
+            handle = (HANDLE) wsaevent;
+            handles[nfd] = handle;
+            data[wsa].wsasock = curlx_sitosk(fds);
+            data[wsa].wsaevent = wsaevent;
+            wsa++;
+          }
+          else {
+            WSACloseEvent(wsaevent);
+            handle = (HANDLE) curlx_sitosk(fds);
+            handle = select_ws_wait(handle, waitevent);
+            handles[nfd] = handle;
+            data[thd].thread = handle;
+            thd++;
+          }
+        }
+      }
+      nfd++;
+    }
+  }
+
+  /* convert struct timeval to milliseconds */
+  if(timeout) {
+    milliseconds = ((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+  }
+  else {
+    milliseconds = INFINITE;
+  }
+
+  /* wait for one of the internal handles to trigger */
+  wait = WaitForMultipleObjectsEx(nfd, handles, FALSE, milliseconds, FALSE);
+
+  /* signal the event handle for the waiting threads */
+  SetEvent(waitevent);
+
+  /* loop over the internal handles returned in the descriptors */
+  for(idx = 0; idx < nfd; idx++) {
+    handle = handles[idx];
+    sock = data[idx].fd;
+    fds = curlx_sktosi(sock);
+
+    /* check if the current internal handle was triggered */
+    if(wait != WAIT_FAILED && (wait - WAIT_OBJECT_0) <= idx &&
+       WaitForSingleObjectEx(handle, 0, FALSE) == WAIT_OBJECT_0) {
+      /* first handle stdin, stdout and stderr */
+      if(fds == fileno(stdin)) {
+        /* stdin is never ready for write or exceptional */
+        FD_CLR(sock, writefds);
+        FD_CLR(sock, exceptfds);
+      }
+      else if(fds == fileno(stdout) || fds == fileno(stderr)) {
+        /* stdout and stderr are never ready for read or exceptional */
+        FD_CLR(sock, readfds);
+        FD_CLR(sock, exceptfds);
+      }
+      else {
+        /* try to handle the event with the WINSOCK2 functions */
+        wsanetevents.lNetworkEvents = 0;
+        error = WSAEnumNetworkEvents(fds, handle, &wsanetevents);
+        if(error != SOCKET_ERROR) {
+          /* remove from descriptor set if not ready for read/accept/close */
+          if(!(wsanetevents.lNetworkEvents & (FD_READ|FD_ACCEPT|FD_CLOSE)))
+            FD_CLR(sock, readfds);
+
+          /* remove from descriptor set if not ready for write/connect */
+          if(!(wsanetevents.lNetworkEvents & (FD_WRITE|FD_CONNECT)))
+            FD_CLR(sock, writefds);
+
+          /* HACK:
+           * use exceptfds together with readfds to signal
+           * that the connection was closed by the client.
+           *
+           * Reason: FD_CLOSE is only signaled once, sometimes
+           * at the same time as FD_READ with data being available.
+           * This means that recv/sread is not reliable to detect
+           * that the connection is closed.
+           */
+          /* remove from descriptor set if not exceptional */
+          if(!(wsanetevents.lNetworkEvents & (FD_OOB|FD_CLOSE)))
+            FD_CLR(sock, exceptfds);
+        }
+      }
+
+      /* check if the event has not been filtered using specific tests */
+      if(FD_ISSET(sock, readfds) || FD_ISSET(sock, writefds) ||
+         FD_ISSET(sock, exceptfds)) {
+        ret++;
+      }
+    }
+    else {
+      /* remove from all descriptor sets since this handle did not trigger */
+      FD_CLR(sock, readfds);
+      FD_CLR(sock, writefds);
+      FD_CLR(sock, exceptfds);
+    }
+  }
+
+  for(fds = 0; fds < nfds; fds++) {
+    if(FD_ISSET(fds, readfds))
+      logmsg("select_ws: %d is readable", fds);
+
+    if(FD_ISSET(fds, writefds))
+      logmsg("select_ws: %d is writable", fds);
+
+    if(FD_ISSET(fds, exceptfds))
+      logmsg("select_ws: %d is excepted", fds);
+  }
+
+  for(idx = 0; idx < wsa; idx++) {
+    WSAEventSelect(data[idx].wsasock, NULL, 0);
+    WSACloseEvent(data[idx].wsaevent);
+  }
+
+  for(idx = 0; idx < thd; idx++) {
+    WaitForSingleObject(data[idx].thread, INFINITE);
+    CloseHandle(data[idx].thread);
+  }
+
+  CloseHandle(waitevent);
+
+  free(handles);
+  free(data);
+
+  return ret;
+}
+#define select(a,b,c,d,e) select_ws(a,b,c,d,e)
+#endif  /* USE_WINSOCK */
+
+/*
+  sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
+
+  if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
+  accept()
+*/
+static bool juggle(curl_socket_t *sockfdp,
+                   curl_socket_t listenfd,
+                   enum sockmode *mode)
+{
+  struct timeval timeout;
+  fd_set fds_read;
+  fd_set fds_write;
+  fd_set fds_err;
+  curl_socket_t sockfd = CURL_SOCKET_BAD;
+  int maxfd = -99;
+  ssize_t rc;
+  ssize_t nread_socket;
+  ssize_t bytes_written;
+  ssize_t buffer_len;
+  int error = 0;
+
+ /* 'buffer' is this excessively large only to be able to support things like
+    test 1003 which tests exceedingly large server response lines */
+  unsigned char buffer[17010];
+  char data[16];
+
+  if(got_exit_signal) {
+    logmsg("signalled to die, exiting...");
+    return FALSE;
+  }
+
+#ifdef HAVE_GETPPID
+  /* As a last resort, quit if sockfilt process becomes orphan. Just in case
+     parent ftpserver process has died without killing its sockfilt children */
+  if(getppid() <= 1) {
+    logmsg("process becomes orphan, exiting");
+    return FALSE;
+  }
+#endif
+
+  timeout.tv_sec = 120;
+  timeout.tv_usec = 0;
+
+  FD_ZERO(&fds_read);
+  FD_ZERO(&fds_write);
+  FD_ZERO(&fds_err);
+
+  FD_SET((curl_socket_t)fileno(stdin), &fds_read);
+
+  switch(*mode) {
+
+  case PASSIVE_LISTEN:
+
+    /* server mode */
+    sockfd = listenfd;
+    /* there's always a socket to wait for */
+    FD_SET(sockfd, &fds_read);
+    maxfd = (int)sockfd;
+    break;
+
+  case PASSIVE_CONNECT:
+
+    sockfd = *sockfdp;
+    if(CURL_SOCKET_BAD == sockfd) {
+      /* eeek, we are supposedly connected and then this cannot be -1 ! */
+      logmsg("socket is -1! on %s:%d", __FILE__, __LINE__);
+      maxfd = 0; /* stdin */
+    }
+    else {
+      /* there's always a socket to wait for */
+      FD_SET(sockfd, &fds_read);
+#ifdef USE_WINSOCK
+      FD_SET(sockfd, &fds_err);
+#endif
+      maxfd = (int)sockfd;
+    }
+    break;
+
+  case ACTIVE:
+
+    sockfd = *sockfdp;
+    /* sockfd turns CURL_SOCKET_BAD when our connection has been closed */
+    if(CURL_SOCKET_BAD != sockfd) {
+      FD_SET(sockfd, &fds_read);
+#ifdef USE_WINSOCK
+      FD_SET(sockfd, &fds_err);
+#endif
+      maxfd = (int)sockfd;
+    }
+    else {
+      logmsg("No socket to read on");
+      maxfd = 0;
+    }
+    break;
+
+  case ACTIVE_DISCONNECT:
+
+    logmsg("disconnected, no socket to read on");
+    maxfd = 0;
+    sockfd = CURL_SOCKET_BAD;
+    break;
+
+  } /* switch(*mode) */
+
+
+  do {
+
+    /* select() blocking behavior call on blocking descriptors please */
+
+    rc = select(maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout);
+
+    if(got_exit_signal) {
+      logmsg("signalled to die, exiting...");
+      return FALSE;
+    }
+
+  } while((rc == -1) && ((error = errno) == EINTR));
+
+  if(rc < 0) {
+    logmsg("select() failed with error: (%d) %s",
+           error, strerror(error));
+    return FALSE;
+  }
+
+  if(rc == 0)
+    /* timeout */
+    return TRUE;
+
+
+  if(FD_ISSET(fileno(stdin), &fds_read)) {
+    /* read from stdin, commands/data to be dealt with and possibly passed on
+       to the socket
+
+       protocol:
+
+       4 letter command + LF [mandatory]
+
+       4-digit hexadecimal data length + LF [if the command takes data]
+       data                       [the data being as long as set above]
+
+       Commands:
+
+       DATA - plain pass-thru data
+    */
+
+    if(!read_stdin(buffer, 5))
+      return FALSE;
+
+    logmsg("Received %c%c%c%c (on stdin)",
+           buffer[0], buffer[1], buffer[2], buffer[3]);
+
+    if(!memcmp("PING", buffer, 4)) {
+      /* send reply on stdout, just proving we are alive */
+      if(!write_stdout("PONG\n", 5))
+        return FALSE;
+    }
+
+    else if(!memcmp("PORT", buffer, 4)) {
+      /* Question asking us what PORT number we are listening to.
+         Replies to PORT with "IPv[num]/[port]" */
+      snprintf((char *)buffer, sizeof(buffer), "%s/%hu\n", ipv_inuse, port);
+      buffer_len = (ssize_t)strlen((char *)buffer);
+      snprintf(data, sizeof(data), "PORT\n%04zx\n", buffer_len);
+      if(!write_stdout(data, 10))
+        return FALSE;
+      if(!write_stdout(buffer, buffer_len))
+        return FALSE;
+    }
+    else if(!memcmp("QUIT", buffer, 4)) {
+      /* just die */
+      logmsg("quits");
+      return FALSE;
+    }
+    else if(!memcmp("DATA", buffer, 4)) {
+      /* data IN => data OUT */
+
+      if(!read_stdin(buffer, 5))
+        return FALSE;
+
+      buffer[5] = '\0';
+
+      buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16);
+      if(buffer_len > (ssize_t)sizeof(buffer)) {
+        logmsg("ERROR: Buffer size (%zu bytes) too small for data size "
+               "(%zd bytes)", sizeof(buffer), buffer_len);
+        return FALSE;
+      }
+      logmsg("> %zd bytes data, server => client", buffer_len);
+
+      if(!read_stdin(buffer, buffer_len))
+        return FALSE;
+
+      lograw(buffer, buffer_len);
+
+      if(*mode == PASSIVE_LISTEN) {
+        logmsg("*** We are disconnected!");
+        if(!write_stdout("DISC\n", 5))
+          return FALSE;
+      }
+      else {
+        /* send away on the socket */
+        bytes_written = swrite(sockfd, buffer, buffer_len);
+        if(bytes_written != buffer_len) {
+          logmsg("Not all data was sent. Bytes to send: %zd sent: %zd",
+                 buffer_len, bytes_written);
+        }
+      }
+    }
+    else if(!memcmp("DISC", buffer, 4)) {
+      /* disconnect! */
+      if(!write_stdout("DISC\n", 5))
+        return FALSE;
+      if(sockfd != CURL_SOCKET_BAD) {
+        logmsg("====> Client forcibly disconnected");
+        sclose(sockfd);
+        *sockfdp = CURL_SOCKET_BAD;
+        if(*mode == PASSIVE_CONNECT)
+          *mode = PASSIVE_LISTEN;
+        else
+          *mode = ACTIVE_DISCONNECT;
+      }
+      else
+        logmsg("attempt to close already dead connection");
+      return TRUE;
+    }
+  }
+
+
+  if((sockfd != CURL_SOCKET_BAD) && (FD_ISSET(sockfd, &fds_read)) ) {
+
+    curl_socket_t newfd = CURL_SOCKET_BAD; /* newly accepted socket */
+
+    if(*mode == PASSIVE_LISTEN) {
+      /* there's no stream set up yet, this is an indication that there's a
+         client connecting. */
+      newfd = accept(sockfd, NULL, NULL);
+      if(CURL_SOCKET_BAD == newfd) {
+        error = SOCKERRNO;
+        logmsg("accept(%d, NULL, NULL) failed with error: (%d) %s",
+               sockfd, error, strerror(error));
+      }
+      else {
+        logmsg("====> Client connect");
+        if(!write_stdout("CNCT\n", 5))
+          return FALSE;
+        *sockfdp = newfd; /* store the new socket */
+        *mode = PASSIVE_CONNECT; /* we have connected */
+      }
+      return TRUE;
+    }
+
+    /* read from socket, pass on data to stdout */
+    nread_socket = sread(sockfd, buffer, sizeof(buffer));
+
+    if(nread_socket > 0) {
+      snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket);
+      if(!write_stdout(data, 10))
+        return FALSE;
+      if(!write_stdout(buffer, nread_socket))
+        return FALSE;
+
+      logmsg("< %zd bytes data, client => server", nread_socket);
+      lograw(buffer, nread_socket);
+    }
+
+    if(nread_socket <= 0
+#ifdef USE_WINSOCK
+       || FD_ISSET(sockfd, &fds_err)
+#endif
+       ) {
+      logmsg("====> Client disconnect");
+      if(!write_stdout("DISC\n", 5))
+        return FALSE;
+      sclose(sockfd);
+      *sockfdp = CURL_SOCKET_BAD;
+      if(*mode == PASSIVE_CONNECT)
+        *mode = PASSIVE_LISTEN;
+      else
+        *mode = ACTIVE_DISCONNECT;
+      return TRUE;
+    }
+  }
+
+  return TRUE;
+}
+
+static curl_socket_t sockdaemon(curl_socket_t sock,
+                                unsigned short *listenport)
+{
+  /* passive daemon style */
+  srvr_sockaddr_union_t listener;
+  int flag;
+  int rc;
+  int totdelay = 0;
+  int maxretr = 10;
+  int delay= 20;
+  int attempt = 0;
+  int error = 0;
+
+  do {
+    attempt++;
+    flag = 1;
+    rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+         (void *)&flag, sizeof(flag));
+    if(rc) {
+      error = SOCKERRNO;
+      logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
+             error, strerror(error));
+      if(maxretr) {
+        rc = wait_ms(delay);
+        if(rc) {
+          /* should not happen */
+          error = errno;
+          logmsg("wait_ms() failed with error: (%d) %s",
+                 error, strerror(error));
+          sclose(sock);
+          return CURL_SOCKET_BAD;
+        }
+        if(got_exit_signal) {
+          logmsg("signalled to die, exiting...");
+          sclose(sock);
+          return CURL_SOCKET_BAD;
+        }
+        totdelay += delay;
+        delay *= 2; /* double the sleep for next attempt */
+      }
+    }
+  } while(rc && maxretr--);
+
+  if(rc) {
+    logmsg("setsockopt(SO_REUSEADDR) failed %d times in %d ms. Error: (%d) %s",
+           attempt, totdelay, error, strerror(error));
+    logmsg("Continuing anyway...");
+  }
+
+  /* When the specified listener port is zero, it is actually a
+     request to let the system choose a non-zero available port. */
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6) {
+#endif
+    memset(&listener.sa4, 0, sizeof(listener.sa4));
+    listener.sa4.sin_family = AF_INET;
+    listener.sa4.sin_addr.s_addr = INADDR_ANY;
+    listener.sa4.sin_port = htons(*listenport);
+    rc = bind(sock, &listener.sa, sizeof(listener.sa4));
+#ifdef ENABLE_IPV6
+  }
+  else {
+    memset(&listener.sa6, 0, sizeof(listener.sa6));
+    listener.sa6.sin6_family = AF_INET6;
+    listener.sa6.sin6_addr = in6addr_any;
+    listener.sa6.sin6_port = htons(*listenport);
+    rc = bind(sock, &listener.sa, sizeof(listener.sa6));
+  }
+#endif /* ENABLE_IPV6 */
+  if(rc) {
+    error = SOCKERRNO;
+    logmsg("Error binding socket on port %hu: (%d) %s",
+           *listenport, error, strerror(error));
+    sclose(sock);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(!*listenport) {
+    /* The system was supposed to choose a port number, figure out which
+       port we actually got and update the listener port value with it. */
+    curl_socklen_t la_size;
+    srvr_sockaddr_union_t localaddr;
+#ifdef ENABLE_IPV6
+    if(!use_ipv6)
+#endif
+      la_size = sizeof(localaddr.sa4);
+#ifdef ENABLE_IPV6
+    else
+      la_size = sizeof(localaddr.sa6);
+#endif
+    memset(&localaddr.sa, 0, (size_t)la_size);
+    if(getsockname(sock, &localaddr.sa, &la_size) < 0) {
+      error = SOCKERRNO;
+      logmsg("getsockname() failed with error: (%d) %s",
+             error, strerror(error));
+      sclose(sock);
+      return CURL_SOCKET_BAD;
+    }
+    switch(localaddr.sa.sa_family) {
+    case AF_INET:
+      *listenport = ntohs(localaddr.sa4.sin_port);
+      break;
+#ifdef ENABLE_IPV6
+    case AF_INET6:
+      *listenport = ntohs(localaddr.sa6.sin6_port);
+      break;
+#endif
+    default:
+      break;
+    }
+    if(!*listenport) {
+      /* Real failure, listener port shall not be zero beyond this point. */
+      logmsg("Apparently getsockname() succeeded, with listener port zero.");
+      logmsg("A valid reason for this failure is a binary built without");
+      logmsg("proper network library linkage. This might not be the only");
+      logmsg("reason, but double check it before anything else.");
+      sclose(sock);
+      return CURL_SOCKET_BAD;
+    }
+  }
+
+  /* bindonly option forces no listening */
+  if(bind_only) {
+    logmsg("instructed to bind port without listening");
+    return sock;
+  }
+
+  /* start accepting connections */
+  rc = listen(sock, 5);
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("listen(%d, 5) failed with error: (%d) %s",
+           sock, error, strerror(error));
+    sclose(sock);
+    return CURL_SOCKET_BAD;
+  }
+
+  return sock;
+}
+
+
+int main(int argc, char *argv[])
+{
+  srvr_sockaddr_union_t me;
+  curl_socket_t sock = CURL_SOCKET_BAD;
+  curl_socket_t msgsock = CURL_SOCKET_BAD;
+  int wrotepidfile = 0;
+  const char *pidname = ".sockfilt.pid";
+  bool juggle_again;
+  int rc;
+  int error;
+  int arg=1;
+  enum sockmode mode = PASSIVE_LISTEN; /* default */
+  const char *addr = NULL;
+
+  while(argc>arg) {
+    if(!strcmp("--version", argv[arg])) {
+      printf("sockfilt IPv4%s\n",
+#ifdef ENABLE_IPV6
+             "/IPv6"
+#else
+             ""
+#endif
+             );
+      return 0;
+    }
+    else if(!strcmp("--verbose", argv[arg])) {
+      verbose = TRUE;
+      arg++;
+    }
+    else if(!strcmp("--pidfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        pidname = argv[arg++];
+    }
+    else if(!strcmp("--logfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        serverlogfile = argv[arg++];
+    }
+    else if(!strcmp("--ipv6", argv[arg])) {
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv6";
+      use_ipv6 = TRUE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--ipv4", argv[arg])) {
+      /* for completeness, we support this option as well */
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv4";
+      use_ipv6 = FALSE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--bindonly", argv[arg])) {
+      bind_only = TRUE;
+      arg++;
+    }
+    else if(!strcmp("--port", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        char *endptr;
+        unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
+        if((endptr != argv[arg] + strlen(argv[arg])) ||
+           ((ulnum != 0UL) && ((ulnum < 1025UL) || (ulnum > 65535UL)))) {
+          fprintf(stderr, "sockfilt: invalid --port argument (%s)\n",
+                  argv[arg]);
+          return 0;
+        }
+        port = curlx_ultous(ulnum);
+        arg++;
+      }
+    }
+    else if(!strcmp("--connect", argv[arg])) {
+      /* Asked to actively connect to the specified local port instead of
+         doing a passive server-style listening. */
+      arg++;
+      if(argc>arg) {
+        char *endptr;
+        unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
+        if((endptr != argv[arg] + strlen(argv[arg])) ||
+           (ulnum < 1025UL) || (ulnum > 65535UL)) {
+          fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
+                  argv[arg]);
+          return 0;
+        }
+        connectport = curlx_ultous(ulnum);
+        arg++;
+      }
+    }
+    else if(!strcmp("--addr", argv[arg])) {
+      /* Set an IP address to use with --connect; otherwise use localhost */
+      arg++;
+      if(argc>arg) {
+        addr = argv[arg];
+        arg++;
+      }
+    }
+    else {
+      puts("Usage: sockfilt [option]\n"
+           " --version\n"
+           " --verbose\n"
+           " --logfile [file]\n"
+           " --pidfile [file]\n"
+           " --ipv4\n"
+           " --ipv6\n"
+           " --bindonly\n"
+           " --port [port]\n"
+           " --connect [port]\n"
+           " --addr [address]");
+      return 0;
+    }
+  }
+
+#ifdef WIN32
+  win32_init();
+  atexit(win32_cleanup);
+
+  setmode(fileno(stdin), O_BINARY);
+  setmode(fileno(stdout), O_BINARY);
+  setmode(fileno(stderr), O_BINARY);
+#endif
+
+  install_signal_handlers();
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6)
+#endif
+    sock = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef ENABLE_IPV6
+  else
+    sock = socket(AF_INET6, SOCK_STREAM, 0);
+#endif
+
+  if(CURL_SOCKET_BAD == sock) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket: (%d) %s",
+           error, strerror(error));
+    write_stdout("FAIL\n", 5);
+    goto sockfilt_cleanup;
+  }
+
+  if(connectport) {
+    /* Active mode, we should connect to the given port number */
+    mode = ACTIVE;
+#ifdef ENABLE_IPV6
+    if(!use_ipv6) {
+#endif
+      memset(&me.sa4, 0, sizeof(me.sa4));
+      me.sa4.sin_family = AF_INET;
+      me.sa4.sin_port = htons(connectport);
+      me.sa4.sin_addr.s_addr = INADDR_ANY;
+      if(!addr)
+        addr = "127.0.0.1";
+      Curl_inet_pton(AF_INET, addr, &me.sa4.sin_addr);
+
+      rc = connect(sock, &me.sa, sizeof(me.sa4));
+#ifdef ENABLE_IPV6
+    }
+    else {
+      memset(&me.sa6, 0, sizeof(me.sa6));
+      me.sa6.sin6_family = AF_INET6;
+      me.sa6.sin6_port = htons(connectport);
+      if(!addr)
+        addr = "::1";
+      Curl_inet_pton(AF_INET6, addr, &me.sa6.sin6_addr);
+
+      rc = connect(sock, &me.sa, sizeof(me.sa6));
+    }
+#endif /* ENABLE_IPV6 */
+    if(rc) {
+      error = SOCKERRNO;
+      logmsg("Error connecting to port %hu: (%d) %s",
+             connectport, error, strerror(error));
+      write_stdout("FAIL\n", 5);
+      goto sockfilt_cleanup;
+    }
+    logmsg("====> Client connect");
+    msgsock = sock; /* use this as stream */
+  }
+  else {
+    /* passive daemon style */
+    sock = sockdaemon(sock, &port);
+    if(CURL_SOCKET_BAD == sock) {
+      write_stdout("FAIL\n", 5);
+      goto sockfilt_cleanup;
+    }
+    msgsock = CURL_SOCKET_BAD; /* no stream socket yet */
+  }
+
+  logmsg("Running %s version", ipv_inuse);
+
+  if(connectport)
+    logmsg("Connected to port %hu", connectport);
+  else if(bind_only)
+    logmsg("Bound without listening on port %hu", port);
+  else
+    logmsg("Listening on port %hu", port);
+
+  wrotepidfile = write_pidfile(pidname);
+  if(!wrotepidfile) {
+    write_stdout("FAIL\n", 5);
+    goto sockfilt_cleanup;
+  }
+
+  do {
+    juggle_again = juggle(&msgsock, sock, &mode);
+  } while(juggle_again);
+
+sockfilt_cleanup:
+
+  if((msgsock != sock) && (msgsock != CURL_SOCKET_BAD))
+    sclose(msgsock);
+
+  if(sock != CURL_SOCKET_BAD)
+    sclose(sock);
+
+  if(wrotepidfile)
+    unlink(pidname);
+
+  restore_signal_handlers();
+
+  if(got_exit_signal) {
+    logmsg("============> sockfilt exits with signal (%d)", exit_signal);
+    /*
+     * To properly set the return status of the process we
+     * must raise the same signal SIGINT or SIGTERM that we
+     * caught and let the old handler take care of it.
+     */
+    raise(exit_signal);
+  }
+
+  logmsg("============> sockfilt quits");
+  return 0;
+}
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/sws.c b/ap/lib/libcurl/curl-7.54.1/tests/server/sws.c
new file mode 100644
index 0000000..163fe8b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/sws.c
@@ -0,0 +1,2396 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/* sws.c: simple (silly?) web server
+
+   This code was originally graciously donated to the project by Juergen
+   Wilke. Thanks a bunch!
+
+ */
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h> /* for TCP_NODELAY */
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "inet_pton.h"
+#include "util.h"
+#include "server_sockaddr.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EAGAIN
+#define EAGAIN  11 /* errno.h value */
+#undef  ERANGE
+#define ERANGE  34 /* errno.h value */
+#endif
+
+static enum {
+  socket_domain_inet = AF_INET
+#ifdef ENABLE_IPV6
+  , socket_domain_inet6 = AF_INET6
+#endif
+#ifdef USE_UNIX_SOCKETS
+  , socket_domain_unix = AF_UNIX
+#endif
+} socket_domain = AF_INET;
+static bool use_gopher = FALSE;
+static int serverlogslocked = 0;
+static bool is_proxy = FALSE;
+
+#define REQBUFSIZ 150000
+#define REQBUFSIZ_TXT "149999"
+
+static long prevtestno=-1;    /* previous test number we served */
+static long prevpartno=-1;    /* previous part number we served */
+static bool prevbounce=FALSE; /* instructs the server to increase the part
+                                 number for a test in case the identical
+                                 testno+partno request shows up again */
+
+#define RCMD_NORMALREQ 0 /* default request, use the tests file normally */
+#define RCMD_IDLE      1 /* told to sit idle */
+#define RCMD_STREAM    2 /* told to stream */
+
+struct httprequest {
+  char reqbuf[REQBUFSIZ]; /* buffer area for the incoming request */
+  bool connect_request; /* if a CONNECT */
+  unsigned short connect_port; /* the port number CONNECT used */
+  size_t checkindex; /* where to start checking of the request */
+  size_t offset;     /* size of the incoming request */
+  long testno;       /* test number found in the request */
+  long partno;       /* part number found in the request */
+  bool open;      /* keep connection open info, as found in the request */
+  bool auth_req;  /* authentication required, don't wait for body unless
+                     there's an Authorization header */
+  bool auth;      /* Authorization header present in the incoming request */
+  size_t cl;      /* Content-Length of the incoming request */
+  bool digest;    /* Authorization digest header found */
+  bool ntlm;      /* Authorization ntlm header found */
+  int writedelay; /* if non-zero, delay this number of seconds between
+                     writes in the response */
+  int pipe;       /* if non-zero, expect this many requests to do a "piped"
+                     request/response */
+  int skip;       /* if non-zero, the server is instructed to not read this
+                     many bytes from a PUT/POST request. Ie the client sends N
+                     bytes said in Content-Length, but the server only reads N
+                     - skip bytes. */
+  int rcmd;       /* doing a special command, see defines above */
+  int prot_version;  /* HTTP version * 10 */
+  bool pipelining;   /* true if request is pipelined */
+  int callcount;  /* times ProcessRequest() gets called */
+  bool connmon;   /* monitor the state of the connection, log disconnects */
+  bool upgrade;   /* test case allows upgrade to http2 */
+  bool upgrade_request; /* upgrade request found and allowed */
+  int done_processing;
+};
+
+#define MAX_SOCKETS 1024
+
+static curl_socket_t all_sockets[MAX_SOCKETS];
+static size_t num_sockets = 0;
+
+static int ProcessRequest(struct httprequest *req);
+static void storerequest(const char *reqbuf, size_t totalsize);
+
+#define DEFAULT_PORT 8999
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/sws.log"
+#endif
+
+const char *serverlogfile = DEFAULT_LOGFILE;
+
+#define SWSVERSION "curl test suite HTTP server/0.1"
+
+#define REQUEST_DUMP  "log/server.input"
+#define RESPONSE_DUMP "log/server.response"
+
+/* when told to run as proxy, we store the logs in different files so that
+   they can co-exist with the same program running as a "server" */
+#define REQUEST_PROXY_DUMP  "log/proxy.input"
+#define RESPONSE_PROXY_DUMP "log/proxy.response"
+
+/* very-big-path support */
+#define MAXDOCNAMELEN 140000
+#define MAXDOCNAMELEN_TXT "139999"
+
+#define REQUEST_KEYWORD_SIZE 256
+#define REQUEST_KEYWORD_SIZE_TXT "255"
+
+#define CMD_AUTH_REQUIRED "auth_required"
+
+/* 'idle' means that it will accept the request fine but never respond
+   any data. Just keep the connection alive. */
+#define CMD_IDLE "idle"
+
+/* 'stream' means to send a never-ending stream of data */
+#define CMD_STREAM "stream"
+
+/* 'connection-monitor' will output when a server/proxy connection gets
+   disconnected as for some cases it is important that it gets done at the
+   proper point - like with NTLM */
+#define CMD_CONNECTIONMONITOR "connection-monitor"
+
+/* upgrade to http2 */
+#define CMD_UPGRADE "upgrade"
+
+#define END_OF_HEADERS "\r\n\r\n"
+
+enum {
+  DOCNUMBER_NOTHING = -4,
+  DOCNUMBER_QUIT    = -3,
+  DOCNUMBER_WERULEZ = -2,
+  DOCNUMBER_404     = -1
+};
+
+static const char *end_of_headers = END_OF_HEADERS;
+
+/* sent as reply to a QUIT */
+static const char *docquit =
+"HTTP/1.1 200 Goodbye" END_OF_HEADERS;
+
+/* send back this on 404 file not found */
+static const char *doc404 = "HTTP/1.1 404 Not Found\r\n"
+    "Server: " SWSVERSION "\r\n"
+    "Connection: close\r\n"
+    "Content-Type: text/html"
+    END_OF_HEADERS
+    "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
+    "<HTML><HEAD>\n"
+    "<TITLE>404 Not Found</TITLE>\n"
+    "</HEAD><BODY>\n"
+    "<H1>Not Found</H1>\n"
+    "The requested URL was not found on this server.\n"
+    "<P><HR><ADDRESS>" SWSVERSION "</ADDRESS>\n" "</BODY></HTML>\n";
+
+/* do-nothing macro replacement for systems which lack siginterrupt() */
+
+#ifndef HAVE_SIGINTERRUPT
+#define siginterrupt(x,y) do {} while(0)
+#endif
+
+/* vars used to keep around previous signal handlers */
+
+typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+
+#ifdef SIGHUP
+static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGPIPE
+static SIGHANDLER_T old_sigpipe_handler = SIG_ERR;
+#endif
+
+#ifdef SIGALRM
+static SIGHANDLER_T old_sigalrm_handler = SIG_ERR;
+#endif
+
+#ifdef SIGINT
+static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGTERM
+static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
+#endif
+
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
+/* var which if set indicates that the program should finish execution */
+
+SIG_ATOMIC_T got_exit_signal = 0;
+
+/* if next is set indicates the first signal handled in exit_signal_handler */
+
+static volatile int exit_signal = 0;
+
+/* signal handler that will be triggered to indicate that the program
+  should finish its execution in a controlled manner as soon as possible.
+  The first time this is called it will set got_exit_signal to one and
+  store in exit_signal the signal that triggered its execution. */
+
+static RETSIGTYPE exit_signal_handler(int signum)
+{
+  int old_errno = errno;
+  if(got_exit_signal == 0) {
+    got_exit_signal = 1;
+    exit_signal = signum;
+  }
+  (void)signal(signum, exit_signal_handler);
+  errno = old_errno;
+}
+
+static void install_signal_handlers(void)
+{
+#ifdef SIGHUP
+  /* ignore SIGHUP signal */
+  old_sighup_handler = signal(SIGHUP, SIG_IGN);
+  if(old_sighup_handler == SIG_ERR)
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
+#endif
+#ifdef SIGPIPE
+  /* ignore SIGPIPE signal */
+  old_sigpipe_handler = signal(SIGPIPE, SIG_IGN);
+  if(old_sigpipe_handler == SIG_ERR)
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
+#endif
+#ifdef SIGALRM
+  /* ignore SIGALRM signal */
+  old_sigalrm_handler = signal(SIGALRM, SIG_IGN);
+  if(old_sigalrm_handler == SIG_ERR)
+    logmsg("cannot install SIGALRM handler: %s", strerror(errno));
+#endif
+#ifdef SIGINT
+  /* handle SIGINT signal with our exit_signal_handler */
+  old_sigint_handler = signal(SIGINT, exit_signal_handler);
+  if(old_sigint_handler == SIG_ERR)
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGINT, 1);
+#endif
+#ifdef SIGTERM
+  /* handle SIGTERM signal with our exit_signal_handler */
+  old_sigterm_handler = signal(SIGTERM, exit_signal_handler);
+  if(old_sigterm_handler == SIG_ERR)
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGTERM, 1);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler);
+  if(old_sigbreak_handler == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
+}
+
+static void restore_signal_handlers(void)
+{
+#ifdef SIGHUP
+  if(SIG_ERR != old_sighup_handler)
+    (void)signal(SIGHUP, old_sighup_handler);
+#endif
+#ifdef SIGPIPE
+  if(SIG_ERR != old_sigpipe_handler)
+    (void)signal(SIGPIPE, old_sigpipe_handler);
+#endif
+#ifdef SIGALRM
+  if(SIG_ERR != old_sigalrm_handler)
+    (void)signal(SIGALRM, old_sigalrm_handler);
+#endif
+#ifdef SIGINT
+  if(SIG_ERR != old_sigint_handler)
+    (void)signal(SIGINT, old_sigint_handler);
+#endif
+#ifdef SIGTERM
+  if(SIG_ERR != old_sigterm_handler)
+    (void)signal(SIGTERM, old_sigterm_handler);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+/* returns true if the current socket is an IP one */
+static bool socket_domain_is_ip(void)
+{
+  switch(socket_domain) {
+  case AF_INET:
+#ifdef ENABLE_IPV6
+  case AF_INET6:
+#endif
+    return true;
+  default:
+  /* case AF_UNIX: */
+    return false;
+  }
+}
+
+/* based on the testno, parse the correct server commands */
+static int parse_servercmd(struct httprequest *req)
+{
+  FILE *stream;
+  char *filename;
+  int error;
+
+  filename = test2file(req->testno);
+
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("  [1] Error opening file: %s", filename);
+    logmsg("  Couldn't open test file %ld", req->testno);
+    req->open = FALSE; /* closes connection */
+    return 1; /* done */
+  }
+  else {
+    char *orgcmd = NULL;
+    char *cmd = NULL;
+    size_t cmdsize = 0;
+    int num=0;
+
+    /* get the custom server control "commands" */
+    error = getpart(&orgcmd, &cmdsize, "reply", "servercmd", stream);
+    fclose(stream);
+    if(error) {
+      logmsg("getpart() failed with error: %d", error);
+      req->open = FALSE; /* closes connection */
+      return 1; /* done */
+    }
+
+    req->connmon = FALSE;
+
+    cmd = orgcmd;
+    while(cmd && cmdsize) {
+      char *check;
+
+      if(!strncmp(CMD_AUTH_REQUIRED, cmd, strlen(CMD_AUTH_REQUIRED))) {
+        logmsg("instructed to require authorization header");
+        req->auth_req = TRUE;
+      }
+      else if(!strncmp(CMD_IDLE, cmd, strlen(CMD_IDLE))) {
+        logmsg("instructed to idle");
+        req->rcmd = RCMD_IDLE;
+        req->open = TRUE;
+      }
+      else if(!strncmp(CMD_STREAM, cmd, strlen(CMD_STREAM))) {
+        logmsg("instructed to stream");
+        req->rcmd = RCMD_STREAM;
+      }
+      else if(!strncmp(CMD_CONNECTIONMONITOR, cmd,
+                       strlen(CMD_CONNECTIONMONITOR))) {
+        logmsg("enabled connection monitoring");
+        req->connmon = TRUE;
+      }
+      else if(!strncmp(CMD_UPGRADE, cmd, strlen(CMD_UPGRADE))) {
+        logmsg("enabled upgrade to http2");
+        req->upgrade = TRUE;
+      }
+      else if(1 == sscanf(cmd, "pipe: %d", &num)) {
+        logmsg("instructed to allow a pipe size of %d", num);
+        if(num < 0)
+          logmsg("negative pipe size ignored");
+        else if(num > 0)
+          req->pipe = num-1; /* decrease by one since we don't count the
+                                first request in this number */
+      }
+      else if(1 == sscanf(cmd, "skip: %d", &num)) {
+        logmsg("instructed to skip this number of bytes %d", num);
+        req->skip = num;
+      }
+      else if(1 == sscanf(cmd, "writedelay: %d", &num)) {
+        logmsg("instructed to delay %d secs between packets", num);
+        req->writedelay = num;
+      }
+      else {
+        logmsg("Unknown <servercmd> instruction found: %s", cmd);
+      }
+      /* try to deal with CRLF or just LF */
+      check = strchr(cmd, '\r');
+      if(!check)
+        check = strchr(cmd, '\n');
+
+      if(check) {
+        /* get to the letter following the newline */
+        while((*check == '\r') || (*check == '\n'))
+          check++;
+
+        if(!*check)
+          /* if we reached a zero, get out */
+          break;
+        cmd = check;
+      }
+      else
+        break;
+    }
+    free(orgcmd);
+  }
+
+  return 0; /* OK! */
+}
+
+static int ProcessRequest(struct httprequest *req)
+{
+  char *line=&req->reqbuf[req->checkindex];
+  bool chunked = FALSE;
+  static char request[REQUEST_KEYWORD_SIZE];
+  static char doc[MAXDOCNAMELEN];
+  char logbuf[456];
+  int prot_major, prot_minor;
+  char *end = strstr(line, end_of_headers);
+
+  req->callcount++;
+
+  logmsg("Process %d bytes request%s", req->offset,
+         req->callcount > 1?" [CONTINUED]":"");
+
+  /* try to figure out the request characteristics as soon as possible, but
+     only once! */
+
+  if(use_gopher &&
+     (req->testno == DOCNUMBER_NOTHING) &&
+     !strncmp("/verifiedserver", line, 15)) {
+    logmsg("Are-we-friendly question received");
+    req->testno = DOCNUMBER_WERULEZ;
+    return 1; /* done */
+  }
+
+  else if((req->testno == DOCNUMBER_NOTHING) &&
+     sscanf(line,
+            "%" REQUEST_KEYWORD_SIZE_TXT"s %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
+            request,
+            doc,
+            &prot_major,
+            &prot_minor) == 4) {
+    char *ptr;
+
+    req->prot_version = prot_major*10 + prot_minor;
+
+    /* find the last slash */
+    ptr = strrchr(doc, '/');
+
+    /* get the number after it */
+    if(ptr) {
+      if((strlen(doc) + strlen(request)) < 400)
+        snprintf(logbuf, sizeof(logbuf), "Got request: %s %s HTTP/%d.%d",
+                 request, doc, prot_major, prot_minor);
+      else
+        snprintf(logbuf, sizeof(logbuf), "Got a *HUGE* request HTTP/%d.%d",
+                 prot_major, prot_minor);
+      logmsg("%s", logbuf);
+
+      if(!strncmp("/verifiedserver", ptr, 15)) {
+        logmsg("Are-we-friendly question received");
+        req->testno = DOCNUMBER_WERULEZ;
+        return 1; /* done */
+      }
+
+      if(!strncmp("/quit", ptr, 5)) {
+        logmsg("Request-to-quit received");
+        req->testno = DOCNUMBER_QUIT;
+        return 1; /* done */
+      }
+
+      ptr++; /* skip the slash */
+
+      /* skip all non-numericals following the slash */
+      while(*ptr && !ISDIGIT(*ptr))
+        ptr++;
+
+      req->testno = strtol(ptr, &ptr, 10);
+
+      if(req->testno > 10000) {
+        req->partno = req->testno % 10000;
+        req->testno /= 10000;
+      }
+      else
+        req->partno = 0;
+
+      if(req->testno) {
+
+        snprintf(logbuf, sizeof(logbuf), "Requested test number %ld part %ld",
+                 req->testno, req->partno);
+        logmsg("%s", logbuf);
+
+        /* find and parse <servercmd> for this test */
+        parse_servercmd(req);
+      }
+      else
+        req->testno = DOCNUMBER_NOTHING;
+
+    }
+
+    if(req->testno == DOCNUMBER_NOTHING) {
+      /* didn't find any in the first scan, try alternative test case
+         number placements */
+
+      if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d",
+                doc, &prot_major, &prot_minor) == 3) {
+        char *portp = NULL;
+        unsigned long part=0;
+
+        snprintf(logbuf, sizeof(logbuf),
+                 "Received a CONNECT %s HTTP/%d.%d request",
+                 doc, prot_major, prot_minor);
+        logmsg("%s", logbuf);
+
+        req->connect_request = TRUE;
+
+        if(req->prot_version == 10)
+          req->open = FALSE; /* HTTP 1.0 closes connection by default */
+
+        if(doc[0] == '[') {
+          char *p = &doc[1];
+          /* scan through the hexgroups and store the value of the last group
+             in the 'part' variable and use as test case number!! */
+          while(*p && (ISXDIGIT(*p) || (*p == ':') || (*p == '.'))) {
+            char *endp;
+            part = strtoul(p, &endp, 16);
+            if(ISXDIGIT(*p))
+              p = endp;
+            else
+              p++;
+          }
+          if(*p != ']')
+            logmsg("Invalid CONNECT IPv6 address format");
+          else if(*(p+1) != ':')
+            logmsg("Invalid CONNECT IPv6 port format");
+          else
+            portp = p+1;
+
+          req->testno = part;
+        }
+        else
+          portp = strchr(doc, ':');
+
+        if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1))) {
+          unsigned long ulnum = strtoul(portp+1, NULL, 10);
+          if(!ulnum || (ulnum > 65535UL))
+            logmsg("Invalid CONNECT port received");
+          else
+            req->connect_port = curlx_ultous(ulnum);
+
+        }
+        logmsg("Port number: %d, test case number: %ld",
+               req->connect_port, req->testno);
+      }
+    }
+
+    if(req->testno == DOCNUMBER_NOTHING) {
+      /* Still no test case number. Try to get the the number off the last dot
+         instead, IE we consider the TLD to be the test number. Test 123 can
+         then be written as "example.com.123". */
+
+      /* find the last dot */
+      ptr = strrchr(doc, '.');
+
+      /* get the number after it */
+      if(ptr) {
+        ptr++; /* skip the dot */
+
+        req->testno = strtol(ptr, &ptr, 10);
+
+        if(req->testno > 10000) {
+          req->partno = req->testno % 10000;
+          req->testno /= 10000;
+
+          logmsg("found test %d in requested host name", req->testno);
+
+        }
+        else
+          req->partno = 0;
+
+        snprintf(logbuf, sizeof(logbuf),
+                 "Requested test number %ld part %ld (from host name)",
+                 req->testno, req->partno);
+        logmsg("%s", logbuf);
+
+      }
+
+      if(!req->testno) {
+        logmsg("Did not find test number in PATH");
+        req->testno = DOCNUMBER_404;
+      }
+      else
+        parse_servercmd(req);
+    }
+  }
+  else if((req->offset >= 3) && (req->testno == DOCNUMBER_NOTHING)) {
+    logmsg("** Unusual request. Starts with %02x %02x %02x",
+           line[0], line[1], line[2]);
+  }
+
+  if(!end) {
+    /* we don't have a complete request yet! */
+    logmsg("request not complete yet");
+    return 0; /* not complete yet */
+  }
+  logmsg("- request found to be complete");
+
+  if(use_gopher) {
+    /* when using gopher we cannot check the request until the entire
+       thing has been received */
+    char *ptr;
+
+    /* find the last slash in the line */
+    ptr = strrchr(line, '/');
+
+    if(ptr) {
+      ptr++; /* skip the slash */
+
+      /* skip all non-numericals following the slash */
+      while(*ptr && !ISDIGIT(*ptr))
+        ptr++;
+
+      req->testno = strtol(ptr, &ptr, 10);
+
+      if(req->testno > 10000) {
+        req->partno = req->testno % 10000;
+        req->testno /= 10000;
+      }
+      else
+        req->partno = 0;
+
+      snprintf(logbuf, sizeof(logbuf),
+               "Requested GOPHER test number %ld part %ld",
+               req->testno, req->partno);
+      logmsg("%s", logbuf);
+    }
+  }
+
+  if(req->pipe)
+    /* we do have a full set, advance the checkindex to after the end of the
+       headers, for the pipelining case mostly */
+    req->checkindex += (end - line) + strlen(end_of_headers);
+
+  /* **** Persistence ****
+   *
+   * If the request is a HTTP/1.0 one, we close the connection unconditionally
+   * when we're done.
+   *
+   * If the request is a HTTP/1.1 one, we MUST check for a "Connection:"
+   * header that might say "close". If it does, we close a connection when
+   * this request is processed. Otherwise, we keep the connection alive for X
+   * seconds.
+   */
+
+  do {
+    if(got_exit_signal)
+      return 1; /* done */
+
+    if((req->cl==0) && strncasecompare("Content-Length:", line, 15)) {
+      /* If we don't ignore content-length, we read it and we read the whole
+         request including the body before we return. If we've been told to
+         ignore the content-length, we will return as soon as all headers
+         have been received */
+      char *endptr;
+      char *ptr = line + 15;
+      unsigned long clen = 0;
+      while(*ptr && ISSPACE(*ptr))
+        ptr++;
+      endptr = ptr;
+      errno = 0;
+      clen = strtoul(ptr, &endptr, 10);
+      if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
+        /* this assumes that a zero Content-Length is valid */
+        logmsg("Found invalid Content-Length: (%s) in the request", ptr);
+        req->open = FALSE; /* closes connection */
+        return 1; /* done */
+      }
+      req->cl = clen - req->skip;
+
+      logmsg("Found Content-Length: %lu in the request", clen);
+      if(req->skip)
+        logmsg("... but will abort after %zu bytes", req->cl);
+      break;
+    }
+    else if(strncasecompare("Transfer-Encoding: chunked", line,
+                            strlen("Transfer-Encoding: chunked"))) {
+      /* chunked data coming in */
+      chunked = TRUE;
+    }
+
+    if(chunked) {
+      if(strstr(req->reqbuf, "\r\n0\r\n\r\n"))
+        /* end of chunks reached */
+        return 1; /* done */
+      else
+        return 0; /* not done */
+    }
+
+    line = strchr(line, '\n');
+    if(line)
+      line++;
+
+  } while(line);
+
+  if(!req->auth && strstr(req->reqbuf, "Authorization:")) {
+    req->auth = TRUE; /* Authorization: header present! */
+    if(req->auth_req)
+      logmsg("Authorization header found, as required");
+  }
+
+  if(!req->digest && strstr(req->reqbuf, "Authorization: Digest")) {
+    /* If the client is passing this Digest-header, we set the part number
+       to 1000. Not only to spice up the complexity of this, but to make
+       Digest stuff to work in the test suite. */
+    req->partno += 1000;
+    req->digest = TRUE; /* header found */
+    logmsg("Received Digest request, sending back data %ld", req->partno);
+  }
+  else if(!req->ntlm &&
+          strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAD")) {
+    /* If the client is passing this type-3 NTLM header */
+    req->partno += 1002;
+    req->ntlm = TRUE; /* NTLM found */
+    logmsg("Received NTLM type-3, sending back data %ld", req->partno);
+    if(req->cl) {
+      logmsg("  Expecting %zu POSTed bytes", req->cl);
+    }
+  }
+  else if(!req->ntlm &&
+          strstr(req->reqbuf, "Authorization: NTLM TlRMTVNTUAAB")) {
+    /* If the client is passing this type-1 NTLM header */
+    req->partno += 1001;
+    req->ntlm = TRUE; /* NTLM found */
+    logmsg("Received NTLM type-1, sending back data %ld", req->partno);
+  }
+  else if((req->partno >= 1000) &&
+          strstr(req->reqbuf, "Authorization: Basic")) {
+    /* If the client is passing this Basic-header and the part number is
+       already >=1000, we add 1 to the part number.  This allows simple Basic
+       authentication negotiation to work in the test suite. */
+    req->partno += 1;
+    logmsg("Received Basic request, sending back data %ld", req->partno);
+  }
+  if(strstr(req->reqbuf, "Connection: close"))
+    req->open = FALSE; /* close connection after this request */
+
+  if(!req->pipe &&
+     req->open &&
+     req->prot_version >= 11 &&
+     end &&
+     req->reqbuf + req->offset > end + strlen(end_of_headers) &&
+     !req->cl &&
+     (!strncmp(req->reqbuf, "GET", strlen("GET")) ||
+      !strncmp(req->reqbuf, "HEAD", strlen("HEAD")))) {
+    /* If we have a persistent connection, HTTP version >= 1.1
+       and GET/HEAD request, enable pipelining. */
+    req->checkindex = (end - req->reqbuf) + strlen(end_of_headers);
+    req->pipelining = TRUE;
+  }
+
+  while(req->pipe) {
+    if(got_exit_signal)
+      return 1; /* done */
+    /* scan for more header ends within this chunk */
+    line = &req->reqbuf[req->checkindex];
+    end = strstr(line, end_of_headers);
+    if(!end)
+      break;
+    req->checkindex += (end - line) + strlen(end_of_headers);
+    req->pipe--;
+  }
+
+  /* If authentication is required and no auth was provided, end now. This
+     makes the server NOT wait for PUT/POST data and you can then make the
+     test case send a rejection before any such data has been sent. Test case
+     154 uses this.*/
+  if(req->auth_req && !req->auth) {
+    logmsg("Return early due to auth requested by none provided");
+    return 1; /* done */
+  }
+
+  if(req->upgrade && strstr(req->reqbuf, "Upgrade:")) {
+    /* we allow upgrade and there was one! */
+    logmsg("Found Upgrade: in request and allows it");
+    req->upgrade_request = TRUE;
+  }
+
+  if(req->cl > 0) {
+    if(req->cl <= req->offset - (end - req->reqbuf) - strlen(end_of_headers))
+      return 1; /* done */
+    else
+      return 0; /* not complete yet */
+  }
+
+  return 1; /* done */
+}
+
+/* store the entire request in a file */
+static void storerequest(const char *reqbuf, size_t totalsize)
+{
+  int res;
+  int error = 0;
+  size_t written;
+  size_t writeleft;
+  FILE *dump;
+  const char *dumpfile=is_proxy?REQUEST_PROXY_DUMP:REQUEST_DUMP;
+
+  if(reqbuf == NULL)
+    return;
+  if(totalsize == 0)
+    return;
+
+  do {
+    dump = fopen(dumpfile, "ab");
+  } while((dump == NULL) && ((error = errno) == EINTR));
+  if(dump == NULL) {
+    logmsg("[2] Error opening file %s error: %d %s",
+           dumpfile, error, strerror(error));
+    logmsg("Failed to write request input ");
+    return;
+  }
+
+  writeleft = totalsize;
+  do {
+    written = fwrite(&reqbuf[totalsize-writeleft],
+                     1, writeleft, dump);
+    if(got_exit_signal)
+      goto storerequest_cleanup;
+    if(written > 0)
+      writeleft -= written;
+  } while((writeleft > 0) && ((error = errno) == EINTR));
+
+  if(writeleft == 0)
+    logmsg("Wrote request (%zu bytes) input to %s", totalsize, dumpfile);
+  else if(writeleft > 0) {
+    logmsg("Error writing file %s error: %d %s",
+           dumpfile, error, strerror(error));
+    logmsg("Wrote only (%zu bytes) of (%zu bytes) request input to %s",
+           totalsize-writeleft, totalsize, dumpfile);
+  }
+
+storerequest_cleanup:
+
+  do {
+    res = fclose(dump);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error closing file %s error: %d %s",
+           dumpfile, error, strerror(error));
+}
+
+static void init_httprequest(struct httprequest *req)
+{
+  /* Pipelining is already set, so do not initialize it here. Only initialize
+     checkindex and offset if pipelining is not set, since in a pipeline they
+     need to be inherited from the previous request. */
+  if(!req->pipelining) {
+    req->checkindex = 0;
+    req->offset = 0;
+  }
+  req->testno = DOCNUMBER_NOTHING;
+  req->partno = 0;
+  req->connect_request = FALSE;
+  req->open = TRUE;
+  req->auth_req = FALSE;
+  req->auth = FALSE;
+  req->cl = 0;
+  req->digest = FALSE;
+  req->ntlm = FALSE;
+  req->pipe = 0;
+  req->skip = 0;
+  req->writedelay = 0;
+  req->rcmd = RCMD_NORMALREQ;
+  req->prot_version = 0;
+  req->callcount = 0;
+  req->connect_port = 0;
+  req->done_processing = 0;
+  req->upgrade = 0;
+  req->upgrade_request = 0;
+}
+
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+   is no data waiting, or < 0 if it should be closed */
+static int get_request(curl_socket_t sock, struct httprequest *req)
+{
+  int error;
+  int fail = 0;
+  char *reqbuf = req->reqbuf;
+  ssize_t got = 0;
+  int overflow = 0;
+
+  char *pipereq = NULL;
+  size_t pipereq_length = 0;
+
+  if(req->pipelining) {
+    pipereq = reqbuf + req->checkindex;
+    pipereq_length = req->offset - req->checkindex;
+
+    /* Now that we've got the pipelining info we can reset the
+       pipelining-related vars which were skipped in init_httprequest */
+    req->pipelining = FALSE;
+    req->checkindex = 0;
+    req->offset = 0;
+  }
+
+  if(req->offset >= REQBUFSIZ-1) {
+    /* buffer is already full; do nothing */
+    overflow = 1;
+  }
+  else {
+    if(pipereq_length && pipereq) {
+      memmove(reqbuf, pipereq, pipereq_length);
+      got = curlx_uztosz(pipereq_length);
+      pipereq_length = 0;
+    }
+    else {
+      if(req->skip)
+        /* we are instructed to not read the entire thing, so we make sure to
+           only read what we're supposed to and NOT read the enire thing the
+           client wants to send! */
+        got = sread(sock, reqbuf + req->offset, req->cl);
+      else
+        got = sread(sock, reqbuf + req->offset, REQBUFSIZ-1 - req->offset);
+    }
+    if(got_exit_signal)
+      return -1;
+    if(got == 0) {
+      logmsg("Connection closed by client");
+      fail = 1;
+    }
+    else if(got < 0) {
+      error = SOCKERRNO;
+      if(EAGAIN == error || EWOULDBLOCK == error) {
+        /* nothing to read at the moment */
+        return 0;
+      }
+      logmsg("recv() returned error: (%d) %s", error, strerror(error));
+      fail = 1;
+    }
+    if(fail) {
+      /* dump the request received so far to the external file */
+      reqbuf[req->offset] = '\0';
+      storerequest(reqbuf, req->offset);
+      return -1;
+    }
+
+    logmsg("Read %zd bytes", got);
+
+    req->offset += (size_t)got;
+    reqbuf[req->offset] = '\0';
+
+    req->done_processing = ProcessRequest(req);
+    if(got_exit_signal)
+      return -1;
+    if(req->done_processing && req->pipe) {
+      logmsg("Waiting for another piped request");
+      req->done_processing = 0;
+      req->pipe--;
+    }
+  }
+
+  if(overflow || (req->offset == REQBUFSIZ-1 && got > 0)) {
+    logmsg("Request would overflow buffer, closing connection");
+    /* dump request received so far to external file anyway */
+    reqbuf[REQBUFSIZ-1] = '\0';
+    fail = 1;
+  }
+  else if(req->offset > REQBUFSIZ-1) {
+    logmsg("Request buffer overflow, closing connection");
+    /* dump request received so far to external file anyway */
+    reqbuf[REQBUFSIZ-1] = '\0';
+    fail = 1;
+  }
+  else
+    reqbuf[req->offset] = '\0';
+
+  /* at the end of a request dump it to an external file */
+  if(fail || req->done_processing)
+    storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset);
+  if(got_exit_signal)
+    return -1;
+
+  return fail ? -1 : 1;
+}
+
+/* returns -1 on failure */
+static int send_doc(curl_socket_t sock, struct httprequest *req)
+{
+  ssize_t written;
+  size_t count;
+  const char *buffer;
+  char *ptr=NULL;
+  FILE *stream;
+  char *cmd=NULL;
+  size_t cmdsize=0;
+  FILE *dump;
+  bool persistant = TRUE;
+  bool sendfailure = FALSE;
+  size_t responsesize;
+  int error = 0;
+  int res;
+  const char *responsedump = is_proxy?RESPONSE_PROXY_DUMP:RESPONSE_DUMP;
+  static char weare[256];
+
+  switch(req->rcmd) {
+  default:
+  case RCMD_NORMALREQ:
+    break; /* continue with business as usual */
+  case RCMD_STREAM:
+#define STREAMTHIS "a string to stream 01234567890\n"
+    count = strlen(STREAMTHIS);
+    for(;;) {
+      written = swrite(sock, STREAMTHIS, count);
+      if(got_exit_signal)
+        return -1;
+      if(written != (ssize_t)count) {
+        logmsg("Stopped streaming");
+        break;
+      }
+    }
+    return -1;
+  case RCMD_IDLE:
+    /* Do nothing. Sit idle. Pretend it rains. */
+    return 0;
+  }
+
+  req->open = FALSE;
+
+  if(req->testno < 0) {
+    size_t msglen;
+    char msgbuf[64];
+
+    switch(req->testno) {
+    case DOCNUMBER_QUIT:
+      logmsg("Replying to QUIT");
+      buffer = docquit;
+      break;
+    case DOCNUMBER_WERULEZ:
+      /* we got a "friends?" question, reply back that we sure are */
+      logmsg("Identifying ourselves as friends");
+      snprintf(msgbuf, sizeof(msgbuf), "WE ROOLZ: %ld\r\n", (long)getpid());
+      msglen = strlen(msgbuf);
+      if(use_gopher)
+        snprintf(weare, sizeof(weare), "%s", msgbuf);
+      else
+        snprintf(weare, sizeof(weare),
+                 "HTTP/1.1 200 OK\r\nContent-Length: %zu\r\n\r\n%s",
+                 msglen, msgbuf);
+      buffer = weare;
+      break;
+    case DOCNUMBER_404:
+    default:
+      logmsg("Replying to with a 404");
+      buffer = doc404;
+      break;
+    }
+
+    count = strlen(buffer);
+  }
+  else {
+    char partbuf[80];
+    char *filename = test2file(req->testno);
+
+    /* select the <data> tag for "normal" requests and the <connect> one
+       for CONNECT requests (within the <reply> section) */
+    const char *section= req->connect_request?"connect":"data";
+
+    if(req->partno)
+      snprintf(partbuf, sizeof(partbuf), "%s%ld", section, req->partno);
+    else
+      snprintf(partbuf, sizeof(partbuf), "%s", section);
+
+    logmsg("Send response test%ld section <%s>", req->testno, partbuf);
+
+    stream=fopen(filename, "rb");
+    if(!stream) {
+      error = errno;
+      logmsg("fopen() failed with error: %d %s", error, strerror(error));
+      logmsg("  [3] Error opening file: %s", filename);
+      return 0;
+    }
+    else {
+      error = getpart(&ptr, &count, "reply", partbuf, stream);
+      fclose(stream);
+      if(error) {
+        logmsg("getpart() failed with error: %d", error);
+        return 0;
+      }
+      buffer = ptr;
+    }
+
+    if(got_exit_signal) {
+      free(ptr);
+      return -1;
+    }
+
+    /* re-open the same file again */
+    stream=fopen(filename, "rb");
+    if(!stream) {
+      error = errno;
+      logmsg("fopen() failed with error: %d %s", error, strerror(error));
+      logmsg("  [4] Error opening file: %s", filename);
+      free(ptr);
+      return 0;
+    }
+    else {
+      /* get the custom server control "commands" */
+      error = getpart(&cmd, &cmdsize, "reply", "postcmd", stream);
+      fclose(stream);
+      if(error) {
+        logmsg("getpart() failed with error: %d", error);
+        free(ptr);
+        return 0;
+      }
+    }
+  }
+
+  if(got_exit_signal) {
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  /* If the word 'swsclose' is present anywhere in the reply chunk, the
+     connection will be closed after the data has been sent to the requesting
+     client... */
+  if(strstr(buffer, "swsclose") || !count) {
+    persistant = FALSE;
+    logmsg("connection close instruction \"swsclose\" found in response");
+  }
+  if(strstr(buffer, "swsbounce")) {
+    prevbounce = TRUE;
+    logmsg("enable \"swsbounce\" in the next request");
+  }
+  else
+    prevbounce = FALSE;
+
+  dump = fopen(responsedump, "ab");
+  if(!dump) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("  [5] Error opening file: %s", responsedump);
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  responsesize = count;
+  do {
+    /* Ok, we send no more than 200 bytes at a time, just to make sure that
+       larger chunks are split up so that the client will need to do multiple
+       recv() calls to get it and thus we exercise that code better */
+    size_t num = count;
+    if(num > 200)
+      num = 200;
+
+    retry:
+    written = swrite(sock, buffer, num);
+    if(written < 0) {
+      if((EWOULDBLOCK == SOCKERRNO) || (EAGAIN == SOCKERRNO)) {
+        wait_ms(10);
+        goto retry;
+      }
+      sendfailure = TRUE;
+      break;
+    }
+    else {
+      logmsg("Sent off %zd bytes", written);
+    }
+
+    /* write to file as well */
+    fwrite(buffer, 1, (size_t)written, dump);
+
+    count -= written;
+    buffer += written;
+
+    if(req->writedelay) {
+      int quarters = req->writedelay * 4;
+      logmsg("Pausing %d seconds", req->writedelay);
+      while((quarters > 0) && !got_exit_signal) {
+        quarters--;
+        wait_ms(250);
+      }
+    }
+  } while((count > 0) && !got_exit_signal);
+
+  do {
+    res = fclose(dump);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error closing file %s error: %d %s",
+           responsedump, error, strerror(error));
+
+  if(got_exit_signal) {
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  if(sendfailure) {
+    logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) "
+           "were sent",
+           responsesize-count, responsesize);
+    free(ptr);
+    free(cmd);
+    return -1;
+  }
+
+  logmsg("Response sent (%zu bytes) and written to %s",
+         responsesize, responsedump);
+  free(ptr);
+
+  if(cmdsize > 0) {
+    char command[32];
+    int quarters;
+    int num;
+    ptr=cmd;
+    do {
+      if(2 == sscanf(ptr, "%31s %d", command, &num)) {
+        if(!strcmp("wait", command)) {
+          logmsg("Told to sleep for %d seconds", num);
+          quarters = num * 4;
+          while((quarters > 0) && !got_exit_signal) {
+            quarters--;
+            res = wait_ms(250);
+            if(res) {
+              /* should not happen */
+              error = errno;
+              logmsg("wait_ms() failed with error: (%d) %s",
+                     error, strerror(error));
+              break;
+            }
+          }
+          if(!quarters)
+            logmsg("Continuing after sleeping %d seconds", num);
+        }
+        else
+          logmsg("Unknown command in reply command section");
+      }
+      ptr = strchr(ptr, '\n');
+      if(ptr)
+        ptr++;
+      else
+        ptr = NULL;
+    } while(ptr && *ptr);
+  }
+  free(cmd);
+  req->open = use_gopher?FALSE:persistant;
+
+  prevtestno = req->testno;
+  prevpartno = req->partno;
+
+  return 0;
+}
+
+static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
+{
+  srvr_sockaddr_union_t serveraddr;
+  curl_socket_t serverfd;
+  int error;
+  int rc = 0;
+  const char *op_br = "";
+  const char *cl_br = "";
+
+#ifdef ENABLE_IPV6
+  if(socket_domain == AF_INET6) {
+    op_br = "[";
+    cl_br = "]";
+  }
+#endif
+
+  if(!ipaddr)
+    return CURL_SOCKET_BAD;
+
+  logmsg("about to connect to %s%s%s:%hu",
+         op_br, ipaddr, cl_br, port);
+
+
+  serverfd = socket(socket_domain, SOCK_STREAM, 0);
+  if(CURL_SOCKET_BAD == serverfd) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket for server conection: (%d) %s",
+           error, strerror(error));
+    return CURL_SOCKET_BAD;
+  }
+
+#ifdef TCP_NODELAY
+  if(socket_domain_is_ip()) {
+    /* Disable the Nagle algorithm */
+    curl_socklen_t flag = 1;
+    if(0 != setsockopt(serverfd, IPPROTO_TCP, TCP_NODELAY,
+                       (void *)&flag, sizeof(flag)))
+      logmsg("====> TCP_NODELAY for server conection failed");
+  }
+#endif
+
+  switch(socket_domain) {
+  case AF_INET:
+    memset(&serveraddr.sa4, 0, sizeof(serveraddr.sa4));
+    serveraddr.sa4.sin_family = AF_INET;
+    serveraddr.sa4.sin_port = htons(port);
+    if(Curl_inet_pton(AF_INET, ipaddr, &serveraddr.sa4.sin_addr) < 1) {
+      logmsg("Error inet_pton failed AF_INET conversion of '%s'", ipaddr);
+      sclose(serverfd);
+      return CURL_SOCKET_BAD;
+    }
+
+    rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa4));
+    break;
+#ifdef ENABLE_IPV6
+  case AF_INET6:
+    memset(&serveraddr.sa6, 0, sizeof(serveraddr.sa6));
+    serveraddr.sa6.sin6_family = AF_INET6;
+    serveraddr.sa6.sin6_port = htons(port);
+    if(Curl_inet_pton(AF_INET6, ipaddr, &serveraddr.sa6.sin6_addr) < 1) {
+      logmsg("Error inet_pton failed AF_INET6 conversion of '%s'", ipaddr);
+      sclose(serverfd);
+      return CURL_SOCKET_BAD;
+    }
+
+    rc = connect(serverfd, &serveraddr.sa, sizeof(serveraddr.sa6));
+    break;
+#endif /* ENABLE_IPV6 */
+#ifdef USE_UNIX_SOCKETS
+  case AF_UNIX:
+    logmsg("Proxying through Unix socket is not (yet?) supported.");
+    return CURL_SOCKET_BAD;
+#endif /* USE_UNIX_SOCKETS */
+  }
+
+  if(got_exit_signal) {
+    sclose(serverfd);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(rc) {
+    error = SOCKERRNO;
+    logmsg("Error connecting to server port %hu: (%d) %s",
+           port, error, strerror(error));
+    sclose(serverfd);
+    return CURL_SOCKET_BAD;
+  }
+
+  logmsg("connected fine to %s%s%s:%hu, now tunnel",
+         op_br, ipaddr, cl_br, port);
+
+  return serverfd;
+}
+
+/*
+ * A CONNECT has been received, a CONNECT response has been sent.
+ *
+ * This function needs to connect to the server, and then pass data between
+ * the client and the server back and forth until the connection is closed by
+ * either end.
+ *
+ * When doing FTP through a CONNECT proxy, we expect that the data connection
+ * will be setup while the first connect is still being kept up. Therefor we
+ * must accept a new connection and deal with it appropriately.
+ */
+
+#define data_or_ctrl(x) ((x)?"DATA":"CTRL")
+
+#define CTRL  0
+#define DATA  1
+
+static void http_connect(curl_socket_t *infdp,
+                         curl_socket_t rootfd,
+                         const char *ipaddr,
+                         unsigned short ipport)
+{
+  curl_socket_t serverfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+  curl_socket_t clientfd[2] = {CURL_SOCKET_BAD, CURL_SOCKET_BAD};
+  ssize_t toc[2] = {0, 0}; /* number of bytes to client */
+  ssize_t tos[2] = {0, 0}; /* number of bytes to server */
+  char readclient[2][256];
+  char readserver[2][256];
+  bool poll_client_rd[2] = { TRUE, TRUE };
+  bool poll_server_rd[2] = { TRUE, TRUE };
+  bool poll_client_wr[2] = { TRUE, TRUE };
+  bool poll_server_wr[2] = { TRUE, TRUE };
+  bool primary = FALSE;
+  bool secondary = FALSE;
+  int max_tunnel_idx; /* CTRL or DATA */
+  int loop;
+  int i;
+  int timeout_count=0;
+
+  /* primary tunnel client endpoint already connected */
+  clientfd[CTRL] = *infdp;
+
+  /* Sleep here to make sure the client reads CONNECT response's
+     'end of headers' separate from the server data that follows.
+     This is done to prevent triggering libcurl known bug #39. */
+  for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+    wait_ms(250);
+  if(got_exit_signal)
+    goto http_connect_cleanup;
+
+  serverfd[CTRL] = connect_to(ipaddr, ipport);
+  if(serverfd[CTRL] == CURL_SOCKET_BAD)
+    goto http_connect_cleanup;
+
+  /* Primary tunnel socket endpoints are now connected. Tunnel data back and
+     forth over the primary tunnel until client or server breaks the primary
+     tunnel, simultaneously allowing establishment, operation and teardown of
+     a secondary tunnel that may be used for passive FTP data connection. */
+
+  max_tunnel_idx = CTRL;
+  primary = TRUE;
+
+  while(!got_exit_signal) {
+
+    fd_set input;
+    fd_set output;
+    struct timeval timeout = {1, 0}; /* 1000 ms */
+    ssize_t rc;
+    curl_socket_t maxfd = (curl_socket_t)-1;
+
+    FD_ZERO(&input);
+    FD_ZERO(&output);
+
+    if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+       (serverfd[DATA] == CURL_SOCKET_BAD) &&
+       poll_client_rd[CTRL] && poll_client_wr[CTRL] &&
+       poll_server_rd[CTRL] && poll_server_wr[CTRL]) {
+      /* listener socket is monitored to allow client to establish
+         secondary tunnel only when this tunnel is not established
+         and primary one is fully operational */
+      FD_SET(rootfd, &input);
+      maxfd = rootfd;
+    }
+
+    /* set tunnel sockets to wait for */
+    for(i = 0; i <= max_tunnel_idx; i++) {
+      /* client side socket monitoring */
+      if(clientfd[i] != CURL_SOCKET_BAD) {
+        if(poll_client_rd[i]) {
+          /* unless told not to do so, monitor readability */
+          FD_SET(clientfd[i], &input);
+          if(clientfd[i] > maxfd)
+            maxfd = clientfd[i];
+        }
+        if(poll_client_wr[i] && toc[i]) {
+          /* unless told not to do so, monitor writability
+             if there is data ready to be sent to client */
+          FD_SET(clientfd[i], &output);
+          if(clientfd[i] > maxfd)
+            maxfd = clientfd[i];
+        }
+      }
+      /* server side socket monitoring */
+      if(serverfd[i] != CURL_SOCKET_BAD) {
+        if(poll_server_rd[i]) {
+          /* unless told not to do so, monitor readability */
+          FD_SET(serverfd[i], &input);
+          if(serverfd[i] > maxfd)
+            maxfd = serverfd[i];
+        }
+        if(poll_server_wr[i] && tos[i]) {
+          /* unless told not to do so, monitor writability
+             if there is data ready to be sent to server */
+          FD_SET(serverfd[i], &output);
+          if(serverfd[i] > maxfd)
+            maxfd = serverfd[i];
+        }
+      }
+    }
+    if(got_exit_signal)
+      break;
+
+    rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+
+    if(rc > 0) {
+      /* socket action */
+      bool tcp_fin_wr;
+      timeout_count=0;
+
+      if(got_exit_signal)
+        break;
+
+      tcp_fin_wr = FALSE;
+
+      /* ---------------------------------------------------------- */
+
+      /* passive mode FTP may establish a secondary tunnel */
+      if((clientfd[DATA] == CURL_SOCKET_BAD) &&
+         (serverfd[DATA] == CURL_SOCKET_BAD) && FD_ISSET(rootfd, &input)) {
+        /* a new connection on listener socket (most likely from client) */
+        curl_socket_t datafd = accept(rootfd, NULL, NULL);
+        if(datafd != CURL_SOCKET_BAD) {
+          struct httprequest req2;
+          int err = 0;
+          memset(&req2, 0, sizeof(req2));
+          logmsg("====> Client connect DATA");
+#ifdef TCP_NODELAY
+          if(socket_domain_is_ip()) {
+            /* Disable the Nagle algorithm */
+            curl_socklen_t flag = 1;
+            if(0 != setsockopt(datafd, IPPROTO_TCP, TCP_NODELAY,
+                               (void *)&flag, sizeof(flag)))
+              logmsg("====> TCP_NODELAY for client DATA conection failed");
+          }
+#endif
+          req2.pipelining = FALSE;
+          init_httprequest(&req2);
+          while(!req2.done_processing) {
+            err = get_request(datafd, &req2);
+            if(err < 0) {
+              /* this socket must be closed, done or not */
+              break;
+            }
+          }
+
+          /* skip this and close the socket if err < 0 */
+          if(err >= 0) {
+            err = send_doc(datafd, &req2);
+            if(!err && req2.connect_request) {
+              /* sleep to prevent triggering libcurl known bug #39. */
+              for(loop = 2; (loop > 0) && !got_exit_signal; loop--)
+                wait_ms(250);
+              if(!got_exit_signal) {
+                /* connect to the server */
+                serverfd[DATA] = connect_to(ipaddr, req2.connect_port);
+                if(serverfd[DATA] != CURL_SOCKET_BAD) {
+                  /* secondary tunnel established, now we have two
+                     connections */
+                  poll_client_rd[DATA] = TRUE;
+                  poll_client_wr[DATA] = TRUE;
+                  poll_server_rd[DATA] = TRUE;
+                  poll_server_wr[DATA] = TRUE;
+                  max_tunnel_idx = DATA;
+                  secondary = TRUE;
+                  toc[DATA] = 0;
+                  tos[DATA] = 0;
+                  clientfd[DATA] = datafd;
+                  datafd = CURL_SOCKET_BAD;
+                }
+              }
+            }
+          }
+          if(datafd != CURL_SOCKET_BAD) {
+            /* secondary tunnel not established */
+            shutdown(datafd, SHUT_RDWR);
+            sclose(datafd);
+          }
+        }
+        if(got_exit_signal)
+          break;
+      }
+
+      /* ---------------------------------------------------------- */
+
+      /* react to tunnel endpoint readable/writable notifications */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        size_t len;
+        if(clientfd[i] != CURL_SOCKET_BAD) {
+          len = sizeof(readclient[i]) - tos[i];
+          if(len && FD_ISSET(clientfd[i], &input)) {
+            /* read from client */
+            rc = sread(clientfd[i], &readclient[i][tos[i]], len);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP READING client", data_or_ctrl(i), rc);
+              shutdown(clientfd[i], SHUT_RD);
+              poll_client_rd[i] = FALSE;
+            }
+            else {
+              logmsg("[%s] READ %zd bytes from client", data_or_ctrl(i), rc);
+              logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+                     data_to_hex(&readclient[i][tos[i]], rc));
+              tos[i] += rc;
+            }
+          }
+        }
+        if(serverfd[i] != CURL_SOCKET_BAD) {
+          len = sizeof(readserver[i])-toc[i];
+          if(len && FD_ISSET(serverfd[i], &input)) {
+            /* read from server */
+            rc = sread(serverfd[i], &readserver[i][toc[i]], len);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP READING server", data_or_ctrl(i), rc);
+              shutdown(serverfd[i], SHUT_RD);
+              poll_server_rd[i] = FALSE;
+            }
+            else {
+              logmsg("[%s] READ %zd bytes from server", data_or_ctrl(i), rc);
+              logmsg("[%s] READ \"%s\"", data_or_ctrl(i),
+                     data_to_hex(&readserver[i][toc[i]], rc));
+              toc[i] += rc;
+            }
+          }
+        }
+        if(clientfd[i] != CURL_SOCKET_BAD) {
+          if(toc[i] && FD_ISSET(clientfd[i], &output)) {
+            /* write to client */
+            rc = swrite(clientfd[i], readserver[i], toc[i]);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP WRITING client", data_or_ctrl(i), rc);
+              shutdown(clientfd[i], SHUT_WR);
+              poll_client_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+            else {
+              logmsg("[%s] SENT %zd bytes to client", data_or_ctrl(i), rc);
+              logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+                     data_to_hex(readserver[i], rc));
+              if(toc[i] - rc)
+                memmove(&readserver[i][0], &readserver[i][rc], toc[i]-rc);
+              toc[i] -= rc;
+            }
+          }
+        }
+        if(serverfd[i] != CURL_SOCKET_BAD) {
+          if(tos[i] && FD_ISSET(serverfd[i], &output)) {
+            /* write to server */
+            rc = swrite(serverfd[i], readclient[i], tos[i]);
+            if(rc <= 0) {
+              logmsg("[%s] got %zd, STOP WRITING server", data_or_ctrl(i), rc);
+              shutdown(serverfd[i], SHUT_WR);
+              poll_server_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+            else {
+              logmsg("[%s] SENT %zd bytes to server", data_or_ctrl(i), rc);
+              logmsg("[%s] SENT \"%s\"", data_or_ctrl(i),
+                     data_to_hex(readclient[i], rc));
+              if(tos[i] - rc)
+                memmove(&readclient[i][0], &readclient[i][rc], tos[i]-rc);
+              tos[i] -= rc;
+            }
+          }
+        }
+      }
+      if(got_exit_signal)
+        break;
+
+      /* ---------------------------------------------------------- */
+
+      /* endpoint read/write disabling, endpoint closing and tunnel teardown */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        for(loop = 2; loop > 0; loop--) {
+          /* loop twice to satisfy condition interdependencies without
+             having to await select timeout or another socket event */
+          if(clientfd[i] != CURL_SOCKET_BAD) {
+            if(poll_client_rd[i] && !poll_server_wr[i]) {
+              logmsg("[%s] DISABLED READING client", data_or_ctrl(i));
+              shutdown(clientfd[i], SHUT_RD);
+              poll_client_rd[i] = FALSE;
+            }
+            if(poll_client_wr[i] && !poll_server_rd[i] && !toc[i]) {
+              logmsg("[%s] DISABLED WRITING client", data_or_ctrl(i));
+              shutdown(clientfd[i], SHUT_WR);
+              poll_client_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+          }
+          if(serverfd[i] != CURL_SOCKET_BAD) {
+            if(poll_server_rd[i] && !poll_client_wr[i]) {
+              logmsg("[%s] DISABLED READING server", data_or_ctrl(i));
+              shutdown(serverfd[i], SHUT_RD);
+              poll_server_rd[i] = FALSE;
+            }
+            if(poll_server_wr[i] && !poll_client_rd[i] && !tos[i]) {
+              logmsg("[%s] DISABLED WRITING server", data_or_ctrl(i));
+              shutdown(serverfd[i], SHUT_WR);
+              poll_server_wr[i] = FALSE;
+              tcp_fin_wr = TRUE;
+            }
+          }
+        }
+      }
+
+      if(tcp_fin_wr)
+        /* allow kernel to place FIN bit packet on the wire */
+        wait_ms(250);
+
+      /* socket clearing */
+      for(i = 0; i <= max_tunnel_idx; i++) {
+        for(loop = 2; loop > 0; loop--) {
+          if(clientfd[i] != CURL_SOCKET_BAD) {
+            if(!poll_client_wr[i] && !poll_client_rd[i]) {
+              logmsg("[%s] CLOSING client socket", data_or_ctrl(i));
+              sclose(clientfd[i]);
+              clientfd[i] = CURL_SOCKET_BAD;
+              if(serverfd[i] == CURL_SOCKET_BAD) {
+                logmsg("[%s] ENDING", data_or_ctrl(i));
+                if(i == DATA)
+                  secondary = FALSE;
+                else
+                  primary = FALSE;
+              }
+            }
+          }
+          if(serverfd[i] != CURL_SOCKET_BAD) {
+            if(!poll_server_wr[i] && !poll_server_rd[i]) {
+              logmsg("[%s] CLOSING server socket", data_or_ctrl(i));
+              sclose(serverfd[i]);
+              serverfd[i] = CURL_SOCKET_BAD;
+              if(clientfd[i] == CURL_SOCKET_BAD) {
+                logmsg("[%s] ENDING", data_or_ctrl(i));
+                if(i == DATA)
+                  secondary = FALSE;
+                else
+                  primary = FALSE;
+              }
+            }
+          }
+        }
+      }
+
+      /* ---------------------------------------------------------- */
+
+      max_tunnel_idx = secondary ? DATA : CTRL;
+
+      if(!primary)
+        /* exit loop upon primary tunnel teardown */
+        break;
+
+    } /* (rc > 0) */
+    else {
+      timeout_count++;
+      if(timeout_count > 5) {
+        logmsg("CONNECT proxy timeout after %d idle seconds!", timeout_count);
+        break;
+      }
+    }
+  }
+
+http_connect_cleanup:
+
+  for(i = DATA; i >= CTRL; i--) {
+    if(serverfd[i] != CURL_SOCKET_BAD) {
+      logmsg("[%s] CLOSING server socket (cleanup)", data_or_ctrl(i));
+      shutdown(serverfd[i], SHUT_RDWR);
+      sclose(serverfd[i]);
+    }
+    if(clientfd[i] != CURL_SOCKET_BAD) {
+      logmsg("[%s] CLOSING client socket (cleanup)", data_or_ctrl(i));
+      shutdown(clientfd[i], SHUT_RDWR);
+      sclose(clientfd[i]);
+    }
+    if((serverfd[i] != CURL_SOCKET_BAD) ||
+       (clientfd[i] != CURL_SOCKET_BAD)) {
+      logmsg("[%s] ABORTING", data_or_ctrl(i));
+    }
+  }
+
+  *infdp = CURL_SOCKET_BAD;
+}
+
+static void http2(struct httprequest *req)
+{
+  (void)req;
+  logmsg("switched to http2");
+  /* left to implement */
+}
+
+
+/* returns a socket handle, or 0 if there are no more waiting sockets,
+   or < 0 if there was an error */
+static curl_socket_t accept_connection(curl_socket_t sock)
+{
+  curl_socket_t msgsock = CURL_SOCKET_BAD;
+  int error;
+  int flag = 1;
+
+  if(MAX_SOCKETS == num_sockets) {
+    logmsg("Too many open sockets!");
+    return CURL_SOCKET_BAD;
+  }
+
+  msgsock = accept(sock, NULL, NULL);
+
+  if(got_exit_signal) {
+    if(CURL_SOCKET_BAD != msgsock)
+      sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(CURL_SOCKET_BAD == msgsock) {
+    error = SOCKERRNO;
+    if(EAGAIN == error || EWOULDBLOCK == error) {
+      /* nothing to accept */
+      return 0;
+    }
+    logmsg("MAJOR ERROR: accept() failed with error: (%d) %s",
+           error, strerror(error));
+    return CURL_SOCKET_BAD;
+  }
+
+  if(0 != curlx_nonblock(msgsock, TRUE)) {
+    error = SOCKERRNO;
+    logmsg("curlx_nonblock failed with error: (%d) %s",
+           error, strerror(error));
+    sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  if(0 != setsockopt(msgsock, SOL_SOCKET, SO_KEEPALIVE,
+                     (void *)&flag, sizeof(flag))) {
+    error = SOCKERRNO;
+    logmsg("setsockopt(SO_KEEPALIVE) failed with error: (%d) %s",
+           error, strerror(error));
+    sclose(msgsock);
+    return CURL_SOCKET_BAD;
+  }
+
+  /*
+  ** As soon as this server accepts a connection from the test harness it
+  ** must set the server logs advisor read lock to indicate that server
+  ** logs should not be read until this lock is removed by this server.
+  */
+
+  if(!serverlogslocked)
+    set_advisor_read_lock(SERVERLOGS_LOCK);
+  serverlogslocked += 1;
+
+  logmsg("====> Client connect");
+
+  all_sockets[num_sockets] = msgsock;
+  num_sockets += 1;
+
+#ifdef TCP_NODELAY
+  if(socket_domain_is_ip()) {
+    /*
+     * Disable the Nagle algorithm to make it easier to send out a large
+     * response in many small segments to torture the clients more.
+     */
+    if(0 != setsockopt(msgsock, IPPROTO_TCP, TCP_NODELAY,
+                       (void *)&flag, sizeof(flag)))
+      logmsg("====> TCP_NODELAY failed");
+  }
+#endif
+
+  return msgsock;
+}
+
+/* returns 1 if the connection should be serviced again immediately, 0 if there
+   is no data waiting, or < 0 if it should be closed */
+static int service_connection(curl_socket_t msgsock, struct httprequest *req,
+                              curl_socket_t listensock,
+                              const char *connecthost)
+{
+  if(got_exit_signal)
+    return -1;
+
+  while(!req->done_processing) {
+    int rc = get_request(msgsock, req);
+    if(rc <= 0) {
+      /* Nothing further to read now, possibly because the socket was closed */
+      return rc;
+    }
+  }
+
+  if(prevbounce) {
+    /* bounce treatment requested */
+    if((req->testno == prevtestno) &&
+       (req->partno == prevpartno)) {
+      req->partno++;
+      logmsg("BOUNCE part number to %ld", req->partno);
+    }
+    else {
+      prevbounce = FALSE;
+      prevtestno = -1;
+      prevpartno = -1;
+    }
+  }
+
+  send_doc(msgsock, req);
+  if(got_exit_signal)
+    return -1;
+
+  if(req->testno < 0) {
+    logmsg("special request received, no persistency");
+    return -1;
+  }
+  if(!req->open) {
+    logmsg("instructed to close connection after server-reply");
+    return -1;
+  }
+
+  if(req->connect_request) {
+    /* a CONNECT request, setup and talk the tunnel */
+    if(!is_proxy) {
+      logmsg("received CONNECT but isn't running as proxy!");
+      return 1;
+    }
+    else {
+      http_connect(&msgsock, listensock, connecthost, req->connect_port);
+      return -1;
+    }
+  }
+
+  if(req->upgrade_request) {
+    /* an upgrade request, switch to http2 here */
+    http2(req);
+    return -1;
+  }
+
+  /* if we got a CONNECT, loop and get another request as well! */
+
+  if(req->open) {
+    logmsg("=> persistant connection request ended, awaits new request\n");
+    return 1;
+  }
+
+  return -1;
+}
+
+int main(int argc, char *argv[])
+{
+  srvr_sockaddr_union_t me;
+  curl_socket_t sock = CURL_SOCKET_BAD;
+  int wrotepidfile = 0;
+  int flag;
+  unsigned short port = DEFAULT_PORT;
+#ifdef USE_UNIX_SOCKETS
+  const char *unix_socket = NULL;
+  bool unlink_socket = false;
+#endif
+  const char *pidname = ".http.pid";
+  struct httprequest req;
+  int rc = 0;
+  int error;
+  int arg=1;
+  long pid;
+  const char *connecthost = "127.0.0.1";
+  const char *socket_type = "IPv4";
+  char port_str[11];
+  const char *location_str = port_str;
+
+  /* a default CONNECT port is basically pointless but still ... */
+  size_t socket_idx;
+
+  memset(&req, 0, sizeof(req));
+
+  while(argc>arg) {
+    if(!strcmp("--version", argv[arg])) {
+      puts("sws IPv4"
+#ifdef ENABLE_IPV6
+             "/IPv6"
+#endif
+#ifdef USE_UNIX_SOCKETS
+             "/unix"
+#endif
+          );
+      return 0;
+    }
+    else if(!strcmp("--pidfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        pidname = argv[arg++];
+    }
+    else if(!strcmp("--logfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        serverlogfile = argv[arg++];
+    }
+    else if(!strcmp("--gopher", argv[arg])) {
+      arg++;
+      use_gopher = TRUE;
+      end_of_headers = "\r\n"; /* gopher style is much simpler */
+    }
+    else if(!strcmp("--ipv4", argv[arg])) {
+      socket_type = "IPv4";
+      socket_domain = AF_INET;
+      location_str = port_str;
+      arg++;
+    }
+    else if(!strcmp("--ipv6", argv[arg])) {
+#ifdef ENABLE_IPV6
+      socket_type = "IPv6";
+      socket_domain = AF_INET6;
+      location_str = port_str;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--unix-socket", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+#ifdef USE_UNIX_SOCKETS
+        unix_socket = argv[arg];
+        if(strlen(unix_socket) >= sizeof(me.sau.sun_path)) {
+          fprintf(stderr, "sws: socket path must be shorter than %zu chars\n",
+                  sizeof(me.sau.sun_path));
+          return 0;
+        }
+        socket_type = "unix";
+        socket_domain = AF_UNIX;
+        location_str = unix_socket;
+#endif
+        arg++;
+      }
+    }
+    else if(!strcmp("--port", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        char *endptr;
+        unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
+        if((endptr != argv[arg] + strlen(argv[arg])) ||
+           (ulnum < 1025UL) || (ulnum > 65535UL)) {
+          fprintf(stderr, "sws: invalid --port argument (%s)\n",
+                  argv[arg]);
+          return 0;
+        }
+        port = curlx_ultous(ulnum);
+        arg++;
+      }
+    }
+    else if(!strcmp("--srcdir", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        path = argv[arg];
+        arg++;
+      }
+    }
+    else if(!strcmp("--connect", argv[arg])) {
+      /* The connect host IP number that the proxy will connect to no matter
+         what the client asks for, but also use this as a hint that we run as
+         a proxy and do a few different internal choices */
+      arg++;
+      if(argc>arg) {
+        connecthost = argv[arg];
+        arg++;
+        is_proxy = TRUE;
+        logmsg("Run as proxy, CONNECT to host %s", connecthost);
+      }
+    }
+    else {
+      puts("Usage: sws [option]\n"
+           " --version\n"
+           " --logfile [file]\n"
+           " --pidfile [file]\n"
+           " --ipv4\n"
+           " --ipv6\n"
+           " --unix-socket [file]\n"
+           " --port [port]\n"
+           " --srcdir [path]\n"
+           " --connect [ip4-addr]\n"
+           " --gopher");
+      return 0;
+    }
+  }
+
+  snprintf(port_str, sizeof(port_str), "port %hu", port);
+
+#ifdef WIN32
+  win32_init();
+  atexit(win32_cleanup);
+#endif
+
+  install_signal_handlers();
+
+  pid = (long)getpid();
+
+  sock = socket(socket_domain, SOCK_STREAM, 0);
+
+  all_sockets[0] = sock;
+  num_sockets = 1;
+
+  if(CURL_SOCKET_BAD == sock) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket: (%d) %s",
+           error, strerror(error));
+    goto sws_cleanup;
+  }
+
+  flag = 1;
+  if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+                     (void *)&flag, sizeof(flag))) {
+    error = SOCKERRNO;
+    logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
+           error, strerror(error));
+    goto sws_cleanup;
+  }
+  if(0 != curlx_nonblock(sock, TRUE)) {
+    error = SOCKERRNO;
+    logmsg("curlx_nonblock failed with error: (%d) %s",
+           error, strerror(error));
+    goto sws_cleanup;
+  }
+
+  switch(socket_domain) {
+  case AF_INET:
+    memset(&me.sa4, 0, sizeof(me.sa4));
+    me.sa4.sin_family = AF_INET;
+    me.sa4.sin_addr.s_addr = INADDR_ANY;
+    me.sa4.sin_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa4));
+    break;
+#ifdef ENABLE_IPV6
+  case AF_INET6:
+    memset(&me.sa6, 0, sizeof(me.sa6));
+    me.sa6.sin6_family = AF_INET6;
+    me.sa6.sin6_addr = in6addr_any;
+    me.sa6.sin6_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa6));
+    break;
+#endif /* ENABLE_IPV6 */
+#ifdef USE_UNIX_SOCKETS
+  case AF_UNIX:
+    memset(&me.sau, 0, sizeof(me.sau));
+    me.sau.sun_family = AF_UNIX;
+    strncpy(me.sau.sun_path, unix_socket, sizeof(me.sau.sun_path));
+    rc = bind(sock, &me.sa, sizeof(me.sau));
+    if(0 != rc && errno == EADDRINUSE) {
+      struct stat statbuf;
+      /* socket already exists. Perhaps it is stale? */
+      int unixfd = socket(AF_UNIX, SOCK_STREAM, 0);
+      if(CURL_SOCKET_BAD == unixfd) {
+        error = SOCKERRNO;
+        logmsg("Error binding socket, failed to create socket at %s: (%d) %s",
+               unix_socket, error, strerror(error));
+        goto sws_cleanup;
+      }
+      /* check whether the server is alive */
+      rc = connect(unixfd, &me.sa, sizeof(me.sau));
+      error = errno;
+      close(unixfd);
+      if(ECONNREFUSED != error) {
+        logmsg("Error binding socket, failed to connect to %s: (%d) %s",
+               unix_socket, error, strerror(error));
+        goto sws_cleanup;
+      }
+      /* socket server is not alive, now check if it was actually a socket.
+       * Systems which have Unix sockets will also have lstat */
+      rc = lstat(unix_socket, &statbuf);
+      if(0 != rc) {
+        logmsg("Error binding socket, failed to stat %s: (%d) %s",
+               unix_socket, errno, strerror(errno));
+        goto sws_cleanup;
+      }
+      if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) {
+        logmsg("Error binding socket, failed to stat %s: (%d) %s",
+               unix_socket, error, strerror(error));
+        goto sws_cleanup;
+      }
+      /* dead socket, cleanup and retry bind */
+      rc = unlink(unix_socket);
+      if(0 != rc) {
+        logmsg("Error binding socket, failed to unlink %s: (%d) %s",
+               unix_socket, errno, strerror(errno));
+        goto sws_cleanup;
+      }
+      /* stale socket is gone, retry bind */
+      rc = bind(sock, &me.sa, sizeof(me.sau));
+    }
+    break;
+#endif /* USE_UNIX_SOCKETS */
+  }
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("Error binding socket on %s: (%d) %s",
+           location_str, error, strerror(error));
+    goto sws_cleanup;
+  }
+
+  logmsg("Running %s %s version on %s",
+         use_gopher?"GOPHER":"HTTP", socket_type, location_str);
+
+  /* start accepting connections */
+  rc = listen(sock, 5);
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("listen() failed with error: (%d) %s",
+           error, strerror(error));
+    goto sws_cleanup;
+  }
+
+#ifdef USE_UNIX_SOCKETS
+  /* listen succeeds, so let's assume a valid listening Unix socket */
+  unlink_socket = true;
+#endif
+
+  /*
+  ** As soon as this server writes its pid file the test harness will
+  ** attempt to connect to this server and initiate its verification.
+  */
+
+  wrotepidfile = write_pidfile(pidname);
+  if(!wrotepidfile)
+    goto sws_cleanup;
+
+  /* initialization of httprequest struct is done before get_request(), but
+     the pipelining struct field must be initialized previously to FALSE
+     every time a new connection arrives. */
+
+  req.pipelining = FALSE;
+  init_httprequest(&req);
+
+  for(;;) {
+    fd_set input;
+    fd_set output;
+    struct timeval timeout = {0, 250000L}; /* 250 ms */
+    curl_socket_t maxfd = (curl_socket_t)-1;
+
+    /* Clear out closed sockets */
+    for(socket_idx = num_sockets - 1; socket_idx >= 1; --socket_idx) {
+      if(CURL_SOCKET_BAD == all_sockets[socket_idx]) {
+        char *dst = (char *) (all_sockets + socket_idx);
+        char *src = (char *) (all_sockets + socket_idx + 1);
+        char *end = (char *) (all_sockets + num_sockets);
+        memmove(dst, src, end - src);
+        num_sockets -= 1;
+      }
+    }
+
+    if(got_exit_signal)
+      goto sws_cleanup;
+
+    /* Set up for select */
+    FD_ZERO(&input);
+    FD_ZERO(&output);
+
+    for(socket_idx = 0; socket_idx < num_sockets; ++socket_idx) {
+      /* Listen on all sockets */
+      FD_SET(all_sockets[socket_idx], &input);
+      if(all_sockets[socket_idx] > maxfd)
+        maxfd = all_sockets[socket_idx];
+    }
+
+    if(got_exit_signal)
+      goto sws_cleanup;
+
+    rc = select((int)maxfd + 1, &input, &output, NULL, &timeout);
+    if(rc < 0) {
+      error = SOCKERRNO;
+      logmsg("select() failed with error: (%d) %s",
+             error, strerror(error));
+      goto sws_cleanup;
+    }
+
+    if(got_exit_signal)
+      goto sws_cleanup;
+
+    if(rc == 0) {
+      /* Timed out - try again */
+      continue;
+    }
+
+    /* Check if the listening socket is ready to accept */
+    if(FD_ISSET(all_sockets[0], &input)) {
+      /* Service all queued connections */
+      curl_socket_t msgsock;
+      do {
+        msgsock = accept_connection(sock);
+        logmsg("accept_connection %d returned %d", sock, msgsock);
+        if(CURL_SOCKET_BAD == msgsock)
+          goto sws_cleanup;
+      } while(msgsock > 0);
+    }
+
+    /* Service all connections that are ready */
+    for(socket_idx = 1; socket_idx < num_sockets; ++socket_idx) {
+      if(FD_ISSET(all_sockets[socket_idx], &input)) {
+        if(got_exit_signal)
+          goto sws_cleanup;
+
+        /* Service this connection until it has nothing available */
+        do {
+          rc = service_connection(all_sockets[socket_idx], &req, sock,
+                                  connecthost);
+          if(got_exit_signal)
+            goto sws_cleanup;
+
+          if(rc < 0) {
+            logmsg("====> Client disconnect %d", req.connmon);
+
+            if(req.connmon) {
+              const char *keepopen="[DISCONNECT]\n";
+              storerequest(keepopen, strlen(keepopen));
+            }
+
+            if(!req.open)
+              /* When instructed to close connection after server-reply we
+                 wait a very small amount of time before doing so. If this
+                 is not done client might get an ECONNRESET before reading
+                 a single byte of server-reply. */
+              wait_ms(50);
+
+            if(all_sockets[socket_idx] != CURL_SOCKET_BAD) {
+              sclose(all_sockets[socket_idx]);
+              all_sockets[socket_idx] = CURL_SOCKET_BAD;
+            }
+
+            serverlogslocked -= 1;
+            if(!serverlogslocked)
+              clear_advisor_read_lock(SERVERLOGS_LOCK);
+
+            if(req.testno == DOCNUMBER_QUIT)
+              goto sws_cleanup;
+          }
+
+          /* Reset the request, unless we're still in the middle of reading */
+          if(rc != 0)
+            init_httprequest(&req);
+        } while(rc > 0);
+      }
+    }
+
+    if(got_exit_signal)
+      goto sws_cleanup;
+  }
+
+sws_cleanup:
+
+  for(socket_idx = 1; socket_idx < num_sockets; ++socket_idx)
+    if((all_sockets[socket_idx] != sock) &&
+     (all_sockets[socket_idx] != CURL_SOCKET_BAD))
+      sclose(all_sockets[socket_idx]);
+
+  if(sock != CURL_SOCKET_BAD)
+    sclose(sock);
+
+#ifdef USE_UNIX_SOCKETS
+  if(unlink_socket && socket_domain == AF_UNIX) {
+    rc = unlink(unix_socket);
+    logmsg("unlink(%s) = %d (%s)", unix_socket, rc, strerror(rc));
+  }
+#endif
+
+  if(got_exit_signal)
+    logmsg("signalled to die");
+
+  if(wrotepidfile)
+    unlink(pidname);
+
+  if(serverlogslocked) {
+    serverlogslocked = 0;
+    clear_advisor_read_lock(SERVERLOGS_LOCK);
+  }
+
+  restore_signal_handlers();
+
+  if(got_exit_signal) {
+    logmsg("========> %s sws (%s pid: %ld) exits with signal (%d)",
+           socket_type, location_str, pid, exit_signal);
+    /*
+     * To properly set the return status of the process we
+     * must raise the same signal SIGINT or SIGTERM that we
+     * caught and let the old handler take care of it.
+     */
+    raise(exit_signal);
+  }
+
+  logmsg("========> sws quits");
+  return 0;
+}
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/testpart.c b/ap/lib/libcurl/curl-7.54.1/tests/server/testpart.c
new file mode 100644
index 0000000..79869e2
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/testpart.c
@@ -0,0 +1,50 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+#include "getpart.h"
+
+#include "curl_printf.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+int main(int argc, char **argv)
+{
+  int rc;
+  char  *part;
+  size_t partlen, i;
+
+  if(argc< 3) {
+    printf("./testpart main sub\n");
+  }
+  else {
+    rc = getpart(&part, &partlen, argv[1], argv[2], stdin);
+    if(rc)
+      return rc;
+    for(i = 0; i < partlen; i++)
+      printf("%c", part[i]);
+    free(part);
+  }
+  return 0;
+}
+
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/tftp.h b/ap/lib/libcurl/curl-7.54.1/tests/server/tftp.h
new file mode 100644
index 0000000..3cdd6e6
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/tftp.h
@@ -0,0 +1,61 @@
+#ifndef HEADER_CURL_SERVER_TFTP_H
+#define HEADER_CURL_SERVER_TFTP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+/* This file is a rewrite/clone of the arpa/tftp.h file for systems without
+   it. */
+
+#define SEGSIZE 512 /* data segment size */
+
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+  ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+#  define PACKED_STRUCT __attribute__((__packed__))
+#else
+#  define PACKED_STRUCT /*NOTHING*/
+#endif
+
+/* Using a packed struct as binary in a program is begging for problems, but
+   the tftpd server was written like this so we have this struct here to make
+   things build. */
+
+struct tftphdr {
+  short th_opcode;         /* packet type */
+  unsigned short th_block; /* all sorts of things */
+  char th_data[1];         /* data or error string */
+} PACKED_STRUCT;
+
+#define th_stuff th_block
+#define th_code  th_block
+#define th_msg   th_data
+
+#define EUNDEF    0
+#define ENOTFOUND 1
+#define EACCESS   2
+#define ENOSPACE  3
+#define EBADOP    4
+#define EBADID    5
+#define EEXISTS   6
+#define ENOUSER   7
+
+#endif /* HEADER_CURL_SERVER_TFTP_H */
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/tftpd.c b/ap/lib/libcurl/curl-7.54.1/tests/server/tftpd.c
new file mode 100644
index 0000000..df01eb7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/tftpd.c
@@ -0,0 +1,1434 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ *
+ * Trivial file transfer protocol server.
+ *
+ * This code includes many modifications by Jim Guyton <guyton@rand-unix>
+ *
+ * This source file was started based on netkit-tftpd 0.17
+ * Heavily modified for curl's test suite
+ */
+
+/*
+ * Copyright (c) 1983, 2016 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "server_setup.h"
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_ARPA_TFTP_H
+#include <arpa/tftp.h>
+#else
+#include "tftp.h"
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_SYS_FILIO_H
+/* FIONREAD on Solaris 7 */
+#include <sys/filio.h>
+#endif
+
+#include <setjmp.h>
+
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+#include "server_sockaddr.h"
+
+/* include memdebug.h last */
+#include "memdebug.h"
+
+/*****************************************************************************
+*                      STRUCT DECLARATIONS AND DEFINES                       *
+*****************************************************************************/
+
+#ifndef PKTSIZE
+#define PKTSIZE (SEGSIZE + 4)  /* SEGSIZE defined in arpa/tftp.h */
+#endif
+
+struct testcase {
+  char *buffer;   /* holds the file data to send to the client */
+  size_t bufsize; /* size of the data in buffer */
+  char *rptr;     /* read pointer into the buffer */
+  size_t rcount;  /* amount of data left to read of the file */
+  long testno;    /* test case number */
+  int ofile;      /* file descriptor for output file when uploading to us */
+
+  int writedelay; /* number of seconds between each packet */
+};
+
+struct formats {
+  const char *f_mode;
+  int f_convert;
+};
+
+struct errmsg {
+  int e_code;
+  const char *e_msg;
+};
+
+typedef union {
+  struct tftphdr hdr;
+  char storage[PKTSIZE];
+} tftphdr_storage_t;
+
+/*
+ * bf.counter values in range [-1 .. SEGSIZE] represents size of data in the
+ * bf.buf buffer. Additionally it can also hold flags BF_ALLOC or BF_FREE.
+ */
+
+struct bf {
+  int counter;            /* size of data in buffer, or flag */
+  tftphdr_storage_t buf;  /* room for data packet */
+};
+
+#define BF_ALLOC -3       /* alloc'd but not yet filled */
+#define BF_FREE  -2       /* free */
+
+#define opcode_RRQ   1
+#define opcode_WRQ   2
+#define opcode_DATA  3
+#define opcode_ACK   4
+#define opcode_ERROR 5
+
+#define TIMEOUT      5
+
+#undef MIN
+#define MIN(x,y) ((x)<(y)?(x):(y))
+
+#ifndef DEFAULT_LOGFILE
+#define DEFAULT_LOGFILE "log/tftpd.log"
+#endif
+
+#define REQUEST_DUMP  "log/server.input"
+
+#define DEFAULT_PORT 8999 /* UDP */
+
+/*****************************************************************************
+*                              GLOBAL VARIABLES                              *
+*****************************************************************************/
+
+static struct errmsg errmsgs[] = {
+  { EUNDEF,       "Undefined error code" },
+  { ENOTFOUND,    "File not found" },
+  { EACCESS,      "Access violation" },
+  { ENOSPACE,     "Disk full or allocation exceeded" },
+  { EBADOP,       "Illegal TFTP operation" },
+  { EBADID,       "Unknown transfer ID" },
+  { EEXISTS,      "File already exists" },
+  { ENOUSER,      "No such user" },
+  { -1,           0 }
+};
+
+static struct formats formata[] = {
+  { "netascii",   1 },
+  { "octet",      0 },
+  { NULL,         0 }
+};
+
+static struct bf bfs[2];
+
+static int nextone;     /* index of next buffer to use */
+static int current;     /* index of buffer in use */
+
+                           /* control flags for crlf conversions */
+static int newline = 0;    /* fillbuf: in middle of newline expansion */
+static int prevchar = -1;  /* putbuf: previous char (cr check) */
+
+static tftphdr_storage_t buf;
+static tftphdr_storage_t ackbuf;
+
+static srvr_sockaddr_union_t from;
+static curl_socklen_t fromlen;
+
+static curl_socket_t peer = CURL_SOCKET_BAD;
+
+static unsigned int timeout;
+static unsigned int maxtimeout = 5 * TIMEOUT;
+
+#ifdef ENABLE_IPV6
+static bool use_ipv6 = FALSE;
+#endif
+static const char *ipv_inuse = "IPv4";
+
+const  char *serverlogfile = DEFAULT_LOGFILE;
+static const char *pidname = ".tftpd.pid";
+static int serverlogslocked = 0;
+static int wrotepidfile = 0;
+
+#ifdef HAVE_SIGSETJMP
+static sigjmp_buf timeoutbuf;
+#endif
+
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+static const unsigned int rexmtval = TIMEOUT;
+#endif
+
+/* do-nothing macro replacement for systems which lack siginterrupt() */
+
+#ifndef HAVE_SIGINTERRUPT
+#define siginterrupt(x,y) do {} while(0)
+#endif
+
+/* vars used to keep around previous signal handlers */
+
+typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+
+#ifdef SIGHUP
+static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGPIPE
+static SIGHANDLER_T old_sigpipe_handler = SIG_ERR;
+#endif
+
+#ifdef SIGINT
+static SIGHANDLER_T old_sigint_handler  = SIG_ERR;
+#endif
+
+#ifdef SIGTERM
+static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
+#endif
+
+#if defined(SIGBREAK) && defined(WIN32)
+static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
+#endif
+
+/* var which if set indicates that the program should finish execution */
+
+SIG_ATOMIC_T got_exit_signal = 0;
+
+/* if next is set indicates the first signal handled in exit_signal_handler */
+
+static volatile int exit_signal = 0;
+
+/*****************************************************************************
+*                            FUNCTION PROTOTYPES                             *
+*****************************************************************************/
+
+static struct tftphdr *rw_init(int);
+
+static struct tftphdr *w_init(void);
+
+static struct tftphdr *r_init(void);
+
+static void read_ahead(struct testcase *test, int convert);
+
+static ssize_t write_behind(struct testcase *test, int convert);
+
+static int synchnet(curl_socket_t);
+
+static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size);
+
+static int validate_access(struct testcase *test, const char *fname, int mode);
+
+static void sendtftp(struct testcase *test, struct formats *pf);
+
+static void recvtftp(struct testcase *test, struct formats *pf);
+
+static void nak(int error);
+
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+
+static void mysignal(int sig, void (*handler)(int));
+
+static void timer(int signum);
+
+static void justtimeout(int signum);
+
+#endif /* HAVE_ALARM && SIGALRM */
+
+static RETSIGTYPE exit_signal_handler(int signum);
+
+static void install_signal_handlers(void);
+
+static void restore_signal_handlers(void);
+
+/*****************************************************************************
+*                          FUNCTION IMPLEMENTATIONS                          *
+*****************************************************************************/
+
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+
+/*
+ * Like signal(), but with well-defined semantics.
+ */
+static void mysignal(int sig, void (*handler)(int))
+{
+  struct sigaction sa;
+  memset(&sa, 0, sizeof(sa));
+  sa.sa_handler = handler;
+  sigaction(sig, &sa, NULL);
+}
+
+static void timer(int signum)
+{
+  (void)signum;
+
+  logmsg("alarm!");
+
+  timeout += rexmtval;
+  if(timeout >= maxtimeout) {
+    if(wrotepidfile) {
+      wrotepidfile = 0;
+      unlink(pidname);
+    }
+    if(serverlogslocked) {
+      serverlogslocked = 0;
+      clear_advisor_read_lock(SERVERLOGS_LOCK);
+    }
+    exit(1);
+  }
+#ifdef HAVE_SIGSETJMP
+  siglongjmp(timeoutbuf, 1);
+#endif
+}
+
+static void justtimeout(int signum)
+{
+  (void)signum;
+}
+
+#endif /* HAVE_ALARM && SIGALRM */
+
+/* signal handler that will be triggered to indicate that the program
+  should finish its execution in a controlled manner as soon as possible.
+  The first time this is called it will set got_exit_signal to one and
+  store in exit_signal the signal that triggered its execution. */
+
+static RETSIGTYPE exit_signal_handler(int signum)
+{
+  int old_errno = errno;
+  if(got_exit_signal == 0) {
+    got_exit_signal = 1;
+    exit_signal = signum;
+  }
+  (void)signal(signum, exit_signal_handler);
+  errno = old_errno;
+}
+
+static void install_signal_handlers(void)
+{
+#ifdef SIGHUP
+  /* ignore SIGHUP signal */
+  old_sighup_handler = signal(SIGHUP, SIG_IGN);
+  if(old_sighup_handler == SIG_ERR)
+    logmsg("cannot install SIGHUP handler: %s", strerror(errno));
+#endif
+#ifdef SIGPIPE
+  /* ignore SIGPIPE signal */
+  old_sigpipe_handler = signal(SIGPIPE, SIG_IGN);
+  if(old_sigpipe_handler == SIG_ERR)
+    logmsg("cannot install SIGPIPE handler: %s", strerror(errno));
+#endif
+#ifdef SIGINT
+  /* handle SIGINT signal with our exit_signal_handler */
+  old_sigint_handler = signal(SIGINT, exit_signal_handler);
+  if(old_sigint_handler == SIG_ERR)
+    logmsg("cannot install SIGINT handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGINT, 1);
+#endif
+#ifdef SIGTERM
+  /* handle SIGTERM signal with our exit_signal_handler */
+  old_sigterm_handler = signal(SIGTERM, exit_signal_handler);
+  if(old_sigterm_handler == SIG_ERR)
+    logmsg("cannot install SIGTERM handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGTERM, 1);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  /* handle SIGBREAK signal with our exit_signal_handler */
+  old_sigbreak_handler = signal(SIGBREAK, exit_signal_handler);
+  if(old_sigbreak_handler == SIG_ERR)
+    logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
+  else
+    siginterrupt(SIGBREAK, 1);
+#endif
+}
+
+static void restore_signal_handlers(void)
+{
+#ifdef SIGHUP
+  if(SIG_ERR != old_sighup_handler)
+    (void)signal(SIGHUP, old_sighup_handler);
+#endif
+#ifdef SIGPIPE
+  if(SIG_ERR != old_sigpipe_handler)
+    (void)signal(SIGPIPE, old_sigpipe_handler);
+#endif
+#ifdef SIGINT
+  if(SIG_ERR != old_sigint_handler)
+    (void)signal(SIGINT, old_sigint_handler);
+#endif
+#ifdef SIGTERM
+  if(SIG_ERR != old_sigterm_handler)
+    (void)signal(SIGTERM, old_sigterm_handler);
+#endif
+#if defined(SIGBREAK) && defined(WIN32)
+  if(SIG_ERR != old_sigbreak_handler)
+    (void)signal(SIGBREAK, old_sigbreak_handler);
+#endif
+}
+
+/*
+ * init for either read-ahead or write-behind.
+ * zero for write-behind, one for read-head.
+ */
+static struct tftphdr *rw_init(int x)
+{
+  newline = 0;                    /* init crlf flag */
+  prevchar = -1;
+  bfs[0].counter =  BF_ALLOC;     /* pass out the first buffer */
+  current = 0;
+  bfs[1].counter = BF_FREE;
+  nextone = x;                    /* ahead or behind? */
+  return &bfs[0].buf.hdr;
+}
+
+static struct tftphdr *w_init(void)
+{
+  return rw_init(0); /* write-behind */
+}
+
+static struct tftphdr *r_init(void)
+{
+  return rw_init(1); /* read-ahead */
+}
+
+/* Have emptied current buffer by sending to net and getting ack.
+   Free it and return next buffer filled with data.
+ */
+static int readit(struct testcase *test, struct tftphdr **dpp,
+                  int convert /* if true, convert to ascii */)
+{
+  struct bf *b;
+
+  bfs[current].counter = BF_FREE; /* free old one */
+  current = !current;             /* "incr" current */
+
+  b = &bfs[current];              /* look at new buffer */
+  if(b->counter == BF_FREE)      /* if it's empty */
+    read_ahead(test, convert);    /* fill it */
+
+  *dpp = &b->buf.hdr;             /* set caller's ptr */
+  return b->counter;
+}
+
+/*
+ * fill the input buffer, doing ascii conversions if requested
+ * conversions are  lf -> cr, lf  and cr -> cr, nul
+ */
+static void read_ahead(struct testcase *test,
+                       int convert /* if true, convert to ascii */)
+{
+  int i;
+  char *p;
+  int c;
+  struct bf *b;
+  struct tftphdr *dp;
+
+  b = &bfs[nextone];              /* look at "next" buffer */
+  if(b->counter != BF_FREE)      /* nop if not free */
+    return;
+  nextone = !nextone;             /* "incr" next buffer ptr */
+
+  dp = &b->buf.hdr;
+
+  if(convert == 0) {
+    /* The former file reading code did this:
+       b->counter = read(fileno(file), dp->th_data, SEGSIZE); */
+    size_t copy_n = MIN(SEGSIZE, test->rcount);
+    memcpy(dp->th_data, test->rptr, copy_n);
+
+    /* decrease amount, advance pointer */
+    test->rcount -= copy_n;
+    test->rptr += copy_n;
+    b->counter = (int)copy_n;
+    return;
+  }
+
+  p = dp->th_data;
+  for(i = 0 ; i < SEGSIZE; i++) {
+    if(newline) {
+      if(prevchar == '\n')
+        c = '\n';       /* lf to cr,lf */
+      else
+        c = '\0';       /* cr to cr,nul */
+      newline = 0;
+    }
+    else {
+      if(test->rcount) {
+        c=test->rptr[0];
+        test->rptr++;
+        test->rcount--;
+      }
+      else
+        break;
+      if(c == '\n' || c == '\r') {
+        prevchar = c;
+        c = '\r';
+        newline = 1;
+      }
+    }
+    *p++ = (char)c;
+  }
+  b->counter = (int)(p - dp->th_data);
+}
+
+/* Update count associated with the buffer, get new buffer from the queue.
+   Calls write_behind only if next buffer not available.
+ */
+static int writeit(struct testcase *test, struct tftphdr * volatile *dpp,
+                   int ct, int convert)
+{
+  bfs[current].counter = ct;      /* set size of data to write */
+  current = !current;             /* switch to other buffer */
+  if(bfs[current].counter != BF_FREE)     /* if not free */
+    write_behind(test, convert);     /* flush it */
+  bfs[current].counter = BF_ALLOC;        /* mark as alloc'd */
+  *dpp =  &bfs[current].buf.hdr;
+  return ct;                      /* this is a lie of course */
+}
+
+/*
+ * Output a buffer to a file, converting from netascii if requested.
+ * CR, NUL -> CR  and CR, LF => LF.
+ * Note spec is undefined if we get CR as last byte of file or a
+ * CR followed by anything else.  In this case we leave it alone.
+ */
+static ssize_t write_behind(struct testcase *test, int convert)
+{
+  char *writebuf;
+  int count;
+  int ct;
+  char *p;
+  int c;                          /* current character */
+  struct bf *b;
+  struct tftphdr *dp;
+
+  b = &bfs[nextone];
+  if(b->counter < -1)            /* anything to flush? */
+    return 0;                     /* just nop if nothing to do */
+
+  if(!test->ofile) {
+    char outfile[256];
+    snprintf(outfile, sizeof(outfile), "log/upload.%ld", test->testno);
+#ifdef WIN32
+    test->ofile=open(outfile, O_CREAT|O_RDWR|O_BINARY, 0777);
+#else
+    test->ofile=open(outfile, O_CREAT|O_RDWR, 0777);
+#endif
+    if(test->ofile == -1) {
+      logmsg("Couldn't create and/or open file %s for upload!", outfile);
+      return -1; /* failure! */
+    }
+  }
+
+  count = b->counter;             /* remember byte count */
+  b->counter = BF_FREE;           /* reset flag */
+  dp = &b->buf.hdr;
+  nextone = !nextone;             /* incr for next time */
+  writebuf = dp->th_data;
+
+  if(count <= 0)
+    return -1;                    /* nak logic? */
+
+  if(convert == 0)
+    return write(test->ofile, writebuf, count);
+
+  p = writebuf;
+  ct = count;
+  while(ct--) {                   /* loop over the buffer */
+    c = *p++;                     /* pick up a character */
+    if(prevchar == '\r') {        /* if prev char was cr */
+      if(c == '\n')               /* if have cr,lf then just */
+        lseek(test->ofile, -1, SEEK_CUR); /* smash lf on top of the cr */
+      else
+        if(c == '\0')             /* if have cr,nul then */
+          goto skipit;            /* just skip over the putc */
+      /* else just fall through and allow it */
+    }
+    /* formerly
+       putc(c, file); */
+    if(1 != write(test->ofile, &c, 1))
+      break;
+    skipit:
+    prevchar = c;
+  }
+  return count;
+}
+
+/* When an error has occurred, it is possible that the two sides are out of
+ * synch.  Ie: that what I think is the other side's response to packet N is
+ * really their response to packet N-1.
+ *
+ * So, to try to prevent that, we flush all the input queued up for us on the
+ * network connection on our host.
+ *
+ * We return the number of packets we flushed (mostly for reporting when trace
+ * is active).
+ */
+
+static int synchnet(curl_socket_t f /* socket to flush */)
+{
+
+#if defined(HAVE_IOCTLSOCKET)
+  unsigned long i;
+#else
+  int i;
+#endif
+  int j = 0;
+  char rbuf[PKTSIZE];
+  srvr_sockaddr_union_t fromaddr;
+  curl_socklen_t fromaddrlen;
+
+  for(;;) {
+#if defined(HAVE_IOCTLSOCKET)
+    (void) ioctlsocket(f, FIONREAD, &i);
+#else
+    (void) ioctl(f, FIONREAD, &i);
+#endif
+    if(i) {
+      j++;
+#ifdef ENABLE_IPV6
+      if(!use_ipv6)
+#endif
+        fromaddrlen = sizeof(fromaddr.sa4);
+#ifdef ENABLE_IPV6
+      else
+        fromaddrlen = sizeof(fromaddr.sa6);
+#endif
+      (void) recvfrom(f, rbuf, sizeof(rbuf), 0,
+                      &fromaddr.sa, &fromaddrlen);
+    }
+    else
+      break;
+  }
+  return j;
+}
+
+int main(int argc, char **argv)
+{
+  srvr_sockaddr_union_t me;
+  struct tftphdr *tp;
+  ssize_t n = 0;
+  int arg = 1;
+  unsigned short port = DEFAULT_PORT;
+  curl_socket_t sock = CURL_SOCKET_BAD;
+  int flag;
+  int rc;
+  int error;
+  long pid;
+  struct testcase test;
+  int result = 0;
+
+  memset(&test, 0, sizeof(test));
+
+  while(argc>arg) {
+    if(!strcmp("--version", argv[arg])) {
+      printf("tftpd IPv4%s\n",
+#ifdef ENABLE_IPV6
+             "/IPv6"
+#else
+             ""
+#endif
+             );
+      return 0;
+    }
+    else if(!strcmp("--pidfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        pidname = argv[arg++];
+    }
+    else if(!strcmp("--logfile", argv[arg])) {
+      arg++;
+      if(argc>arg)
+        serverlogfile = argv[arg++];
+    }
+    else if(!strcmp("--ipv4", argv[arg])) {
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv4";
+      use_ipv6 = FALSE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--ipv6", argv[arg])) {
+#ifdef ENABLE_IPV6
+      ipv_inuse = "IPv6";
+      use_ipv6 = TRUE;
+#endif
+      arg++;
+    }
+    else if(!strcmp("--port", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        char *endptr;
+        unsigned long ulnum = strtoul(argv[arg], &endptr, 10);
+        if((endptr != argv[arg] + strlen(argv[arg])) ||
+           (ulnum < 1025UL) || (ulnum > 65535UL)) {
+          fprintf(stderr, "tftpd: invalid --port argument (%s)\n",
+                  argv[arg]);
+          return 0;
+        }
+        port = curlx_ultous(ulnum);
+        arg++;
+      }
+    }
+    else if(!strcmp("--srcdir", argv[arg])) {
+      arg++;
+      if(argc>arg) {
+        path = argv[arg];
+        arg++;
+      }
+    }
+    else {
+      puts("Usage: tftpd [option]\n"
+           " --version\n"
+           " --logfile [file]\n"
+           " --pidfile [file]\n"
+           " --ipv4\n"
+           " --ipv6\n"
+           " --port [port]\n"
+           " --srcdir [path]");
+      return 0;
+    }
+  }
+
+#ifdef WIN32
+  win32_init();
+  atexit(win32_cleanup);
+#endif
+
+  install_signal_handlers();
+
+  pid = (long)getpid();
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6)
+#endif
+    sock = socket(AF_INET, SOCK_DGRAM, 0);
+#ifdef ENABLE_IPV6
+  else
+    sock = socket(AF_INET6, SOCK_DGRAM, 0);
+#endif
+
+  if(CURL_SOCKET_BAD == sock) {
+    error = SOCKERRNO;
+    logmsg("Error creating socket: (%d) %s",
+           error, strerror(error));
+    result = 1;
+    goto tftpd_cleanup;
+  }
+
+  flag = 1;
+  if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
+            (void *)&flag, sizeof(flag))) {
+    error = SOCKERRNO;
+    logmsg("setsockopt(SO_REUSEADDR) failed with error: (%d) %s",
+           error, strerror(error));
+    result = 1;
+    goto tftpd_cleanup;
+  }
+
+#ifdef ENABLE_IPV6
+  if(!use_ipv6) {
+#endif
+    memset(&me.sa4, 0, sizeof(me.sa4));
+    me.sa4.sin_family = AF_INET;
+    me.sa4.sin_addr.s_addr = INADDR_ANY;
+    me.sa4.sin_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa4));
+#ifdef ENABLE_IPV6
+  }
+  else {
+    memset(&me.sa6, 0, sizeof(me.sa6));
+    me.sa6.sin6_family = AF_INET6;
+    me.sa6.sin6_addr = in6addr_any;
+    me.sa6.sin6_port = htons(port);
+    rc = bind(sock, &me.sa, sizeof(me.sa6));
+  }
+#endif /* ENABLE_IPV6 */
+  if(0 != rc) {
+    error = SOCKERRNO;
+    logmsg("Error binding socket on port %hu: (%d) %s",
+           port, error, strerror(error));
+    result = 1;
+    goto tftpd_cleanup;
+  }
+
+  wrotepidfile = write_pidfile(pidname);
+  if(!wrotepidfile) {
+    result = 1;
+    goto tftpd_cleanup;
+  }
+
+  logmsg("Running %s version on port UDP/%d", ipv_inuse, (int)port);
+
+  for(;;) {
+    fromlen = sizeof(from);
+#ifdef ENABLE_IPV6
+    if(!use_ipv6)
+#endif
+      fromlen = sizeof(from.sa4);
+#ifdef ENABLE_IPV6
+    else
+      fromlen = sizeof(from.sa6);
+#endif
+    n = (ssize_t)recvfrom(sock, &buf.storage[0], sizeof(buf.storage), 0,
+                          &from.sa, &fromlen);
+    if(got_exit_signal)
+      break;
+    if(n < 0) {
+      logmsg("recvfrom");
+      result = 3;
+      break;
+    }
+
+    set_advisor_read_lock(SERVERLOGS_LOCK);
+    serverlogslocked = 1;
+
+#ifdef ENABLE_IPV6
+    if(!use_ipv6) {
+#endif
+      from.sa4.sin_family = AF_INET;
+      peer = socket(AF_INET, SOCK_DGRAM, 0);
+      if(CURL_SOCKET_BAD == peer) {
+        logmsg("socket");
+        result = 2;
+        break;
+      }
+      if(connect(peer, &from.sa, sizeof(from.sa4)) < 0) {
+        logmsg("connect: fail");
+        result = 1;
+        break;
+      }
+#ifdef ENABLE_IPV6
+    }
+    else {
+      from.sa6.sin6_family = AF_INET6;
+      peer = socket(AF_INET6, SOCK_DGRAM, 0);
+      if(CURL_SOCKET_BAD == peer) {
+        logmsg("socket");
+        result = 2;
+        break;
+      }
+      if(connect(peer, &from.sa, sizeof(from.sa6)) < 0) {
+        logmsg("connect: fail");
+        result = 1;
+        break;
+      }
+    }
+#endif
+
+    maxtimeout = 5*TIMEOUT;
+
+    tp = &buf.hdr;
+    tp->th_opcode = ntohs(tp->th_opcode);
+    if(tp->th_opcode == opcode_RRQ || tp->th_opcode == opcode_WRQ) {
+      memset(&test, 0, sizeof(test));
+      if(do_tftp(&test, tp, n) < 0)
+        break;
+      free(test.buffer);
+    }
+    sclose(peer);
+    peer = CURL_SOCKET_BAD;
+
+    if(test.ofile > 0) {
+      close(test.ofile);
+      test.ofile = 0;
+    }
+
+    if(got_exit_signal)
+      break;
+
+    if(serverlogslocked) {
+      serverlogslocked = 0;
+      clear_advisor_read_lock(SERVERLOGS_LOCK);
+    }
+
+    logmsg("end of one transfer");
+
+  }
+
+tftpd_cleanup:
+
+  if(test.ofile > 0)
+    close(test.ofile);
+
+  if((peer != sock) && (peer != CURL_SOCKET_BAD))
+    sclose(peer);
+
+  if(sock != CURL_SOCKET_BAD)
+    sclose(sock);
+
+  if(got_exit_signal)
+    logmsg("signalled to die");
+
+  if(wrotepidfile)
+    unlink(pidname);
+
+  if(serverlogslocked) {
+    serverlogslocked = 0;
+    clear_advisor_read_lock(SERVERLOGS_LOCK);
+  }
+
+  restore_signal_handlers();
+
+  if(got_exit_signal) {
+    logmsg("========> %s tftpd (port: %d pid: %ld) exits with signal (%d)",
+           ipv_inuse, (int)port, pid, exit_signal);
+    /*
+     * To properly set the return status of the process we
+     * must raise the same signal SIGINT or SIGTERM that we
+     * caught and let the old handler take care of it.
+     */
+    raise(exit_signal);
+  }
+
+  logmsg("========> tftpd quits");
+  return result;
+}
+
+/*
+ * Handle initial connection protocol.
+ */
+static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
+{
+  char *cp;
+  int first = 1, ecode;
+  struct formats *pf;
+  char *filename, *mode = NULL;
+  int error;
+  FILE *server;
+#ifdef USE_WINSOCK
+  DWORD recvtimeout, recvtimeoutbak;
+#endif
+  const char *option = "mode"; /* mode is implicit */
+  int toggle = 1;
+
+  /* Open request dump file. */
+  server = fopen(REQUEST_DUMP, "ab");
+  if(!server) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("Error opening file: %s", REQUEST_DUMP);
+    return -1;
+  }
+
+  /* store input protocol */
+  fprintf(server, "opcode: %x\n", tp->th_opcode);
+
+  cp = (char *)&tp->th_stuff;
+  filename = cp;
+  do {
+    bool endofit = true;
+    while(cp < &buf.storage[size]) {
+      if(*cp == '\0') {
+        endofit = false;
+        break;
+      }
+      cp++;
+    }
+    if(endofit)
+      /* no more options */
+      break;
+
+    /* before increasing pointer, make sure it is still within the legal
+       space */
+    if((cp+1) < &buf.storage[size]) {
+      ++cp;
+      if(first) {
+        /* store the mode since we need it later */
+        mode = cp;
+        first = 0;
+      }
+      if(toggle)
+        /* name/value pair: */
+        fprintf(server, "%s: %s\n", option, cp);
+      else {
+        /* store the name pointer */
+        option = cp;
+      }
+      toggle ^= 1;
+    }
+    else
+      /* No more options */
+      break;
+  } while(1);
+
+  if(*cp) {
+    nak(EBADOP);
+    fclose(server);
+    return 3;
+  }
+
+  /* store input protocol */
+  fprintf(server, "filename: %s\n", filename);
+
+  for(cp = mode; cp && *cp; cp++)
+    if(ISUPPER(*cp))
+      *cp = (char)tolower((int)*cp);
+
+  /* store input protocol */
+  fclose(server);
+
+  for(pf = formata; pf->f_mode; pf++)
+    if(strcmp(pf->f_mode, mode) == 0)
+      break;
+  if(!pf->f_mode) {
+    nak(EBADOP);
+    return 2;
+  }
+  ecode = validate_access(test, filename, tp->th_opcode);
+  if(ecode) {
+    nak(ecode);
+    return 1;
+  }
+
+#ifdef USE_WINSOCK
+  recvtimeout = sizeof(recvtimeoutbak);
+  getsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (char *)&recvtimeoutbak, (int *)&recvtimeout);
+  recvtimeout = TIMEOUT*1000;
+  setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (const char *)&recvtimeout, sizeof(recvtimeout));
+#endif
+
+  if(tp->th_opcode == opcode_WRQ)
+    recvtftp(test, pf);
+  else
+    sendtftp(test, pf);
+
+#ifdef USE_WINSOCK
+  recvtimeout = recvtimeoutbak;
+  setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO,
+             (const char *)&recvtimeout, sizeof(recvtimeout));
+#endif
+
+  return 0;
+}
+
+/* Based on the testno, parse the correct server commands. */
+static int parse_servercmd(struct testcase *req)
+{
+  FILE *stream;
+  char *filename;
+  int error;
+
+  filename = test2file(req->testno);
+
+  stream=fopen(filename, "rb");
+  if(!stream) {
+    error = errno;
+    logmsg("fopen() failed with error: %d %s", error, strerror(error));
+    logmsg("  [1] Error opening file: %s", filename);
+    logmsg("  Couldn't open test file %ld", req->testno);
+    return 1; /* done */
+  }
+  else {
+    char *orgcmd = NULL;
+    char *cmd = NULL;
+    size_t cmdsize = 0;
+    int num=0;
+
+    /* get the custom server control "commands" */
+    error = getpart(&orgcmd, &cmdsize, "reply", "servercmd", stream);
+    fclose(stream);
+    if(error) {
+      logmsg("getpart() failed with error: %d", error);
+      return 1; /* done */
+    }
+
+    cmd = orgcmd;
+    while(cmd && cmdsize) {
+      char *check;
+      if(1 == sscanf(cmd, "writedelay: %d", &num)) {
+        logmsg("instructed to delay %d secs between packets", num);
+        req->writedelay = num;
+      }
+      else {
+        logmsg("Unknown <servercmd> instruction found: %s", cmd);
+      }
+      /* try to deal with CRLF or just LF */
+      check = strchr(cmd, '\r');
+      if(!check)
+        check = strchr(cmd, '\n');
+
+      if(check) {
+        /* get to the letter following the newline */
+        while((*check == '\r') || (*check == '\n'))
+          check++;
+
+        if(!*check)
+          /* if we reached a zero, get out */
+          break;
+        cmd = check;
+      }
+      else
+        break;
+    }
+    free(orgcmd);
+  }
+
+  return 0; /* OK! */
+}
+
+
+/*
+ * Validate file access.
+ */
+static int validate_access(struct testcase *test,
+                           const char *filename, int mode)
+{
+  char *ptr;
+  long testno, partno;
+  int error;
+  char partbuf[80]="data";
+
+  logmsg("trying to get file: %s mode %x", filename, mode);
+
+  if(!strncmp("verifiedserver", filename, 14)) {
+    char weare[128];
+    size_t count = snprintf(weare, sizeof(weare),
+                            "WE ROOLZ: %ld\r\n", (long)getpid());
+
+    logmsg("Are-we-friendly question received");
+    test->buffer = strdup(weare);
+    test->rptr = test->buffer; /* set read pointer */
+    test->bufsize = count;    /* set total count */
+    test->rcount = count;     /* set data left to read */
+    return 0; /* fine */
+  }
+
+  /* find the last slash */
+  ptr = strrchr(filename, '/');
+
+  if(ptr) {
+    char *file;
+
+    ptr++; /* skip the slash */
+
+    /* skip all non-numericals following the slash */
+    while(*ptr && !ISDIGIT(*ptr))
+      ptr++;
+
+    /* get the number */
+    testno = strtol(ptr, &ptr, 10);
+
+    if(testno > 10000) {
+      partno = testno % 10000;
+      testno /= 10000;
+    }
+    else
+      partno = 0;
+
+
+    logmsg("requested test number %ld part %ld", testno, partno);
+
+    test->testno = testno;
+
+    (void)parse_servercmd(test);
+
+    file = test2file(testno);
+
+    if(0 != partno)
+      snprintf(partbuf, sizeof(partbuf), "data%ld", partno);
+
+    if(file) {
+      FILE *stream=fopen(file, "rb");
+      if(!stream) {
+        error = errno;
+        logmsg("fopen() failed with error: %d %s", error, strerror(error));
+        logmsg("Error opening file: %s", file);
+        logmsg("Couldn't open test file: %s", file);
+        return EACCESS;
+      }
+      else {
+        size_t count;
+        error = getpart(&test->buffer, &count, "reply", partbuf, stream);
+        fclose(stream);
+        if(error) {
+          logmsg("getpart() failed with error: %d", error);
+          return EACCESS;
+        }
+        if(test->buffer) {
+          test->rptr = test->buffer; /* set read pointer */
+          test->bufsize = count;    /* set total count */
+          test->rcount = count;     /* set data left to read */
+        }
+        else
+          return EACCESS;
+      }
+
+    }
+    else
+      return EACCESS;
+  }
+  else {
+    logmsg("no slash found in path");
+    return EACCESS; /* failure */
+  }
+
+  logmsg("file opened and all is good");
+  return 0;
+}
+
+/*
+ * Send the requested file.
+ */
+static void sendtftp(struct testcase *test, struct formats *pf)
+{
+  int size;
+  ssize_t n;
+  /* These are volatile to live through a siglongjmp */
+  volatile unsigned short sendblock; /* block count */
+  struct tftphdr * volatile sdp = r_init(); /* data buffer */
+  struct tftphdr * const sap = &ackbuf.hdr; /* ack buffer */
+
+  sendblock = 1;
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+  mysignal(SIGALRM, timer);
+#endif
+  do {
+    size = readit(test, (struct tftphdr **)&sdp, pf->f_convert);
+    if(size < 0) {
+      nak(errno + 100);
+      return;
+    }
+    sdp->th_opcode = htons((unsigned short)opcode_DATA);
+    sdp->th_block = htons(sendblock);
+    timeout = 0;
+#ifdef HAVE_SIGSETJMP
+    (void) sigsetjmp(timeoutbuf, 1);
+#endif
+    if(test->writedelay) {
+      logmsg("Pausing %d seconds before %d bytes", test->writedelay,
+             size);
+      wait_ms(1000*test->writedelay);
+    }
+
+    send_data:
+    if(swrite(peer, sdp, size + 4) != size + 4) {
+      logmsg("write");
+      return;
+    }
+    read_ahead(test, pf->f_convert);
+    for(;;) {
+#ifdef HAVE_ALARM
+      alarm(rexmtval);        /* read the ack */
+#endif
+      n = sread(peer, &ackbuf.storage[0], sizeof(ackbuf.storage));
+#ifdef HAVE_ALARM
+      alarm(0);
+#endif
+      if(got_exit_signal)
+        return;
+      if(n < 0) {
+        logmsg("read: fail");
+        return;
+      }
+      sap->th_opcode = ntohs((unsigned short)sap->th_opcode);
+      sap->th_block = ntohs(sap->th_block);
+
+      if(sap->th_opcode == opcode_ERROR) {
+        logmsg("got ERROR");
+        return;
+      }
+
+      if(sap->th_opcode == opcode_ACK) {
+        if(sap->th_block == sendblock) {
+          break;
+        }
+        /* Re-synchronize with the other side */
+        (void) synchnet(peer);
+        if(sap->th_block == (sendblock-1)) {
+          goto send_data;
+        }
+      }
+
+    }
+    sendblock++;
+  } while(size == SEGSIZE);
+}
+
+/*
+ * Receive a file.
+ */
+static void recvtftp(struct testcase *test, struct formats *pf)
+{
+  ssize_t n, size;
+  /* These are volatile to live through a siglongjmp */
+  volatile unsigned short recvblock; /* block count */
+  struct tftphdr * volatile rdp;     /* data buffer */
+  struct tftphdr *rap;      /* ack buffer */
+
+  recvblock = 0;
+  rdp = w_init();
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+  mysignal(SIGALRM, timer);
+#endif
+  rap = &ackbuf.hdr;
+  do {
+    timeout = 0;
+    rap->th_opcode = htons((unsigned short)opcode_ACK);
+    rap->th_block = htons(recvblock);
+    recvblock++;
+#ifdef HAVE_SIGSETJMP
+    (void) sigsetjmp(timeoutbuf, 1);
+#endif
+send_ack:
+    if(swrite(peer, &ackbuf.storage[0], 4) != 4) {
+      logmsg("write: fail\n");
+      goto abort;
+    }
+    write_behind(test, pf->f_convert);
+    for(;;) {
+#ifdef HAVE_ALARM
+      alarm(rexmtval);
+#endif
+      n = sread(peer, rdp, PKTSIZE);
+#ifdef HAVE_ALARM
+      alarm(0);
+#endif
+      if(got_exit_signal)
+        goto abort;
+      if(n < 0) {                       /* really? */
+        logmsg("read: fail\n");
+        goto abort;
+      }
+      rdp->th_opcode = ntohs((unsigned short)rdp->th_opcode);
+      rdp->th_block = ntohs(rdp->th_block);
+      if(rdp->th_opcode == opcode_ERROR)
+        goto abort;
+      if(rdp->th_opcode == opcode_DATA) {
+        if(rdp->th_block == recvblock) {
+          break;                         /* normal */
+        }
+        /* Re-synchronize with the other side */
+        (void) synchnet(peer);
+        if(rdp->th_block == (recvblock-1))
+          goto send_ack;                 /* rexmit */
+      }
+    }
+
+    size = writeit(test, &rdp, (int)(n - 4), pf->f_convert);
+    if(size != (n-4)) {                 /* ahem */
+      if(size < 0)
+        nak(errno + 100);
+      else
+        nak(ENOSPACE);
+      goto abort;
+    }
+  } while(size == SEGSIZE);
+  write_behind(test, pf->f_convert);
+
+  rap->th_opcode = htons((unsigned short)opcode_ACK);  /* send the "final"
+                                                          ack */
+  rap->th_block = htons(recvblock);
+  (void) swrite(peer, &ackbuf.storage[0], 4);
+#if defined(HAVE_ALARM) && defined(SIGALRM)
+  mysignal(SIGALRM, justtimeout);        /* just abort read on timeout */
+  alarm(rexmtval);
+#endif
+  /* normally times out and quits */
+  n = sread(peer, &buf.storage[0], sizeof(buf.storage));
+#ifdef HAVE_ALARM
+  alarm(0);
+#endif
+  if(got_exit_signal)
+    goto abort;
+  if(n >= 4 &&                               /* if read some data */
+     rdp->th_opcode == opcode_DATA &&        /* and got a data block */
+     recvblock == rdp->th_block) {           /* then my last ack was lost */
+    (void) swrite(peer, &ackbuf.storage[0], 4);  /* resend final ack */
+  }
+abort:
+  return;
+}
+
+/*
+ * Send a nak packet (error message).  Error code passed in is one of the
+ * standard TFTP codes, or a Unix errno offset by 100.
+ */
+static void nak(int error)
+{
+  struct tftphdr *tp;
+  int length;
+  struct errmsg *pe;
+
+  tp = &buf.hdr;
+  tp->th_opcode = htons((unsigned short)opcode_ERROR);
+  tp->th_code = htons((unsigned short)error);
+  for(pe = errmsgs; pe->e_code >= 0; pe++)
+    if(pe->e_code == error)
+      break;
+  if(pe->e_code < 0) {
+    pe->e_msg = strerror(error - 100);
+    tp->th_code = EUNDEF;   /* set 'undef' errorcode */
+  }
+  length = (int)strlen(pe->e_msg);
+
+  /* we use memcpy() instead of strcpy() in order to avoid buffer overflow
+   * report from glibc with FORTIFY_SOURCE */
+  memcpy(tp->th_msg, pe->e_msg, length + 1);
+  length += 5;
+  if(swrite(peer, &buf.storage[0], length) != length)
+    logmsg("nak: fail\n");
+}
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/util.c b/ap/lib/libcurl/curl-7.54.1/tests/server/util.c
new file mode 100644
index 0000000..a2340f4
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/util.c
@@ -0,0 +1,399 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef _XOPEN_SOURCE_EXTENDED
+/* This define is "almost" required to build on HPUX 11 */
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+#include <sys/poll.h>
+#endif
+#ifdef __MINGW32__
+#include <w32api.h>
+#endif
+
+#define ENABLE_CURLX_PRINTF
+/* make the curlx header define all printf() functions to use the curlx_*
+   versions instead */
+#include "curlx.h" /* from the private lib dir */
+#include "getpart.h"
+#include "util.h"
+#include "timeval.h"
+
+#ifdef USE_WINSOCK
+#undef  EINTR
+#define EINTR    4 /* errno.h value */
+#undef  EINVAL
+#define EINVAL  22 /* errno.h value */
+#endif
+
+/* MinGW with w32api version < 3.6 declared in6addr_any as extern,
+   but lacked the definition */
+#if defined(ENABLE_IPV6) && defined(__MINGW32__)
+#if (__W32API_MAJOR_VERSION < 3) || \
+    ((__W32API_MAJOR_VERSION == 3) && (__W32API_MINOR_VERSION < 6))
+const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
+#endif /* w32api < 3.6 */
+#endif /* ENABLE_IPV6 && __MINGW32__*/
+
+/* This function returns a pointer to STATIC memory. It converts the given
+ * binary lump to a hex formatted string usable for output in logs or
+ * whatever.
+ */
+char *data_to_hex(char *data, size_t len)
+{
+  static char buf[256*3];
+  size_t i;
+  char *optr = buf;
+  char *iptr = data;
+
+  if(len > 255)
+    len = 255;
+
+  for(i=0; i < len; i++) {
+    if((data[i] >= 0x20) && (data[i] < 0x7f))
+      *optr++ = *iptr++;
+    else {
+      snprintf(optr, 4, "%%%02x", *iptr++);
+      optr+=3;
+    }
+  }
+  *optr=0; /* in case no sprintf was used */
+
+  return buf;
+}
+
+void logmsg(const char *msg, ...)
+{
+  va_list ap;
+  char buffer[2048 + 1];
+  FILE *logfp;
+  int error;
+  struct timeval tv;
+  time_t sec;
+  struct tm *now;
+  char timebuf[20];
+  static time_t epoch_offset;
+  static int    known_offset;
+
+  if(!serverlogfile) {
+    fprintf(stderr, "Error: serverlogfile not set\n");
+    return;
+  }
+
+  tv = curlx_tvnow();
+  if(!known_offset) {
+    epoch_offset = time(NULL) - tv.tv_sec;
+    known_offset = 1;
+  }
+  sec = epoch_offset + tv.tv_sec;
+  now = localtime(&sec); /* not thread safe but we don't care */
+
+  snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
+    (int)now->tm_hour, (int)now->tm_min, (int)now->tm_sec, (long)tv.tv_usec);
+
+  va_start(ap, msg);
+  vsnprintf(buffer, sizeof(buffer), msg, ap);
+  va_end(ap);
+
+  logfp = fopen(serverlogfile, "ab");
+  if(logfp) {
+    fprintf(logfp, "%s %s\n", timebuf, buffer);
+    fclose(logfp);
+  }
+  else {
+    error = errno;
+    fprintf(stderr, "fopen() failed with error: %d %s\n",
+            error, strerror(error));
+    fprintf(stderr, "Error opening file: %s\n", serverlogfile);
+    fprintf(stderr, "Msg not logged: %s %s\n", timebuf, buffer);
+  }
+}
+
+#ifdef WIN32
+/* use instead of perror() on generic windows */
+void win32_perror(const char *msg)
+{
+  char buf[512];
+  DWORD err = SOCKERRNO;
+
+  if(!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
+                    LANG_NEUTRAL, buf, sizeof(buf), NULL))
+     snprintf(buf, sizeof(buf), "Unknown error %lu (%#lx)", err, err);
+  if(msg)
+    fprintf(stderr, "%s: ", msg);
+  fprintf(stderr, "%s\n", buf);
+}
+#endif  /* WIN32 */
+
+#ifdef USE_WINSOCK
+void win32_init(void)
+{
+  WORD wVersionRequested;
+  WSADATA wsaData;
+  int err;
+  wVersionRequested = MAKEWORD(USE_WINSOCK, USE_WINSOCK);
+
+  err = WSAStartup(wVersionRequested, &wsaData);
+
+  if(err != 0) {
+    perror("Winsock init failed");
+    logmsg("Error initialising winsock -- aborting");
+    exit(1);
+  }
+
+  if(LOBYTE(wsaData.wVersion) != USE_WINSOCK ||
+     HIBYTE(wsaData.wVersion) != USE_WINSOCK) {
+    WSACleanup();
+    perror("Winsock init failed");
+    logmsg("No suitable winsock.dll found -- aborting");
+    exit(1);
+  }
+}
+
+void win32_cleanup(void)
+{
+  WSACleanup();
+}
+#endif  /* USE_WINSOCK */
+
+/* set by the main code to point to where the test dir is */
+const char *path=".";
+
+char *test2file(long testno)
+{
+  static char filename[256];
+  snprintf(filename, sizeof(filename), TEST_DATA_PATH, path, testno);
+  return filename;
+}
+
+/*
+ * Portable function used for waiting a specific amount of ms.
+ * Waiting indefinitely with this function is not allowed, a
+ * zero or negative timeout value will return immediately.
+ *
+ * Return values:
+ *   -1 = system call error, or invalid timeout value
+ *    0 = specified timeout has elapsed
+ */
+int wait_ms(int timeout_ms)
+{
+#if !defined(MSDOS) && !defined(USE_WINSOCK)
+#ifndef HAVE_POLL_FINE
+  struct timeval pending_tv;
+#endif
+  struct timeval initial_tv;
+  int pending_ms;
+  int error;
+#endif
+  int r = 0;
+
+  if(!timeout_ms)
+    return 0;
+  if(timeout_ms < 0) {
+    errno = EINVAL;
+    return -1;
+  }
+#if defined(MSDOS)
+  delay(timeout_ms);
+#elif defined(USE_WINSOCK)
+  Sleep(timeout_ms);
+#else
+  pending_ms = timeout_ms;
+  initial_tv = curlx_tvnow();
+  do {
+#if defined(HAVE_POLL_FINE)
+    r = poll(NULL, 0, pending_ms);
+#else
+    pending_tv.tv_sec = pending_ms / 1000;
+    pending_tv.tv_usec = (pending_ms % 1000) * 1000;
+    r = select(0, NULL, NULL, NULL, &pending_tv);
+#endif /* HAVE_POLL_FINE */
+    if(r != -1)
+      break;
+    error = errno;
+    if(error && (error != EINTR))
+      break;
+    pending_ms = timeout_ms - (int)curlx_tvdiff(curlx_tvnow(), initial_tv);
+    if(pending_ms <= 0)
+      break;
+  } while(r == -1);
+#endif /* USE_WINSOCK */
+  if(r)
+    r = -1;
+  return r;
+}
+
+int write_pidfile(const char *filename)
+{
+  FILE *pidfile;
+  long pid;
+
+  pid = (long)getpid();
+  pidfile = fopen(filename, "wb");
+  if(!pidfile) {
+    logmsg("Couldn't write pid file: %s %s", filename, strerror(errno));
+    return 0; /* fail */
+  }
+  fprintf(pidfile, "%ld\n", pid);
+  fclose(pidfile);
+  logmsg("Wrote pid %ld to %s", pid, filename);
+  return 1; /* success */
+}
+
+void set_advisor_read_lock(const char *filename)
+{
+  FILE *lockfile;
+  int error = 0;
+  int res;
+
+  do {
+    lockfile = fopen(filename, "wb");
+  } while((lockfile == NULL) && ((error = errno) == EINTR));
+  if(lockfile == NULL) {
+    logmsg("Error creating lock file %s error: %d %s",
+           filename, error, strerror(error));
+    return;
+  }
+
+  do {
+    res = fclose(lockfile);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error closing lock file %s error: %d %s",
+           filename, error, strerror(error));
+}
+
+void clear_advisor_read_lock(const char *filename)
+{
+  int error = 0;
+  int res;
+
+  /*
+  ** Log all removal failures. Even those due to file not existing.
+  ** This allows to detect if unexpectedly the file has already been
+  ** removed by a process different than the one that should do this.
+  */
+
+  do {
+    res = unlink(filename);
+  } while(res && ((error = errno) == EINTR));
+  if(res)
+    logmsg("Error removing lock file %s error: %d %s",
+           filename, error, strerror(error));
+}
+
+
+/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because
+   its behavior is altered by the current locale. */
+static char raw_toupper(char in)
+{
+#if !defined(CURL_DOES_CONVERSIONS)
+  if(in >= 'a' && in <= 'z')
+    return (char)('A' + in - 'a');
+#else
+  switch(in) {
+  case 'a':
+    return 'A';
+  case 'b':
+    return 'B';
+  case 'c':
+    return 'C';
+  case 'd':
+    return 'D';
+  case 'e':
+    return 'E';
+  case 'f':
+    return 'F';
+  case 'g':
+    return 'G';
+  case 'h':
+    return 'H';
+  case 'i':
+    return 'I';
+  case 'j':
+    return 'J';
+  case 'k':
+    return 'K';
+  case 'l':
+    return 'L';
+  case 'm':
+    return 'M';
+  case 'n':
+    return 'N';
+  case 'o':
+    return 'O';
+  case 'p':
+    return 'P';
+  case 'q':
+    return 'Q';
+  case 'r':
+    return 'R';
+  case 's':
+    return 'S';
+  case 't':
+    return 'T';
+  case 'u':
+    return 'U';
+  case 'v':
+    return 'V';
+  case 'w':
+    return 'W';
+  case 'x':
+    return 'X';
+  case 'y':
+    return 'Y';
+  case 'z':
+    return 'Z';
+  }
+#endif
+
+  return in;
+}
+
+int strncasecompare(const char *first, const char *second, size_t max)
+{
+  while(*first && *second && max) {
+    if(raw_toupper(*first) != raw_toupper(*second)) {
+      break;
+    }
+    max--;
+    first++;
+    second++;
+  }
+  if(0 == max)
+    return 1; /* they are equal this far */
+
+  return raw_toupper(*first) == raw_toupper(*second);
+}
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/server/util.h b/ap/lib/libcurl/curl-7.54.1/tests/server/util.h
new file mode 100644
index 0000000..a2a56ba
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/server/util.h
@@ -0,0 +1,68 @@
+#ifndef HEADER_CURL_SERVER_UTIL_H
+#define HEADER_CURL_SERVER_UTIL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "server_setup.h"
+
+char *data_to_hex(char *data, size_t len);
+void logmsg(const char *msg, ...);
+
+#define TEST_DATA_PATH "%s/data/test%ld"
+
+#define SERVERLOGS_LOCK "log/serverlogs.lock"
+
+/* global variable, where to find the 'data' dir */
+extern const char *path;
+
+/* global variable, log file name */
+extern const char *serverlogfile;
+
+#ifdef WIN32
+#include <process.h>
+#include <fcntl.h>
+
+#define sleep(sec)   Sleep ((sec)*1000)
+
+#undef perror
+#define perror(m) win32_perror(m)
+void win32_perror(const char *msg);
+#endif  /* WIN32 */
+
+#ifdef USE_WINSOCK
+void win32_init(void);
+void win32_cleanup(void);
+#endif  /* USE_WINSOCK */
+
+/* returns the path name to the test case file */
+char *test2file(long testno);
+
+int wait_ms(int timeout_ms);
+
+int write_pidfile(const char *filename);
+
+void set_advisor_read_lock(const char *filename);
+
+void clear_advisor_read_lock(const char *filename);
+
+int strncasecompare(const char *first, const char *second, size_t max);
+
+#endif  /* HEADER_CURL_SERVER_UTIL_H */