[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-talk] tor-0.2.2.32 compilation failure
> circuitbuild.c:4134: warning: preprocessing directive not recognized
> within macro arg
> circuitbuild.c: In function `choose_random_entry':
> circuitbuild.c:4108: undefined or invalid # directive
> circuitbuild.c:4122: undefined or invalid # directive
> *** Error code 1
Here's my current patch. I only have rint(3) and rintf(3).
Although it compiles and 'runs', attempting production use
with this substitution feels hazardous. Is it? Alternatives?
Other warnings follow after the patch.
==========
--- src/common/torgzip.c.orig Fri Aug 26 19:10:58 2011
+++ src/common/torgzip.c
@@ -14,11 +14,12 @@
#include <stdio.h>
#include <assert.h>
#include <string.h>
+#include "torint.h"
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#include "torint.h"
#include "util.h"
#include "torlog.h"
#include "torgzip.h"
--- src/or/circuitbuild.c.orig Fri Aug 26 19:10:59 2011
+++ src/or/circuitbuild.c
@@ -4105,22 +4105,6 @@
continue; /* don't pick the same node for entry and exit */
if (consider_exit_family && smartlist_isin(exit_family, r))
continue; /* avoid relays that are family members of our exit */
-#if 0 /* since EntryNodes is always strict now, this clause is moot */
- if (options->EntryNodes &&
- !routerset_contains_router(options->EntryNodes, r)) {
- /* We've come to the end of our preferred entry nodes. */
- if (smartlist_len(live_entry_guards))
- goto choose_and_finish; /* only choose from the ones we like */
- if (options->StrictNodes) {
- /* in theory this case should never happen, since
- * entry_guards_prepend_from_config() drops unwanted relays */
- tor_fragile_assert();
- } else {
- log_info(LD_CIRC,
- "No relays from EntryNodes available. Using others.");
- }
- }
-#endif
smartlist_add(live_entry_guards, r);
if (!entry->made_contact) {
/* Always start with the first not-yet-contacted entry
--- src/common/util.c.orig Fri Aug 26 19:10:58 2011
+++ src/common/util.c
@@ -334,7 +334,7 @@
long
tor_lround(double d)
{
- return lround(d);
+ return rint(d);
}
/** Returns floor(log2(u64)). If u64 is 0, (incorrectly) returns 0. */
==========
==========
Making all in common
In file included from address.c:44:
/usr/include/sys/param.h:213: warning: `MIN' redefined
compat.h:645: warning: this is the location of the previous definition
/usr/include/sys/param.h:214: warning: `MAX' redefined
compat.h:642: warning: this is the location of the previous definition
log.c:99: warning: `log_mutex' defined but not used
In file included from util.c:84:
/usr/include/malloc.h:2: warning: #warning "this file includes
<malloc.h> which is deprecated, use <stdlib.h> instead"
In file included from compat.c:65:
/usr/include/sys/param.h:213: warning: `MIN' redefined
compat.h:645: warning: this is the location of the previous definition
/usr/include/sys/param.h:214: warning: `MAX' redefined
compat.h:642: warning: this is the location of the previous definition
Making all in or
circuitbuild.c: In function `circuit_build_times_network_check_changed':
circuitbuild.c:1241: warning: use of `l' length character with `f'
type character
circuitbuild.c: In function `circuit_build_times_set_timeout':
circuitbuild.c:1418: warning: use of `l' length character with `f'
type character
circuitbuild.c:1441: warning: use of `l' length character with `f'
type character
circuitbuild.c:1452: warning: use of `l' length character with `f'
type character
circuitbuild.c:1459: warning: use of `l' length character with `f'
type character
control.c: In function `handle_control_attachstream':
control.c:2450: warning: `exit_digest' might be used uninitialized in
this function
control.c: In function `control_event_buildtimeout_set':
control.c:3722: warning: use of `l' length character with `f' type character
dirserv.c: In function `dirserv_compute_performance_thresholds':
dirserv.c:1952: warning: use of `l' length character with `f' type character
geoip.c: In function `geoip_dirreq_stats_write':
geoip.c:1029: warning: use of `l' length character with `f' type character
geoip.c:1031: warning: use of `l' length character with `f' type character
relay.c: In function `cell_ewma_set_scale_factor':
relay.c:2032: warning: use of `l' length character with `f' type character
rephist.c: In function `rep_hist_downrate_old_runs':
rephist.c:449: warning: use of `l' length character with `f' type character
rephist.c: In function `rep_hist_record_mtbf_data':
rephist.c:843: warning: use of `l' length character with `f' type character
rephist.c: In function `rep_hist_format_router_status':
rephist.c:905: warning: use of `l' length character with `f' type character
routerlist.c: In function `smartlist_choose_by_bandwidth_weights':
routerlist.c:1820: warning: use of `l' length character with `f' type character
routerlist.c:1828: warning: use of `l' length character with `f' type character
routerlist.c:1853: warning: use of `l' length character with `f' type character
routerlist.c: In function `smartlist_choose_by_bandwidth':
routerlist.c:2086: warning: use of `l' length character with `f' type character
routerparse.c: In function `router_parse_list_from_string':
routerparse.c:1167: warning: `signed_desc' might be used uninitialized
in this function
routerparse.c: In function `networkstatus_verify_bw_weights':
routerparse.c:2423: warning: use of `l' length character with `f' type character
routerparse.c:2428: warning: use of `l' length character with `f' type character
routerparse.c:2433: warning: use of `l' length character with `f' type character
routerparse.c:2438: warning: use of `l' length character with `f' type character
routerparse.c:2444: warning: use of `l' length character with `f' type character
routerparse.c:2450: warning: use of `l' length character with `f' type character
routerparse.c:2456: warning: use of `l' length character with `f' type character
routerparse.c:2517: warning: use of `l' length character with `f' type character
routerparse.c:2529: warning: use of `l' length character with `f' type character
routerparse.c:2541: warning: use of `l' length character with `f' type character
routerparse.c:2573: warning: use of `l' length character with `f' type character
routerparse.c:2586: warning: use of `l' length character with `f' type character
routerparse.c:2599: warning: use of `l' length character with `f' type character
routerparse.c:2613: warning: use of `l' length character with `f' type character
routerparse.c:2631: warning: use of `l' length character with `f' type character
routerparse.c:2643: warning: use of `l' length character with `f' type character
routerparse.c:2655: warning: use of `l' length character with `f' type character
routerparse.c:2668: warning: use of `l' length character with `f' type character
routerparse.c:2698: warning: use of `l' length character with `f' type character
routerparse.c:2711: warning: use of `l' length character with `f' type character
routerparse.c:2725: warning: use of `l' length character with `f' type character
routerparse.c:2740: warning: use of `l' length character with `f' type character
routerparse.c:2752: warning: use of `l' length character with `f' type character
routerparse.c:2764: warning: use of `l' length character with `f' type character
Making all in test
test.c: In function `test_circuit_timeout':
test.c:458: warning: use of `l' length character with `f' type character
test.c:473: warning: use of `l' length character with `f' type character
==========
_______________________________________________
tor-talk mailing list
tor-talk@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk