freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] LLP64 model outside Win64


From: Ruslan Nikolaev
Subject: [ft-devel] LLP64 model outside Win64
Date: Thu, 8 Feb 2018 05:11:06 +0000 (UTC)

Is there any reason why it has to be tied to Windows only (see below)? freetype can be used in some embedded applications outside. I hit a compiler warning in that place. Can this code be changed to cast to uintptr_t/size_t, etc as proposed below?


diff -urN freetype-2.9.orig/include/freetype/config/ftconfig.h freetype-2.9/include/freetype/config/ftconfig.h
--- freetype-2.9.orig/include/freetype/config/ftconfig.h    2018-01-03 13:00:18.000000000 -0500
+++ freetype-2.9/include/freetype/config/ftconfig.h 2018-01-23 23:09:26.329279443 -0500
@@ -333,13 +333,7 @@
 #endif


-#ifdef _WIN64
-  /* only 64bit Windows uses the LLP64 data model, i.e., */
-  /* 32bit integers, 64bit pointers                      */
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
-#else
-#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
-#endif
+#define FT_UINT_TO_POINTER( x ) (void*)(uintptr_t)(x)


   /*************************************************************************/

- Ruslan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]