aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lexilla/src/Lexilla.cxx10
-rw-r--r--lexilla/src/Lexilla.def5
-rw-r--r--lexilla/src/lexilla.mak2
3 files changed, 12 insertions, 5 deletions
diff --git a/lexilla/src/Lexilla.cxx b/lexilla/src/Lexilla.cxx
index 2cc1ed7c9..cff38fa01 100644
--- a/lexilla/src/Lexilla.cxx
+++ b/lexilla/src/Lexilla.cxx
@@ -12,8 +12,10 @@
#if _WIN32
#define EXPORT_FUNCTION __declspec(dllexport)
+#define CALLING_CONVENTION __stdcall
#else
#define EXPORT_FUNCTION __attribute__((visibility("default")))
+#define CALLING_CONVENTION
#endif
#include "ILexer.h"
@@ -305,12 +307,12 @@ void AddEachLexer() {
extern "C" {
-int EXPORT_FUNCTION GetLexerCount() {
+EXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() {
AddEachLexer();
return catalogueLexilla.Count();
}
-void EXPORT_FUNCTION GetLexerName(unsigned int index, char *name, int buflength) {
+EXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) {
AddEachLexer();
*name = 0;
const char *lexerName = catalogueLexilla.Name(index);
@@ -319,12 +321,12 @@ void EXPORT_FUNCTION GetLexerName(unsigned int index, char *name, int buflength)
}
}
-LexerFactoryFunction EXPORT_FUNCTION GetLexerFactory(unsigned int index) {
+EXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) {
AddEachLexer();
return catalogueLexilla.Factory(index);
}
-ILexer5 EXPORT_FUNCTION *CreateLexer(const char *name) {
+EXPORT_FUNCTION ILexer5 * CALLING_CONVENTION CreateLexer(const char *name) {
AddEachLexer();
for (unsigned int i = 0; i < catalogueLexilla.Count(); i++) {
const char *lexerName = catalogueLexilla.Name(i);
diff --git a/lexilla/src/Lexilla.def b/lexilla/src/Lexilla.def
new file mode 100644
index 000000000..4455c7a82
--- /dev/null
+++ b/lexilla/src/Lexilla.def
@@ -0,0 +1,5 @@
+EXPORTS
+ GetLexerCount
+ GetLexerName
+ GetLexerFactory
+ CreateLexer
diff --git a/lexilla/src/lexilla.mak b/lexilla/src/lexilla.mak
index d1d03de2f..90ba13750 100644
--- a/lexilla/src/lexilla.mak
+++ b/lexilla/src/lexilla.mak
@@ -208,7 +208,7 @@ LEXILLA_OBJS=\
$(LEX_OBJS)
$(LEXILLA): $(LEXILLA_OBJS) LexillaVersion.res
- $(LD) $(LDFLAGS) -DLL -OUT:$@ $** $(LIBS)
+ $(LD) $(LDFLAGS) -DEF:Lexilla.def -DLL -OUT:$@ $** $(LIBS)
$(LIBLEXILLA): $(LEXILLA_OBJS)
LIB -OUT:$@ $**