Don't assume size_t is either int- or long-sized.

On 64bit Windows systems, sizeof(int)==sizeof(long)=4, but size_t is 8
bytes large.

Fixes #12179.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2010-07-01 14:30:29 +00:00
parent 0d3d9817c0
commit 227c030f98
2 changed files with 9 additions and 10 deletions

View File

@@ -173,16 +173,19 @@ public:
Arg_Double = 0x0040,
Arg_LongDouble = 0x0080,
#ifdef wxSIZE_T_IS_UINT
#if defined(wxSIZE_T_IS_UINT)
Arg_Size_t = Arg_Int,
#endif
#ifdef wxSIZE_T_IS_ULONG
#elif defined(wxSIZE_T_IS_ULONG)
Arg_Size_t = Arg_LongInt,
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_SIZE_T == SIZEOF_LONG_LONG
Arg_Size_t = Arg_LongLongInt,
#else
Arg_Size_t = 0x0100,
#endif
Arg_IntPtr = 0x0100, // %n -- store # of chars written
Arg_ShortIntPtr = 0x0200,
Arg_LongIntPtr = 0x0400,
Arg_IntPtr = 0x0200, // %n -- store # of chars written
Arg_ShortIntPtr = 0x0400,
Arg_LongIntPtr = 0x0800,
Arg_Unknown = 0x8000 // unrecognized specifier (likely error)
};