Repository : ssh://darcs.haskell.org//srv/darcs/hsc2hs On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d9baa751784daa288b031094caa5b39c9fa8c176 >--------------------------------------------------------------- commit d9baa751784daa288b031094caa5b39c9fa8c176 Author: Ian Lynagh <[email protected]> Date: Tue Apr 24 22:04:12 2012 +0100 Support long longs in const and enum in template-hsc.h This is needed to support pointer-sized values on Win64. >--------------------------------------------------------------- template-hsc.h | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/template-hsc.h b/template-hsc.h index 6f47168..b27faee 100644 --- a/template-hsc.h +++ b/template-hsc.h @@ -31,11 +31,11 @@ void *hsc_stdout(void); hsc_printf ("{-# LINE %d \"%s\" #-}\n", line, file); #endif -#define hsc_const(x...) \ - if ((x) < 0) \ - hsc_printf ("%ld", (long)(x)); \ - else \ - hsc_printf ("%lu", (unsigned long)(x)); +#define hsc_const(x...) \ + if ((x) < 0) \ + hsc_printf ("%lld", (long long)(x)); \ + else \ + hsc_printf ("%llu", (unsigned long long)(x)); #define hsc_const_str(x...) \ { \ @@ -85,15 +85,15 @@ void *hsc_stdout(void); #define hsc_size(t...) \ hsc_printf("(%ld)", (long) sizeof(t)); -#define hsc_enum(t, f, print_name, x) \ - print_name; \ - hsc_printf (" :: %s\n", #t); \ - print_name; \ - hsc_printf (" = %s ", #f); \ - if ((x) < 0) \ - hsc_printf ("(%ld)\n", (long)(x)); \ - else \ - hsc_printf ("%lu\n", (unsigned long)(x)); +#define hsc_enum(t, f, print_name, x) \ + print_name; \ + hsc_printf (" :: %s\n", #t); \ + print_name; \ + hsc_printf (" = %s ", #f); \ + if ((x) < 0) \ + hsc_printf ("(%lld)\n", (long long)(x)); \ + else \ + hsc_printf ("%llu\n", (unsigned long long)(x)); #define hsc_haskellize(x...) \ { \ _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
