null+****@clear*****
null+****@clear*****
2012年 2月 28日 (火) 15:16:30 JST
Susumu Yata 2012-02-28 15:16:30 +0900 (Tue, 28 Feb 2012) New Revision: 346c07aa006fb1112b3365e2194407942a6a3052 Log: export implementations (classes) of grn_dat DLL. Modified files: lib/dat.cpp lib/dat/Makefile.am lib/dat/cursor-factory.hpp lib/dat/dat.hpp lib/dat/file-impl.cpp lib/dat/file.hpp lib/dat/id-cursor.hpp lib/dat/key-cursor.hpp lib/dat/predictive-cursor.hpp lib/dat/prefix-cursor.hpp lib/dat/trie.hpp test/unit/core/dat/test-trie.cpp Modified: lib/dat.cpp (+1 -0) =================================================================== --- lib/dat.cpp 2012-02-28 13:35:01 +0900 (2422577) +++ lib/dat.cpp 2012-02-28 15:16:30 +0900 (e6ae4d3) @@ -24,6 +24,7 @@ #include "dat.h" #include "util.h" +#define GRN_DAT_EXPORT #include "dat/trie.hpp" #include "dat/cursor-factory.hpp" Modified: lib/dat/Makefile.am (+1 -1) =================================================================== --- lib/dat/Makefile.am 2012-02-28 13:35:01 +0900 (66bb5e5) +++ lib/dat/Makefile.am 2012-02-28 15:16:30 +0900 (6c65a07) @@ -1,4 +1,4 @@ -DEFS += -D_REENTRANT $(GRN_DEFS) +DEFS += -D_REENTRANT $(GRN_DEFS) -DGRN_DAT_EXPORT DEFAULT_INCLUDES = \ -I$(top_builddir) \ Modified: lib/dat/cursor-factory.hpp (+1 -1) =================================================================== --- lib/dat/cursor-factory.hpp 2012-02-28 13:35:01 +0900 (05a8624) +++ lib/dat/cursor-factory.hpp 2012-02-28 15:16:30 +0900 (9c99ce3) @@ -25,7 +25,7 @@ namespace dat { class Trie; -class CursorFactory { +class GRN_DAT_API CursorFactory { public: static Cursor *open(const Trie &trie, const void *min_ptr, UInt32 min_length, Modified: lib/dat/dat.hpp (+12 -0) =================================================================== --- lib/dat/dat.hpp 2012-02-28 13:35:01 +0900 (4921b96) +++ lib/dat/dat.hpp 2012-02-28 15:16:30 +0900 (705223b) @@ -29,6 +29,18 @@ #include <iostream> #endif // _DEBUG +#ifndef GRN_DAT_API + #ifdef WIN32 + #ifdef GRN_DAT_EXPORT + #define GRN_DAT_API __declspec(dllexport) + #else // GRN_DAT_EXPORT + #define GRN_DAT_API __declspec(dllimport) + #endif // GRN_DAT_EXPORT + #else // WIN32 + #define GRN_DAT_API + #endif // WIN32 +#endif // GRN_DAT_API + namespace grn { namespace dat { Modified: lib/dat/file-impl.cpp (+0 -2) =================================================================== --- lib/dat/file-impl.cpp 2012-02-28 13:35:01 +0900 (b891cf5) +++ lib/dat/file-impl.cpp 2012-02-28 15:16:30 +0900 (5b89a2f) @@ -15,8 +15,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <groonga_in.h> - #include "file-impl.hpp" #include <sys/types.h> Modified: lib/dat/file.hpp (+1 -1) =================================================================== --- lib/dat/file.hpp 2012-02-28 13:35:01 +0900 (91175c6) +++ lib/dat/file.hpp 2012-02-28 15:16:30 +0900 (1107b50) @@ -27,7 +27,7 @@ namespace dat { // memory-mapped I/O. class FileImpl; -class File { +class GRN_DAT_API File { public: File(); ~File(); Modified: lib/dat/id-cursor.hpp (+1 -1) =================================================================== --- lib/dat/id-cursor.hpp 2012-02-28 13:35:01 +0900 (7e0a423) +++ lib/dat/id-cursor.hpp 2012-02-28 15:16:30 +0900 (7f39ef6) @@ -25,7 +25,7 @@ namespace dat { class Trie; -class IdCursor : public Cursor { +class GRN_DAT_API IdCursor : public Cursor { public: IdCursor(); ~IdCursor(); Modified: lib/dat/key-cursor.hpp (+1 -1) =================================================================== --- lib/dat/key-cursor.hpp 2012-02-28 13:35:01 +0900 (81ed6ef) +++ lib/dat/key-cursor.hpp 2012-02-28 15:16:30 +0900 (5b1fbad) @@ -26,7 +26,7 @@ namespace dat { class Trie; -class KeyCursor : public Cursor { +class GRN_DAT_API KeyCursor : public Cursor { public: KeyCursor(); ~KeyCursor(); Modified: lib/dat/predictive-cursor.hpp (+1 -1) =================================================================== --- lib/dat/predictive-cursor.hpp 2012-02-28 13:35:01 +0900 (7110404) +++ lib/dat/predictive-cursor.hpp 2012-02-28 15:16:30 +0900 (4bc9d71) @@ -26,7 +26,7 @@ namespace dat { class Trie; -class PredictiveCursor : public Cursor { +class GRN_DAT_API PredictiveCursor : public Cursor { public: PredictiveCursor(); ~PredictiveCursor(); Modified: lib/dat/prefix-cursor.hpp (+1 -1) =================================================================== --- lib/dat/prefix-cursor.hpp 2012-02-28 13:35:01 +0900 (630e5b0) +++ lib/dat/prefix-cursor.hpp 2012-02-28 15:16:30 +0900 (5ea14ae) @@ -26,7 +26,7 @@ namespace dat { class Trie; -class PrefixCursor : public Cursor { +class GRN_DAT_API PrefixCursor : public Cursor { public: PrefixCursor(); ~PrefixCursor(); Modified: lib/dat/trie.hpp (+1 -1) =================================================================== --- lib/dat/trie.hpp 2012-02-28 13:35:01 +0900 (048846f) +++ lib/dat/trie.hpp 2012-02-28 15:16:30 +0900 (5e1748e) @@ -29,7 +29,7 @@ namespace grn { namespace dat { -class Trie { +class GRN_DAT_API Trie { public: Trie(); ~Trie(); Modified: test/unit/core/dat/test-trie.cpp (+4 -0) =================================================================== --- test/unit/core/dat/test-trie.cpp 2012-02-28 13:35:01 +0900 (9ffabea) +++ test/unit/core/dat/test-trie.cpp 2012-02-28 15:16:30 +0900 (203e3c1) @@ -20,6 +20,10 @@ #include <glib/gstdio.h> #include <cppcutter.h> +#ifdef UINT32_MAX + #undef UINT32_MAX +#endif // UINT32_MAX + #include <grn-assertions.h> #include <dat/trie.hpp>