From 109c70dc60b763362923549beeef312324fefba4 Mon Sep 17 00:00:00 2001 From: Nicolas Hillegeer Date: Sat, 12 Jul 2014 14:56:04 +0200 Subject: test/preprocess: always declare EXTERN Unit tests never need to declare globals, only access them. In the main code base this is handled by including "vim.h". If a file wants to declare globals (in the case of neovim that's only main.c), it #define's EXTERN and includes "vim.h". Otherwise, a file just includes "vim.h" (that's the majority case). Since we want to be able to run unit tests without including "vim.h", we predefine "EXTERN" to mean extern. That way, we don't have to include "vim.h". --- test/unit/preprocess.moon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/preprocess.moon b/test/unit/preprocess.moon index aa74b8ce24..cb734da2f7 100644 --- a/test/unit/preprocess.moon +++ b/test/unit/preprocess.moon @@ -85,6 +85,8 @@ class Gcc '-D "__asm(ARGS)="', '-D "__asm__(ARGS)="', '-D "__inline__="', + '-D "EXTERN=extern"', + '-D "INIT(...)="', '-D_GNU_SOURCE', '-DINCLUDE_GENERATED_DECLARATIONS' } -- cgit