From 9d3fb7553014196b3eb5aa41b3a56150cee89065 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Thu, 18 Sep 2014 19:43:19 -0700
Subject: [PATCH] rtcd: relocate 'extern "C" {' declaration

Place after pulling in forward declarations from the codec. This fixes
compilation of the tests under vs9.

Since
10783d4 Adds high bitdepth transform functions and tests
where vp9_idct.h was added to vp9_rtcd.h the tests are pulling in
vp9_systemdependent.h, which under visual studio include intrin.h. With
VS9 these include headers which define helper classes for intel
intrinsics. When including it in the tests (via vp9_rtcd.h) __cplusplus
is defined but vp9_rtcd.h would wrap declarations in 'extern "C" {'
causing a mismatch in linkage which resulted in compilation failure.

Change-Id: I475e50198b71320e8606bc95c9454876d8799ede
---
 build/make/rtcd.pl | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
index 40bcb33d00..1ed6895762 100755
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -209,14 +209,16 @@ sub common_top() {
 #define RTCD_EXTERN extern
 #endif
 
+EOF
+
+process_forward_decls();
+print <<EOF;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 EOF
-
-process_forward_decls();
-print "\n";
 declare_function_pointers("c", @ALL_ARCHS);
 
 print <<EOF;
-- 
GitLab