- Fixed ladmin's linux compilation and moved some platform specific defines to cbasetypes.h

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9435 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS 2006-12-07 23:59:26 +00:00
parent 1928d865c8
commit 7ecc1ab6e1
5 changed files with 55 additions and 31 deletions

View File

@ -3,7 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2004/12/07 2006/12/07
* Fixed ladmin's linux compilation and moved some platform specific
defines to cbasetypes.h [FlavioJS]
* Cleaned up implementation of NPC_EMOTION/NPC_EMOTION_ON. Now val0 is the * Cleaned up implementation of NPC_EMOTION/NPC_EMOTION_ON. Now val0 is the
emotion, val1 sets the mode, val2 adds to the mode, val3 removes from the emotion, val1 sets the mode, val2 adds to the mode, val3 removes from the
mode. val4 asks to remove the previous mode change, otherwise it will stack mode. val4 asks to remove the previous mode change, otherwise it will stack

View File

@ -29,9 +29,10 @@ ifeq ($(findstring /,$(HAVESVN)), /)
svnversion.h: svnversion.h:
@printf "#define SVNVERSION " > svnversion.h @printf "#define SVNVERSION " > svnversion.h
@svnversion . >> svnversion.h @svnversion . >> svnversion.h
@printf "\n" >> svnversion.h
else else
svnversion.h: svnversion.h:
@printf "" > svnversion.h @printf "\n" > svnversion.h
endif endif
obj/minicore.o: core.c core.h obj/minicore.o: core.c core.h
@ -54,3 +55,6 @@ obj/plugins.o: plugins.c plugins.h plugin.h
obj/showmsg.o: showmsg.c showmsg.h obj/showmsg.o: showmsg.c showmsg.h
obj/strlib.o: strlib.c strlib.h utils.h obj/strlib.o: strlib.c strlib.h utils.h
obj/mapindex.o: mapindex.c mapindex.h obj/mapindex.o: mapindex.c mapindex.h
obj/utils.o: utils.c utils.h malloc.h showmsg.h mmo.h
mmo.h: cbasetypes.h
@touch mmo.h

View File

@ -243,6 +243,9 @@ typedef int bool;
#endif // not cplusplus #endif // not cplusplus
////////////////////////////// //////////////////////////////
//////////////////////////////////////////////////////////////////////////
// macro tools
#ifdef swap // just to be sure #ifdef swap // just to be sure
#undef swap #undef swap
#endif #endif
@ -271,4 +274,45 @@ typedef int bool;
#define NBBY 8 #define NBBY 8
#endif #endif
//////////////////////////////////////////////////////////////////////////
// path separator
#if defined(WIN32)
#define PATHSEP '\\'
#elif defined(__APPLE__)
#define PATHSEP ':'
#else
#define PATHSEP '/'
#endif
//////////////////////////////////////////////////////////////////////////
// EOL separator
#if defined(WIN32) || defined(CYGWIN)
#define RETCODE "\r\n" // CR/LF : Windows systems
#elif defined(__APPLE__)
#define RETCODE "\r" // CR : Macintosh systems
#else
#define RETCODE "\n" // LF : Unix systems
#endif
#define RET RETCODE
//////////////////////////////////////////////////////////////////////////
// Assert
#if ! defined(Assert)
#if defined(RELEASE)
#define Assert(EX)
#else
// extern "C" {
#include <assert.h>
// }
#if !defined(DEFCPP) && defined(WIN32) && !defined(MINGW)
#include <crtdbg.h>
#endif
#define Assert(EX) assert(EX)
#endif
#endif /* ! defined(Assert) */
#endif /* _CBASETYPES_H_ */ #endif /* _CBASETYPES_H_ */

View File

@ -5,33 +5,9 @@
#define _MMO_H_ #define _MMO_H_
#include <time.h> #include <time.h>
#include "cbasetypes.h"
#include "utils.h" // _WIN32 #include "utils.h" // _WIN32
#if ! defined(Assert)
#if defined(RELEASE)
#define Assert(EX)
#else
// extern "C" {
#include <assert.h>
// }
#ifndef DEFCPP
#if defined(_WIN32) && !defined(MINGW)
#include <crtdbg.h>
#endif
#endif
#define Assert(EX) assert(EX)
#endif
#endif /* ! defined(Assert) */
#ifdef CYGWIN
// txtやlogなどの書き出すファイルの改行コード
#define RETCODE "\r\n" // (CR/LFWindows系)
#else
#define RETCODE "\n" // (LFUnix系
#endif
#define RET RETCODE
#define FIFOSIZE_SERVERLINK 256*1024 #define FIFOSIZE_SERVERLINK 256*1024
// set to 0 to not check IP of player between each server. // set to 0 to not check IP of player between each server.

View File

@ -8,12 +8,10 @@
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#define PATHSEP '\\'
#else #else
#include <unistd.h> #include <unistd.h>
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
#define PATHSEP '/'
#endif #endif
#include "utils.h" #include "utils.h"