summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-08-03 23:57:05 +0000
committerNick Mathewson <nickm@torproject.org>2004-08-03 23:57:05 +0000
commit5b61dd04570c93ec6663f5893951c312b95f58f9 (patch)
tree4e7be06b8f2cf38ed3ad38e9cebf006f57650fdf
parent8cb412412127dafd88e6b6a5b39a6b897f174a7c (diff)
downloadtor-5b61dd04570c93ec6663f5893951c312b95f58f9.tar.gz
tor-5b61dd04570c93ec6663f5893951c312b95f58f9.zip
Fix all warnings on win32 build
svn:r2127
-rw-r--r--src/common/util.c2
-rw-r--r--src/or/connection_edge.c2
-rw-r--r--src/or/dirserv.c3
-rw-r--r--src/or/or.h2
-rw-r--r--src/or/rephist.c4
-rw-r--r--src/win32/orconfig.h4
6 files changed, 10 insertions, 7 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 42679a33b4..ed5b6a06f4 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1641,7 +1641,7 @@ void finish_daemon(void)
}
#else
/* defined(MS_WINDOWS) */
-void start_daemon(char *cp) {}
+void start_daemon(const char *cp) {}
void finish_daemon(void) {}
#endif
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 52e578da8e..f5030f189f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -668,7 +668,7 @@ void connection_ap_handshake_socks_resolved(connection_t *conn,
* Otherwise, send back a reply based on whether <b>success</b> is 1 or 0.
*/
void connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
- int replylen, char success) {
+ int replylen, int success) {
char buf[256];
if(replylen) { /* we already have a reply in mind */
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 5316fe900a..f76a01a8eb 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -696,8 +696,9 @@ static int generate_runningrouters(crypto_pk_env_t *private_key)
char *s, *cp;
char digest[DIGEST_LEN];
char signature[PK_BYTES];
- int i, len;
+ int i;
char published[33];
+ size_t len;
time_t published_on;
len = 1024+(MAX_HEX_NICKNAME_LEN+2)*smartlist_len(descriptor_list);
diff --git a/src/or/or.h b/src/or/or.h
index 8bdfb1f80e..34290e4542 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1094,7 +1094,7 @@ int connection_ap_handshake_send_resolve(connection_t *ap_conn, circuit_t *circ)
int connection_ap_make_bridge(char *address, uint16_t port);
void connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
- int replylen, char success);
+ int replylen, int success);
void connection_ap_handshake_socks_resolved(connection_t *conn,
int answer_type,
int answer_len,
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 0cca2097dc..1f3848b786 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -468,9 +468,9 @@ int rep_hist_bandwidth_assess(time_t when) {
r = find_largest_max(read_array);
w = find_largest_max(write_array);
if (r>w)
- return w/(double)NUM_SECS_ROLLING_MEASURE;
+ return (int)(w/(double)NUM_SECS_ROLLING_MEASURE);
else
- return r/(double)NUM_SECS_ROLLING_MEASURE;
+ return (int)(r/(double)NUM_SECS_ROLLING_MEASURE);
return 0;
}
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 0594cfab33..ddbf23a0fb 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -36,7 +36,7 @@
#undef HAVE_INET_ATON
/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H
+/* #define HAVE_INTTYPES_H */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H
@@ -86,6 +86,8 @@
/* Define to 1 if you have the `strptime' function. */
#undef HAVE_STRPTIME
+#define HAVE_STRUCT_TIMEVAL_TV_SEC
+
/* Define to 1 if you have the <sys/fcntl.h> header file. */
#undef HAVE_SYS_FCNTL_H