git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1bb287)
Improve STRINGS_H macro test for MSVC extensions.
Sun, 5 Mar 2006 04:43:57 +0000 (04:43 +0000)
Sun, 5 Mar 2006 04:43:57 +0000 (04:43 +0000)
Add DLLIMPORT for V1 headers, in case Win32 don't export all symbols.


diff --git a/src/include/c.h b/src/include/c.h
index fcab5cbd56188fe217fb0c7ee6fdae7ab29f2432..69a15e1df57a4ebc280293bf2bf148e340cd6390 100644 (file)
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/c.h,v 1.197 2006年03月03日 21:35:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.198 2006年03月05日 04:43:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,6 +57,8 @@
#else
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_CLIENT_ONLY
+/* Some use MinGW-generated pg_config.h but MSVC for extensions. */
+#undef HAVE_STRINGS_H
#endif
#endif
#include "postgres_ext.h"
@@ -66,8 +68,7 @@
#include <string.h>
#include <stddef.h>
#include <stdarg.h>
-/* Some use MinGW-generated pg_config.h but MSVC for extensions. */
-#if defined(HAVE_STRINGS_H) && !defined(WIN32_CLIENT_ONLY)
+#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <sys/types.h>
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index b7a85f15f5e2dda6f4e98fddf11e9d0d77c54933..07aa052c6dd42ae0287748b181dabde4a62ff6b6 100644 (file)
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.40 2005年10月15日 02:49:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/fmgr.h,v 1.41 2006年03月05日 04:43:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -293,10 +293,13 @@ typedef struct
/* Expected signature of an info function */
typedef Pg_finfo_record *(*PGFInfoFunction) (void);
-/* Macro to build an info function associated with the given function name */
-
+/*
+ * Macro to build an info function associated with the given function name.
+ * Win32 loadable functions usually link with 'dlltool --export-all', but it
+ * doesn't hurt to add DLLIMPORT in case they don't.
+ */
#define PG_FUNCTION_INFO_V1(funcname) \
-extern Pg_finfo_record * CppConcat(pg_finfo_,funcname) (void); \
+extern DLLIMPORT Pg_finfo_record * CppConcat(pg_finfo_,funcname) (void); \
Pg_finfo_record * \
CppConcat(pg_finfo_,funcname) (void) \
{ \
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /