Loading src/common/util.h +1 −6 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include "lib/string/scanf.h" #include "lib/intmath/bits.h" #include "lib/intmath/addsub.h" #include "lib/intmath/logic.h" #include "lib/intmath/muldiv.h" #include "lib/intmath/cmp.h" #include "lib/log/ratelim.h" Loading @@ -54,12 +55,6 @@ #define SUBTYPE_P(p, subtype, basemember) \ ((void*) ( ((char*)(p)) - offsetof(subtype, basemember) )) /* Logic */ /** Macro: true if two values have the same boolean value. */ #define bool_eq(a,b) (!(a)==!(b)) /** Macro: true if two values have different boolean values. */ #define bool_neq(a,b) (!(a)!=!(b)) /* Math functions */ /* String manipulation */ Loading src/lib/intmath/include.am +1 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,6 @@ noinst_HEADERS += \ src/lib/intmath/addsub.h \ src/lib/intmath/cmp.h \ src/lib/intmath/bits.h \ src/lib/intmath/logic.h \ src/lib/intmath/muldiv.h \ src/lib/intmath/weakrng.h src/lib/intmath/logic.h 0 → 100644 +14 −0 Original line number Diff line number Diff line /* Copyright (c) 2003-2004, Roger Dingledine * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ #ifndef HAVE_TOR_LOGIC_H #define HAVE_TOR_LOGIC_H /** Macro: true if two values have the same boolean value. */ #define bool_eq(a,b) (!(a)==!(b)) /** Macro: true if two values have different boolean values. */ #define bool_neq(a,b) (!(a)!=!(b)) #endif Loading
src/common/util.h +1 −6 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include "lib/string/scanf.h" #include "lib/intmath/bits.h" #include "lib/intmath/addsub.h" #include "lib/intmath/logic.h" #include "lib/intmath/muldiv.h" #include "lib/intmath/cmp.h" #include "lib/log/ratelim.h" Loading @@ -54,12 +55,6 @@ #define SUBTYPE_P(p, subtype, basemember) \ ((void*) ( ((char*)(p)) - offsetof(subtype, basemember) )) /* Logic */ /** Macro: true if two values have the same boolean value. */ #define bool_eq(a,b) (!(a)==!(b)) /** Macro: true if two values have different boolean values. */ #define bool_neq(a,b) (!(a)!=!(b)) /* Math functions */ /* String manipulation */ Loading
src/lib/intmath/include.am +1 −0 Original line number Diff line number Diff line Loading @@ -20,5 +20,6 @@ noinst_HEADERS += \ src/lib/intmath/addsub.h \ src/lib/intmath/cmp.h \ src/lib/intmath/bits.h \ src/lib/intmath/logic.h \ src/lib/intmath/muldiv.h \ src/lib/intmath/weakrng.h
src/lib/intmath/logic.h 0 → 100644 +14 −0 Original line number Diff line number Diff line /* Copyright (c) 2003-2004, Roger Dingledine * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ #ifndef HAVE_TOR_LOGIC_H #define HAVE_TOR_LOGIC_H /** Macro: true if two values have the same boolean value. */ #define bool_eq(a,b) (!(a)==!(b)) /** Macro: true if two values have different boolean values. */ #define bool_neq(a,b) (!(a)!=!(b)) #endif