Explorar o código

Add extern support for file-scope variables in testsupport.h

Andrea Shepard %!s(int64=8) %!d(string=hai) anos
pai
achega
4e4a760491
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/common/testsupport.h

+ 2 - 0
src/common/testsupport.h

@@ -6,8 +6,10 @@
 
 #ifdef TOR_UNIT_TESTS
 #define STATIC
+#define EXTERN(type, name) extern type name;
 #else
 #define STATIC static
+#define EXTERN(type, name)
 #endif
 
 /** Quick and dirty macros to implement test mocking.