Explorar el Código

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

Andrea Shepard hace 8 años
padre
commit
4e4a760491
Se han modificado 1 ficheros con 2 adiciones y 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.