1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 17:56:38 +02:00

A few more Win32 fixes, Anope 1.9 compiles and runs under Windows now.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1799 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2008-11-26 22:13:01 +00:00
parent 797edb40ba
commit 2e41f43ace
6 changed files with 23 additions and 29 deletions
+2 -12
View File
@@ -15,18 +15,8 @@
#ifndef EXTERN_H
#define EXTERN_H
#ifndef _WIN32
#define E extern
#define EI extern
#else
#ifndef MODULE_COMPILE
#define E extern __declspec(dllexport)
#define EI extern __declspec(dllimport)
#else
#define E extern __declspec(dllimport)
#define EI extern __declspec(dllexport)
#endif
#endif
#define E extern CoreExport
#define EI extern DllExport
#include "slist.h"
+9 -2
View File
@@ -305,7 +305,7 @@ class CoreExport ModuleException : public CoreException
/** Class with the ability to be extended with key:value pairs.
* Thanks to InspIRCd for this.
*/
class Extensible
class CoreExport Extensible
{
private:
std::map<std::string, void *> Extension_Items;
@@ -360,7 +360,14 @@ class Extensible
* you provide a nonexistent key (case is important) then the function will return false.
* @return Returns true on success.
*/
bool Shrink(const std::string &key);
bool Shrink(const std::string &key)
{
/* map::size_type map::erase( const key_type& key );
* returns the number of elements removed, std::map
* is single-associative so this should only be 0 or 1
*/
return this->Extension_Items.erase(key);
}
/** Get an extension item.
*
+1 -1
View File
@@ -364,7 +364,7 @@ var buildPackages = [
f.WriteLine("CC=cl");
f.WriteLine("RC=rc");
f.WriteLine("MAKE=nmake -f Makefile.win32");
f.WriteLine("BASE_CFLAGS=$(VC6) /O2 /MD /TP /GR /EHsc $(INCFLAGS)");
f.WriteLine("BASE_CFLAGS=$(VC6) /Zi /MD /TP /GR /EHs $(INCFLAGS)");
f.WriteLine("RC_FLAGS="+path_line_rc);
f.WriteLine("LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib");
f.WriteLine("LFLAGS=$(LIBPATH)");
+1 -1
View File
@@ -9,7 +9,7 @@ DATDEST=data
CC=cl
RC=rc
MAKE=nmake -f Makefile.win32
BASE_CFLAGS=$(VC6) /O2 /MD /TP /GR /EHsc $(INCFLAGS)
BASE_CFLAGS=$(VC6) /Zi /MD /TP /GR /EHs $(INCFLAGS)
RC_FLAGS=/i "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\Include" /i "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include"
LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib
LFLAGS=$(LIBPATH)
+3 -3
View File
@@ -22,13 +22,13 @@ OBJS = actions.obj base64.obj bots.obj botserv.obj channels.obj chanserv.obj co
init.obj ircd.obj language.obj log.obj mail.obj main.obj memory.obj \
memoserv.obj messages.obj misc.obj modules.obj mod_version.obj news.obj nickserv.obj operserv.obj \
process.obj send.obj servers.obj sessions.obj slist.obj sockutil.obj \
timeout.obj users.obj module.obj modulemanager.obj hashcomp.obj
timeout.obj users.obj module.obj modulemanager.obj hashcomp.obj configreader.obj
SRCS = actions.c base64.c botserv.c bots.cpp channels.c chanserv.c commands.c compat.c \
config.c datafiles.c encrypt.c events.c helpserv.c hostserv.c init.c ircd.c \
language.c log.c mail.c main.c memory.c memoserv.c messages.c misc.c \
modules.c mod_version.c news.c nickserv.c operserv.c process.c send.c servers.obj sessions.c \
slist.c sockutil.c timeout.c users.c module.cpp modulemanager.cpp hashcomp.cpp
slist.c sockutil.c timeout.c users.c module.cpp modulemanager.cpp hashcomp.cpp configreader.cpp
###########################################################################
@@ -42,7 +42,7 @@ SRCS = actions.c base64.c botserv.c bots.cpp channels.c chanserv.c commands.c c
all: $(PROGRAM)
$(PROGRAM): $(OBJS) win32.res
$(CC) $(OBJS) win32.res /link /out:$(PROGRAM) /implib:anope.lib $(LIBS) $(LFLAGS) $(MLIBS) $(ELIBS)
$(CC) $(OBJS) win32.res /link /debug /out:$(PROGRAM) /implib:anope.lib $(LIBS) $(LFLAGS) $(MLIBS) $(ELIBS)
spotless:
-@erase *.obj *.exe *.exp *.lib tools\*.exe *.res win32.rc *.manifest
+7 -10
View File
@@ -1,16 +1,13 @@
#include "version.h"
#ifndef _WIN32
#define E extern
#define I extern
#ifdef _WIN32
# ifdef MODULE_COMPILE
# define E extern __declspec(dllexport)
# else
# define E extern __declspec(dllimport)
# endif
#else
#ifndef MODULE_COMPILE
#define E extern __declspec(dllexport)
#define I extern __declspec(dllimport)
#else
#define E extern __declspec(dllimport)
#define I extern __declspec(dllexport)
#endif
# define E extern
#endif
extern "C"