summaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-06 20:34:47 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-14 16:07:36 -0500
commitd32795bb6ebdfbf05180d7552d4cd18cb33ddcee (patch)
treea3938789b8184723865b9468ea49279f31127713 /src/ext
parente429e31ad1c3000d814f3172fcd3f7c433ee3219 (diff)
downloadtor-d32795bb6ebdfbf05180d7552d4cd18cb33ddcee.tar.gz
tor-d32795bb6ebdfbf05180d7552d4cd18cb33ddcee.zip
Make "ext" participate in may_include.
Also, resolve a circular dependency involving the use of lib/log by csiphash.c.
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/.may_include10
-rw-r--r--src/ext/csiphash.c10
-rw-r--r--src/ext/readpassphrase.c2
3 files changed, 16 insertions, 6 deletions
diff --git a/src/ext/.may_include b/src/ext/.may_include
new file mode 100644
index 0000000000..1eafff2eeb
--- /dev/null
+++ b/src/ext/.may_include
@@ -0,0 +1,10 @@
+
+orconfig.h
+
+lib/err/*.h
+lib/cc/*.h
+
+tinytest*.h
+ext/siphash.h
+ext/byteorder.h
+ext/tor_readpassphrase.h \ No newline at end of file
diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index a6a9846db4..af8559a476 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -30,12 +30,12 @@
*/
#include "lib/cc/torint.h"
-#include "lib/log/util_bug.h"
+#include "lib/err/torerr.h"
-#include "siphash.h"
+#include "ext/siphash.h"
#include <string.h>
#include <stdlib.h>
-#include "byteorder.h"
+#include "ext/byteorder.h"
#define ROTATE(x, b) (uint64_t)( ((x) << (b)) | ( (x) >> (64 - (b))) )
@@ -112,13 +112,13 @@ static int the_siphash_key_is_set = 0;
static struct sipkey the_siphash_key;
uint64_t siphash24g(const void *src, unsigned long src_sz) {
- tor_assert(the_siphash_key_is_set);
+ raw_assert(the_siphash_key_is_set);
return siphash24(src, src_sz, &the_siphash_key);
}
void siphash_set_global_key(const struct sipkey *key)
{
- tor_assert(! the_siphash_key_is_set);
+ raw_assert(! the_siphash_key_is_set);
the_siphash_key.k0 = key->k0;
the_siphash_key.k1 = key->k1;
the_siphash_key_is_set = 1;
diff --git a/src/ext/readpassphrase.c b/src/ext/readpassphrase.c
index e0df05d7b7..16611af1e2 100644
--- a/src/ext/readpassphrase.c
+++ b/src/ext/readpassphrase.c
@@ -30,7 +30,7 @@
#include <signal.h>
#include <ctype.h>
#include <fcntl.h>
-#include "tor_readpassphrase.h"
+#include "ext/tor_readpassphrase.h"
#include <errno.h>
#include <string.h>
#include <unistd.h>