Remove old non-compliant win32 defines.

This commit is contained in:
KimLS
2019-06-22 16:00:06 -07:00
parent 5d138891d8
commit 4ae0f2a1d7
103 changed files with 192 additions and 306 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
SET(zone_sources
aa.cpp
+1 -1
View File
@@ -49,7 +49,7 @@ extern QueryServ* QServ;
extern WorldServer worldserver;
extern FastMath g_Math;
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
+1 -1
View File
@@ -109,7 +109,7 @@ int GetArgs(char * string)
char *buffer = com_list;
memset(temp,0x0,255);
//memset(buffer,0x0,512);
//#ifdef WIN32
//#ifdef _WIN32
//strcpy(buffer,com_list);
//#else
//strncpy(buffer,com_list,sizeof(buffer)-1);
+1 -1
View File
@@ -25,7 +25,7 @@ target to center around.
class Zone;
#ifdef _WINDOWS
#ifdef _WIN32
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
#define snprintf _snprintf
#define vsnprintf _vsnprintf
+1 -1
View File
@@ -33,7 +33,7 @@
#include "quest_parser_collection.h"
#ifndef WIN32
#ifndef _WIN32
#include <stdlib.h>
#include "../common/unix.h"
#endif
+1 -1
View File
@@ -41,7 +41,7 @@
#include <ctime>
#include <thread>
#ifdef _WINDOWS
#ifdef _WIN32
#define strcasecmp _stricmp
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
#include <stdio.h>
// for windows compile
#ifndef _WINDOWS
#ifndef _WIN32
#include <stdarg.h>
#include <sys/socket.h>
#include <netinet/in.h>
+1 -1
View File
@@ -59,7 +59,7 @@ namespace EQEmu
#include "zone.h"
#include "zonedb.h"
#ifdef _WINDOWS
#ifdef _WIN32
// since windows defines these within windef.h (which windows.h include)
// we are required to undefine these to use min and max from <algorithm>
#undef min
+1 -1
View File
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <string.h>
#include <zlib.h>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
+1 -1
View File
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <zlib.h>
#ifdef _WINDOWS
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#define snprintf _snprintf
+4 -4
View File
@@ -39,7 +39,7 @@
#include <ctime>
#include <thread>
#ifdef _WINDOWS
#ifdef _WIN32
#define strcasecmp _stricmp
#endif
@@ -844,7 +844,7 @@ void command_setanim(Client *c, const Seperator *sep)
void command_serverinfo(Client *c, const Seperator *sep)
{
#ifdef _WINDOWS
#ifdef _WIN32
char intbuffer [sizeof(unsigned long)];
c->Message(0, "Operating system information.");
c->Message(0, " %s", Ver_name);
@@ -11815,7 +11815,7 @@ void command_hotfix(Client *c, const Seperator *sep) {
c->Message(0, "Creating and applying hotfix");
std::thread t1([c,hotfix_name]() {
#ifdef WIN32
#ifdef _WIN32
if(hotfix_name.length() > 0) {
system(StringFormat("shared_memory -hotfix=%s", hotfix_name.c_str()).c_str());
} else {
@@ -11856,7 +11856,7 @@ void command_load_shared_memory(Client *c, const Seperator *sep) {
hotfix_name = sep->arg[1];
c->Message(0, "Loading shared memory segment %s", hotfix_name.c_str());
std::thread t1([c,hotfix_name]() {
#ifdef WIN32
#ifdef _WIN32
if(hotfix_name.length() > 0) {
system(StringFormat("shared_memory -hotfix=%s", hotfix_name.c_str()).c_str());
} else {
+1 -1
View File
@@ -21,7 +21,7 @@ Child of the Mob class.
-Quagmire
*/
#ifdef _WINDOWS
#ifdef _WIN32
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
#define snprintf _snprintf
#define vsnprintf _vsnprintf
+3 -3
View File
@@ -22,15 +22,15 @@ Eglin
#include <EXTERN.h>
#define WIN32IO_IS_STDIO
#ifndef WIN32
#ifndef _WIN32
extern "C" { //the perl headers dont do this for us...
#endif
#include <perl.h>
#include <XSUB.h>
#ifndef WIN32
#ifndef _WIN32
};
#endif
#ifdef WIN32
#ifdef _WIN32
#define snprintf _snprintf
#endif
+2 -2
View File
@@ -5,12 +5,12 @@
#include <EXTERN.h>
#define WIN32IO_IS_STDIO
#ifndef WIN32
#ifndef _WIN32
extern "C" { //the perl headers dont do this for us...
#endif
#include <perl.h>
#include <XSUB.h>
#ifndef WIN32
#ifndef _WIN32
};
#endif
+1 -1
View File
@@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef _WINDOWS
#ifdef _WIN32
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
#define snprintf _snprintf
#define vsnprintf _vsnprintf
+4 -4
View File
@@ -22,7 +22,7 @@
#include <string.h>
#include <iostream>
#ifdef _WINDOWS
#ifdef _WIN32
#include <process.h>
#else
#include <pthread.h>
@@ -43,7 +43,7 @@
#include "npc_scale_manager.h"
#include "../common/say_link.h"
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
@@ -532,7 +532,7 @@ void EntityList::MobProcess()
entity_list.RemoveNPC(id);
}
else {
#ifdef _WINDOWS
#ifdef _WIN32
struct in_addr in;
in.s_addr = mob->CastToClient()->GetIP();
Log(Logs::General, Logs::Zone_Server, "Dropping client: Process=false, ip=%s port=%u", inet_ntoa(in), mob->CastToClient()->GetPort());
@@ -2688,7 +2688,7 @@ char *EntityList::MakeNameUnique(char *name)
}
for (int i=0; i < 300; i++) {
if (!used[i]) {
#ifdef _WINDOWS
#ifdef _WIN32
snprintf(name, 64, "%s%03d", name, i);
#else
//glibc clears destination of snprintf
+1 -1
View File
@@ -21,7 +21,7 @@
#include "map.h"
#include "zone.h"
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#endif
+1 -1
View File
@@ -33,7 +33,7 @@
#include <iostream>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#endif
+1 -1
View File
@@ -31,7 +31,7 @@
#include <iostream>
#include <stdlib.h>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#endif
+5 -5
View File
@@ -84,7 +84,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#ifdef _WINDOWS
#ifdef _WIN32
#include <conio.h>
#include <process.h>
#else
@@ -279,7 +279,7 @@ int main(int argc, char** argv) {
Log(Logs::General, Logs::Error, "Could not set signal handler");
return 1;
}
#ifndef WIN32
#ifndef _WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
Log(Logs::General, Logs::Error, "Could not set signal handler");
return 1;
@@ -442,7 +442,7 @@ int main(int argc, char** argv) {
EQStreamIdentifier stream_identifier;
RegisterAllPatches(stream_identifier);
#ifndef WIN32
#ifndef _WIN32
Log(Logs::Detail, Logs::None, "Main thread running with thread id %d", pthread_self());
#endif
@@ -602,7 +602,7 @@ int main(int argc, char** argv) {
}
void CatchSignal(int sig_num) {
#ifdef _WINDOWS
#ifdef _WIN32
Log(Logs::General, Logs::Zone_Server, "Recieved signal: %i", sig_num);
#endif
RunLoops = false;
@@ -672,7 +672,7 @@ NetConnection::~NetConnection() {
/* Update Window Title with relevant information */
void UpdateWindowTitle(char* iNewTitle) {
#ifdef _WINDOWS
#ifdef _WIN32
char tmp[500];
if (iNewTitle) {
snprintf(tmp, sizeof(tmp), "%i: %s", ZoneConfig::get()->ZonePort, iNewTitle);
+1 -1
View File
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef _WINDOWS
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#else
+1 -1
View File
@@ -46,7 +46,7 @@
#include <stdio.h>
#include <string>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
+1 -1
View File
@@ -29,7 +29,7 @@
#include <list>
#ifdef _WINDOWS
#ifdef _WIN32
#define M_PI 3.141592
#endif
+2 -2
View File
@@ -18,13 +18,13 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
#include "../common/global_define.h"
#include "../common/eqemu_logsys.h"
#include <string.h>
#ifdef _WINDOWS
#ifdef _WIN32
#include <process.h>
#else
#include <pthread.h>
#endif
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
+1 -1
View File
@@ -34,7 +34,7 @@
#include "bot.h"
#endif
#ifndef WIN32
#ifndef _WIN32
#include <stdlib.h>
#include "../common/unix.h"
#endif
+1 -1
View File
@@ -33,7 +33,7 @@
#include <math.h>
#ifndef WIN32
#ifndef _WIN32
#include <stdlib.h>
#include "../common/unix.h"
#endif
+1 -1
View File
@@ -87,7 +87,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
#include <math.h>
#include <algorithm>
#ifndef WIN32
#ifndef _WIN32
#include <stdlib.h>
#include "../common/unix.h"
#endif
+1 -1
View File
@@ -22,7 +22,7 @@ Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
#include <string.h>
#ifdef _WINDOWS
#ifdef _WIN32
#define strcasecmp _stricmp
#endif
+1 -1
View File
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <list>
#ifndef WIN32
#ifndef _WIN32
#include <netinet/in.h> //for htonl
#endif
+1 -1
View File
@@ -24,7 +24,7 @@
#include <map>
#ifdef _WINDOWS
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <process.h>
+1 -1
View File
@@ -45,7 +45,7 @@
extern QueryServ* QServ;
extern WorldServer worldserver;
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
+1 -1
View File
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdarg.h>
#include <limits.h>
#ifdef _WINDOWS
#ifdef _WIN32
#include <process.h>
#define snprintf _snprintf
+2 -2
View File
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#else
@@ -60,7 +60,7 @@
#include <ctime>
#include <iostream>
#ifdef _WINDOWS
#ifdef _WIN32
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp