util.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_SERVER_UTIL_H
00002 #define HEADER_CURL_SERVER_UTIL_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 #include "server_setup.h"
00025 
00026 char *data_to_hex(char *data, size_t len);
00027 void logmsg(const char *msg, ...);
00028 
00029 #define TEST_DATA_PATH "%s/data/test%ld"
00030 
00031 #define SERVERLOGS_LOCK "log/serverlogs.lock"
00032 
00033 /* global variable, where to find the 'data' dir */
00034 extern const char *path;
00035 
00036 /* global variable, log file name */
00037 extern const char *serverlogfile;
00038 
00039 #ifdef WIN32
00040 #include <process.h>
00041 #include <fcntl.h>
00042 
00043 #define sleep(sec)   Sleep ((sec)*1000)
00044 
00045 #undef perror
00046 #define perror(m) win32_perror(m)
00047 void win32_perror(const char *msg);
00048 #endif  /* WIN32 */
00049 
00050 #ifdef USE_WINSOCK
00051 void win32_init(void);
00052 void win32_cleanup(void);
00053 #endif  /* USE_WINSOCK */
00054 
00055 /* returns the path name to the test case file */
00056 char *test2file(long testno);
00057 
00058 int wait_ms(int timeout_ms);
00059 
00060 int write_pidfile(const char *filename);
00061 
00062 void set_advisor_read_lock(const char *filename);
00063 
00064 void clear_advisor_read_lock(const char *filename);
00065 
00066 int strncasecompare(const char *first, const char *second, size_t max);
00067 
00068 #endif  /* HEADER_CURL_SERVER_UTIL_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:07