diff options
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/Makefile.am | 57 | ||||
-rw-r--r-- | tests/server/Makefile.in | 1692 | ||||
-rw-r--r-- | tests/server/Makefile.inc | 61 | ||||
-rw-r--r-- | tests/server/getpart.c | 422 | ||||
-rw-r--r-- | tests/server/getpart.h | 33 | ||||
-rw-r--r-- | tests/server/resolve.c | 164 | ||||
-rw-r--r-- | tests/server/rtspd.c | 1471 | ||||
-rw-r--r-- | tests/server/sockfilt.c | 1053 | ||||
-rw-r--r-- | tests/server/sws.c | 1458 | ||||
-rw-r--r-- | tests/server/testpart.c | 54 | ||||
-rw-r--r-- | tests/server/tftp.h | 57 | ||||
-rw-r--r-- | tests/server/tftpd.c | 1263 | ||||
-rw-r--r-- | tests/server/util.c | 283 | ||||
-rw-r--r-- | tests/server/util.h | 64 |
14 files changed, 8132 insertions, 0 deletions
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am new file mode 100644 index 0000000..d4b9cc3 --- /dev/null +++ b/tests/server/Makefile.am @@ -0,0 +1,57 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2009, 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 http://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 included from lib/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 is for libcurl's lib/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 +INCLUDES = -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 +INCLUDES = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib +endif + +# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD) +include Makefile.inc + +extra_DIST = base64.pl Makefile.inc + diff --git a/tests/server/Makefile.in b/tests/server/Makefile.in new file mode 100644 index 0000000..69907fd --- /dev/null +++ b/tests/server/Makefile.in @@ -0,0 +1,1692 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.inc +noinst_PROGRAMS = getpart$(EXEEXT) resolve$(EXEEXT) rtspd$(EXEEXT) \ + sockfilt$(EXEEXT) sws$(EXEEXT) tftpd$(EXEEXT) +subdir = tests/server +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ + $(top_srcdir)/m4/curl-confopts.m4 \ + $(top_srcdir)/m4/curl-functions.m4 \ + $(top_srcdir)/m4/curl-override.m4 \ + $(top_srcdir)/m4/curl-reentrant.m4 \ + $(top_srcdir)/m4/curl-system.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)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \ + $(top_builddir)/src/curl_config.h \ + $(top_builddir)/include/curl/curlbuild.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am__objects_1 = getpart-mprintf.$(OBJEXT) getpart-nonblock.$(OBJEXT) \ + getpart-strequal.$(OBJEXT) getpart-strtoofft.$(OBJEXT) \ + getpart-timeval.$(OBJEXT) getpart-warnless.$(OBJEXT) +am__objects_2 = +am__objects_3 = getpart-getpart.$(OBJEXT) getpart-base64.$(OBJEXT) \ + getpart-memdebug.$(OBJEXT) +am_getpart_OBJECTS = $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) getpart-testpart.$(OBJEXT) +getpart_OBJECTS = $(am_getpart_OBJECTS) +getpart_DEPENDENCIES = +am__objects_4 = resolve-mprintf.$(OBJEXT) resolve-nonblock.$(OBJEXT) \ + resolve-strequal.$(OBJEXT) resolve-strtoofft.$(OBJEXT) \ + resolve-timeval.$(OBJEXT) resolve-warnless.$(OBJEXT) +am__objects_5 = resolve-getpart.$(OBJEXT) resolve-base64.$(OBJEXT) \ + resolve-memdebug.$(OBJEXT) +am__objects_6 = resolve-util.$(OBJEXT) +am_resolve_OBJECTS = $(am__objects_4) $(am__objects_2) \ + $(am__objects_5) $(am__objects_6) resolve-resolve.$(OBJEXT) +resolve_OBJECTS = $(am_resolve_OBJECTS) +resolve_DEPENDENCIES = +am__objects_7 = rtspd-mprintf.$(OBJEXT) rtspd-nonblock.$(OBJEXT) \ + rtspd-strequal.$(OBJEXT) rtspd-strtoofft.$(OBJEXT) \ + rtspd-timeval.$(OBJEXT) rtspd-warnless.$(OBJEXT) +am__objects_8 = rtspd-getpart.$(OBJEXT) rtspd-base64.$(OBJEXT) \ + rtspd-memdebug.$(OBJEXT) +am__objects_9 = rtspd-util.$(OBJEXT) +am_rtspd_OBJECTS = $(am__objects_7) $(am__objects_2) $(am__objects_8) \ + $(am__objects_9) rtspd-rtspd.$(OBJEXT) +rtspd_OBJECTS = $(am_rtspd_OBJECTS) +rtspd_DEPENDENCIES = +am__objects_10 = sockfilt-mprintf.$(OBJEXT) \ + sockfilt-nonblock.$(OBJEXT) sockfilt-strequal.$(OBJEXT) \ + sockfilt-strtoofft.$(OBJEXT) sockfilt-timeval.$(OBJEXT) \ + sockfilt-warnless.$(OBJEXT) +am__objects_11 = sockfilt-getpart.$(OBJEXT) sockfilt-base64.$(OBJEXT) \ + sockfilt-memdebug.$(OBJEXT) +am__objects_12 = sockfilt-util.$(OBJEXT) +am_sockfilt_OBJECTS = $(am__objects_10) $(am__objects_2) \ + $(am__objects_11) $(am__objects_12) \ + sockfilt-sockfilt.$(OBJEXT) sockfilt-inet_pton.$(OBJEXT) +sockfilt_OBJECTS = $(am_sockfilt_OBJECTS) +sockfilt_DEPENDENCIES = +am__objects_13 = sws-mprintf.$(OBJEXT) sws-nonblock.$(OBJEXT) \ + sws-strequal.$(OBJEXT) sws-strtoofft.$(OBJEXT) \ + sws-timeval.$(OBJEXT) sws-warnless.$(OBJEXT) +am__objects_14 = sws-getpart.$(OBJEXT) sws-base64.$(OBJEXT) \ + sws-memdebug.$(OBJEXT) +am__objects_15 = sws-util.$(OBJEXT) +am_sws_OBJECTS = $(am__objects_13) $(am__objects_2) $(am__objects_14) \ + $(am__objects_15) sws-sws.$(OBJEXT) +sws_OBJECTS = $(am_sws_OBJECTS) +sws_DEPENDENCIES = +am__objects_16 = tftpd-mprintf.$(OBJEXT) tftpd-nonblock.$(OBJEXT) \ + tftpd-strequal.$(OBJEXT) tftpd-strtoofft.$(OBJEXT) \ + tftpd-timeval.$(OBJEXT) tftpd-warnless.$(OBJEXT) +am__objects_17 = tftpd-getpart.$(OBJEXT) tftpd-base64.$(OBJEXT) \ + tftpd-memdebug.$(OBJEXT) +am__objects_18 = tftpd-util.$(OBJEXT) +am_tftpd_OBJECTS = $(am__objects_16) $(am__objects_2) \ + $(am__objects_17) $(am__objects_18) tftpd-tftpd.$(OBJEXT) +tftpd_OBJECTS = $(am_tftpd_OBJECTS) +tftpd_DEPENDENCIES = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \ + $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES) +DIST_SOURCES = $(getpart_SOURCES) $(resolve_SOURCES) $(rtspd_SOURCES) \ + $(sockfilt_SOURCES) $(sws_SOURCES) $(tftpd_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@ +BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@ +CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@ +CURLDEBUG_FALSE = @CURLDEBUG_FALSE@ +CURLDEBUG_TRUE = @CURLDEBUG_TRUE@ +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_SMTP = @CURL_DISABLE_SMTP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ +CURL_LIBS = @CURL_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@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@ +HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@ +HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@ +IDN_ENABLED = @IDN_ENABLED@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +KRB4_ENABLED = @KRB4_ENABLED@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCURL_LIBS = @LIBCURL_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MANOPT = @MANOPT@ +MIMPURE_FALSE = @MIMPURE_FALSE@ +MIMPURE_TRUE = @MIMPURE_TRUE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@ +NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@ +NROFF = @NROFF@ +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 = @PATH@ +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@ +SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@ +SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@ +SSL_ENABLED = @SSL_ENABLED@ +STATICLIB_FALSE = @STATICLIB_FALSE@ +STATICLIB_TRUE = @STATICLIB_TRUE@ +STRIP = @STRIP@ +SUPPORT_FEATURES = @SUPPORT_FEATURES@ +SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ +TEST_SERVER_LIBS = @TEST_SERVER_LIBS@ +USE_ARES = @USE_ARES@ +USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@ +USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@ +USE_GNUTLS = @USE_GNUTLS@ +USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH2 = @USE_LIBSSH2@ +USE_MANUAL_FALSE = @USE_MANUAL_FALSE@ +USE_MANUAL_TRUE = @USE_MANUAL_TRUE@ +USE_NSS = @USE_NSS@ +USE_OPENLDAP = @USE_OPENLDAP@ +USE_POLARSSL = @USE_POLARSSL@ +USE_SSLEAY = @USE_SSLEAY@ +USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +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@ +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@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2009, 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 http://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@INCLUDES = -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 + + +# 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 included from lib/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 is for libcurl's lib/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@INCLUDES = -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 + +CURLX_SRCS = \ + $(top_srcdir)/lib/mprintf.c \ + $(top_srcdir)/lib/nonblock.c \ + $(top_srcdir)/lib/strequal.c \ + $(top_srcdir)/lib/strtoofft.c \ + $(top_srcdir)/lib/timeval.c \ + $(top_srcdir)/lib/warnless.c + +CURLX_HDRS = \ + $(top_srcdir)/lib/curlx.h \ + $(top_srcdir)/lib/nonblock.h \ + $(top_srcdir)/lib/strequal.h \ + $(top_srcdir)/lib/strtoofft.h \ + $(top_srcdir)/lib/timeval.h \ + $(top_srcdir)/lib/warnless.h + +USEFUL = \ + getpart.c \ + getpart.h \ + $(top_srcdir)/lib/base64.c \ + $(top_srcdir)/lib/curl_base64.h \ + $(top_srcdir)/lib/memdebug.c \ + $(top_srcdir)/lib/memdebug.h + +UTIL = \ + util.c \ + util.h + +getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \ + testpart.c + +getpart_LDADD = @TEST_SERVER_LIBS@ +getpart_CFLAGS = $(AM_CFLAGS) +resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + resolve.c + +resolve_LDADD = @TEST_SERVER_LIBS@ +resolve_CFLAGS = $(AM_CFLAGS) +rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + rtspd.c + +rtspd_LDADD = @TEST_SERVER_LIBS@ +rtspd_CFLAGS = $(AM_CFLAGS) +sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + sockfilt.c \ + $(top_srcdir)/lib/inet_pton.c + +sockfilt_LDADD = @TEST_SERVER_LIBS@ +sockfilt_CFLAGS = $(AM_CFLAGS) +sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + sws.c + +sws_LDADD = @TEST_SERVER_LIBS@ +sws_CFLAGS = $(AM_CFLAGS) +tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + tftpd.c \ + tftp.h + +tftpd_LDADD = @TEST_SERVER_LIBS@ +tftpd_CFLAGS = $(AM_CFLAGS) + +# Makefile.inc provides the source defines (noinst_PROGRAMS, useful, *_SOURCES, and *_LDADD) +extra_DIST = base64.pl Makefile.inc +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/server/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/server/Makefile +.PRECIOUS: 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; + +$(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 + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +getpart$(EXEEXT): $(getpart_OBJECTS) $(getpart_DEPENDENCIES) + @rm -f getpart$(EXEEXT) + $(LINK) $(getpart_LDFLAGS) $(getpart_OBJECTS) $(getpart_LDADD) $(LIBS) +resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) + @rm -f resolve$(EXEEXT) + $(LINK) $(resolve_LDFLAGS) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS) +rtspd$(EXEEXT): $(rtspd_OBJECTS) $(rtspd_DEPENDENCIES) + @rm -f rtspd$(EXEEXT) + $(LINK) $(rtspd_LDFLAGS) $(rtspd_OBJECTS) $(rtspd_LDADD) $(LIBS) +sockfilt$(EXEEXT): $(sockfilt_OBJECTS) $(sockfilt_DEPENDENCIES) + @rm -f sockfilt$(EXEEXT) + $(LINK) $(sockfilt_LDFLAGS) $(sockfilt_OBJECTS) $(sockfilt_LDADD) $(LIBS) +sws$(EXEEXT): $(sws_OBJECTS) $(sws_DEPENDENCIES) + @rm -f sws$(EXEEXT) + $(LINK) $(sws_LDFLAGS) $(sws_OBJECTS) $(sws_LDADD) $(LIBS) +tftpd$(EXEEXT): $(tftpd_OBJECTS) $(tftpd_DEPENDENCIES) + @rm -f tftpd$(EXEEXT) + $(LINK) $(tftpd_LDFLAGS) $(tftpd_OBJECTS) $(tftpd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-testpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpart-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-resolve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-rtspd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtspd-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-inet_pton.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-sockfilt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockfilt-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-sws.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sws-warnless.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-base64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-getpart.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-memdebug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-mprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-nonblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-strequal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-strtoofft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-tftpd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tftpd-warnless.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +getpart-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.o -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +getpart-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-mprintf.obj -MD -MP -MF "$(DEPDIR)/getpart-mprintf.Tpo" -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-mprintf.Tpo" "$(DEPDIR)/getpart-mprintf.Po"; else rm -f "$(DEPDIR)/getpart-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='getpart-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +getpart-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.o -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +getpart-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-nonblock.obj -MD -MP -MF "$(DEPDIR)/getpart-nonblock.Tpo" -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-nonblock.Tpo" "$(DEPDIR)/getpart-nonblock.Po"; else rm -f "$(DEPDIR)/getpart-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='getpart-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +getpart-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.o -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +getpart-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strequal.obj -MD -MP -MF "$(DEPDIR)/getpart-strequal.Tpo" -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strequal.Tpo" "$(DEPDIR)/getpart-strequal.Po"; else rm -f "$(DEPDIR)/getpart-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='getpart-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +getpart-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.o -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +getpart-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-strtoofft.obj -MD -MP -MF "$(DEPDIR)/getpart-strtoofft.Tpo" -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-strtoofft.Tpo" "$(DEPDIR)/getpart-strtoofft.Po"; else rm -f "$(DEPDIR)/getpart-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='getpart-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +getpart-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.o -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +getpart-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-timeval.obj -MD -MP -MF "$(DEPDIR)/getpart-timeval.Tpo" -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-timeval.Tpo" "$(DEPDIR)/getpart-timeval.Po"; else rm -f "$(DEPDIR)/getpart-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='getpart-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +getpart-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.o -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +getpart-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-warnless.obj -MD -MP -MF "$(DEPDIR)/getpart-warnless.Tpo" -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-warnless.Tpo" "$(DEPDIR)/getpart-warnless.Po"; else rm -f "$(DEPDIR)/getpart-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='getpart-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +getpart-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='getpart-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/getpart-getpart.Tpo" "$(DEPDIR)/getpart-getpart.Po"; else rm -f "$(DEPDIR)/getpart-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='getpart-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +getpart-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.o -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='getpart-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +getpart-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-base64.obj -MD -MP -MF "$(DEPDIR)/getpart-base64.Tpo" -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-base64.Tpo" "$(DEPDIR)/getpart-base64.Po"; else rm -f "$(DEPDIR)/getpart-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='getpart-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +getpart-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.o -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +getpart-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -MT getpart-memdebug.obj -MD -MP -MF "$(DEPDIR)/getpart-memdebug.Tpo" -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getpart-memdebug.Tpo" "$(DEPDIR)/getpart-memdebug.Po"; else rm -f "$(DEPDIR)/getpart-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='getpart-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(getpart_CFLAGS) $(CFLAGS) -c -o getpart-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +getpart-testpart.o: testpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpart.c' object='getpart-testpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/getpart-testpart.Tpo" "$(DEPDIR)/getpart-testpart.Po"; else rm -f "$(DEPDIR)/getpart-testpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testpart.c' object='getpart-testpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +resolve-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.o -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +resolve-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-mprintf.obj -MD -MP -MF "$(DEPDIR)/resolve-mprintf.Tpo" -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-mprintf.Tpo" "$(DEPDIR)/resolve-mprintf.Po"; else rm -f "$(DEPDIR)/resolve-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='resolve-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +resolve-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.o -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +resolve-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-nonblock.obj -MD -MP -MF "$(DEPDIR)/resolve-nonblock.Tpo" -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-nonblock.Tpo" "$(DEPDIR)/resolve-nonblock.Po"; else rm -f "$(DEPDIR)/resolve-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='resolve-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +resolve-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.o -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +resolve-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strequal.obj -MD -MP -MF "$(DEPDIR)/resolve-strequal.Tpo" -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strequal.Tpo" "$(DEPDIR)/resolve-strequal.Po"; else rm -f "$(DEPDIR)/resolve-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='resolve-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +resolve-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.o -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +resolve-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-strtoofft.obj -MD -MP -MF "$(DEPDIR)/resolve-strtoofft.Tpo" -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-strtoofft.Tpo" "$(DEPDIR)/resolve-strtoofft.Po"; else rm -f "$(DEPDIR)/resolve-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='resolve-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +resolve-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.o -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +resolve-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-timeval.obj -MD -MP -MF "$(DEPDIR)/resolve-timeval.Tpo" -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-timeval.Tpo" "$(DEPDIR)/resolve-timeval.Po"; else rm -f "$(DEPDIR)/resolve-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='resolve-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +resolve-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.o -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +resolve-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-warnless.obj -MD -MP -MF "$(DEPDIR)/resolve-warnless.Tpo" -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-warnless.Tpo" "$(DEPDIR)/resolve-warnless.Po"; else rm -f "$(DEPDIR)/resolve-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='resolve-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +resolve-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='resolve-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/resolve-getpart.Tpo" "$(DEPDIR)/resolve-getpart.Po"; else rm -f "$(DEPDIR)/resolve-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='resolve-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +resolve-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.o -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='resolve-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +resolve-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-base64.obj -MD -MP -MF "$(DEPDIR)/resolve-base64.Tpo" -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-base64.Tpo" "$(DEPDIR)/resolve-base64.Po"; else rm -f "$(DEPDIR)/resolve-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='resolve-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +resolve-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.o -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +resolve-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-memdebug.obj -MD -MP -MF "$(DEPDIR)/resolve-memdebug.Tpo" -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/resolve-memdebug.Tpo" "$(DEPDIR)/resolve-memdebug.Po"; else rm -f "$(DEPDIR)/resolve-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='resolve-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +resolve-util.o: util.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='resolve-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/resolve-util.Tpo" "$(DEPDIR)/resolve-util.Po"; else rm -f "$(DEPDIR)/resolve-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='resolve-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/resolve-resolve.Tpo" "$(DEPDIR)/resolve-resolve.Po"; else rm -f "$(DEPDIR)/resolve-resolve.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +rtspd-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.o -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +rtspd-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-mprintf.obj -MD -MP -MF "$(DEPDIR)/rtspd-mprintf.Tpo" -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-mprintf.Tpo" "$(DEPDIR)/rtspd-mprintf.Po"; else rm -f "$(DEPDIR)/rtspd-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='rtspd-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +rtspd-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.o -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +rtspd-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-nonblock.obj -MD -MP -MF "$(DEPDIR)/rtspd-nonblock.Tpo" -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-nonblock.Tpo" "$(DEPDIR)/rtspd-nonblock.Po"; else rm -f "$(DEPDIR)/rtspd-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='rtspd-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +rtspd-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.o -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +rtspd-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strequal.obj -MD -MP -MF "$(DEPDIR)/rtspd-strequal.Tpo" -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strequal.Tpo" "$(DEPDIR)/rtspd-strequal.Po"; else rm -f "$(DEPDIR)/rtspd-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='rtspd-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +rtspd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.o -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +rtspd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/rtspd-strtoofft.Tpo" -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-strtoofft.Tpo" "$(DEPDIR)/rtspd-strtoofft.Po"; else rm -f "$(DEPDIR)/rtspd-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='rtspd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +rtspd-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.o -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +rtspd-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-timeval.obj -MD -MP -MF "$(DEPDIR)/rtspd-timeval.Tpo" -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-timeval.Tpo" "$(DEPDIR)/rtspd-timeval.Po"; else rm -f "$(DEPDIR)/rtspd-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='rtspd-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +rtspd-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.o -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +rtspd-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-warnless.obj -MD -MP -MF "$(DEPDIR)/rtspd-warnless.Tpo" -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-warnless.Tpo" "$(DEPDIR)/rtspd-warnless.Po"; else rm -f "$(DEPDIR)/rtspd-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='rtspd-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +rtspd-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='rtspd-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/rtspd-getpart.Tpo" "$(DEPDIR)/rtspd-getpart.Po"; else rm -f "$(DEPDIR)/rtspd-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='rtspd-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +rtspd-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.o -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +rtspd-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-base64.obj -MD -MP -MF "$(DEPDIR)/rtspd-base64.Tpo" -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-base64.Tpo" "$(DEPDIR)/rtspd-base64.Po"; else rm -f "$(DEPDIR)/rtspd-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='rtspd-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +rtspd-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.o -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +rtspd-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -MT rtspd-memdebug.obj -MD -MP -MF "$(DEPDIR)/rtspd-memdebug.Tpo" -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/rtspd-memdebug.Tpo" "$(DEPDIR)/rtspd-memdebug.Po"; else rm -f "$(DEPDIR)/rtspd-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='rtspd-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtspd_CFLAGS) $(CFLAGS) -c -o rtspd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +rtspd-util.o: util.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='rtspd-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/rtspd-util.Tpo" "$(DEPDIR)/rtspd-util.Po"; else rm -f "$(DEPDIR)/rtspd-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='rtspd-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtspd.c' object='rtspd-rtspd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/rtspd-rtspd.Tpo" "$(DEPDIR)/rtspd-rtspd.Po"; else rm -f "$(DEPDIR)/rtspd-rtspd.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtspd.c' object='rtspd-rtspd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +sockfilt-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.o -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +sockfilt-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-mprintf.obj -MD -MP -MF "$(DEPDIR)/sockfilt-mprintf.Tpo" -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-mprintf.Tpo" "$(DEPDIR)/sockfilt-mprintf.Po"; else rm -f "$(DEPDIR)/sockfilt-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sockfilt-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +sockfilt-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.o -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +sockfilt-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-nonblock.obj -MD -MP -MF "$(DEPDIR)/sockfilt-nonblock.Tpo" -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-nonblock.Tpo" "$(DEPDIR)/sockfilt-nonblock.Po"; else rm -f "$(DEPDIR)/sockfilt-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sockfilt-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +sockfilt-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.o -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +sockfilt-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strequal.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strequal.Tpo" -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strequal.Tpo" "$(DEPDIR)/sockfilt-strequal.Po"; else rm -f "$(DEPDIR)/sockfilt-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sockfilt-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +sockfilt-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.o -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +sockfilt-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sockfilt-strtoofft.Tpo" -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-strtoofft.Tpo" "$(DEPDIR)/sockfilt-strtoofft.Po"; else rm -f "$(DEPDIR)/sockfilt-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sockfilt-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +sockfilt-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.o -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +sockfilt-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-timeval.obj -MD -MP -MF "$(DEPDIR)/sockfilt-timeval.Tpo" -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-timeval.Tpo" "$(DEPDIR)/sockfilt-timeval.Po"; else rm -f "$(DEPDIR)/sockfilt-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sockfilt-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +sockfilt-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.o -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +sockfilt-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-warnless.obj -MD -MP -MF "$(DEPDIR)/sockfilt-warnless.Tpo" -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-warnless.Tpo" "$(DEPDIR)/sockfilt-warnless.Po"; else rm -f "$(DEPDIR)/sockfilt-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sockfilt-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +sockfilt-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sockfilt-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-getpart.Tpo" "$(DEPDIR)/sockfilt-getpart.Po"; else rm -f "$(DEPDIR)/sockfilt-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sockfilt-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +sockfilt-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.o -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +sockfilt-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-base64.obj -MD -MP -MF "$(DEPDIR)/sockfilt-base64.Tpo" -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-base64.Tpo" "$(DEPDIR)/sockfilt-base64.Po"; else rm -f "$(DEPDIR)/sockfilt-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sockfilt-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +sockfilt-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.o -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +sockfilt-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-memdebug.obj -MD -MP -MF "$(DEPDIR)/sockfilt-memdebug.Tpo" -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-memdebug.Tpo" "$(DEPDIR)/sockfilt-memdebug.Po"; else rm -f "$(DEPDIR)/sockfilt-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sockfilt-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +sockfilt-util.o: util.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sockfilt-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-util.Tpo" "$(DEPDIR)/sockfilt-util.Po"; else rm -f "$(DEPDIR)/sockfilt-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sockfilt-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sockfilt.c' object='sockfilt-sockfilt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sockfilt-sockfilt.Tpo" "$(DEPDIR)/sockfilt-sockfilt.Po"; else rm -f "$(DEPDIR)/sockfilt-sockfilt.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sockfilt.c' object='sockfilt-sockfilt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +sockfilt-inet_pton.o: $(top_srcdir)/lib/inet_pton.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.o -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.o `test -f '$(top_srcdir)/lib/inet_pton.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/inet_pton.c + +sockfilt-inet_pton.obj: $(top_srcdir)/lib/inet_pton.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -MT sockfilt-inet_pton.obj -MD -MP -MF "$(DEPDIR)/sockfilt-inet_pton.Tpo" -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sockfilt-inet_pton.Tpo" "$(DEPDIR)/sockfilt-inet_pton.Po"; else rm -f "$(DEPDIR)/sockfilt-inet_pton.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/inet_pton.c' object='sockfilt-inet_pton.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sockfilt_CFLAGS) $(CFLAGS) -c -o sockfilt-inet_pton.obj `if test -f '$(top_srcdir)/lib/inet_pton.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/inet_pton.c'; fi` + +sws-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.o -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +sws-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-mprintf.obj -MD -MP -MF "$(DEPDIR)/sws-mprintf.Tpo" -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-mprintf.Tpo" "$(DEPDIR)/sws-mprintf.Po"; else rm -f "$(DEPDIR)/sws-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='sws-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +sws-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.o -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +sws-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-nonblock.obj -MD -MP -MF "$(DEPDIR)/sws-nonblock.Tpo" -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-nonblock.Tpo" "$(DEPDIR)/sws-nonblock.Po"; else rm -f "$(DEPDIR)/sws-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='sws-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +sws-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.o -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +sws-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strequal.obj -MD -MP -MF "$(DEPDIR)/sws-strequal.Tpo" -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strequal.Tpo" "$(DEPDIR)/sws-strequal.Po"; else rm -f "$(DEPDIR)/sws-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='sws-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +sws-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.o -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +sws-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-strtoofft.obj -MD -MP -MF "$(DEPDIR)/sws-strtoofft.Tpo" -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-strtoofft.Tpo" "$(DEPDIR)/sws-strtoofft.Po"; else rm -f "$(DEPDIR)/sws-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='sws-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +sws-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.o -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +sws-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-timeval.obj -MD -MP -MF "$(DEPDIR)/sws-timeval.Tpo" -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-timeval.Tpo" "$(DEPDIR)/sws-timeval.Po"; else rm -f "$(DEPDIR)/sws-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='sws-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +sws-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.o -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +sws-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-warnless.obj -MD -MP -MF "$(DEPDIR)/sws-warnless.Tpo" -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-warnless.Tpo" "$(DEPDIR)/sws-warnless.Po"; else rm -f "$(DEPDIR)/sws-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='sws-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +sws-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sws-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sws-getpart.Tpo" "$(DEPDIR)/sws-getpart.Po"; else rm -f "$(DEPDIR)/sws-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='sws-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +sws-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.o -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sws-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +sws-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-base64.obj -MD -MP -MF "$(DEPDIR)/sws-base64.Tpo" -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-base64.Tpo" "$(DEPDIR)/sws-base64.Po"; else rm -f "$(DEPDIR)/sws-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='sws-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +sws-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.o -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +sws-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -MT sws-memdebug.obj -MD -MP -MF "$(DEPDIR)/sws-memdebug.Tpo" -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/sws-memdebug.Tpo" "$(DEPDIR)/sws-memdebug.Po"; else rm -f "$(DEPDIR)/sws-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='sws-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sws_CFLAGS) $(CFLAGS) -c -o sws-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +sws-util.o: util.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sws-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sws-util.Tpo" "$(DEPDIR)/sws-util.Po"; else rm -f "$(DEPDIR)/sws-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='sws-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sws.c' object='sws-sws.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/sws-sws.Tpo" "$(DEPDIR)/sws-sws.Po"; else rm -f "$(DEPDIR)/sws-sws.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sws.c' object='sws-sws.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +tftpd-mprintf.o: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.o -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.o `test -f '$(top_srcdir)/lib/mprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/mprintf.c + +tftpd-mprintf.obj: $(top_srcdir)/lib/mprintf.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-mprintf.obj -MD -MP -MF "$(DEPDIR)/tftpd-mprintf.Tpo" -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-mprintf.Tpo" "$(DEPDIR)/tftpd-mprintf.Po"; else rm -f "$(DEPDIR)/tftpd-mprintf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/mprintf.c' object='tftpd-mprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-mprintf.obj `if test -f '$(top_srcdir)/lib/mprintf.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/mprintf.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/mprintf.c'; fi` + +tftpd-nonblock.o: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.o -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.o `test -f '$(top_srcdir)/lib/nonblock.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/nonblock.c + +tftpd-nonblock.obj: $(top_srcdir)/lib/nonblock.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-nonblock.obj -MD -MP -MF "$(DEPDIR)/tftpd-nonblock.Tpo" -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-nonblock.Tpo" "$(DEPDIR)/tftpd-nonblock.Po"; else rm -f "$(DEPDIR)/tftpd-nonblock.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/nonblock.c' object='tftpd-nonblock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-nonblock.obj `if test -f '$(top_srcdir)/lib/nonblock.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/nonblock.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/nonblock.c'; fi` + +tftpd-strequal.o: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.o -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.o `test -f '$(top_srcdir)/lib/strequal.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strequal.c + +tftpd-strequal.obj: $(top_srcdir)/lib/strequal.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strequal.obj -MD -MP -MF "$(DEPDIR)/tftpd-strequal.Tpo" -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strequal.Tpo" "$(DEPDIR)/tftpd-strequal.Po"; else rm -f "$(DEPDIR)/tftpd-strequal.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strequal.c' object='tftpd-strequal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strequal.obj `if test -f '$(top_srcdir)/lib/strequal.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strequal.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strequal.c'; fi` + +tftpd-strtoofft.o: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.o -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.o `test -f '$(top_srcdir)/lib/strtoofft.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/strtoofft.c + +tftpd-strtoofft.obj: $(top_srcdir)/lib/strtoofft.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-strtoofft.obj -MD -MP -MF "$(DEPDIR)/tftpd-strtoofft.Tpo" -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-strtoofft.Tpo" "$(DEPDIR)/tftpd-strtoofft.Po"; else rm -f "$(DEPDIR)/tftpd-strtoofft.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/strtoofft.c' object='tftpd-strtoofft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-strtoofft.obj `if test -f '$(top_srcdir)/lib/strtoofft.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/strtoofft.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/strtoofft.c'; fi` + +tftpd-timeval.o: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.o -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.o `test -f '$(top_srcdir)/lib/timeval.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/timeval.c + +tftpd-timeval.obj: $(top_srcdir)/lib/timeval.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-timeval.obj -MD -MP -MF "$(DEPDIR)/tftpd-timeval.Tpo" -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-timeval.Tpo" "$(DEPDIR)/tftpd-timeval.Po"; else rm -f "$(DEPDIR)/tftpd-timeval.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/timeval.c' object='tftpd-timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-timeval.obj `if test -f '$(top_srcdir)/lib/timeval.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/timeval.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/timeval.c'; fi` + +tftpd-warnless.o: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.o -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.o `test -f '$(top_srcdir)/lib/warnless.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/warnless.c + +tftpd-warnless.obj: $(top_srcdir)/lib/warnless.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-warnless.obj -MD -MP -MF "$(DEPDIR)/tftpd-warnless.Tpo" -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-warnless.Tpo" "$(DEPDIR)/tftpd-warnless.Po"; else rm -f "$(DEPDIR)/tftpd-warnless.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/warnless.c' object='tftpd-warnless.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-warnless.obj `if test -f '$(top_srcdir)/lib/warnless.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/warnless.c'; fi` + +tftpd-getpart.o: getpart.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='tftpd-getpart.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/tftpd-getpart.Tpo" "$(DEPDIR)/tftpd-getpart.Po"; else rm -f "$(DEPDIR)/tftpd-getpart.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getpart.c' object='tftpd-getpart.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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` + +tftpd-base64.o: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.o -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.o `test -f '$(top_srcdir)/lib/base64.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/base64.c + +tftpd-base64.obj: $(top_srcdir)/lib/base64.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-base64.obj -MD -MP -MF "$(DEPDIR)/tftpd-base64.Tpo" -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-base64.Tpo" "$(DEPDIR)/tftpd-base64.Po"; else rm -f "$(DEPDIR)/tftpd-base64.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/base64.c' object='tftpd-base64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-base64.obj `if test -f '$(top_srcdir)/lib/base64.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/base64.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/base64.c'; fi` + +tftpd-memdebug.o: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.o -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.o `test -f '$(top_srcdir)/lib/memdebug.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/memdebug.c + +tftpd-memdebug.obj: $(top_srcdir)/lib/memdebug.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -MT tftpd-memdebug.obj -MD -MP -MF "$(DEPDIR)/tftpd-memdebug.Tpo" -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tftpd-memdebug.Tpo" "$(DEPDIR)/tftpd-memdebug.Po"; else rm -f "$(DEPDIR)/tftpd-memdebug.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/memdebug.c' object='tftpd-memdebug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tftpd_CFLAGS) $(CFLAGS) -c -o tftpd-memdebug.obj `if test -f '$(top_srcdir)/lib/memdebug.c'; then $(CYGPATH_W) '$(top_srcdir)/lib/memdebug.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/lib/memdebug.c'; fi` + +tftpd-util.o: util.c +@am__fastdepCC_TRUE@ if $(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@ then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='tftpd-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/tftpd-util.Tpo" "$(DEPDIR)/tftpd-util.Po"; else rm -f "$(DEPDIR)/tftpd-util.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='tftpd-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tftpd.c' object='tftpd-tftpd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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@ if $(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@ then mv -f "$(DEPDIR)/tftpd-tftpd.Tpo" "$(DEPDIR)/tftpd-tftpd.Po"; else rm -f "$(DEPDIR)/tftpd-tftpd.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tftpd.c' object='tftpd-tftpd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(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 + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 +all-am: Makefile $(PROGRAMS) +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +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 ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(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: uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags 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-exec \ + install-exec-am install-info install-info-am install-man \ + 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 uninstall uninstall-am \ + uninstall-info-am + +# 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/tests/server/Makefile.inc b/tests/server/Makefile.inc new file mode 100644 index 0000000..c73a851 --- /dev/null +++ b/tests/server/Makefile.inc @@ -0,0 +1,61 @@ +noinst_PROGRAMS = getpart resolve rtspd sockfilt sws tftpd + +CURLX_SRCS = \ + $(top_srcdir)/lib/mprintf.c \ + $(top_srcdir)/lib/nonblock.c \ + $(top_srcdir)/lib/strequal.c \ + $(top_srcdir)/lib/strtoofft.c \ + $(top_srcdir)/lib/timeval.c \ + $(top_srcdir)/lib/warnless.c + +CURLX_HDRS = \ + $(top_srcdir)/lib/curlx.h \ + $(top_srcdir)/lib/nonblock.h \ + $(top_srcdir)/lib/strequal.h \ + $(top_srcdir)/lib/strtoofft.h \ + $(top_srcdir)/lib/timeval.h \ + $(top_srcdir)/lib/warnless.h + +USEFUL = \ + getpart.c \ + getpart.h \ + $(top_srcdir)/lib/base64.c \ + $(top_srcdir)/lib/curl_base64.h \ + $(top_srcdir)/lib/memdebug.c \ + $(top_srcdir)/lib/memdebug.h + +UTIL = \ + util.c \ + util.h + +getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \ + testpart.c +getpart_LDADD = @TEST_SERVER_LIBS@ +getpart_CFLAGS = $(AM_CFLAGS) + +resolve_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + resolve.c +resolve_LDADD = @TEST_SERVER_LIBS@ +resolve_CFLAGS = $(AM_CFLAGS) + +rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + rtspd.c +rtspd_LDADD = @TEST_SERVER_LIBS@ +rtspd_CFLAGS = $(AM_CFLAGS) + +sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + sockfilt.c \ + $(top_srcdir)/lib/inet_pton.c +sockfilt_LDADD = @TEST_SERVER_LIBS@ +sockfilt_CFLAGS = $(AM_CFLAGS) + +sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + sws.c +sws_LDADD = @TEST_SERVER_LIBS@ +sws_CFLAGS = $(AM_CFLAGS) + +tftpd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \ + tftpd.c \ + tftp.h +tftpd_LDADD = @TEST_SERVER_LIBS@ +tftpd_CFLAGS = $(AM_CFLAGS) diff --git a/tests/server/getpart.c b/tests/server/getpart.c new file mode 100644 index 0000000..a3b5f2f --- /dev/null +++ b/tests/server/getpart.c @@ -0,0 +1,422 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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 "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 base64.h we create a fake struct */ +struct SessionHandle { + 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) +#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(_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, src_len; + union { + unsigned char *as_uchar; + char *as_char; + } buf64; + + src_len = strlen(src_buf); + if(!src_len) + return GPE_OK; + + buf64.as_char = NULL; + + if(src_b64) { + /* base64 decode the given buffer */ + src_len = Curl_base64_decode(src_buf, &buf64.as_uchar); + src_buf = buf64.as_char; + if(!src_len || !src_buf) { + /* + ** 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. + */ + if(buf64.as_char) + free(buf64.as_char); + return GPE_OUT_OF_MEMORY; + } + } + + need_alloc = src_len + *dst_len + 1; + + /* enlarge destination buffer if required */ + if(need_alloc > *dst_alloc) { + size_t newsize = need_alloc * 2; + char *newptr = realloc(*dst_buf, newsize); + if(!newptr) { + if(buf64.as_char) + free(buf64.as_char); + 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'; + + if(buf64.as_char) + free(buf64.as_char); + + 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); + if((len.sig = end - ptr) > 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; + 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; + 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); + if((len.sig = end - ptr) > 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++; + if((len.sig = end - ptr) > 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 */ + + if(buffer) + free(buffer); + + if(error != GPE_OK) { + if(error == GPE_END_OF_FILE) + error = GPE_OK; + else { + if(*outbuf) + free(*outbuf); + *outbuf = NULL; + *outlen = 0; + } + } + + return error; +} + diff --git a/tests/server/getpart.h b/tests/server/getpart.h new file mode 100644 index 0000000..78a0be2 --- /dev/null +++ b/tests/server/getpart.h @@ -0,0 +1,33 @@ +#ifndef HEADER_SERVER_GETPART_H +#define HEADER_SERVER_GETPART_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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 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_SERVER_GETPART_H */ diff --git a/tests/server/resolve.c b/tests/server/resolve.c new file mode 100644 index 0000000..26ad853 --- /dev/null +++ b/tests/server/resolve.c @@ -0,0 +1,164 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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. + * + ***************************************************************************/ + +/* 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. + * + */ + +#define CURL_NO_OLDIES + +#include "setup.h" /* portability help from the lib directory */ + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.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 function to stop it from being replaced by + the macro in memdebug.h */ + rc = (getaddrinfo)(host, "80", &hints, &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/tests/server/rtspd.c b/tests/server/rtspd.c new file mode 100644 index 0000000..788d61c --- /dev/null +++ b/tests/server/rtspd.c @@ -0,0 +1,1471 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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. + * + ***************************************************************************/ + +/* + * curl's test suite Real Time Streaming Protocol (RTSP) server. + * + * This source file was started based on curl's HTTP test suite server. + */ + +#define CURL_NO_OLDIES + +#include "setup.h" /* portability help from the lib directory */ + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.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 memdebug.h last */ +#include "memdebug.h" + +#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 + +/* 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); + SET_ERRNO(old_errno); +} + +static void install_signal_handlers(void) +{ +#ifdef SIGHUP + /* ignore SIGHUP signal */ + if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGPIPE + /* ignore SIGPIPE signal */ + if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGALRM + /* ignore SIGALRM signal */ + if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGINT + /* handle SIGINT signal with our exit_signal_handler */ + if((old_sigint_handler = signal(SIGINT, exit_signal_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 */ + if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR) + logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO)); + else + siginterrupt(SIGTERM, 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 +} + +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) + sprintf(logbuf, "Got request: %s %s %s/%d.%d", + request, doc, prot_str, prot_major, prot_minor); + else + sprintf(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; + + sprintf(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"); + } + if(cmd) + free(cmd); + } + } + else { + if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d", + doc, &prot_major, &prot_minor) == 3) { + sprintf(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) + req->testno = atoi(portp+1); + 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) && curlx_strnequal("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; + SET_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(curlx_strnequal("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 = 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"); + sprintf(msgbuf, "RTSP_SERVER WE ROOLZ: %ld\r\n", (long)getpid()); + msglen = strlen(msgbuf); + sprintf(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) + sprintf(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) { + if(ptr) + 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"); + if(ptr) + 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); + if(ptr) + free(ptr); + return 0; + } + } + } + + if(got_exit_signal) { + if(ptr) + free(ptr); + if(cmd) + 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); + if(ptr) + free(ptr); + if(cmd) + 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) { + if(ptr) + free(ptr); + if(cmd) + free(cmd); + return -1; + } + + if(sendfailure) { + logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) were sent", + responsesize-count, responsesize); + if(ptr) + free(ptr); + if(cmd) + free(cmd); + return -1; + } + + logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP, + responsesize); + + if(ptr) + 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 = SOCKERRNO; + 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); + } + if(cmd) + free(cmd); + + req->open = persistant; + + prevtestno = req->testno; + prevpartno = req->partno; + + return 0; +} + + +int main(int argc, char *argv[]) +{ + struct sockaddr_in me; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 me6; +#endif /* ENABLE_IPV6 */ + curl_socket_t sock = CURL_SOCKET_BAD; + curl_socket_t msgsock = CURL_SOCKET_BAD; + int wrotepidfile = 0; + int flag; + unsigned short port = DEFAULT_PORT; + char *pidname= (char *)".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, 0, sizeof(me)); + me.sin_family = AF_INET; + me.sin_addr.s_addr = INADDR_ANY; + me.sin_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me, sizeof(me)); +#ifdef ENABLE_IPV6 + } + else { + memset(&me6, 0, sizeof(me6)); + me6.sin6_family = AF_INET6; + me6.sin6_addr = in6addr_any; + me6.sin6_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6)); + } +#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/tests/server/sockfilt.c b/tests/server/sockfilt.c new file mode 100644 index 0000000..714d6fc --- /dev/null +++ b/tests/server/sockfilt.c @@ -0,0 +1,1053 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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. + * + ***************************************************************************/ + +/* 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! + */ + +#define CURL_NO_OLDIES + +#include "setup.h" /* portability help from the lib directory */ + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.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 memdebug.h last */ +#include "memdebug.h" + +#define DEFAULT_PORT 8999 + +#ifndef DEFAULT_LOGFILE +#define DEFAULT_LOGFILE "log/sockfilt.log" +#endif + +const char *serverlogfile = DEFAULT_LOGFILE; + +static bool verbose = 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 + +/* 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); + SET_ERRNO(old_errno); +} + +static void install_signal_handlers(void) +{ +#ifdef SIGHUP + /* ignore SIGHUP signal */ + if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGPIPE + /* ignore SIGPIPE signal */ + if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGALRM + /* ignore SIGALRM signal */ + if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGINT + /* handle SIGINT signal with our exit_signal_handler */ + if((old_sigint_handler = signal(SIGINT, exit_signal_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 */ + if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR) + logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO)); + else + siginterrupt(SIGTERM, 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 +} + +/* + * 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("unrecoverable read() failure: %s", 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, (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("unrecoverable write() failure: %s", 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; + + for(i=0; i<len; i++) { + switch(ptr[i]) { + case '\n': + sprintf(optr, "\\n"); + width += 2; + optr += 2; + break; + case '\r': + sprintf(optr, "\\r"); + width += 2; + optr += 2; + break; + default: + sprintf(optr, "%c", (ISGRAPH(ptr[i]) || ptr[i]==0x20) ?ptr[i]:'.'); + width++; + optr++; + break; + } + + if(width>60) { + logmsg("'%s'", data); + width = 0; + optr = data; + } + } + if(width) + logmsg("'%s'", data); +} + +/* + 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; + curl_socket_t maxfd = CURL_SOCKET_BAD; + 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); + +#ifdef USE_WINSOCK + /* + ** WinSock select() does not support standard file descriptors, + ** it can only check SOCKETs. Since this program in its current + ** state will not work on WinSock based systems, next line is + ** commented out to allow warning-free compilation awaiting the + ** day it will be fixed to also run on WinSock systems. + */ +#else + FD_SET(fileno(stdin), &fds_read); +#endif + + switch(*mode) { + + case PASSIVE_LISTEN: + + /* server mode */ + sockfd = listenfd; + /* there's always a socket to wait for */ + FD_SET(sockfd, &fds_read); + maxfd = 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); + maxfd = 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); + maxfd = 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 { + + rc = select((int)maxfd + 1, &fds_read, &fds_write, &fds_err, &timeout); + + if(got_exit_signal) { + logmsg("signalled to die, exiting..."); + return FALSE; + } + + } while((rc == -1) && ((error = SOCKERRNO) == 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]" */ + sprintf((char *)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)) ) { + + if(*mode == PASSIVE_LISTEN) { + /* there's no stream set up yet, this is an indication that there's a + client connecting. */ + sockfd = accept(sockfd, NULL, NULL); + if(CURL_SOCKET_BAD == sockfd) + logmsg("accept() failed"); + else { + logmsg("====> Client connect"); + if(!write_stdout("CNCT\n", 5)) + return FALSE; + *sockfdp = sockfd; /* 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) { + 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; + } + + 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); + } + + return TRUE; +} + +static curl_socket_t sockdaemon(curl_socket_t sock, + unsigned short *listenport) +{ + /* passive daemon style */ + struct sockaddr_in me; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 me6; +#endif /* ENABLE_IPV6 */ + 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 = SOCKERRNO; + 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(&me, 0, sizeof(me)); + me.sin_family = AF_INET; + me.sin_addr.s_addr = INADDR_ANY; + me.sin_port = htons(*listenport); + rc = bind(sock, (struct sockaddr *) &me, sizeof(me)); +#ifdef ENABLE_IPV6 + } + else { + memset(&me6, 0, sizeof(me6)); + me6.sin6_family = AF_INET6; + me6.sin6_addr = in6addr_any; + me6.sin6_port = htons(*listenport); + rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6)); + } +#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; + struct sockaddr *localaddr; + struct sockaddr_in localaddr4; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 localaddr6; + if(!use_ipv6) { +#endif + la_size = sizeof(localaddr4); + localaddr = (struct sockaddr *)&localaddr4; +#ifdef ENABLE_IPV6 + } + else { + la_size = sizeof(localaddr6); + localaddr = (struct sockaddr *)&localaddr6; + } +#endif + memset(localaddr, 0, (size_t)la_size); + if(getsockname(sock, localaddr, &la_size) < 0) { + error = SOCKERRNO; + logmsg("getsockname() failed with error: (%d) %s", + error, strerror(error)); + sclose(sock); + return CURL_SOCKET_BAD; + } + switch (localaddr->sa_family) { + case AF_INET: + *listenport = ntohs(localaddr4.sin_port); + break; +#ifdef ENABLE_IPV6 + case AF_INET6: + *listenport = ntohs(localaddr6.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; + } + } + + /* start accepting connections */ + rc = listen(sock, 5); + if(0 != rc) { + error = SOCKERRNO; + logmsg("listen() failed with error: (%d) %s", + error, strerror(error)); + sclose(sock); + return CURL_SOCKET_BAD; + } + + return sock; +} + + +int main(int argc, char *argv[]) +{ + struct sockaddr_in me; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 me6; +#endif /* ENABLE_IPV6 */ + curl_socket_t sock = CURL_SOCKET_BAD; + curl_socket_t msgsock = CURL_SOCKET_BAD; + int wrotepidfile = 0; + char *pidname= (char *)".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("--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" + " --port [port]\n" + " --connect [port]\n" + " --addr [address]"); + return 0; + } + } + +#ifdef WIN32 + win32_init(); + atexit(win32_cleanup); +#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)); + 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, 0, sizeof(me)); + me.sin_family = AF_INET; + me.sin_port = htons(connectport); + me.sin_addr.s_addr = INADDR_ANY; + if (!addr) + addr = "127.0.0.1"; + Curl_inet_pton(AF_INET, addr, &me.sin_addr); + + rc = connect(sock, (struct sockaddr *) &me, sizeof(me)); +#ifdef ENABLE_IPV6 + } + else { + memset(&me6, 0, sizeof(me6)); + me6.sin6_family = AF_INET6; + me6.sin6_port = htons(connectport); + if (!addr) + addr = "::1"; + Curl_inet_pton(AF_INET6, addr, &me6.sin6_addr); + + rc = connect(sock, (struct sockaddr *) &me6, sizeof(me6)); + } +#endif /* ENABLE_IPV6 */ + if(rc) { + error = SOCKERRNO; + logmsg("Error connecting to port %hu: (%d) %s", + connectport, error, strerror(error)); + 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) + 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 + logmsg("Listening on port %hu", port); + + wrotepidfile = write_pidfile(pidname); + if(!wrotepidfile) + 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/tests/server/sws.c b/tests/server/sws.c new file mode 100644 index 0000000..a4c040b --- /dev/null +++ b/tests/server/sws.c @@ -0,0 +1,1458 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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. + * + ***************************************************************************/ + +/* sws.c: simple (silly?) web server + + This code was originally graciously donated to the project by Juergen + Wilke. Thanks a bunch! + + */ + +#define CURL_NO_OLDIES + +#include "setup.h" /* portability help from the lib directory */ + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.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 memdebug.h last */ +#include "memdebug.h" + +#if !defined(CURL_SWS_FORK_ENABLED) && defined(HAVE_FORK) +/* + * The normal sws build for the plain standard curl test suite has no use for + * fork(), but if you feel wild and crazy and want to setup some more exotic + * tests. Define this and run... + */ +#define CURL_SWS_FORK_ENABLED +#endif + +#ifdef ENABLE_IPV6 +static bool use_ipv6 = FALSE; +#endif +static bool use_gopher = FALSE; +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 */ + +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 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 */ +}; + +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/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" + +/* 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 +}; + +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; + +/* 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 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 + +/* 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); + SET_ERRNO(old_errno); +} + +static void install_signal_handlers(void) +{ +#ifdef SIGHUP + /* ignore SIGHUP signal */ + if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGPIPE + /* ignore SIGPIPE signal */ + if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGALRM + /* ignore SIGALRM signal */ + if((old_sigalrm_handler = signal(SIGALRM, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGALRM handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGINT + /* handle SIGINT signal with our exit_signal_handler */ + if((old_sigint_handler = signal(SIGINT, exit_signal_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 */ + if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR) + logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO)); + else + siginterrupt(SIGTERM, 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 +} + +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[256]; + int prot_major, prot_minor; + char *end; + int error; + end = strstr(line, end_of_headers); + + logmsg("ProcessRequest() called"); + + /* 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) { + FILE *stream; + char *filename; + + if((strlen(doc) + strlen(request)) < 200) + sprintf(logbuf, "Got request: %s %s HTTP/%d.%d", + request, doc, prot_major, prot_minor); + else + sprintf(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; + + sprintf(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; + + /* 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 */ + } + + if(cmdsize) { + logmsg("Found a reply-servercmd section!"); + + 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(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("funny instruction found: %s", cmd); + } + } + if(cmd) + free(cmd); + } + } + else { + if(sscanf(req->reqbuf, "CONNECT %" MAXDOCNAMELEN_TXT "s HTTP/%d.%d", + doc, &prot_major, &prot_minor) == 3) { + sprintf(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) + req->testno = atoi(portp+1); + 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(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; + + sprintf(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) && curlx_strnequal("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; + SET_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(curlx_strnequal("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->writedelay = 0; + req->rcmd = RCMD_NORMALREQ; + req->prot_version = 0; + req->pipelining = FALSE; + + /*** end of httprequest init ***/ + + while(!done_processing && (req->offset < REQBUFSIZ-1)) { + if(pipereq_length && pipereq) { + memmove(reqbuf, pipereq, pipereq_length); + got = 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"); + sprintf(msgbuf, "WE ROOLZ: %ld\r\n", (long)getpid()); + msglen = strlen(msgbuf); + if(use_gopher) + sprintf(weare, "%s", msgbuf); + else + sprintf(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"); + buffer = doc404; + break; + } + + count = strlen(buffer); + } + else { + char *filename = test2file(req->testno); + + if(0 != req->partno) + sprintf(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) { + if(ptr) + 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"); + if(ptr) + 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); + if(ptr) + free(ptr); + return 0; + } + } + } + + if(got_exit_signal) { + if(ptr) + free(ptr); + if(cmd) + 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); + if(ptr) + free(ptr); + if(cmd) + 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); + } + if (req->writedelay) { + logmsg("Pausing %d seconds", req->writedelay); + sleep(req->writedelay); + } + /* write to file as well */ + fwrite(buffer, 1, (size_t)written, dump); + if(got_exit_signal) + break; + + count -= written; + buffer += written; + } while(count>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) { + if(ptr) + free(ptr); + if(cmd) + free(cmd); + return -1; + } + + if(sendfailure) { + logmsg("Sending response failed. Only (%zu bytes) of (%zu bytes) were sent", + responsesize-count, responsesize); + if(ptr) + free(ptr); + if(cmd) + free(cmd); + return -1; + } + + logmsg("Response sent (%zu bytes) and written to " RESPONSE_DUMP, + responsesize); + + if(ptr) + 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 = SOCKERRNO; + 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); + } + if(cmd) + free(cmd); + + req->open = use_gopher?FALSE:persistant; + + prevtestno = req->testno; + prevpartno = req->partno; + + return 0; +} + + +int main(int argc, char *argv[]) +{ + struct sockaddr_in me; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 me6; +#endif /* ENABLE_IPV6 */ + curl_socket_t sock = CURL_SOCKET_BAD; + curl_socket_t msgsock = CURL_SOCKET_BAD; + int wrotepidfile = 0; + int flag; + unsigned short port = DEFAULT_PORT; + char *pidname= (char *)".http.pid"; + struct httprequest req; + int rc; + int error; + int arg=1; + long pid; +#ifdef CURL_SWS_FORK_ENABLED + bool use_fork = FALSE; +#endif + + while(argc>arg) { + if(!strcmp("--version", argv[arg])) { + printf("sws IPv4%s" +#ifdef CURL_SWS_FORK_ENABLED + " FORK" +#endif + "\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("--gopher", argv[arg])) { + arg++; + use_gopher = TRUE; + end_of_headers = "\r\n"; /* gopher style is much simpler */ + } + 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++; + } +#ifdef CURL_SWS_FORK_ENABLED + else if(!strcmp("--fork", argv[arg])) { + use_fork=TRUE; + arg++; + } +#endif + 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 { + puts("Usage: sws [option]\n" + " --version\n" + " --logfile [file]\n" + " --pidfile [file]\n" + " --ipv4\n" + " --ipv6\n" + " --port [port]\n" + " --srcdir [path]\n" + " --gopher\n" + " --fork"); + 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 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; + } + +#ifdef ENABLE_IPV6 + if(!use_ipv6) { +#endif + memset(&me, 0, sizeof(me)); + me.sin_family = AF_INET; + me.sin_addr.s_addr = INADDR_ANY; + me.sin_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me, sizeof(me)); +#ifdef ENABLE_IPV6 + } + else { + memset(&me6, 0, sizeof(me6)); + me6.sin6_family = AF_INET6; + me6.sin6_addr = in6addr_any; + me6.sin6_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6)); + } +#endif /* ENABLE_IPV6 */ + if(0 != rc) { + error = SOCKERRNO; + logmsg("Error binding socket on port %hu: (%d) %s", + port, error, strerror(error)); + goto sws_cleanup; + } + + logmsg("Running %s %s version on port %d", + use_gopher?"GOPHER":"HTTP", 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 sws_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 sws_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; + +#ifdef CURL_SWS_FORK_ENABLED + if(use_fork) { + /* The fork enabled version just forks off the child and don't care + about it anymore, so don't assume otherwise. Beware and don't do + this at home. */ + rc = fork(); + if(-1 == rc) { + printf("MAJOR ERROR: fork() failed!\n"); + break; + } + } + else + /* not a fork, just set rc so the following proceeds nicely */ + rc = 0; + /* 0 is returned to the child */ + if(0 == rc) { +#endif + 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; +#ifdef CURL_SWS_FORK_ENABLED + } +#endif + } + +sws_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 sws (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("========> sws quits"); + return 0; +} + diff --git a/tests/server/testpart.c b/tests/server/testpart.c new file mode 100644 index 0000000..9409714 --- /dev/null +++ b/tests/server/testpart.c @@ -0,0 +1,54 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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 "setup.h" + +#include "getpart.h" + +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.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/tests/server/tftp.h b/tests/server/tftp.h new file mode 100644 index 0000000..f60f122 --- /dev/null +++ b/tests/server/tftp.h @@ -0,0 +1,57 @@ +#ifndef __SERVER_TFTP_H +#define __SERVER_TFTP_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2008, 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 http://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. + * + ***************************************************************************/ + +/* This file is a rewrite/clone of the arpa/tftp.h file for systems without + it. */ + +#define SEGSIZE 512 /* data segment size */ + +#ifndef __GNUC__ +#define __attribute__(x) +#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 */ +} __attribute__ ((__packed__)); + +#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 /* __SERVER_TFTP_H */ diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c new file mode 100644 index 0000000..0adcd49 --- /dev/null +++ b/tests/server/tftpd.c @@ -0,0 +1,1263 @@ +/*************************************************************************** + * _ _ ____ _ + * 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 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. + */ + +#define CURL_NO_OLDIES + +#include "setup.h" /* portability help from the lib directory */ + +#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_SYS_SOCKET_H +#include <sys/socket.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_UNISTD_H +#include <unistd.h> +#endif +#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 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 num; /* test case number */ + int ofile; /* file descriptor for output file when uploading to us */ +}; + +struct formats { + const char *f_mode; + int f_convert; +}; + +struct errmsg { + int e_code; + const char *e_msg; +}; + +/* + * 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 */ + char buf[PKTSIZE]; /* 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 char buf[PKTSIZE]; +static char ackbuf[PKTSIZE]; + +static struct sockaddr_in from; +static curl_socklen_t fromlen; + +static curl_socket_t peer = CURL_SOCKET_BAD; + +static int timeout; +static int maxtimeout = 5 * TIMEOUT; + +static unsigned short sendblock; /* block count used by sendtftp() */ +static struct tftphdr *sdp; /* data buffer used by sendtftp() */ +static struct tftphdr *sap; /* ack buffer used by sendtftp() */ + +static unsigned short recvblock; /* block count used by recvtftp() */ +static struct tftphdr *rdp; /* data buffer used by recvtftp() */ +static struct tftphdr *rap; /* ack buffer used by recvtftp() */ + +#ifdef ENABLE_IPV6 +static bool use_ipv6 = FALSE; +#endif +static const char *ipv_inuse = "IPv4"; + +const char *serverlogfile = DEFAULT_LOGFILE; +static char *pidname= (char *)".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 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 + +/* 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 int readit(struct testcase *test, + struct tftphdr **dpp, + int convert); + +static int writeit(struct testcase *test, + struct tftphdr **dpp, + int ct, + int convert); + +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); + SET_ERRNO(old_errno); +} + +static void install_signal_handlers(void) +{ +#ifdef SIGHUP + /* ignore SIGHUP signal */ + if((old_sighup_handler = signal(SIGHUP, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGHUP handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGPIPE + /* ignore SIGPIPE signal */ + if((old_sigpipe_handler = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) + logmsg("cannot install SIGPIPE handler: %s", strerror(ERRNO)); +#endif +#ifdef SIGINT + /* handle SIGINT signal with our exit_signal_handler */ + if((old_sigint_handler = signal(SIGINT, exit_signal_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 */ + if((old_sigterm_handler = signal(SIGTERM, exit_signal_handler)) == SIG_ERR) + logmsg("cannot install SIGTERM handler: %s", strerror(ERRNO)); + else + siginterrupt(SIGTERM, 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 +} + +/* + * 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 (struct tftphdr *)bfs[0].buf; +} + +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 = (struct tftphdr *)b->buf; /* 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 = (struct tftphdr *)b->buf; + + 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 **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 = (struct tftphdr *)bfs[current].buf; + 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->num); + test->ofile=open(outfile, O_CREAT|O_RDWR, 0777); + 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 = (struct tftphdr *)b->buf; + 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); */ + write(test->ofile, &c, 1); + 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]; + struct sockaddr_in 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++; + fromaddrlen = sizeof(fromaddr); + (void)recvfrom(f, rbuf, sizeof(rbuf), 0, + (struct sockaddr *)&fromaddr, &fromaddrlen); + } + else + break; + } + return j; +} + +int main(int argc, char **argv) +{ + struct sockaddr_in me; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 me6; +#endif /* ENABLE_IPV6 */ + + 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, 0, sizeof(me)); + me.sin_family = AF_INET; + me.sin_addr.s_addr = INADDR_ANY; + me.sin_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me, sizeof(me)); +#ifdef ENABLE_IPV6 + } + else { + memset(&me6, 0, sizeof(me6)); + me6.sin6_family = AF_INET6; + me6.sin6_addr = in6addr_any; + me6.sin6_port = htons(port); + rc = bind(sock, (struct sockaddr *) &me6, sizeof(me6)); + } +#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); + n = (ssize_t)recvfrom(sock, buf, sizeof(buf), 0, + (struct sockaddr *)&from, &fromlen); + if(got_exit_signal) + break; + if (n < 0) { + logmsg("recvfrom"); + result = 3; + break; + } + + set_advisor_read_lock(SERVERLOGS_LOCK); + serverlogslocked = 1; + + from.sin_family = AF_INET; + + peer = socket(AF_INET, SOCK_DGRAM, 0); + if(CURL_SOCKET_BAD == peer) { + logmsg("socket"); + result = 2; + break; + } + + if (connect(peer, (struct sockaddr *)&from, sizeof(from)) < 0) { + logmsg("connect: fail"); + result = 1; + break; + } + maxtimeout = 5*TIMEOUT; + + tp = (struct tftphdr *)buf; + 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; + if(test.buffer) + 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; + + /* 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; +again: + while (cp < buf + size) { + if (*cp == '\0') + break; + cp++; + } + if (*cp) { + nak(EBADOP); + fclose(server); + return 3; + } + if (first) { + mode = ++cp; + first = 0; + goto again; + } + /* 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 */ + fprintf(server, "mode: %s\n", mode); + 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; + } + if (tp->th_opcode == opcode_WRQ) + recvtftp(test, pf); + else + sendtftp(test, pf); + + return 0; +} + +/* + * 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 = sprintf(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->num = testno; + + file = test2file(testno); + + if(0 != partno) + sprintf(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; + sendblock = 1; +#if defined(HAVE_ALARM) && defined(SIGALRM) + mysignal(SIGALRM, timer); +#endif + sdp = r_init(); + sap = (struct tftphdr *)ackbuf; + do { + size = readit(test, &sdp, pf->f_convert); + if (size < 0) { + nak(ERRNO + 100); + return; + } + sdp->th_opcode = htons((u_short)opcode_DATA); + sdp->th_block = htons((u_short)sendblock); + timeout = 0; +#ifdef HAVE_SIGSETJMP + (void) sigsetjmp(timeoutbuf, 1); +#endif + 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, sizeof (ackbuf)); +#ifdef HAVE_ALARM + alarm(0); +#endif + if(got_exit_signal) + return; + if (n < 0) { + logmsg("read: fail"); + return; + } + sap->th_opcode = ntohs((u_short)sap->th_opcode); + sap->th_block = ntohs((u_short)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; + recvblock = 0; +#if defined(HAVE_ALARM) && defined(SIGALRM) + mysignal(SIGALRM, timer); +#endif + rdp = w_init(); + rap = (struct tftphdr *)ackbuf; + do { + timeout = 0; + rap->th_opcode = htons((u_short)opcode_ACK); + rap->th_block = htons((u_short)recvblock); + recvblock++; +#ifdef HAVE_SIGSETJMP + (void) sigsetjmp(timeoutbuf, 1); +#endif +send_ack: + if (swrite(peer, ackbuf, 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((u_short)rdp->th_opcode); + rdp->th_block = ntohs((u_short)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((u_short)opcode_ACK); /* send the "final" ack */ + rap->th_block = htons((u_short)recvblock); + (void) swrite(peer, ackbuf, 4); +#if defined(HAVE_ALARM) && defined(SIGALRM) + mysignal(SIGALRM, justtimeout); /* just abort read on timeout */ + alarm(rexmtval); +#endif + n = sread(peer, buf, sizeof(buf)); /* normally times out and quits */ +#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, 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 = (struct tftphdr *)buf; + tp->th_opcode = htons((u_short)opcode_ERROR); + tp->th_code = htons((u_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 */ + } + strcpy(tp->th_msg, pe->e_msg); + length = (int)strlen(pe->e_msg); + tp->th_msg[length] = '\0'; + length += 5; + if (swrite(peer, buf, length) != length) + logmsg("nak: fail\n"); +} diff --git a/tests/server/util.c b/tests/server/util.c new file mode 100644 index 0000000..52802a8 --- /dev/null +++ b/tests/server/util.c @@ -0,0 +1,283 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2010, 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 http://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 "setup.h" /* portability help from the lib directory */ + +#ifdef HAVE_SIGNAL_H +#include <signal.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.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_SYS_POLL_H +#include <sys/poll.h> +#elif defined(HAVE_POLL_H) +#include <poll.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" + +#if defined(ENABLE_IPV6) && defined(__MINGW32__) +const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }}; +#endif + +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) { + SET_SOCKERRNO(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 = SOCKERRNO; + 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)); +} diff --git a/tests/server/util.h b/tests/server/util.h new file mode 100644 index 0000000..76cd88d --- /dev/null +++ b/tests/server/util.h @@ -0,0 +1,64 @@ +#ifndef __SERVER_UTIL_H +#define __SERVER_UTIL_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2008, 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 http://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. + * + ***************************************************************************/ + +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); + +#endif /* __SERVER_UTIL_H */ |