I suggest that the whole body of this file gets included inside an "#ifdef CURVE25519_ENABLED" in-case someone (like me!) inadvertently tries to compile it w/o this define set. Patch:
--- Git-latest\src\or\onion_ntor.c Tue Feb 12 18:40:04 2013 +++ or\onion_ntor.c Tue Feb 12 23:46:51 2013 @@ -9,6 +9,8 @@ #include "torlog.h" #include "util.h"
+#ifdef CURVE25519_ENABLED /* Rest of file */ + /** Free storage held in an ntor handshake state. */ void ntor_handshake_state_free(ntor_handshake_state_t *state) @@ -292,4 +294,4 @@ memwipe(&s, 0, sizeof(s)); return bad ? -1 : 0; } - +#endif /* CURVE25519_ENABLED */
--gv
On Tue, Feb 12, 2013 at 5:53 PM, Gisle Vanem gvanem@broadpark.no wrote:
I suggest that the whole body of this file gets included inside an "#ifdef CURVE25519_ENABLED" in-case someone (like me!) inadvertently tries to compile it w/o this define set. Patch:
NAK on this patch -- it doesn't make sense IMO to do this without doing the same thing for the other dozen or so conditionally-compiled files.
There *is* a reason to take a more general patch of this kind (that is, one that would cover all of the conditionally-compiled files): it would let people who want to edit Tor with IDEs that like to compile all the files they edit do so without having their IDEs complain about files that can't build. That's not how I work personally, but I've got nothing against people who work that way, so I'd be happy to take that kind of a patch in 0.2.5 or later. Just opened a ticket as
https://trac.torproject.org/projects/tor/ticket/8278
so we don't forget.
best wishes, -- Nick