define wxLongLong_t as long long if it is supported, only fall back to long otherwise as we want to be able to pass wxLongLong_t to the standard C99 functions working with long long

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-10-30 11:29:56 +00:00
parent 1b1b531857
commit 89fd8148ce

View File

@ -920,13 +920,15 @@ inline void *wxUIntToPtr(wxUIntPtr p)
/* we will need to define this */
#undef wxLongLongIsLong
/* first check for generic cases which are long on 64bit machine and "long */
/* long", then check for specific compilers */
#if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
#define wxLongLong_t long
#define wxLongLongSuffix l
#define wxLongLongFmtSpec _T("l")
#define wxLongLongIsLong
/* first check for compilers which have the real long long */
#if (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
defined(__GNUC__) || \
defined(__CYGWIN__) || \
defined(__WXMICROWIN__) || \
(defined(__DJGPP__) && __DJGPP__ >= 2)
#define wxLongLong_t long long
#define wxLongLongSuffix ll
#define wxLongLongFmtSpec _T("ll")
#elif defined(__WXPALMOS__)
#define wxLongLong_t int64_t
#define wxLongLongSuffix ll
@ -951,14 +953,6 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#define wxLongLong_t long long
#define wxLongLongSuffix ll
#define wxLongLongFmtSpec _T("I64")
#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
defined(__GNUC__) || \
defined(__CYGWIN__) || \
defined(__WXMICROWIN__) || \
(defined(__DJGPP__) && __DJGPP__ >= 2)
#define wxLongLong_t long long
#define wxLongLongSuffix ll
#define wxLongLongFmtSpec _T("ll")
#elif defined(__MWERKS__)
#if __option(longlong)
#define wxLongLong_t long long
@ -970,6 +964,11 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#endif
#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
#define wxLongLong_t long long
#elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
#define wxLongLong_t long
#define wxLongLongSuffix l
#define wxLongLongFmtSpec _T("l")
#define wxLongLongIsLong
#endif