summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl-7.19.0/tests/libtest/test.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-09-23 16:32:06 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-09-23 16:32:06 (GMT)
commitdd92d9ec38232dfc80b4fff804a0960d23ccc227 (patch)
treebfa3747b1e62ff8d2dd671200f6c88cf1784fb6b /Utilities/cmcurl-7.19.0/tests/libtest/test.h
parent5778b6efe98e3676e00f01cfeca62bd9b2b481b5 (diff)
downloadCMake-dd92d9ec38232dfc80b4fff804a0960d23ccc227.zip
CMake-dd92d9ec38232dfc80b4fff804a0960d23ccc227.tar.gz
CMake-dd92d9ec38232dfc80b4fff804a0960d23ccc227.tar.bz2
ENH: import of new curl version
Diffstat (limited to 'Utilities/cmcurl-7.19.0/tests/libtest/test.h')
-rw-r--r--Utilities/cmcurl-7.19.0/tests/libtest/test.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/Utilities/cmcurl-7.19.0/tests/libtest/test.h b/Utilities/cmcurl-7.19.0/tests/libtest/test.h
new file mode 100644
index 0000000..ef85c34
--- /dev/null
+++ b/Utilities/cmcurl-7.19.0/tests/libtest/test.h
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * $Id$
+ */
+
+/* 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"
+
+#include <curl/curl.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.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
+
+#define TEST_ERR_MAJOR_BAD 100
+#define TEST_ERR_RUNS_FOREVER 99
+
+extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
+extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
+
+/* argc and argv as passed in to the main() function */
+extern int test_argc;
+extern char **test_argv;
+
+int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
+ struct timeval *tv);
+
+int test(char *URL); /* the actual test function provided by each individual
+ libXXX.c file */