mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
FreeBSD support and clean up of unnecessary ifdef FREEBSD
This commit is contained in:
parent
9ea71dd94f
commit
73a4e87379
@ -84,6 +84,14 @@ ELSE(MSVC)
|
||||
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
|
||||
ENDIF(MSVC)
|
||||
|
||||
#FreeBSD support
|
||||
IF(UNIX)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
ADD_DEFINITIONS(-DFREEBSD)
|
||||
SET(FREEBSD TRUE)
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
ENDIF(UNIX)
|
||||
|
||||
#use stdint.h types if they exist for this platform (we have to guess otherwise)
|
||||
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
|
||||
IF(HAVE_STDINT_H)
|
||||
|
||||
@ -74,7 +74,7 @@ Mutex::Mutex() {
|
||||
#else
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
#if defined(__CYGWIN__) || defined(__APPLE__)
|
||||
#if defined(__CYGWIN__) || defined(__APPLE__) || defined(FREEBSD)
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#else
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||
|
||||
@ -29,6 +29,9 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include "eqemu_exception.h"
|
||||
#ifdef FREEBSD
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
namespace EQEmu {
|
||||
|
||||
|
||||
@ -26,7 +26,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(eqlaunch "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(eqlaunch "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(eqlaunch "z")
|
||||
TARGET_LINK_LIBRARIES(eqlaunch "m")
|
||||
TARGET_LINK_LIBRARIES(eqlaunch "rt")
|
||||
|
||||
@ -53,7 +53,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(loginserver "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(loginserver "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(loginserver "z")
|
||||
TARGET_LINK_LIBRARIES(loginserver "m")
|
||||
TARGET_LINK_LIBRARIES(loginserver "rt")
|
||||
|
||||
@ -32,7 +32,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(queryserv "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(queryserv "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(queryserv "z")
|
||||
TARGET_LINK_LIBRARIES(queryserv "m")
|
||||
TARGET_LINK_LIBRARIES(queryserv "rt")
|
||||
|
||||
@ -31,7 +31,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(shared_memory "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(shared_memory "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(shared_memory "z")
|
||||
TARGET_LINK_LIBRARIES(shared_memory "m")
|
||||
TARGET_LINK_LIBRARIES(shared_memory "rt")
|
||||
|
||||
@ -34,7 +34,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(ucs "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(ucs "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(ucs "z")
|
||||
TARGET_LINK_LIBRARIES(ucs "m")
|
||||
TARGET_LINK_LIBRARIES(ucs "rt")
|
||||
|
||||
@ -80,7 +80,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(world "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(world "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(world "z")
|
||||
TARGET_LINK_LIBRARIES(world "m")
|
||||
TARGET_LINK_LIBRARIES(world "rt")
|
||||
|
||||
@ -168,7 +168,9 @@ IF(MINGW)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(zone "dl")
|
||||
IF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(zone "dl")
|
||||
ENDIF(NOT FREEBSD)
|
||||
TARGET_LINK_LIBRARIES(zone "z")
|
||||
TARGET_LINK_LIBRARIES(zone "m")
|
||||
TARGET_LINK_LIBRARIES(zone "rt")
|
||||
|
||||
@ -12549,11 +12549,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
//
|
||||
|
||||
char *GuildName = (char *)app->pBuffer;
|
||||
#ifdef FREEBSD
|
||||
if(strlen(GuildName) > 60)
|
||||
#else
|
||||
if(strnlen(GuildName, 64) > 60)
|
||||
#endif
|
||||
{
|
||||
Message(clientMessageError, "Guild name too long.");
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user