30 #include <stdio.h> |
30 #include <stdio.h> |
31 #include <stdlib.h> |
31 #include <stdlib.h> |
32 #include <string.h> |
32 #include <string.h> |
33 #include <stdbool.h> |
33 #include <stdbool.h> |
34 #include <errno.h> |
34 #include <errno.h> |
35 #include <unistd.h> |
|
36 #include <time.h> |
35 #include <time.h> |
37 #include <sys/types.h> |
36 #include <sys/types.h> |
38 #ifndef _WIN32 |
37 #ifndef _WIN32 |
39 #include <sys/wait.h> |
38 #include <sys/wait.h> |
|
39 #include <unistd.h> |
40 #endif |
40 #endif |
41 #include <cx/string.h> |
41 #include <cx/string.h> |
42 #include <cx/utils.h> |
42 #include <cx/utils.h> |
43 #include <cx/printf.h> |
43 #include <cx/printf.h> |
44 #include <cx/hash_map.h> |
44 #include <cx/hash_map.h> |
45 #include <cx/linked_list.h> |
45 #include <cx/linked_list.h> |
46 #include <dirent.h> |
46 |
47 |
47 |
48 #include <libidav/utils.h> |
48 #include <libidav/utils.h> |
49 #include <libidav/crypto.h> |
49 #include <libidav/crypto.h> |
50 #include <libidav/session.h> |
50 #include <libidav/session.h> |
51 #include <libidav/xml.h> |
51 #include <libidav/xml.h> |
80 } |
80 } |
81 |
81 |
82 int dav_main(int argc, char **argv); |
82 int dav_main(int argc, char **argv); |
83 |
83 |
84 #ifdef _WIN32 |
84 #ifdef _WIN32 |
|
85 |
|
86 #define strcasecmp _stricmp |
|
87 |
85 static char* wchar2utf8(const wchar_t *wstr, size_t wlen) { |
88 static char* wchar2utf8(const wchar_t *wstr, size_t wlen) { |
86 size_t maxlen = wlen * 4; |
89 size_t maxlen = wlen * 4; |
87 char *ret = malloc(maxlen + 1); |
90 char *ret = malloc(maxlen + 1); |
88 int ret_len = WideCharToMultiByte( |
91 int ret_len = WideCharToMultiByte( |
89 CP_UTF8, |
92 CP_UTF8, |