Commit 71f7ab6a authored by kgardas's avatar kgardas Committed by ian@well-typed.com

define own version of PRIdPTR on platform where its not available

Note that PRIdPTR is considered as linux-ism so it's not available on platforms
like Solaris, although some other free Unix(-like) OSes apparently supports
it too.
parent 7dd7008f
......@@ -30,6 +30,16 @@
#include <stdio.h>
#include <string.h>
#if !defined(PRIdPTR)
#if SIZEOF_VOID_P == SIZEOF_INT
/* compiling for 32bit target */
#define PRIdPTR "d"
#else
/* compiling for 64bit target */
#define PRIdPTR "ld"
#endif
#endif
enum Mode { Gen_Haskell_Type, Gen_Haskell_Value, Gen_Haskell_Wrappers, Gen_Haskell_Exports, Gen_Header } mode;
#define str(a,b) #a "_" #b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment