@@ -158,7 +158,7 @@ PHP_INI_END()
158158 */
159159PHP_FUNCTION (xhprof_enable )
160160{
161- long xhprof_flags = 0 ; /* XHProf flags */
161+ zend_long xhprof_flags = 0 ; /* XHProf flags */
162162 zval * optional_array = NULL ; /* optional array arg: for future use */
163163
164164 if (zend_parse_parameters (ZEND_NUM_ARGS (), "|lz" , & xhprof_flags , & optional_array ) == FAILURE ) {
@@ -195,7 +195,7 @@ PHP_FUNCTION(xhprof_disable)
195195 */
196196PHP_FUNCTION (xhprof_sample_enable )
197197{
198- long xhprof_flags = 0 ; /* XHProf flags */
198+ zend_long xhprof_flags = 0 ; /* XHProf flags */
199199 hp_get_ignored_functions_from_arg (NULL );
200200 hp_begin (XHPROF_MODE_SAMPLED , xhprof_flags );
201201}
@@ -754,7 +754,7 @@ static void hp_fast_free_hprof_entry(hp_entry_t *p)
754754 * @return void
755755 * @author kannan
756756 */
757- void hp_inc_count (zval * counts , char * name , long count )
757+ void hp_inc_count (zval * counts , char * name , zend_long count )
758758{
759759 HashTable * ht ;
760760 zval * data , val ;
@@ -789,9 +789,9 @@ void hp_inc_count(zval *counts, char *name, long count)
789789 * @return void
790790 * @author veeve
791791 */
792- void hp_trunc_time (struct timeval * tv , uint64 intr )
792+ void hp_trunc_time (struct timeval * tv , zend_ulong intr )
793793{
794- uint64 time_in_micro ;
794+ zend_ulong time_in_micro ;
795795
796796 /* Convert to microsecs and trunc that first */
797797 time_in_micro = (tv -> tv_sec * 1000000 ) + tv -> tv_usec ;
@@ -817,7 +817,7 @@ void hp_sample_stack(hp_entry_t **entries)
817817 char symbol [SCRATCH_BUF_LEN * 1000 ];
818818
819819 /* Build key */
820- snprintf (key , sizeof (key ), "%d.%06d" , XHPROF_G (last_sample_time ).tv_sec , XHPROF_G (last_sample_time ).tv_usec );
820+ snprintf (key , sizeof (key ), "%d.%06d" , ( uint32 ) XHPROF_G (last_sample_time ).tv_sec , ( uint32 ) XHPROF_G (last_sample_time ).tv_usec );
821821
822822 /* Init stats in the global stats_count hashtable */
823823 hp_get_function_stack (* entries , XHPROF_G (sampling_depth ), symbol , sizeof (symbol ));
@@ -863,7 +863,7 @@ void hp_sample_check(hp_entry_t **entries)
863863 * ***********************
864864 */
865865
866- static inline uint64 cycle_timer ()
866+ static inline zend_ulong cycle_timer ()
867867{
868868#if defined(__APPLE__ ) && defined(__MACH__ )
869869 return mach_absolute_time () / XHPROF_G (timebase_conversion );
@@ -884,7 +884,7 @@ static inline uint64 cycle_timer()
884884/**
885885 * Get the current real CPU clock timer
886886 */
887- static uint64 cpu_timer ()
887+ static zend_ulong cpu_timer ()
888888{
889889#if defined(CLOCK_PROCESS_CPUTIME_ID )
890890 struct timespec s ;
@@ -902,7 +902,7 @@ static uint64 cpu_timer()
902902/**
903903 * Incr time with the given microseconds.
904904 */
905- static void incr_us_interval (struct timeval * start , uint64 incr )
905+ static void incr_us_interval (struct timeval * start , zend_ulong incr )
906906{
907907 incr += (start -> tv_sec * 1000000 + start -> tv_usec );
908908 start -> tv_sec = incr / 1000000 ;
@@ -1266,7 +1266,7 @@ ZEND_DLEXPORT zend_op_array* hp_compile_string(zval *source_string, char *filena
12661266 * It replaces all the functions like zend_execute, zend_execute_internal,
12671267 * etc that needs to be instrumented with their corresponding proxies.
12681268 */
1269- static void hp_begin (long level , long xhprof_flags )
1269+ static void hp_begin (zend_long level , zend_long xhprof_flags )
12701270{
12711271 if (!XHPROF_G (enabled )) {
12721272 int hp_profile_flag = 1 ;
0 commit comments