Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BSD Stupidity

  • Loading branch information...
commit 1bebbd67a3e79603affd5a1a65a5a84a5547aabe 1 parent 357b1ef
Caleb James DeLisle authored
View
7 cmake/modules/FindLibuv.cmake
@@ -97,7 +97,12 @@ if (NOT LIBUV_FOUND AND "$ENV{NO_STATIC}" STREQUAL "")
if (APPLE)
set(MAKE_COMMAND "make")
else ()
- separate_arguments(MAKE_COMMAND UNIX_COMMAND "CFLAGS=-fPIC make")
+ if (BSD)
+ set(make gmake)
+ else()
+ set(make make)
+ endif ()
+ separate_arguments(MAKE_COMMAND UNIX_COMMAND "CFLAGS=-fPIC ${make}")
endif ()
ExternalProject_Add(libuv_ep
View
38 contrib/python/dumptable
@@ -15,49 +15,13 @@ from cjdns import cjdns_connectWithAdminInfo;
cjdns = cjdns_connectWithAdminInfo();
-class route:
- def __init__(self, ip, name, path, link):
- self.ip = ip
- self.name = name
- route = path
- route = route.replace('.','')
- route = route.replace('0','x')
- route = route.replace('1','y')
- route = route.replace('f','1111')
- route = route.replace('e','1110')
- route = route.replace('d','1101')
- route = route.replace('c','1100')
- route = route.replace('b','1011')
- route = route.replace('a','1010')
- route = route.replace('9','1001')
- route = route.replace('8','1000')
- route = route.replace('7','0111')
- route = route.replace('6','0110')
- route = route.replace('5','0101')
- route = route.replace('4','0100')
- route = route.replace('3','0011')
- route = route.replace('2','0010')
- route = route.replace('y','0001')
- route = route.replace('x','0000')
- self.route = route[::-1].rstrip('0')[:-1]
- self.quality = link / 5366870.0 # LINK_STATE_MULTIPLIER
-
- def find_parent(self, routes):
- parents = [(len(other.route),other) for other in routes if self.route.startswith(other.route) and self != other]
-
- parents.sort(reverse=True)
- if parents:
- parent = parents[0][1]
- return parent
- return None
-
routes = [];
names = {};
i = 0;
while True:
table = cjdns.NodeStore_dumpTable(i)
for r in table['routingTable']:
- print r['ip'] + '@' + r['path']
+ print(r['ip'] + ' ' + r['path'] + ' ' + str(r['link']) + ' ' + str(r['version']));
if not 'more' in table:
break
i += 1
View
4 crypto/random/seed/BsdKernArndSysctlRandomSeed.c
@@ -29,10 +29,10 @@ static int get(struct RandomSeed* randomSeed, uint64_t output[8])
{
int mib[] = { CTL_KERN, KERN_ARND };
Bits_memset(output, 0, 64);
- int len = 64;
+ size_t len = 64;
if (sysctl(mib, 2, output, &len, NULL, 0) == -1) {
// TOR/Libevent retry this 4 bytes at a time if it fails initially.
- int four = 4;
+ size_t four = 4;
int tries = 0;
union {
uint64_t longs[8];
Please sign in to comment.
Something went wrong with that request. Please try again.