Always define NS_MODULE and NS_SUBMODULE when NS is used.

When these macros aren't defined, the expansions of the NS macros
can get particularly ugly.
This commit is contained in:
Nick Mathewson 2020-01-09 09:56:41 -05:00
parent e45810113b
commit 1ffba2f121
4 changed files with 7 additions and 1 deletions

View File

@ -95,6 +95,7 @@
#endif #endif
#define NS_MODULE dir #define NS_MODULE dir
#define NS_SUBMODULE tests
static networkstatus_t * static networkstatus_t *
networkstatus_parse_vote_from_string_(const char *s, networkstatus_parse_vote_from_string_(const char *s,

View File

@ -65,6 +65,7 @@ ENABLE_GCC_WARNING("-Woverlength-strings")
#endif #endif
#define NS_MODULE dir_handle_get #define NS_MODULE dir_handle_get
#define NS_SUBMODULE tests
#define NOT_FOUND "HTTP/1.0 404 Not found\r\n\r\n" #define NOT_FOUND "HTTP/1.0 404 Not found\r\n\r\n"
#define BAD_REQUEST "HTTP/1.0 400 Bad request\r\n\r\n" #define BAD_REQUEST "HTTP/1.0 400 Bad request\r\n\r\n"

View File

@ -35,7 +35,8 @@
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#define NS_MODULE test_options #define NS_MODULE opt
#define NS_SUBMODULE tests
typedef struct { typedef struct {
int severity; int severity;

View File

@ -31,6 +31,9 @@
#include "test/test.h" #include "test/test.h"
#include "test/log_test_helpers.h" #include "test/log_test_helpers.h"
#define NS_MODULE rtr
#define NS_SUBMODULE tests
NS_DECL(const routerinfo_t *, router_get_my_routerinfo, (void)); NS_DECL(const routerinfo_t *, router_get_my_routerinfo, (void));
static routerinfo_t* mock_routerinfo; static routerinfo_t* mock_routerinfo;