1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 22:03:12 +02:00

Fix numerous errors in Win32 building under Visual Studio due to the many changes to trunk. Trunk now builds under Windows like it should.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2106 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-02-17 02:02:20 +00:00
parent 7af9e42d21
commit 3fe5aa037a
15 changed files with 37 additions and 28 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ class NickAlias
NickCore *nc; /* I'm an alias of this */
};
class NickCore : public Extensible
class CoreExport NickCore : public Extensible
{
public:
NickCore();
+4 -4
View File
@@ -6,9 +6,9 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id$
* Based on the original code of Services by Andy Church.
*
* $Id$
*
*/
@@ -23,6 +23,6 @@
extern MDE Command *lookup_cmd(Command *list, char *name);
extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
extern MDE void mod_run_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
extern MDE void do_help_limited(char *service, User * u, Command * c);
//extern MDE void do_help_limited(char *service, User * u, Command * c);
/*************************************************************************/
+3 -3
View File
@@ -21,7 +21,7 @@
* the next token, until none remain, at which point the method returns
* an empty string.
*/
class sepstream
class CoreExport sepstream
{
private:
/** Original string.
@@ -61,7 +61,7 @@ class sepstream
/** A derived form of sepstream, which seperates on commas
*/
class commasepstream : public sepstream
class CoreExport commasepstream : public sepstream
{
public:
/** Initialize with comma seperator
@@ -71,7 +71,7 @@ class commasepstream : public sepstream
/** A derived form of sepstream, which seperates on spaces
*/
class spacesepstream : public sepstream
class CoreExport spacesepstream : public sepstream
{
public:
/** Initialize with space seperator
+3 -3
View File
@@ -23,7 +23,7 @@
typedef HMODULE ano_module_t;
#define dlopen(file, unused) LoadLibrary(file)
MDE const char *dlerror();
E const char *dlerror();
#define dlsym(file, symbol) (HMODULE)GetProcAddress(file, symbol)
#define dlclose(file) FreeLibrary(file) ? 0 : 1
#define ano_modclearerr() SetLastError(0)
@@ -219,7 +219,7 @@ enum CommandFlags
/** Every services command is a class, inheriting from Command.
*/
class Command
class CoreExport Command
{
int flags;
public:
@@ -509,7 +509,7 @@ class CoreExport ModuleManager
* This needs to be public to be used by FOREACH_MOD and friends.
*/
static std::vector<Module *> EventHandlers[I_END];
/** Load up a list of modules.
* @param total_modules The number of modules to load
* @param module_list The list of modules to load
+2 -2
View File
@@ -1246,7 +1246,7 @@ class ServerConfig;
#include "extern.h"
#include "configreader.h"
class IRCDProto
class CoreExport IRCDProto
{
private:
virtual void SendSVSKillInternal(const char *, const char *, const char *) = 0;
@@ -1338,7 +1338,7 @@ class IRCDProto
virtual void SendAccountLogout(User *u, NickCore *account) { }
};
class IRCDTS6Proto : public IRCDProto
class CoreExport IRCDTS6Proto : public IRCDProto
{
};
+1 -1
View File
@@ -70,4 +70,4 @@ void Command::UnsetFlag(CommandFlags flag)
bool Command::HasFlag(CommandFlags flag) const
{
return this->flags & flag;
}
}
+4
View File
@@ -1159,7 +1159,11 @@ int ServerConfig::Read(bool bail)
if (ConfValue(config_data, static_cast<std::string>(MultiValues[Index].tag),
static_cast<std::string>(MultiValues[Index].items[valuenum]),
static_cast<std::string>(MultiValues[Index].items_default[valuenum]), tagnum, item, allow_newlines)) {
#ifdef _WIN32
long time = static_cast<long>(dotime(item.c_str()));
#else
time_t time = dotime(item.c_str());
#endif
vl.push_back(ValueItem(time));
}
else vl.push_back(ValueItem(0));
+1 -1
View File
@@ -68,7 +68,7 @@ class CommandBSBadwords : public Command
return MOD_CONT;
}
pos = strrchr(word, ' ');
pos = strrchr(const_cast<char *>(word), ' '); // XXX - Potentially unsafe cast
if (pos)
{
opt = pos + 1;
+1 -1
View File
@@ -89,7 +89,7 @@ class CommandNSRecover : public Command
duration(u->nc, relstr, sizeof(relstr), NSReleaseTimeout);
notice_help(s_NickServ, u, NICK_HELP_RECOVER, relstr);
do_help_limited(s_NickServ, u, this);
//do_help_limited(s_NickServ, u, this);
return MOD_CONT;
}
+1 -1
View File
@@ -77,7 +77,7 @@ class CommandNSRelease : public Command
duration(u->nc, relstr, sizeof(relstr), NSReleaseTimeout);
notice_help(s_NickServ, u, NICK_HELP_RELEASE, relstr);
do_help_limited(s_NickServ, u, this);
//do_help_limited(s_NickServ, u, this);
return true;
}
+1
View File
@@ -11,6 +11,7 @@
*
*/
#include "services.h"
#include "hashcomp.h"
sepstream::sepstream(const std::string &source, char seperator) : tokens(source), sep(seperator)
+2
View File
@@ -477,7 +477,9 @@ int init_secondary(int ac, char **av)
/* Set signal handlers. Catch certain signals to let us do things or
* panic as necessary, and ignore all others.
*/
#ifndef _WIN32
signal(SIGHUP, sighandler);
#endif
signal(SIGTERM, sighandler);
signal(SIGINT, sighandler);
+4 -2
View File
@@ -33,8 +33,10 @@
#include "modules.h"
// getrlimit.
#include <sys/time.h>
#include <sys/resource.h>
#ifndef _WIN32
# include <sys/time.h>
# include <sys/resource.h>
#endif
/******** Global variables! ********/
+4 -4
View File
@@ -149,7 +149,7 @@ void User::SetVIdent(const std::string &sident)
update_host(this);
}
const std::string &User::GetVIdent() const
const std::string &User::GetVIdent() const
{
if (ircd->vhostmode && (this->mode & ircd->vhostmode))
return this->vident;
@@ -597,7 +597,7 @@ User *do_nick(const char *source, const char *nick, const char *username, const
"DEFCON AKILL");
check_akill(nick, username, host, vhost, ipbuf);
}
/* As with akill checks earlier, we can't not add the user record, as the user may be exempt from bans.
* Instead, we'll just wait for the IRCd to tell us they are gone.
*/
@@ -1005,7 +1005,7 @@ char *create_mask(User * u)
// XXX: someone needs to rewrite this godawful kitten murdering pile of crap.
if (strspn(mhost.c_str(), "0123456789.") == mhost.length()
&& (s = strchr(mhost.c_str(), '.'))
&& (s = strchr(const_cast<char *>(mhost.c_str()), '.')) // XXX - Potentially unsafe cast
&& (s = strchr(s + 1, '.'))
&& (s = strchr(s + 1, '.'))
&& (!strchr(s + 1, '.')))
@@ -1018,7 +1018,7 @@ char *create_mask(User * u)
}
else
{
if ((s = strchr(mhost.c_str(), '.')) && strchr(s + 1, '.')) {
if ((s = strchr(const_cast<char *>(mhost.c_str()), '.')) && strchr(s + 1, '.')) {
s = sstrdup(strchr(mhost.c_str(), '.') - 1);
*s = '*';
strcpy(end, s);
+5 -5
View File
@@ -10,18 +10,18 @@
*
* $Id$
*
*/
*/
#ifdef WIN32
#include <windows.h>
const char *dlerror()
{
static char errbuf[513];
DWORD err = GetLastError();
if (err == 0)
if (!err)
return NULL;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, errbuf, 512,
NULL);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, errbuf, 512, NULL);
return errbuf;
}
#endif