1 #ifndef __SERVER_UTIL_H
2 #define __SERVER_UTIL_H
3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: util.h,v 1.19 2008-04-23 23:55:34 yangtse Exp $
24 ***************************************************************************/
26 void logmsg(const char *msg
, ...);
28 #define TEST_DATA_PATH "%s/data/test%ld"
30 #define SERVERLOGS_LOCK "log/serverlogs.lock"
32 /* global variable, where to find the 'data' dir */
33 extern const char *path
;
39 #define sleep(sec) Sleep ((sec)*1000)
42 #define perror(m) win32_perror(m)
43 void win32_perror (const char *msg
);
47 void win32_init(void);
48 void win32_cleanup(void);
49 #endif /* USE_WINSOCK */
51 /* returns the path name to the test case file */
52 char *test2file(long testno
);
54 int wait_ms(int timeout_ms
);
56 int write_pidfile(const char *filename
);
58 void set_advisor_read_lock(const char *filename
);
60 void clear_advisor_read_lock(const char *filename
);
62 #endif /* __SERVER_UTIL_H */