1
0
Fork 0
mirror of https://github.com/pissnet/pissircd.git synced 2024-06-05 07:48:44 +01:00

Win32 module fixes for ssl/zip/curl

This commit is contained in:
codemastr 2004-05-13 16:39:23 +00:00
parent 45a5bd231f
commit a49e227bd4
6 changed files with 30 additions and 16 deletions

View file

@ -3155,3 +3155,4 @@ This is the 3.2 fixes branch.
- Module coders can code 3rd party cloak modules that use other algorithms or cloak
in a different way (have a look at src/modules/cloak.c).
- spamfilter: Added Bloodhound.Exploit.6 sig
- Compile fixes for win32 modules with ssl/zip/curl

View file

@ -585,7 +585,7 @@ extern time_t rfc2time(char *s);
extern char *rfctime(time_t t, char *buf);
extern void *MyMallocEx(size_t size);
#ifdef USE_SSL
extern char *ssl_get_cipher(SSL *ssl);
extern MODFUNC char *ssl_get_cipher(SSL *ssl);
#endif
extern long config_checkval(char *value, unsigned short flags);
extern void config_status(char *format, ...) __attribute__((format(printf,1,2)));

View file

@ -32,4 +32,12 @@ typedef char (*cFP)(); /* char * function pointer */
#endif
#endif
#ifndef MODFUNC
#ifdef _WIN32
#define MODFUNC __declspec(dllexport)
#else
#define MODFUNC
#endif
#endif
#endif

View file

@ -1,11 +1,12 @@
#ifndef URL_H
#define URL_H
#include "types.h"
int url_is_valid(char *);
char *url_getfilename(char *);
char *download_file(char *, char **);
void download_file_async(char *, time_t, vFP);
void url_do_transfers_async(void);
void url_init(void);
int MODFUNC url_is_valid(char *);
char MODFUNC *url_getfilename(char *);
char MODFUNC *download_file(char *, char **);
void MODFUNC download_file_async(char *, time_t, vFP);
void MODFUNC url_do_transfers_async(void);
void MODFUNC url_init(void);
#endif

View file

@ -54,7 +54,7 @@ struct Zdata {
#endif /* ZIP_LINKS */
extern int zip_init(struct Client *, int);
extern void zip_free(struct Client *);
extern char *unzip_packet(struct Client *, char *, int *);
extern char *zip_buffer(struct Client *, char *, int *, int);
extern MODFUNC int zip_init(struct Client *, int);
extern MODFUNC void zip_free(struct Client *);
extern MODFUNC char *unzip_packet(struct Client *, char *, int *);
extern MODFUNC char *zip_buffer(struct Client *, char *, int *, int);

View file

@ -116,9 +116,11 @@ LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
dbghelp.lib oldnames.lib libcmt.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
$(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \
/nodefaultlib /nologo $(DBGLFLAG) /out:WIRCD.EXE
MODCFLAGS=$(MODDBGCFLAG) /Fesrc/modules/ /Fosrc/modules/ /nologo /I ./INCLUDE \
/D DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE
MODLFLAGS=/link /def:src/modules/module.def wircd.lib
MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fesrc/modules/ \
/Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE
MODLFLAGS=/link /def:src/modules/module.def wircd.lib $(OPENSSL_LIB) $(SSLLIBS) \
$(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
@ -438,8 +440,10 @@ SYMBOLFILE:
MODULES: $(DLL_FILES)
src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
$(CC) /LDd /nologo /Fosrc/modules/ /I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE \
$(MOD_FILES) $(MODLFLAGS) /OUT:src/modules/commands.dll
$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
$(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fosrc/modules/ \
/I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE $(MOD_FILES) \
$(MODLFLAGS) /OUT:src/modules/commands.dll
src/modules/m_chghost.dll: src/modules/m_chghost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chghost.c $(MODLFLAGS)