From 1535731a0b84cb4e5e72b233f792d5b5c6ec7fee Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@wien.gv.at>
Date: Wed, 12 Oct 2016 10:30:26 +0200
Subject: [PATCH] Add PGDLLEXPORT to function declaration in PG_FUNCTION_INFO_V1

That way functions declared with the version-1 calling convention
will automatically be exported on Windows.
---
 src/include/fmgr.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 0491e2e..6e37a95 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -348,7 +348,7 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
  *	doesn't hurt to add PGDLLIMPORT in case they don't.
  */
 #define PG_FUNCTION_INFO_V1(funcname) \
-Datum funcname(PG_FUNCTION_ARGS); \
+PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS); \
 extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
 const Pg_finfo_record * \
 CppConcat(pg_finfo_,funcname) (void) \
-- 
1.7.1

