mirror of
https://github.com/TTimo/doom3.gpl.git
synced 2026-03-20 08:59:42 +01:00
hello world
This commit is contained in:
85
neo/curl/tests/libtest/Makefile.am
Normal file
85
neo/curl/tests/libtest/Makefile.am
Normal file
@@ -0,0 +1,85 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2004, 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.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.19 2004/01/30 09:26:23 bagder Exp $
|
||||
###########################################################################
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
# $(top_srcdir)/include/curl is for the main curl include files, to make it
|
||||
# easier to include this specific set of curl headers, and NOT the ones
|
||||
# possibly already installed in the system.
|
||||
# -I$(top_srcdir)/lib is for the setup.h file, included by test.h
|
||||
# -I$(top_builddir)/lib is for the config.h file, possibly included by the
|
||||
# setup.h file
|
||||
INCLUDES = -I$(top_srcdir)/include/curl \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_builddir)/lib
|
||||
|
||||
LIBDIR = $(top_builddir)/lib
|
||||
|
||||
SUPPORTFILES = first.c test.h
|
||||
|
||||
# here are all tools used for running libcurl tests
|
||||
noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 \
|
||||
lib508 lib509 lib510
|
||||
|
||||
lib500_SOURCES = lib500.c $(SUPPORTFILES)
|
||||
lib500_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib500_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib501_SOURCES = lib501.c $(SUPPORTFILES)
|
||||
lib501_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib501_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib502_SOURCES = lib502.c $(SUPPORTFILES)
|
||||
lib502_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib502_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib503_SOURCES = lib503.c $(SUPPORTFILES)
|
||||
lib503_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib503_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib504_SOURCES = lib504.c $(SUPPORTFILES)
|
||||
lib504_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib504_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib505_SOURCES = lib505.c $(SUPPORTFILES)
|
||||
lib505_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib505_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib506_SOURCES = lib506.c $(SUPPORTFILES)
|
||||
lib506_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib506_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib507_SOURCES = lib507.c $(SUPPORTFILES)
|
||||
lib507_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib507_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib508_SOURCES = lib508.c $(SUPPORTFILES)
|
||||
lib508_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib508_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib509_SOURCES = lib509.c $(SUPPORTFILES)
|
||||
lib509_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib509_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
|
||||
lib510_SOURCES = lib510.c $(SUPPORTFILES)
|
||||
lib510_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib510_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
608
neo/curl/tests/libtest/Makefile.in
Normal file
608
neo/curl/tests/libtest/Makefile.in
Normal file
@@ -0,0 +1,608 @@
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 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@
|
||||
|
||||
SOURCES = $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) $(lib509_SOURCES) $(lib510_SOURCES)
|
||||
|
||||
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 = :
|
||||
host_triplet = @host@
|
||||
noinst_PROGRAMS = lib500$(EXEEXT) lib501$(EXEEXT) lib502$(EXEEXT) \
|
||||
lib503$(EXEEXT) lib504$(EXEEXT) lib505$(EXEEXT) \
|
||||
lib506$(EXEEXT) lib507$(EXEEXT) lib508$(EXEEXT) \
|
||||
lib509$(EXEEXT) lib510$(EXEEXT)
|
||||
subdir = tests/libtest
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(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/config.h \
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am__objects_1 = first.$(OBJEXT)
|
||||
am_lib500_OBJECTS = lib500.$(OBJEXT) $(am__objects_1)
|
||||
lib500_OBJECTS = $(am_lib500_OBJECTS)
|
||||
am_lib501_OBJECTS = lib501.$(OBJEXT) $(am__objects_1)
|
||||
lib501_OBJECTS = $(am_lib501_OBJECTS)
|
||||
am_lib502_OBJECTS = lib502.$(OBJEXT) $(am__objects_1)
|
||||
lib502_OBJECTS = $(am_lib502_OBJECTS)
|
||||
am_lib503_OBJECTS = lib503.$(OBJEXT) $(am__objects_1)
|
||||
lib503_OBJECTS = $(am_lib503_OBJECTS)
|
||||
am_lib504_OBJECTS = lib504.$(OBJEXT) $(am__objects_1)
|
||||
lib504_OBJECTS = $(am_lib504_OBJECTS)
|
||||
am_lib505_OBJECTS = lib505.$(OBJEXT) $(am__objects_1)
|
||||
lib505_OBJECTS = $(am_lib505_OBJECTS)
|
||||
am_lib506_OBJECTS = lib506.$(OBJEXT) $(am__objects_1)
|
||||
lib506_OBJECTS = $(am_lib506_OBJECTS)
|
||||
am_lib507_OBJECTS = lib507.$(OBJEXT) $(am__objects_1)
|
||||
lib507_OBJECTS = $(am_lib507_OBJECTS)
|
||||
am_lib508_OBJECTS = lib508.$(OBJEXT) $(am__objects_1)
|
||||
lib508_OBJECTS = $(am_lib508_OBJECTS)
|
||||
am_lib509_OBJECTS = lib509.$(OBJEXT) $(am__objects_1)
|
||||
lib509_OBJECTS = $(am_lib509_OBJECTS)
|
||||
am_lib510_OBJECTS = lib510.$(OBJEXT) $(am__objects_1)
|
||||
lib510_OBJECTS = $(am_lib510_OBJECTS)
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/first.Po ./$(DEPDIR)/lib500.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lib501.Po ./$(DEPDIR)/lib502.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lib503.Po ./$(DEPDIR)/lib504.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lib505.Po ./$(DEPDIR)/lib506.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lib507.Po ./$(DEPDIR)/lib508.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lib509.Po ./$(DEPDIR)/lib510.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
|
||||
$(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
|
||||
$(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
|
||||
$(lib509_SOURCES) $(lib510_SOURCES)
|
||||
DIST_SOURCES = $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
|
||||
$(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
|
||||
$(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
|
||||
$(lib509_SOURCES) $(lib510_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@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
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_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
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@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
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@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_ENABLED = @OPENSSL_ENABLED@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
PKGADD_PKG = @PKGADD_PKG@
|
||||
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
|
||||
USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_AS = @ac_ct_AS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2004, 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.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.19 2004/01/30 09:26:23 bagder Exp $
|
||||
###########################################################################
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
# $(top_srcdir)/include/curl is for the main curl include files, to make it
|
||||
# easier to include this specific set of curl headers, and NOT the ones
|
||||
# possibly already installed in the system.
|
||||
# -I$(top_srcdir)/lib is for the setup.h file, included by test.h
|
||||
# -I$(top_builddir)/lib is for the config.h file, possibly included by the
|
||||
# setup.h file
|
||||
INCLUDES = -I$(top_srcdir)/include/curl \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_builddir)/lib
|
||||
|
||||
LIBDIR = $(top_builddir)/lib
|
||||
SUPPORTFILES = first.c test.h
|
||||
lib500_SOURCES = lib500.c $(SUPPORTFILES)
|
||||
lib500_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib500_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib501_SOURCES = lib501.c $(SUPPORTFILES)
|
||||
lib501_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib501_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib502_SOURCES = lib502.c $(SUPPORTFILES)
|
||||
lib502_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib502_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib503_SOURCES = lib503.c $(SUPPORTFILES)
|
||||
lib503_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib503_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib504_SOURCES = lib504.c $(SUPPORTFILES)
|
||||
lib504_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib504_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib505_SOURCES = lib505.c $(SUPPORTFILES)
|
||||
lib505_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib505_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib506_SOURCES = lib506.c $(SUPPORTFILES)
|
||||
lib506_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib506_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib507_SOURCES = lib507.c $(SUPPORTFILES)
|
||||
lib507_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib507_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib508_SOURCES = lib508.c $(SUPPORTFILES)
|
||||
lib508_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib508_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib509_SOURCES = lib509.c $(SUPPORTFILES)
|
||||
lib509_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib509_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
lib510_SOURCES = lib510.c $(SUPPORTFILES)
|
||||
lib510_LDADD = $(LIBDIR)/libcurl.la
|
||||
lib510_DEPENDENCIES = $(LIBDIR)/libcurl.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(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/libtest/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign tests/libtest/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
|
||||
lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES)
|
||||
@rm -f lib500$(EXEEXT)
|
||||
$(LINK) $(lib500_LDFLAGS) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS)
|
||||
lib501$(EXEEXT): $(lib501_OBJECTS) $(lib501_DEPENDENCIES)
|
||||
@rm -f lib501$(EXEEXT)
|
||||
$(LINK) $(lib501_LDFLAGS) $(lib501_OBJECTS) $(lib501_LDADD) $(LIBS)
|
||||
lib502$(EXEEXT): $(lib502_OBJECTS) $(lib502_DEPENDENCIES)
|
||||
@rm -f lib502$(EXEEXT)
|
||||
$(LINK) $(lib502_LDFLAGS) $(lib502_OBJECTS) $(lib502_LDADD) $(LIBS)
|
||||
lib503$(EXEEXT): $(lib503_OBJECTS) $(lib503_DEPENDENCIES)
|
||||
@rm -f lib503$(EXEEXT)
|
||||
$(LINK) $(lib503_LDFLAGS) $(lib503_OBJECTS) $(lib503_LDADD) $(LIBS)
|
||||
lib504$(EXEEXT): $(lib504_OBJECTS) $(lib504_DEPENDENCIES)
|
||||
@rm -f lib504$(EXEEXT)
|
||||
$(LINK) $(lib504_LDFLAGS) $(lib504_OBJECTS) $(lib504_LDADD) $(LIBS)
|
||||
lib505$(EXEEXT): $(lib505_OBJECTS) $(lib505_DEPENDENCIES)
|
||||
@rm -f lib505$(EXEEXT)
|
||||
$(LINK) $(lib505_LDFLAGS) $(lib505_OBJECTS) $(lib505_LDADD) $(LIBS)
|
||||
lib506$(EXEEXT): $(lib506_OBJECTS) $(lib506_DEPENDENCIES)
|
||||
@rm -f lib506$(EXEEXT)
|
||||
$(LINK) $(lib506_LDFLAGS) $(lib506_OBJECTS) $(lib506_LDADD) $(LIBS)
|
||||
lib507$(EXEEXT): $(lib507_OBJECTS) $(lib507_DEPENDENCIES)
|
||||
@rm -f lib507$(EXEEXT)
|
||||
$(LINK) $(lib507_LDFLAGS) $(lib507_OBJECTS) $(lib507_LDADD) $(LIBS)
|
||||
lib508$(EXEEXT): $(lib508_OBJECTS) $(lib508_DEPENDENCIES)
|
||||
@rm -f lib508$(EXEEXT)
|
||||
$(LINK) $(lib508_LDFLAGS) $(lib508_OBJECTS) $(lib508_LDADD) $(LIBS)
|
||||
lib509$(EXEEXT): $(lib509_OBJECTS) $(lib509_DEPENDENCIES)
|
||||
@rm -f lib509$(EXEEXT)
|
||||
$(LINK) $(lib509_LDFLAGS) $(lib509_OBJECTS) $(lib509_LDADD) $(LIBS)
|
||||
lib510$(EXEEXT): $(lib510_OBJECTS) $(lib510_DEPENDENCIES)
|
||||
@rm -f lib510$(EXEEXT)
|
||||
$(LINK) $(lib510_LDFLAGS) $(lib510_OBJECTS) $(lib510_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/first.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib503.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib504.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib505.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib506.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib507.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib508.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib509.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib510.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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(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@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
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; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
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:
|
||||
-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:
|
||||
31
neo/curl/tests/libtest/first.c
Normal file
31
neo/curl/tests/libtest/first.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "test.h"
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
/* provide a proto for this debug function */
|
||||
extern void curl_memdebug(const char *);
|
||||
#endif
|
||||
|
||||
/* test is provided in the test code file */
|
||||
int test(char *url);
|
||||
|
||||
char *arg2=NULL;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *URL;
|
||||
if(argc< 2 ) {
|
||||
fprintf(stderr, "Pass URL as argument please\n");
|
||||
return 1;
|
||||
}
|
||||
if(argc>2)
|
||||
arg2=argv[2];
|
||||
|
||||
URL = argv[1]; /* provide this to the rest */
|
||||
|
||||
fprintf(stderr, "URL: %s\n", URL);
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
curl_memdebug("memdump");
|
||||
#endif
|
||||
return test(URL);
|
||||
}
|
||||
13
neo/curl/tests/libtest/lib500.c
Normal file
13
neo/curl/tests/libtest/lib500.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "test.h"
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl = curl_easy_init();
|
||||
curl_easy_setopt(curl, CURLOPT_URL, URL);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
return (int)res;
|
||||
}
|
||||
|
||||
14
neo/curl/tests/libtest/lib501.c
Normal file
14
neo/curl/tests/libtest/lib501.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "test.h"
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURLcode res;
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
(void)URL; /* we don't use this */
|
||||
curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
return res;
|
||||
}
|
||||
|
||||
33
neo/curl/tests/libtest/lib502.c
Normal file
33
neo/curl/tests/libtest/lib502.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "test.h"
|
||||
|
||||
/*
|
||||
* Get a single URL without select().
|
||||
*/
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *c;
|
||||
CURLM *m;
|
||||
CURLMcode res;
|
||||
int running=1;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
c = curl_easy_init();
|
||||
curl_easy_setopt(c, CURLOPT_URL, URL);
|
||||
m = curl_multi_init();
|
||||
|
||||
res = curl_multi_add_handle(m, c);
|
||||
while (running) {
|
||||
res = curl_multi_perform(m, &running);
|
||||
if (running <= 0) {
|
||||
fprintf(stderr, "nothing left running.\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
curl_multi_remove_handle(m, c);
|
||||
curl_easy_cleanup(c);
|
||||
curl_multi_cleanup(m);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
84
neo/curl/tests/libtest/lib503.c
Normal file
84
neo/curl/tests/libtest/lib503.c
Normal file
@@ -0,0 +1,84 @@
|
||||
#include "test.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Source code in here hugely as reported in bug report 651460 by
|
||||
* Christopher R. Palmer.
|
||||
*
|
||||
* Use multi interface to get HTTPS document over proxy, and provide
|
||||
* auth info.
|
||||
*/
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *c;
|
||||
CURLM *m;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
c = curl_easy_init();
|
||||
curl_easy_setopt(c, CURLOPT_PROXY, arg2); /* set in first.c */
|
||||
curl_easy_setopt(c, CURLOPT_URL, URL);
|
||||
curl_easy_setopt(c, CURLOPT_USERPWD, "test:ing");
|
||||
curl_easy_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
|
||||
curl_easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1);
|
||||
curl_easy_setopt(c, CURLOPT_HEADER, 1);
|
||||
|
||||
{
|
||||
CURLMcode res;
|
||||
int running;
|
||||
char done=FALSE;
|
||||
|
||||
m = curl_multi_init();
|
||||
|
||||
res = curl_multi_add_handle(m, c);
|
||||
|
||||
while(!done) {
|
||||
fd_set rd, wr, exc;
|
||||
int max_fd;
|
||||
struct timeval interval;
|
||||
|
||||
interval.tv_sec = 1;
|
||||
interval.tv_usec = 0;
|
||||
|
||||
while (res == CURLM_CALL_MULTI_PERFORM) {
|
||||
res = curl_multi_perform(m, &running);
|
||||
if (running <= 0) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(done)
|
||||
break;
|
||||
|
||||
if (res != CURLM_OK) {
|
||||
fprintf(stderr, "not okay???\n");
|
||||
return 80;
|
||||
}
|
||||
|
||||
FD_ZERO(&rd);
|
||||
FD_ZERO(&wr);
|
||||
FD_ZERO(&exc);
|
||||
max_fd = 0;
|
||||
|
||||
if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
|
||||
fprintf(stderr, "unexpected failured of fdset.\n");
|
||||
return 89;
|
||||
}
|
||||
|
||||
if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
|
||||
fprintf(stderr, "bad select??\n");
|
||||
return 95;
|
||||
}
|
||||
|
||||
res = CURLM_CALL_MULTI_PERFORM;
|
||||
}
|
||||
}
|
||||
curl_multi_remove_handle(m, c);
|
||||
curl_easy_cleanup(c);
|
||||
curl_multi_cleanup(m);
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
89
neo/curl/tests/libtest/lib504.c
Normal file
89
neo/curl/tests/libtest/lib504.c
Normal file
@@ -0,0 +1,89 @@
|
||||
#include "test.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Source code in here hugely as reported in bug report 651464 by
|
||||
* Christopher R. Palmer.
|
||||
*
|
||||
* Use multi interface to get document over proxy with bad port number.
|
||||
* This caused the interface to "hang" in libcurl 7.10.2.
|
||||
*/
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *c;
|
||||
int ret=0;
|
||||
CURLM *m;
|
||||
fd_set rd, wr, exc;
|
||||
CURLMcode res;
|
||||
int running;
|
||||
int max_fd;
|
||||
int rc;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
c = curl_easy_init();
|
||||
|
||||
/* the point here being that there must not run anything on the given
|
||||
proxy port */
|
||||
curl_easy_setopt(c, CURLOPT_PROXY, arg2);
|
||||
curl_easy_setopt(c, CURLOPT_URL, URL);
|
||||
curl_easy_setopt(c, CURLOPT_VERBOSE, 1);
|
||||
|
||||
m = curl_multi_init();
|
||||
|
||||
res = curl_multi_add_handle(m, c);
|
||||
if(res && (res != CURLM_CALL_MULTI_PERFORM))
|
||||
return 1; /* major failure */
|
||||
do {
|
||||
struct timeval interval;
|
||||
|
||||
interval.tv_sec = 1;
|
||||
interval.tv_usec = 0;
|
||||
|
||||
fprintf(stderr, "curl_multi_perform()\n");
|
||||
|
||||
do {
|
||||
res = curl_multi_perform(m, &running);
|
||||
} while (res == CURLM_CALL_MULTI_PERFORM);
|
||||
if(!running) {
|
||||
/* This is where this code is expected to reach */
|
||||
int numleft;
|
||||
CURLMsg *msg = curl_multi_info_read(m, &numleft);
|
||||
fprintf(stderr, "Expected: not running\n");
|
||||
if(msg && !numleft)
|
||||
ret = 100; /* this is where we should be */
|
||||
else
|
||||
ret = 99; /* not correct */
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "running == %d, res == %d\n", running, res);
|
||||
|
||||
if (res != CURLM_OK) {
|
||||
ret = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
FD_ZERO(&rd);
|
||||
FD_ZERO(&wr);
|
||||
FD_ZERO(&exc);
|
||||
max_fd = 0;
|
||||
|
||||
fprintf(stderr, "curl_multi_fdset()\n");
|
||||
if (curl_multi_fdset(m, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
|
||||
fprintf(stderr, "unexpected failured of fdset.\n");
|
||||
ret = 3;
|
||||
break;
|
||||
}
|
||||
rc = select(max_fd+1, &rd, &wr, &exc, &interval);
|
||||
fprintf(stderr, "select returned %d\n", rc);
|
||||
|
||||
} while(rc);
|
||||
|
||||
curl_multi_remove_handle(m, c);
|
||||
curl_easy_cleanup(c);
|
||||
curl_multi_cleanup(m);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
111
neo/curl/tests/libtest/lib505.c
Normal file
111
neo/curl/tests/libtest/lib505.c
Normal file
@@ -0,0 +1,111 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* $Id: lib505.c,v 1.4 2004/02/05 12:34:17 bagder Exp $
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This example shows an FTP upload, with a rename of the file just after
|
||||
* a successful upload.
|
||||
*
|
||||
* Example based on source code provided by Erick Nuwendam. Thanks!
|
||||
*/
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
FILE *hd_src ;
|
||||
int hd ;
|
||||
struct stat file_info;
|
||||
|
||||
struct curl_slist *headerlist=NULL;
|
||||
const char *buf_1 = "RNFR 505";
|
||||
const char *buf_2 = "RNTO 505-forreal";
|
||||
|
||||
/* get the file size of the local file */
|
||||
hd = stat(arg2, &file_info);
|
||||
if(hd == -1) {
|
||||
/* can't open file, bail out */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(! file_info.st_size) {
|
||||
fprintf(stderr, "WARNING: file %s has no size!\n", arg2);
|
||||
return -4;
|
||||
}
|
||||
|
||||
/* get a FILE * of the same file, could also be made with
|
||||
fdopen() from the previous descriptor, but hey this is just
|
||||
an example! */
|
||||
hd_src = fopen(arg2, "rb");
|
||||
if(NULL == hd_src) {
|
||||
return -2; /* if this happens things are major weird */
|
||||
}
|
||||
|
||||
/* In windows, this will init the winsock stuff */
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
/* get a curl handle */
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* build a list of commands to pass to libcurl */
|
||||
headerlist = curl_slist_append(headerlist, buf_1);
|
||||
headerlist = curl_slist_append(headerlist, buf_2);
|
||||
|
||||
/* enable uploading */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
||||
|
||||
/* enable verbose */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ;
|
||||
|
||||
/* specify target */
|
||||
curl_easy_setopt(curl,CURLOPT_URL, URL);
|
||||
|
||||
/* pass in that last of FTP commands to run after the transfer */
|
||||
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
|
||||
|
||||
/* now specify which file to upload */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
|
||||
|
||||
/* and give the size of the upload (optional) */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||
file_info.st_size);
|
||||
|
||||
/* Now run off and do what you've been told! */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* clean up the FTP commands list */
|
||||
curl_slist_free_all (headerlist);
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
fclose(hd_src); /* close the local file */
|
||||
|
||||
curl_global_cleanup();
|
||||
return res;
|
||||
}
|
||||
230
neo/curl/tests/libtest/lib506.c
Normal file
230
neo/curl/tests/libtest/lib506.c
Normal file
@@ -0,0 +1,230 @@
|
||||
#include "test.h"
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
const char *HOSTHEADER = "Host: www.host.foo.com";
|
||||
const char *JAR = "log/jar506";
|
||||
#define THREADS 2
|
||||
|
||||
void lock(CURL *handle, curl_lock_data data, curl_lock_access access,
|
||||
void *useptr );
|
||||
void unlock(CURL *handle, curl_lock_data data, void *useptr );
|
||||
struct curl_slist *sethost(struct curl_slist *headers);
|
||||
void *fire(void *ptr);
|
||||
char *suburl(char *base, int i);
|
||||
|
||||
/* struct containing data of a thread */
|
||||
struct Tdata {
|
||||
CURLSH *share;
|
||||
char *url;
|
||||
};
|
||||
|
||||
struct userdata {
|
||||
char *text;
|
||||
int counter;
|
||||
};
|
||||
|
||||
/* lock callback */
|
||||
void lock(CURL *handle, curl_lock_data data, curl_lock_access access,
|
||||
void *useptr )
|
||||
{
|
||||
const char *what;
|
||||
struct userdata *user = (struct userdata *)useptr;
|
||||
|
||||
(void)handle;
|
||||
(void)access;
|
||||
|
||||
switch ( data ) {
|
||||
case CURL_LOCK_DATA_SHARE:
|
||||
what = "share";
|
||||
break;
|
||||
case CURL_LOCK_DATA_DNS:
|
||||
what = "dns";
|
||||
break;
|
||||
case CURL_LOCK_DATA_COOKIE:
|
||||
what = "cookie";
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "lock: no such data: %d\n",data);
|
||||
return;
|
||||
}
|
||||
printf("lock: %-6s <%s>: %d\n", what, user->text, user->counter);
|
||||
user->counter++;
|
||||
}
|
||||
|
||||
/* unlock callback */
|
||||
void unlock(CURL *handle, curl_lock_data data, void *useptr )
|
||||
{
|
||||
const char *what;
|
||||
struct userdata *user = (struct userdata *)useptr;
|
||||
(void)handle;
|
||||
switch ( data ) {
|
||||
case CURL_LOCK_DATA_SHARE:
|
||||
what = "share";
|
||||
break;
|
||||
case CURL_LOCK_DATA_DNS:
|
||||
what = "dns";
|
||||
break;
|
||||
case CURL_LOCK_DATA_COOKIE:
|
||||
what = "cookie";
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "unlock: no such data: %d\n",data);
|
||||
return;
|
||||
}
|
||||
printf("unlock: %-6s <%s>: %d\n", what, user->text, user->counter);
|
||||
user->counter++;
|
||||
}
|
||||
|
||||
|
||||
/* build host entry */
|
||||
struct curl_slist *sethost(struct curl_slist *headers)
|
||||
{
|
||||
(void)headers;
|
||||
return curl_slist_append(NULL, HOSTHEADER );
|
||||
}
|
||||
|
||||
|
||||
/* the dummy thread function */
|
||||
void *fire(void *ptr)
|
||||
{
|
||||
CURLcode code;
|
||||
struct curl_slist *headers;
|
||||
struct Tdata *tdata = (struct Tdata*)ptr;
|
||||
CURL *curl = curl_easy_init();
|
||||
int i=0;
|
||||
|
||||
headers = sethost(NULL);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, (void*)headers);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, (void*)tdata->url);
|
||||
printf( "CURLOPT_SHARE\n" );
|
||||
curl_easy_setopt(curl, CURLOPT_SHARE, (void*)tdata->share);
|
||||
|
||||
printf( "PERFORM\n" );
|
||||
code = curl_easy_perform(curl);
|
||||
if( code != CURLE_OK ) {
|
||||
fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
|
||||
tdata->url, i, (int)code);
|
||||
}
|
||||
|
||||
printf( "CLEANUP\n" );
|
||||
curl_easy_cleanup(curl);
|
||||
curl_slist_free_all(headers);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* build request url */
|
||||
char *suburl(char *base, int i)
|
||||
{
|
||||
int len = strlen(base);
|
||||
char *url = (char *)malloc(len+5);
|
||||
if (!url) {
|
||||
abort();
|
||||
}
|
||||
strcpy(url, base);
|
||||
strcat(url, "0000");
|
||||
url[len+3] = 48+i;
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
/* test function */
|
||||
int test(char *URL)
|
||||
{
|
||||
int res;
|
||||
CURLSHcode scode;
|
||||
char *url;
|
||||
struct Tdata tdata;
|
||||
CURL *curl;
|
||||
CURLSH *share;
|
||||
struct curl_slist *headers;
|
||||
int i;
|
||||
struct userdata user;
|
||||
|
||||
user.text = (char *)"Pigs in space";
|
||||
user.counter = 0;
|
||||
|
||||
printf( "GLOBAL_INIT\n" );
|
||||
curl_global_init( CURL_GLOBAL_ALL );
|
||||
|
||||
/* prepare share */
|
||||
printf( "SHARE_INIT\n" );
|
||||
share = curl_share_init();
|
||||
curl_share_setopt( share, CURLSHOPT_LOCKFUNC, lock);
|
||||
curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, unlock);
|
||||
curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
|
||||
printf( "CURL_LOCK_DATA_COOKIE\n" );
|
||||
curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
|
||||
printf( "CURL_LOCK_DATA_DNS\n" );
|
||||
curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
|
||||
|
||||
res = 0;
|
||||
|
||||
/* start treads */
|
||||
for (i=1; i<=THREADS; i++ ) {
|
||||
|
||||
/* set thread data */
|
||||
tdata.url = suburl( URL, i ); /* must be freed */
|
||||
tdata.share = share;
|
||||
|
||||
/* simulate thread, direct call of "thread" function */
|
||||
printf( "*** run %d\n",i );
|
||||
fire( &tdata );
|
||||
|
||||
free( tdata.url );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* fetch a another one and save cookies */
|
||||
printf( "*** run %d\n", i );
|
||||
curl = curl_easy_init();
|
||||
|
||||
url = suburl( URL, i );
|
||||
headers = sethost( NULL );
|
||||
curl_easy_setopt( curl, CURLOPT_HTTPHEADER, (void*)headers );
|
||||
curl_easy_setopt( curl, CURLOPT_URL, url );
|
||||
printf( "CURLOPT_SHARE\n" );
|
||||
curl_easy_setopt( curl, CURLOPT_SHARE, share );
|
||||
printf( "CURLOPT_COOKIEJAR\n" );
|
||||
curl_easy_setopt( curl, CURLOPT_COOKIEJAR, JAR );
|
||||
|
||||
printf( "PERFORM\n" );
|
||||
curl_easy_perform( curl );
|
||||
|
||||
/* try to free share, expect to fail because share is in use*/
|
||||
printf( "try SHARE_CLEANUP...\n" );
|
||||
scode = curl_share_cleanup( share );
|
||||
if ( scode==CURLSHE_OK )
|
||||
{
|
||||
fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
|
||||
share = NULL;
|
||||
} else {
|
||||
printf( "SHARE_CLEANUP failed, correct\n" );
|
||||
}
|
||||
|
||||
/* clean up last handle */
|
||||
printf( "CLEANUP\n" );
|
||||
curl_easy_cleanup( curl );
|
||||
curl_slist_free_all( headers );
|
||||
free(url);
|
||||
|
||||
|
||||
/* free share */
|
||||
printf( "SHARE_CLEANUP\n" );
|
||||
scode = curl_share_cleanup( share );
|
||||
if ( scode!=CURLSHE_OK )
|
||||
{
|
||||
fprintf(stderr, "curl_share_cleanup failed, code errno %d\n", scode);
|
||||
}
|
||||
|
||||
printf( "GLOBAL_CLEANUP\n" );
|
||||
curl_global_cleanup();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
50
neo/curl/tests/libtest/lib507.c
Normal file
50
neo/curl/tests/libtest/lib507.c
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "test.h"
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL* curls;
|
||||
CURLM* multi;
|
||||
int still_running;
|
||||
int i;
|
||||
CURLMsg *msg;
|
||||
|
||||
multi = curl_multi_init();
|
||||
|
||||
curls=curl_easy_init();
|
||||
curl_easy_setopt(curls, CURLOPT_URL, URL);
|
||||
curl_multi_add_handle(multi, curls);
|
||||
|
||||
while ( CURLM_CALL_MULTI_PERFORM == curl_multi_perform(multi, &still_running) );
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
int rc;
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
switch(rc) {
|
||||
case -1:
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(multi, &still_running));
|
||||
break;
|
||||
}
|
||||
}
|
||||
msg = curl_multi_info_read(multi, &still_running);
|
||||
/* this should now contain a result code from the easy handle,
|
||||
get it */
|
||||
i = msg->data.result;
|
||||
|
||||
curl_multi_cleanup(multi);
|
||||
curl_easy_cleanup(curls);
|
||||
|
||||
return i; /* return the final return code */
|
||||
}
|
||||
67
neo/curl/tests/libtest/lib508.c
Normal file
67
neo/curl/tests/libtest/lib508.c
Normal file
@@ -0,0 +1,67 @@
|
||||
#include "test.h"
|
||||
|
||||
static char data[]="this is what we post to the silly web server\n";
|
||||
|
||||
struct WriteThis {
|
||||
char *readptr;
|
||||
size_t sizeleft;
|
||||
};
|
||||
|
||||
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||
|
||||
if(size*nmemb < 1)
|
||||
return 0;
|
||||
|
||||
if(pooh->sizeleft) {
|
||||
*(char *)ptr = pooh->readptr[0]; /* copy one single byte */
|
||||
pooh->readptr++; /* advance pointer */
|
||||
pooh->sizeleft--; /* less data left */
|
||||
return 1; /* we return 1 byte at a time! */
|
||||
}
|
||||
|
||||
return -1; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res=CURLE_OK;
|
||||
|
||||
struct WriteThis pooh;
|
||||
|
||||
pooh.readptr = data;
|
||||
pooh.sizeleft = strlen(data);
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* First set the URL that is about to receive our POST. */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, URL);
|
||||
|
||||
/* Now specify we want to POST data */
|
||||
curl_easy_setopt(curl, CURLOPT_POST, TRUE);
|
||||
|
||||
/* Set the expected POST size */
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
|
||||
|
||||
/* we want to use our own read function */
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
/* pointer to pass to our read function */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
|
||||
|
||||
/* get verbose debug output please */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
||||
/* include headers in the output */
|
||||
curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
|
||||
|
||||
/* Perform the request, res will get the return code */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
256
neo/curl/tests/libtest/lib509.c
Normal file
256
neo/curl/tests/libtest/lib509.c
Normal file
@@ -0,0 +1,256 @@
|
||||
#include "test.h"
|
||||
|
||||
#ifdef USE_SSLEAY
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/x509_vfy.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
|
||||
typedef struct sslctxparm_st {
|
||||
CURL* curl;
|
||||
int accesstype ;
|
||||
unsigned char * accessinfoURL ;
|
||||
|
||||
} sslctxparm;
|
||||
|
||||
|
||||
static unsigned char *i2s_ASN1_IA5STRING( ASN1_IA5STRING *ia5)
|
||||
{
|
||||
unsigned char *tmp;
|
||||
if(!ia5 || !ia5->length) return NULL;
|
||||
tmp = OPENSSL_malloc(ia5->length + 1);
|
||||
memcpy(tmp, ia5->data, ia5->length);
|
||||
tmp[ia5->length] = 0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/* A conveniance routine to get an access URI. */
|
||||
|
||||
static unsigned char *my_get_ext(X509 * cert, const int type,
|
||||
int extensiontype)
|
||||
{
|
||||
int i;
|
||||
STACK_OF(ACCESS_DESCRIPTION) * accessinfo ;
|
||||
accessinfo = X509_get_ext_d2i(cert, extensiontype, NULL, NULL) ;
|
||||
|
||||
if (!sk_ACCESS_DESCRIPTION_num(accessinfo))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < sk_ACCESS_DESCRIPTION_num(accessinfo); i++) {
|
||||
ACCESS_DESCRIPTION * ad = sk_ACCESS_DESCRIPTION_value(accessinfo, i);
|
||||
if (OBJ_obj2nid(ad->method) == type) {
|
||||
if (ad->location->type == GEN_URI) {
|
||||
return i2s_ASN1_IA5STRING(ad->location->d.ia5);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * globalparm = NULL;
|
||||
|
||||
static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg)
|
||||
{
|
||||
sslctxparm * p = (sslctxparm *) arg;
|
||||
int ok, err;
|
||||
|
||||
fprintf(stderr,"ssl_app_verify_callback sslctxparm=%p ctx=%p\n",
|
||||
(void *)p, (void*)ctx);
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER<0x00907000L
|
||||
/* not necessary in openssl 0.9.7 or later */
|
||||
|
||||
fprintf(stderr,"This version %s of openssl does not support a parm (%p)"
|
||||
", getting a global static %p \n",
|
||||
OPENSSL_VERSION_TEXT, (void *)p, (void *)globalparm);
|
||||
|
||||
p = globalparm;
|
||||
#endif
|
||||
|
||||
/* The following error should not occur. We test this to avoid segfault. */
|
||||
if (!p || !ctx) {
|
||||
fprintf(stderr,"Internal error in ssl_app_verify_callback "
|
||||
"sslctxparm=%p ctx=%p\n",(void *)p,(void*)ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ok= X509_verify_cert(ctx);
|
||||
err=X509_STORE_CTX_get_error(ctx);
|
||||
|
||||
/* The following seems to be a problem in 0.9.7/8 openssl versions */
|
||||
|
||||
#if 1
|
||||
if (err == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT ||
|
||||
err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) {
|
||||
fprintf(stderr,"X509_verify_cert: repairing self signed\n") ;
|
||||
X509_STORE_CTX_set_error(ctx,X509_V_OK);
|
||||
ok = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ok && ctx->cert) {
|
||||
unsigned char * accessinfoURL ;
|
||||
|
||||
accessinfoURL = my_get_ext(ctx->cert,p->accesstype ,NID_info_access);
|
||||
if (accessinfoURL) {
|
||||
|
||||
if (strcmp((char *)p->accessinfoURL, (char *)accessinfoURL)) {
|
||||
fprintf(stderr, "Setting URL <%s>, was <%s>\n",
|
||||
accessinfoURL,p->accessinfoURL);
|
||||
OPENSSL_free(p->accessinfoURL);
|
||||
p->accessinfoURL = accessinfoURL;
|
||||
curl_easy_setopt(p->curl, CURLOPT_URL,p->accessinfoURL);
|
||||
}
|
||||
else
|
||||
OPENSSL_free(accessinfoURL);
|
||||
}
|
||||
}
|
||||
return(ok);
|
||||
}
|
||||
|
||||
|
||||
static CURLcode sslctxfun(CURL * curl, void * sslctx, void * parm)
|
||||
{
|
||||
sslctxparm * p = (sslctxparm *) parm;
|
||||
|
||||
SSL_CTX * ctx = (SSL_CTX *) sslctx ;
|
||||
fprintf(stderr,"sslctxfun start curl=%p ctx=%p parm=%p\n",
|
||||
(void *)curl,(void *)ctx,(void *)p);
|
||||
|
||||
SSL_CTX_set_quiet_shutdown(ctx,1);
|
||||
SSL_CTX_set_cipher_list(ctx,"RC4-MD5");
|
||||
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
|
||||
|
||||
/* one might assume that the cert validaton would not fail when setting this,
|
||||
but it still does, see the error handling in the call back */
|
||||
|
||||
SSL_CTX_set_verify_depth(ctx,0);
|
||||
SSL_CTX_set_verify(ctx,SSL_VERIFY_NONE,NULL);
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER<0x00907000L
|
||||
/* in newer openssl versions we can set a parameter for the call back. */
|
||||
fprintf(stderr,"This version %s of openssl does not support a parm,"
|
||||
" setting global one\n", OPENSSL_VERSION_TEXT);
|
||||
/* this is only done to support 0.9.6 version */
|
||||
globalparm = parm;
|
||||
|
||||
/* in 0.9.6 the parm is not taken */
|
||||
#endif
|
||||
SSL_CTX_set_cert_verify_callback(ctx, ssl_app_verify_callback, parm);
|
||||
fprintf(stderr,"sslctxfun end\n");
|
||||
|
||||
return CURLE_OK ;
|
||||
}
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURLM* multi;
|
||||
sslctxparm p;
|
||||
|
||||
int i;
|
||||
CURLMsg *msg;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
p.curl = curl_easy_init();
|
||||
|
||||
p.accessinfoURL = (unsigned char *) strdup(URL);
|
||||
p.accesstype = OBJ_obj2nid(OBJ_txt2obj("AD_DVCS",0)) ;
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_URL, p.accessinfoURL);
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_SSL_CTX_FUNCTION, sslctxfun) ;
|
||||
curl_easy_setopt(p.curl, CURLOPT_SSL_CTX_DATA, &p);
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_easy_setopt(p.curl, CURLOPT_SSL_VERIFYHOST, 1);
|
||||
|
||||
fprintf(stderr,"Going to perform %s\n",p.accessinfoURL);
|
||||
|
||||
{
|
||||
CURLMcode res;
|
||||
int running;
|
||||
char done=FALSE;
|
||||
|
||||
multi = curl_multi_init();
|
||||
|
||||
res = curl_multi_add_handle(multi, p.curl);
|
||||
|
||||
while(!done) {
|
||||
fd_set rd, wr, exc;
|
||||
int max_fd;
|
||||
struct timeval interval;
|
||||
|
||||
interval.tv_sec = 1;
|
||||
interval.tv_usec = 0;
|
||||
|
||||
while (res == CURLM_CALL_MULTI_PERFORM) {
|
||||
res = curl_multi_perform(multi, &running);
|
||||
fprintf(stderr, "running=%d res=%d\n",running,res);
|
||||
if (running <= 0) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(done)
|
||||
break;
|
||||
|
||||
if (res != CURLM_OK) {
|
||||
fprintf(stderr, "not okay???\n");
|
||||
return 80;
|
||||
}
|
||||
|
||||
FD_ZERO(&rd);
|
||||
FD_ZERO(&wr);
|
||||
FD_ZERO(&exc);
|
||||
max_fd = 0;
|
||||
|
||||
if (curl_multi_fdset(multi, &rd, &wr, &exc, &max_fd) != CURLM_OK) {
|
||||
fprintf(stderr, "unexpected failured of fdset.\n");
|
||||
return 89;
|
||||
}
|
||||
|
||||
if (select(max_fd+1, &rd, &wr, &exc, &interval) == -1) {
|
||||
fprintf(stderr, "bad select??\n");
|
||||
return 95;
|
||||
}
|
||||
|
||||
res = CURLM_CALL_MULTI_PERFORM;
|
||||
}
|
||||
msg = curl_multi_info_read(multi, &running);
|
||||
/* this should now contain a result code from the easy handle, get it */
|
||||
i = msg->data.result;
|
||||
}
|
||||
|
||||
fprintf(stderr, "all done\n");
|
||||
|
||||
curl_multi_remove_handle(multi, p.curl);
|
||||
curl_easy_cleanup(p.curl);
|
||||
curl_multi_cleanup(multi);
|
||||
|
||||
curl_global_cleanup();
|
||||
free(p.accessinfoURL);
|
||||
|
||||
return i;
|
||||
}
|
||||
#else /* USE_SSLEAY */
|
||||
int test(char *URL)
|
||||
{
|
||||
(void)URL;
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
#endif /* USE_SSLEAY */
|
||||
80
neo/curl/tests/libtest/lib510.c
Normal file
80
neo/curl/tests/libtest/lib510.c
Normal file
@@ -0,0 +1,80 @@
|
||||
#include "test.h"
|
||||
|
||||
static const char *post[]={
|
||||
"one",
|
||||
"two",
|
||||
"three",
|
||||
"and a final longer crap: four",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
struct WriteThis {
|
||||
int counter;
|
||||
};
|
||||
|
||||
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||
const char *data;
|
||||
|
||||
if(size*nmemb < 1)
|
||||
return 0;
|
||||
|
||||
data = post[pooh->counter];
|
||||
|
||||
if(data) {
|
||||
size_t len = strlen(data);
|
||||
memcpy(ptr, data, len);
|
||||
pooh->counter++; /* advance pointer */
|
||||
return len;
|
||||
}
|
||||
return 0; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
int test(char *URL)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res=CURLE_OK;
|
||||
struct curl_slist *slist = NULL;
|
||||
|
||||
struct WriteThis pooh;
|
||||
pooh.counter = 0;
|
||||
|
||||
slist = curl_slist_append(slist, "Transfer-Encoding: chunked");
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* First set the URL that is about to receive our POST. */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, URL);
|
||||
|
||||
/* Now specify we want to POST data */
|
||||
curl_easy_setopt(curl, CURLOPT_POST, TRUE);
|
||||
|
||||
/* we want to use our own read function */
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
/* pointer to pass to our read function */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
|
||||
|
||||
/* get verbose debug output please */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
||||
/* include headers in the output */
|
||||
curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
|
||||
|
||||
/* enforce chunked transfer by setting the header */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
|
||||
|
||||
/* Perform the request, res will get the return code */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
/* clean up the headers list */
|
||||
curl_slist_free_all(slist);
|
||||
|
||||
}
|
||||
return res;
|
||||
}
|
||||
35
neo/curl/tests/libtest/test.h
Normal file
35
neo/curl/tests/libtest/test.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
/* Now include the setup.h file from libcurl's private libdir (the source
|
||||
version, but that might include "config.h" from the build dir so we need
|
||||
both of them in the include path), so that we get good in-depth knowledge
|
||||
about the system we're building this on */
|
||||
#include "setup.h"
|
||||
#endif
|
||||
|
||||
#include <curl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
/* since so many tests use select(), we can just as well include it here */
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
/* at least somewhat oldish FreeBSD systems need this for select() */
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
extern char *arg2; /* set by first.c to the argv[2] or NULL */
|
||||
int test(char *URL); /* the actual test function provided by each individual
|
||||
libXXX.c file */
|
||||
Reference in New Issue
Block a user