~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to tests/server/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-16 15:16:54 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20070516151654-x9nkigtr2j0i8d0v
Tags: upstream-7.16.2
ImportĀ upstreamĀ versionĀ 7.16.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *                            | (__| |_| |  _ <| |___
8
8
 *                             \___|\___/|_| \_\_____|
9
9
 *
10
 
 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
11
11
 *
12
12
 * This software is licensed as described in the file COPYING, which
13
13
 * you should have received as part of this distribution. The terms
20
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
 * KIND, either express or implied.
22
22
 *
23
 
 * $Id: util.h,v 1.5 2005/12/18 15:36:14 yangtse Exp $
 
23
 * $Id: util.h,v 1.13 2007-02-22 02:51:55 yangtse Exp $
24
24
 ***************************************************************************/
25
25
 
26
 
int ourerrno(void);
27
26
void logmsg(const char *msg, ...);
28
27
 
29
 
#ifndef FALSE
30
 
#define FALSE 0
31
 
#endif
32
 
#ifndef TRUE
33
 
#define TRUE 1
34
 
#endif
35
 
 
36
28
#define TEST_DATA_PATH "%s/data/test%ld"
37
29
 
38
30
/* global variable, where to find the 'data' dir */
39
31
extern const char *path;
40
32
 
41
 
#if defined(WIN32) && !defined(__CYGWIN__)
 
33
#ifdef WIN32
42
34
#include <process.h>
 
35
#include <fcntl.h>
43
36
 
44
37
#define sleep(sec)   Sleep ((sec)*1000)
45
38
 
46
 
#define EINPROGRESS  WSAEINPROGRESS
47
 
#define EWOULDBLOCK  WSAEWOULDBLOCK
48
 
#define EISCONN      WSAEISCONN
49
 
#define ENOTSOCK     WSAENOTSOCK
50
 
#define ECONNREFUSED WSAECONNREFUSED
51
 
 
52
 
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
53
 
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
54
 
#endif
55
 
#endif
56
 
 
57
 
#endif
58
 
 
59
 
#if defined(WIN32) && !defined(__CYGWIN__)
60
39
#undef perror
61
40
#define perror(m) win32_perror(m)
62
 
#endif
 
41
void win32_perror (const char *msg);
 
42
#endif  /* WIN32 */
63
43
 
 
44
#ifdef USE_WINSOCK
64
45
void win32_init(void);
65
46
void win32_cleanup(void);
 
47
#endif  /* USE_WINSOCK */
66
48
 
67
49
/* returns the path name to the test case file */
68
50
char *test2file(long testno);
 
51
 
 
52
#endif  /* __SERVER_UTIL_H */