diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/include/gnunet_common.h | 1 | ||||
-rw-r--r-- | src/include/platform.h | 4 | ||||
-rw-r--r-- | src/include/plibc.h | 5 | ||||
-rw-r--r-- | src/include/winproc.h | 5 | ||||
-rw-r--r-- | src/transport/gnunet-nat-client-windows.c | 2 | ||||
-rw-r--r-- | src/util/common_logging.c | 2 | ||||
-rw-r--r-- | src/util/connection.c | 2 | ||||
-rw-r--r-- | src/util/os_priority.c | 1 | ||||
-rw-r--r-- | src/util/scheduler.c | 3 | ||||
-rw-r--r-- | src/util/signal.c | 2 | ||||
-rw-r--r-- | src/util/strings.c | 2 | ||||
-rw-r--r-- | src/util/win.cc | 16 | ||||
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 2 | ||||
-rw-r--r-- | src/vpn/gnunet-vpn-pretty-print.c | 1 |
15 files changed, 31 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 1176ff5fb..eddb10ff0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -23,6 +23,7 @@ | |||
23 | AC_PREREQ(2.61) | 23 | AC_PREREQ(2.61) |
24 | AC_INIT([gnunet], [0.9.0pre1],[bug-gnunet@gnu.org]) | 24 | AC_INIT([gnunet], [0.9.0pre1],[bug-gnunet@gnu.org]) |
25 | AM_INIT_AUTOMAKE([gnunet], [0.9.0pre1]) | 25 | AM_INIT_AUTOMAKE([gnunet], [0.9.0pre1]) |
26 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
26 | AC_CONFIG_HEADERS([gnunet_config.h]) | 27 | AC_CONFIG_HEADERS([gnunet_config.h]) |
27 | 28 | ||
28 | AH_TOP([#define _GNU_SOURCE 1]) | 29 | AH_TOP([#define _GNU_SOURCE 1]) |
@@ -141,6 +142,7 @@ netbsd*) | |||
141 | LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols" | 142 | LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols" |
142 | LIBS="$LIBS -lws2_32 -lplibc" | 143 | LIBS="$LIBS -lws2_32 -lplibc" |
143 | CFLAGS="-mms-bitfields $CFLAGS" | 144 | CFLAGS="-mms-bitfields $CFLAGS" |
145 | CPPFLAGS="-D_WIN32_WINNT=0x0501 $CPPFLAGS" | ||
144 | build_target="mingw" | 146 | build_target="mingw" |
145 | AC_PROG_CXX | 147 | AC_PROG_CXX |
146 | LIBPREFIX=lib | 148 | LIBPREFIX=lib |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 57008fa08..badb52880 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -138,6 +138,7 @@ typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); | |||
138 | */ | 138 | */ |
139 | enum GNUNET_ErrorType | 139 | enum GNUNET_ErrorType |
140 | { | 140 | { |
141 | GNUNET_ERROR_TYPE_NONE = 0, | ||
141 | GNUNET_ERROR_TYPE_ERROR = 1, | 142 | GNUNET_ERROR_TYPE_ERROR = 1, |
142 | GNUNET_ERROR_TYPE_WARNING = 2, | 143 | GNUNET_ERROR_TYPE_WARNING = 2, |
143 | GNUNET_ERROR_TYPE_INFO = 4, | 144 | GNUNET_ERROR_TYPE_INFO = 4, |
diff --git a/src/include/platform.h b/src/include/platform.h index 1b279d123..cc2aa03ae 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -78,6 +78,7 @@ | |||
78 | 78 | ||
79 | #ifdef _MSC_VER | 79 | #ifdef _MSC_VER |
80 | #include <Winsock2.h> | 80 | #include <Winsock2.h> |
81 | #include <ws2tcpip.h> | ||
81 | #else | 82 | #else |
82 | #ifndef MINGW | 83 | #ifndef MINGW |
83 | #include <netdb.h> | 84 | #include <netdb.h> |
@@ -108,6 +109,9 @@ | |||
108 | #include <stdarg.h> | 109 | #include <stdarg.h> |
109 | #include <errno.h> | 110 | #include <errno.h> |
110 | #include <signal.h> | 111 | #include <signal.h> |
112 | #ifdef WINDOWS | ||
113 | #include <malloc.h> /* for alloca(), on other OSes it's in stdlib.h */ | ||
114 | #endif | ||
111 | #ifndef _MSC_VER | 115 | #ifndef _MSC_VER |
112 | #include <unistd.h> /* KLB_FIX */ | 116 | #include <unistd.h> /* KLB_FIX */ |
113 | #endif | 117 | #endif |
diff --git a/src/include/plibc.h b/src/include/plibc.h index 4e3204c98..a59e53de9 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h | |||
@@ -50,8 +50,9 @@ extern "C" { | |||
50 | #include "langinfo.h" | 50 | #include "langinfo.h" |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #include <windows.h> | 53 | #include <winsock2.h> |
54 | #include <ws2tcpip.h> | 54 | #include <ws2tcpip.h> |
55 | #include <windows.h> | ||
55 | #include <sys/types.h> | 56 | #include <sys/types.h> |
56 | #include <time.h> | 57 | #include <time.h> |
57 | #include <stdio.h> | 58 | #include <stdio.h> |
@@ -334,7 +335,7 @@ BOOL _plibc_CreateShortcut(const char *pszSrc, const char *pszDest); | |||
334 | BOOL _plibc_DereferenceShortcut(char *pszShortcut); | 335 | BOOL _plibc_DereferenceShortcut(char *pszShortcut); |
335 | char *plibc_ChooseDir(char *pszTitle, unsigned long ulFlags); | 336 | char *plibc_ChooseDir(char *pszTitle, unsigned long ulFlags); |
336 | char *plibc_ChooseFile(char *pszTitle, unsigned long ulFlags); | 337 | char *plibc_ChooseFile(char *pszTitle, unsigned long ulFlags); |
337 | long QueryRegistry(HKEY hMainKey, char *pszKey, char *pszSubKey, | 338 | long QueryRegistry(HKEY hMainKey, const char *pszKey, const char *pszSubKey, |
338 | char *pszBuffer, long *pdLength); | 339 | char *pszBuffer, long *pdLength); |
339 | 340 | ||
340 | BOOL __win_IsHandleMarkedAsBlocking(int hHandle); | 341 | BOOL __win_IsHandleMarkedAsBlocking(int hHandle); |
diff --git a/src/include/winproc.h b/src/include/winproc.h index 0298c2d59..595180a96 100644 --- a/src/include/winproc.h +++ b/src/include/winproc.h | |||
@@ -34,8 +34,9 @@ | |||
34 | #include <sys/timeb.h> | 34 | #include <sys/timeb.h> |
35 | #include <time.h> | 35 | #include <time.h> |
36 | #include <dirent.h> | 36 | #include <dirent.h> |
37 | #include <winsock2.h> | ||
38 | #include <ws2tcpip.h> | ||
37 | #include <windows.h> | 39 | #include <windows.h> |
38 | #include <winsock.h> | ||
39 | #include <winerror.h> | 40 | #include <winerror.h> |
40 | #include <iphlpapi.h> | 41 | #include <iphlpapi.h> |
41 | #include <shlobj.h> | 42 | #include <shlobj.h> |
@@ -198,7 +199,7 @@ extern "C" | |||
198 | 199 | ||
199 | BOOL CreateShortcut (const char *pszSrc, const char *pszDest); | 200 | BOOL CreateShortcut (const char *pszSrc, const char *pszDest); |
200 | BOOL DereferenceShortcut (char *pszShortcut); | 201 | BOOL DereferenceShortcut (char *pszShortcut); |
201 | long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey, | 202 | long QueryRegistry (HKEY hMainKey, const char *pszKey, const char *pszSubKey, |
202 | char *pszBuffer, long *pdLength); | 203 | char *pszBuffer, long *pdLength); |
203 | int ListNICs (void (*callback) (void *, const char *, int), void *cls); | 204 | int ListNICs (void (*callback) (void *, const char *, int), void *cls); |
204 | BOOL AddPathAccessRights (char *lpszFileName, char *lpszAccountName, | 205 | BOOL AddPathAccessRights (char *lpszFileName, char *lpszAccountName, |
diff --git a/src/transport/gnunet-nat-client-windows.c b/src/transport/gnunet-nat-client-windows.c index 911f4962a..2e7c8a86e 100644 --- a/src/transport/gnunet-nat-client-windows.c +++ b/src/transport/gnunet-nat-client-windows.c | |||
@@ -43,8 +43,8 @@ | |||
43 | */ | 43 | */ |
44 | #define _GNU_SOURCE | 44 | #define _GNU_SOURCE |
45 | 45 | ||
46 | #include <ws2tcpip.h> | ||
47 | #include <winsock2.h> | 46 | #include <winsock2.h> |
47 | #include <ws2tcpip.h> | ||
48 | #include <sys/time.h> | 48 | #include <sys/time.h> |
49 | #include <sys/types.h> | 49 | #include <sys/types.h> |
50 | #include <unistd.h> | 50 | #include <unistd.h> |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 223c92218..74f28ff76 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -152,6 +152,8 @@ get_type (const char *log) | |||
152 | return GNUNET_ERROR_TYPE_WARNING; | 152 | return GNUNET_ERROR_TYPE_WARNING; |
153 | if (0 == strcasecmp (log, _("ERROR"))) | 153 | if (0 == strcasecmp (log, _("ERROR"))) |
154 | return GNUNET_ERROR_TYPE_ERROR; | 154 | return GNUNET_ERROR_TYPE_ERROR; |
155 | if (0 == strcasecmp (log, _("NONE"))) | ||
156 | return GNUNET_ERROR_TYPE_NONE; | ||
155 | return GNUNET_ERROR_TYPE_INVALID; | 157 | return GNUNET_ERROR_TYPE_INVALID; |
156 | } | 158 | } |
157 | 159 | ||
diff --git a/src/util/connection.c b/src/util/connection.c index efab4edd8..04d0c864d 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -719,7 +719,7 @@ connect_probe_continuation (void *cls, | |||
719 | struct GNUNET_CONNECTION_Handle *h = ap->h; | 719 | struct GNUNET_CONNECTION_Handle *h = ap->h; |
720 | struct AddressProbe *pos; | 720 | struct AddressProbe *pos; |
721 | int error; | 721 | int error; |
722 | unsigned int len; | 722 | socklen_t len; |
723 | 723 | ||
724 | GNUNET_assert (ap->sock != NULL); | 724 | GNUNET_assert (ap->sock != NULL); |
725 | GNUNET_CONTAINER_DLL_remove (h->ap_head, h->ap_tail, ap); | 725 | GNUNET_CONTAINER_DLL_remove (h->ap_head, h->ap_tail, ap); |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 8bb7757f4..baeeb2d9a 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -551,7 +551,6 @@ GNUNET_OS_start_process_v (const int *lsocks, | |||
551 | PROCESS_INFORMATION proc; | 551 | PROCESS_INFORMATION proc; |
552 | int argcount = 0; | 552 | int argcount = 0; |
553 | char non_const_filename[MAX_PATH +1]; | 553 | char non_const_filename[MAX_PATH +1]; |
554 | int filenamelen = 0; | ||
555 | struct GNUNET_OS_Process *gnunet_proc = NULL; | 554 | struct GNUNET_OS_Process *gnunet_proc = NULL; |
556 | 555 | ||
557 | GNUNET_assert (lsocks == NULL); | 556 | GNUNET_assert (lsocks == NULL); |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 6e5a06db5..9b8ab4b29 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -692,12 +692,13 @@ static struct GNUNET_DISK_PipeHandle *shutdown_pipe_handle; | |||
692 | /** | 692 | /** |
693 | * Signal handler called for SIGPIPE. | 693 | * Signal handler called for SIGPIPE. |
694 | */ | 694 | */ |
695 | #ifndef MINGW | ||
695 | static void | 696 | static void |
696 | sighandler_pipe () | 697 | sighandler_pipe () |
697 | { | 698 | { |
698 | return; | 699 | return; |
699 | } | 700 | } |
700 | 701 | #endif | |
701 | /** | 702 | /** |
702 | * Signal handler called for signals that should cause us to shutdown. | 703 | * Signal handler called for signals that should cause us to shutdown. |
703 | */ | 704 | */ |
diff --git a/src/util/signal.c b/src/util/signal.c index 1fc3cf68f..0fe4bfc96 100644 --- a/src/util/signal.c +++ b/src/util/signal.c | |||
@@ -68,7 +68,7 @@ GNUNET_SIGNAL_handler_install (int signum, GNUNET_SIGNAL_Handler handler) | |||
68 | w32_sigchld_handler = handler; | 68 | w32_sigchld_handler = handler; |
69 | else | 69 | else |
70 | { | 70 | { |
71 | __p_sig_fn_t sigret = signal (signum, handler); | 71 | __p_sig_fn_t sigret = signal (signum, (__p_sig_fn_t) handler); |
72 | if (sigret == SIG_ERR) | 72 | if (sigret == SIG_ERR) |
73 | { | 73 | { |
74 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 74 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
diff --git a/src/util/strings.c b/src/util/strings.c index c8e5191bf..fa445f694 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -199,7 +199,7 @@ GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset) | |||
199 | itmp = tmp; | 199 | itmp = tmp; |
200 | finSize = tmpSize; | 200 | finSize = tmpSize; |
201 | if (iconv (cd, | 201 | if (iconv (cd, |
202 | #if FREEBSD || DARWIN | 202 | #if FREEBSD || DARWIN || WINDOWS |
203 | (const char **) &input, | 203 | (const char **) &input, |
204 | #else | 204 | #else |
205 | (char **) &input, | 205 | (char **) &input, |
diff --git a/src/util/win.cc b/src/util/win.cc index 2cc3b8f71..b462033b9 100644 --- a/src/util/win.cc +++ b/src/util/win.cc | |||
@@ -346,7 +346,7 @@ NTSTATUS _OpenPolicy(LPWSTR ServerName, DWORD DesiredAccess, PLSA_HANDLE PolicyH | |||
346 | * @remarks Call GetLastError() to obtain extended error information. | 346 | * @remarks Call GetLastError() to obtain extended error information. |
347 | * @see http://support.microsoft.com/?scid=kb;en-us;132958 | 347 | * @see http://support.microsoft.com/?scid=kb;en-us;132958 |
348 | */ | 348 | */ |
349 | BOOL _GetAccountSid(LPTSTR SystemName, LPTSTR AccountName, PSID * Sid) | 349 | BOOL _GetAccountSid(LPCTSTR SystemName, LPCTSTR AccountName, PSID * Sid) |
350 | { | 350 | { |
351 | LPTSTR ReferencedDomain = NULL; | 351 | LPTSTR ReferencedDomain = NULL; |
352 | DWORD cbSid = 128; /* initial allocation attempt */ | 352 | DWORD cbSid = 128; /* initial allocation attempt */ |
@@ -452,7 +452,7 @@ NTSTATUS _SetPrivilegeOnAccount(LSA_HANDLE PolicyHandle,/* open policy handle */ | |||
452 | * @param pszName the name of the account | 452 | * @param pszName the name of the account |
453 | * @param pszDesc description of the account | 453 | * @param pszDesc description of the account |
454 | */ | 454 | */ |
455 | int CreateServiceAccount(char *pszName, char *pszDesc) | 455 | int CreateServiceAccount(const char *pszName, const char *pszDesc) |
456 | { | 456 | { |
457 | USER_INFO_1 ui; | 457 | USER_INFO_1 ui; |
458 | USER_INFO_1008 ui2; | 458 | USER_INFO_1008 ui2; |
@@ -486,14 +486,14 @@ int CreateServiceAccount(char *pszName, char *pszDesc) | |||
486 | STATUS_SUCCESS) | 486 | STATUS_SUCCESS) |
487 | return 3; | 487 | return 3; |
488 | 488 | ||
489 | _GetAccountSid(NULL, (LPTSTR) pszName, &pSID); | 489 | _GetAccountSid(NULL, (LPCTSTR) pszName, &pSID); |
490 | 490 | ||
491 | if (_SetPrivilegeOnAccount(hPolicy, pSID, L"SeServiceLogonRight", TRUE) != STATUS_SUCCESS) | 491 | if (_SetPrivilegeOnAccount(hPolicy, pSID, (LPWSTR) L"SeServiceLogonRight", TRUE) != STATUS_SUCCESS) |
492 | return 4; | 492 | return 4; |
493 | 493 | ||
494 | _SetPrivilegeOnAccount(hPolicy, pSID, L"SeDenyInteractiveLogonRight", TRUE); | 494 | _SetPrivilegeOnAccount(hPolicy, pSID, (LPWSTR) L"SeDenyInteractiveLogonRight", TRUE); |
495 | _SetPrivilegeOnAccount(hPolicy, pSID, L"SeDenyBatchLogonRight", TRUE); | 495 | _SetPrivilegeOnAccount(hPolicy, pSID, (LPWSTR) L"SeDenyBatchLogonRight", TRUE); |
496 | _SetPrivilegeOnAccount(hPolicy, pSID, L"SeDenyNetworkLogonRight", TRUE); | 496 | _SetPrivilegeOnAccount(hPolicy, pSID, (LPWSTR) L"SeDenyNetworkLogonRight", TRUE); |
497 | 497 | ||
498 | GNLsaClose(hPolicy); | 498 | GNLsaClose(hPolicy); |
499 | 499 | ||
@@ -801,7 +801,7 @@ char *winErrorStr(const char *prefix, int dwErr) | |||
801 | NULL, (DWORD) dwErr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &err, | 801 | NULL, (DWORD) dwErr, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &err, |
802 | 0, NULL )) | 802 | 0, NULL )) |
803 | { | 803 | { |
804 | err = ""; | 804 | err = (char *) LocalAlloc (LMEM_FIXED | LMEM_ZEROINIT, 1); |
805 | } | 805 | } |
806 | 806 | ||
807 | mem = strlen(err) + strlen(prefix) + 20; | 807 | mem = strlen(err) + strlen(prefix) + 20; |
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index 151561fe4..7997112c4 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -452,7 +452,7 @@ read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { | |||
452 | 452 | ||
453 | struct sockaddr_in addr; | 453 | struct sockaddr_in addr; |
454 | memset(&addr, 0, sizeof addr); | 454 | memset(&addr, 0, sizeof addr); |
455 | unsigned int addrlen = sizeof addr; | 455 | socklen_t addrlen = sizeof addr; |
456 | 456 | ||
457 | int r; | 457 | int r; |
458 | r = GNUNET_NETWORK_socket_recvfrom(dnsout, | 458 | r = GNUNET_NETWORK_socket_recvfrom(dnsout, |
diff --git a/src/vpn/gnunet-vpn-pretty-print.c b/src/vpn/gnunet-vpn-pretty-print.c index 1aeb167f1..09aa05b0d 100644 --- a/src/vpn/gnunet-vpn-pretty-print.c +++ b/src/vpn/gnunet-vpn-pretty-print.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef _WIN32 | 5 | #ifndef _WIN32 |
6 | #include <arpa/inet.h> | 6 | #include <arpa/inet.h> |
7 | #else | 7 | #else |
8 | #include <winsock2.h> | ||
8 | #include <ws2tcpip.h> | 9 | #include <ws2tcpip.h> |
9 | #endif | 10 | #endif |
10 | 11 | ||