From 35f0c02465492591b17dfde0e0b26411db4a5c66 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 21 Nov 2010 13:44:10 +0000 Subject: * Added msinttypes (rev. 26, http://msinttypes.googlecode.com/svn/trunk/) portability framework for Visual C++ compilers (related bugreport:4059). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14478 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/cbasetypes.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/common') diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 488e4db49..aee54a4bc 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -73,6 +73,11 @@ # define __attribute__(x) #endif +////////////////////////////////////////////////////////////////////////// +// portable printf/scanf format macros and integer definitions +// NOTE: Visual C++ uses and provided in /3rdparty +////////////////////////////////////////////////////////////////////////// +#include ////////////////////////////////////////////////////////////////////////// // typedefs to compensate type size change from 32bit to 64bit @@ -174,22 +179,20 @@ typedef int ssize_t; typedef __int64 int64; typedef signed __int64 sint64; typedef unsigned __int64 uint64; -#define LLCONST(a) (a##i64) #else typedef long long int64; typedef signed long long sint64; typedef unsigned long long uint64; -#define LLCONST(a) (a##ll) #endif #ifndef INT64_MIN -#define INT64_MIN (LLCONST(-9223372036854775807)-1) +#define INT64_MIN (INT64_C(-9223372036854775807)-1) #endif #ifndef INT64_MAX -#define INT64_MAX (LLCONST(9223372036854775807)) +#define INT64_MAX (INT64_C(9223372036854775807)) #endif #ifndef UINT64_MAX -#define UINT64_MAX (LLCONST(18446744073709551615u)) +#define UINT64_MAX (UINT64_C(18446744073709551615)) #endif -- cgit v1.2.3-60-g2f50