Skip to content

Commit

Permalink
[9337] Use ACE PATH_MAX define magic
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirMangos committed Feb 9, 2010
1 parent f1fb382 commit ebc6c9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions dep/include/sockets/socket_include.h
Expand Up @@ -203,7 +203,9 @@ namespace SOCKETS_NAMESPACE {

// 1.8.6: define FD_SETSIZE to something bigger than 64 if there are a lot of
// simultaneous connections (must be done before including winsock.h)
#ifndef FD_SETSIZE
#define FD_SETSIZE 1024
#endif

// windows 2000 with ipv6 preview installed:
// http://msdn.microsoft.com/downloads/sdks/platform/tpipv6.asp
Expand Down
4 changes: 2 additions & 2 deletions src/framework/Platform/Define.h
Expand Up @@ -48,10 +48,11 @@ typedef ACE_SHLIB_HANDLE MANGOS_LIBRARY_HANDLE;
#define MANGOS_CLOSE_LIBRARY(hlib) ACE_OS::dlclose(hlib)
#define MANGOS_GET_PROC_ADDR(hlib,name) ACE_OS::dlsym(hlib,name)

#define MANGOS_PATH_MAX PATH_MAX // ace/os_include/os_limits.h -> ace/Basic_Types.h

#if PLATFORM == PLATFORM_WINDOWS
# define MANGOS_EXPORT __declspec(dllexport)
# define MANGOS_IMPORT __cdecl
# define MANGOS_PATH_MAX MAX_PATH
#else //PLATFORM != PLATFORM_WINDOWS
# define MANGOS_EXPORT export
# if defined(__APPLE_CC__) && defined(BIG_ENDIAN)
Expand All @@ -61,7 +62,6 @@ typedef ACE_SHLIB_HANDLE MANGOS_LIBRARY_HANDLE;
# else
# define MANGOS_IMPORT __attribute__ ((cdecl))
# endif //__APPLE_CC__ && BIG_ENDIAN
# define MANGOS_PATH_MAX PATH_MAX
#endif //PLATFORM

#if PLATFORM == PLATFORM_WINDOWS
Expand Down
2 changes: 1 addition & 1 deletion src/game/ObjectMgr.cpp
Expand Up @@ -7348,7 +7348,7 @@ bool PlayerCondition::Meets(Player const * player) const
case CONDITION_REPUTATION_RANK:
{
FactionEntry const* faction = sFactionStore.LookupEntry(value1);
return faction && player->GetReputationMgr().GetRank(faction) >= int32(value2);
return faction && player->GetReputationMgr().GetRank(faction) >= ReputationRank(value2);
}
case CONDITION_TEAM:
return player->GetTeam() == value1;
Expand Down
3 changes: 1 addition & 2 deletions src/shared/Config/dotconfpp/dotconfpp.cpp
Expand Up @@ -3,7 +3,6 @@
#include <ace/OS_NS_stdlib.h>

#ifdef WIN32
# define PATH_MAX _MAX_PATH
# define strcasecmp stricmp
# include <io.h>
#else
Expand Down Expand Up @@ -403,7 +402,7 @@ int DOTCONFDocument::checkConfig(const NodeList::iterator& from)
int DOTCONFDocument::setContent(const char* _fileName)
{
int ret = 0;
char realpathBuf[PATH_MAX];
char realpathBuf[MANGOS_PATH_MAX];

if (ACE_OS::realpath(_fileName, realpathBuf) == NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9336"
#define REVISION_NR "9337"
#endif // __REVISION_NR_H__

1 comment on commit ebc6c9f

@NetSky
Copy link

@NetSky NetSky commented on ebc6c9f Feb 9, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice =)

Please sign in to comment.