mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define. I64FMTD renamed to UI64FMTD for more clear name. * Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals. Please always use UI64LIT(0x00001) instead less portable 0x00001LL
This commit is contained in:
parent
e8cd008005
commit
2a27a44e2a
36 changed files with 372 additions and 362 deletions
|
|
@ -98,6 +98,7 @@
|
|||
#include "LockedQueue.h"
|
||||
#include "Threading.h"
|
||||
|
||||
#include <ace/Basic_Types.h>
|
||||
#include <ace/Guard_T.h>
|
||||
#include <ace/RW_Thread_Mutex.h>
|
||||
#include <ace/Thread_Mutex.h>
|
||||
|
|
@ -125,8 +126,6 @@
|
|||
#include <float.h>
|
||||
|
||||
#define I64FMT "%016I64X"
|
||||
#define I64FMTD "%I64u"
|
||||
#define SI64FMTD "%I64d"
|
||||
#define snprintf _snprintf
|
||||
#define atoll __atoi64
|
||||
#define vsnprintf _vsnprintf
|
||||
|
|
@ -138,10 +137,15 @@
|
|||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
#define I64FMT "%016llX"
|
||||
#define I64FMTD "%llu"
|
||||
#define SI64FMTD "%lld"
|
||||
|
||||
#endif
|
||||
|
||||
#define UI64FMTD ACE_UINT64_FORMAT_SPECIFIER
|
||||
#define UI64LIT(N) ACE_UINT64_LITERAL(N)
|
||||
|
||||
#define SI64FMTD ACE_INT64_FORMAT_SPECIFIER
|
||||
#define SI64LIT(N) ACE_INT64_LITERAL(N)
|
||||
|
||||
inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
|
||||
|
||||
#define atol(a) strtoul( a, NULL, 10)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue