This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cover case where CLK_TCK is a float, not integer (from
[perl5.git] / ext / Devel / DProf / DProf.xs
index 62ad464..2917421 100644 (file)
@@ -30,7 +30,7 @@ static U32 dprof_ticks;
 
 /* HZ == clock ticks per second */
 #ifdef VMS
-#  define HZ CLK_TCK
+#  define HZ ((I32)CLK_TCK)
 #  define DPROF_HZ HZ
 #  include <starlet.h>  /* prototype for sys$gettim() */
    clock_t dprof_times(struct tms *bufptr) {
@@ -60,7 +60,7 @@ static U32 dprof_ticks;
 #else
 #  ifndef HZ
 #    ifdef CLK_TCK
-#      define HZ CLK_TCK
+#      define HZ ((I32)CLK_TCK)
 #    else
 #      define HZ 60
 #    endif