Use pragma aux to export valid names from DLL in Watcom

This commit is contained in:
z3APA3A committed 2016-12-12 19:49:58 +03:00
1 parent a9fb0ea969
commit 945c30c5ee
13 files changed
+88 -41

No files matched your search

+5 -5
View File
@@ -878,13 +878,13 @@ static struct commands file_commandhandlers[] = {
static int file_loaded=0;
#ifdef _WIN32
__declspec(dllexport)
#ifdef WATCOM
#pragma aux file_plugin "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
int file_plugin (struct pluginlink * pluginlink,
PLUGINAPI int PLUGINCALL file_plugin (struct pluginlink * pluginlink,
int argc, char** argv){
if(!file_loaded){
+8 -3
View File
@@ -677,13 +677,18 @@ static struct commands lfm_commandhandlers[] = {
{NULL, "lfm_format", h_lfm_format, 2, 2}
};
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
__declspec(dllexport)
#ifdef WATCOM
#pragma aux lfm_plugin "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
int lfm_plugin( struct pluginlink * pluginlink, int argc, char** argv )
PLUGINAPI int PLUGINCALL lfm_plugin( struct pluginlink * pluginlink, int argc, char** argv )
{
pl = pluginlink;
myOutputDebugStringA1( "lfm_plugin" );
+7 -6
View File
@@ -457,15 +457,16 @@ int h_dircount(int argc, unsigned char ** argv)
/*------------------------------- MAIN --------------------------------------
start plugin init */
#ifdef _WIN32
__declspec(dllexport) int start(struct pluginlink * pluginlink,
int argc, char** argv)
#else
int start(struct pluginlink * pluginlink,
#ifdef WATCOM
#pragma aux start "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
PLUGINAPI int PLUGINCALL start(struct pluginlink * pluginlink,
int argc, char** argv)
#endif
{
+6 -3
View File
@@ -358,12 +358,15 @@ static struct symbol regexp_symbols[] = {
{NULL, "pcre_free", NULL},
};
#ifdef _WIN32
__declspec(dllexport)
#ifdef WATCOM
#pragma aux pcre_plugin "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
int pcre_plugin (struct pluginlink * pluginlink,
PLUGINAPI int PLUGINCALL pcre_plugin (struct pluginlink * pluginlink,
int argc, char** argv){
struct filter *flt, *tmpflt;
pl = pluginlink;
pcre_options = 0;
+7 -1
View File
@@ -117,9 +117,15 @@ static int pamfunc(struct clientparam *param)
}
#ifdef WATCOM
#pragma aux start "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
/*------------------------------- MAIN --------------------------------------
start plugin init */
int start(struct pluginlink * pluginlink, int argc, unsigned char** argv)
PLUGINAPI int PLUGINCALL start(struct pluginlink * pluginlink, int argc, unsigned char** argv)
{
+6 -3
View File
@@ -372,12 +372,15 @@ static struct commands ssl_commandhandlers[] = {
};
#ifdef _WIN32
__declspec(dllexport)
#ifdef WATCOM
#pragma aux ssl_plugin "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
int ssl_plugin (struct pluginlink * pluginlink,
PLUGINAPI int PLUGINCALL ssl_plugin (struct pluginlink * pluginlink,
int argc, char** argv){
pl = pluginlink;
if(!ssl_loaded){
ssl_loaded = 1;
+7 -8
View File
@@ -164,17 +164,16 @@ BOOL WINAPI DllMain( HINSTANCE hModule,
return TRUE;
}
__declspec(dllexport) int start(struct pluginlink * pluginlink,
int argc, char** argv)
#else
int start(struct pluginlink * pluginlink,
int argc, char** argv)
#endif
#ifdef WATCOM
#pragma aux start "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
PLUGINAPI int PLUGINCALL start(struct pluginlink * pluginlink,
int argc, char** argv)
{
FILE *f=NULL;
+8 -3
View File
@@ -266,11 +266,16 @@ BOOL WINAPI DllMain( HINSTANCE hModule,
return TRUE;
}
__declspec(dllexport)
#endif
int start(struct pluginlink * pluginlink, int argc, char** argv) {
#ifdef WATCOM
#pragma aux start "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
PLUGINAPI int PLUGINCALL start(struct pluginlink * pluginlink, int argc, char** argv) {
struct commands * starthandler;
conf = pluginlink->conf;
commandhandlers = pluginlink->commandhandlers;
@@ -89,11 +89,13 @@ static struct filter transparent_filter = {
};
#ifdef _WIN32
__declspec(dllexport)
#ifdef WATCOM
#pragma aux transparent_plugin "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
int transparent_plugin (struct pluginlink * pluginlink,
PLUGINAPI int PLUGINCALL transparent_plugin (struct pluginlink * pluginlink,
int argc, char** argv){
pl = pluginlink;
if(!transparent_loaded){
@@ -58,7 +58,13 @@ extern "C" {
return 7;
}
__declspec(dllexport) int WindowsAuthentication(struct pluginlink * pluginlink, int argc, char** argv){
#ifdef WATCOM
#pragma aux WindowsAuthentication "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
PLUGINAPI int PLUGINCALL WindowsAuthentication(struct pluginlink * pluginlink, int argc, char** argv){
char tmpbuf[4096];
DWORD dlen, sidlen;
SID_NAME_USE snu;
+6 -1
View File
@@ -62,8 +62,13 @@ unsigned char * conv_utf8_to_cp1251(unsigned char *s){
}
#ifdef WATCOM
#pragma aux utf8tocp1251 "*" parm caller [ ] value struct float struct routine [eax] modify [eax ecx edx]
#undef PLUGINCALL
#define PLUGINCALL
#endif
__declspec(dllexport) int utf8tocp1251(struct pluginlink * pluginlink, int argc, char** argv){
PLUGINAPI int PLUGINCALL utf8tocp1251(struct pluginlink * pluginlink, int argc, char** argv){
static int loaded = 0;