[commit: ghc] master: Give an error if we can't find a suitable value for PRIdPTR (c2b5698)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c2b569858967d3d2c4410e7e70f4066e77b753d5

>---------------------------------------------------------------

commit c2b569858967d3d2c4410e7e70f4066e77b753d5
Author: Ian Lynagh <[email protected]>
Date:   Thu Nov 8 21:51:02 2012 +0000

    Give an error if we can't find a suitable value for PRIdPTR

>---------------------------------------------------------------

 includes/mkDerivedConstants.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index bd2214e..dedb386 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -34,9 +34,11 @@
 #if SIZEOF_VOID_P == SIZEOF_INT
 /* compiling for 32bit target */
 #define PRIdPTR "d"
-#else
+#elif SIZEOF_VOID_P == SIZEOF_LONG
 /* compiling for 64bit target */
 #define PRIdPTR "ld"
+#else
+#error Cannot find definition for PRIdPTR
 #endif
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.