7
7
* | (__| |_| | _ <| |___
8
8
* \___|\___/|_| \_\_____|
10
* Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
10
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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
***************************************************************************/
27
26
void logmsg(const char *msg, ...);
36
28
#define TEST_DATA_PATH "%s/data/test%ld"
38
30
/* global variable, where to find the 'data' dir */
39
31
extern const char *path;
41
#if defined(WIN32) && !defined(__CYGWIN__)
42
34
#include <process.h>
44
37
#define sleep(sec) Sleep ((sec)*1000)
46
#define EINPROGRESS WSAEINPROGRESS
47
#define EWOULDBLOCK WSAEWOULDBLOCK
48
#define EISCONN WSAEISCONN
49
#define ENOTSOCK WSAENOTSOCK
50
#define ECONNREFUSED WSAECONNREFUSED
52
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
53
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
59
#if defined(WIN32) && !defined(__CYGWIN__)
61
40
#define perror(m) win32_perror(m)
41
void win32_perror (const char *msg);
64
45
void win32_init(void);
65
46
void win32_cleanup(void);
47
#endif /* USE_WINSOCK */
67
49
/* returns the path name to the test case file */
68
50
char *test2file(long testno);
52
#endif /* __SERVER_UTIL_H */