Add project notice and file Id
[platform/upstream/curl.git] / tests / libtest / test.h
1 /*****************************************************************************
2  *                                  _   _ ____  _
3  *  Project                     ___| | | |  _ \| |
4  *                             / __| | | | |_) | |
5  *                            | (__| |_| |  _ <| |___
6  *                             \___|\___/|_| \_\_____|
7  *
8  * $Id$
9  */
10
11 #ifdef HAVE_CONFIG_H
12 /* Now include the setup.h file from libcurl's private libdir (the source
13    version, but that might include "config.h" from the build dir so we need
14    both of them in the include path), so that we get good in-depth knowledge
15    about the system we're building this on */
16 #include "setup.h"
17 #endif
18
19 #include <curl.h>
20 #include <stdio.h>
21 #include <string.h>
22 #include <stdlib.h>
23
24 #ifdef HAVE_SYS_SOCKET_H
25 #include <sys/socket.h>
26 #endif
27 #ifdef HAVE_SYS_SELECT_H
28 /* since so many tests use select(), we can just as well include it here */
29 #include <sys/select.h>
30 #endif
31 #ifdef HAVE_UNISTD_H
32 /* at least somewhat oldish FreeBSD systems need this for select() */
33 #include <unistd.h>
34 #endif
35
36 #ifndef FALSE
37 #define FALSE 0
38 #endif
39
40 #ifndef TRUE
41 #define TRUE 1
42 #endif
43
44 #define TEST_ERR_MAJOR_BAD     100
45 #define TEST_ERR_RUNS_FOREVER   99
46
47 extern char *arg2; /* set by first.c to the argv[2] or NULL */
48
49 int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
50                  struct timeval *tv);
51
52 int test(char *URL); /* the actual test function provided by each individual
53                         libXXX.c file */