mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Compatibility with Watcom's DLL exports for plugins
This commit is contained in:
parent
88263ebde9
commit
c650d32206
@ -100,17 +100,7 @@ int savecouters(void)
|
||||
|
||||
return (0);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport) int start(struct pluginlink * pluginlink,
|
||||
int argc, char** argv);
|
||||
#else
|
||||
|
||||
int start(struct pluginlink * pluginlink,
|
||||
int argc, char** argv);
|
||||
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------------*/
|
||||
static int ldapfunc(struct clientparam *param)
|
||||
@ -467,7 +457,15 @@ int h_dircount(int argc, unsigned char ** argv)
|
||||
|
||||
/*------------------------------- MAIN --------------------------------------
|
||||
start plugin init */
|
||||
int start(struct pluginlink * pluginlink, int argc, char** argv)
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport) int start(struct pluginlink * pluginlink,
|
||||
int argc, char** argv)
|
||||
#else
|
||||
|
||||
int start(struct pluginlink * pluginlink,
|
||||
int argc, char** argv)
|
||||
|
||||
#endif
|
||||
{
|
||||
|
||||
|
||||
|
@ -151,8 +151,6 @@ static int restore_old_table(void * v)
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport) int start(struct pluginlink * pluginlink,
|
||||
int argc, char** argv);
|
||||
BOOL WINAPI DllMain( HINSTANCE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
@ -165,17 +163,18 @@ 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);
|
||||
|
||||
int argc, char** argv)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*---------------------- start plugin init ------------------------------ */
|
||||
int start(struct pluginlink * pluginlink, int argc, char** argv)
|
||||
{
|
||||
FILE *f=NULL;
|
||||
|
||||
|
@ -15,10 +15,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) int WindowsAuthentication(struct pluginlink * pluginlink,
|
||||
int argc, char** argv);
|
||||
|
||||
|
||||
static struct auth alwaysauth;
|
||||
|
||||
static char sidbuf[4096];
|
||||
@ -62,12 +58,7 @@ extern "C" {
|
||||
return 7;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int WindowsAuthentication(struct pluginlink * pluginlink, int argc, char** argv){
|
||||
__declspec(dllexport) int WindowsAuthentication(struct pluginlink * pluginlink, int argc, char** argv){
|
||||
char tmpbuf[4096];
|
||||
DWORD dlen, sidlen;
|
||||
SID_NAME_USE snu;
|
||||
@ -91,4 +82,7 @@ int WindowsAuthentication(struct pluginlink * pluginlink, int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -14,9 +14,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) int utf8tocp1251(struct pluginlink * pluginlink,
|
||||
int argc, char** argv);
|
||||
|
||||
static struct auth alwaysauth;
|
||||
|
||||
|
||||
@ -64,12 +61,9 @@ unsigned char * conv_utf8_to_cp1251(unsigned char *s){
|
||||
return 4;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int utf8tocp1251(struct pluginlink * pluginlink, int argc, char** argv){
|
||||
__declspec(dllexport) int utf8tocp1251(struct pluginlink * pluginlink, int argc, char** argv){
|
||||
static int loaded = 0;
|
||||
|
||||
|
||||
@ -85,4 +79,7 @@ int utf8tocp1251(struct pluginlink * pluginlink, int argc, char** argv){
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user