Browse Source

Fix build on opensolaris with Sun Studio compiler

ahc_fix_select
tedbullock 16 years ago
parent
commit
297492792b
3 changed files with 23 additions and 6 deletions
  1. +5
    -0
      httperf/ChangeLog
  2. +8
    -4
      httperf/src/lib/heap.c
  3. +10
    -2
      httperf/src/timer.c

+ 5
- 0
httperf/ChangeLog View File

@@ -1,3 +1,8 @@
2008-10-03 Ted Bullock <tbullock@canada.com>

* src/timer.c: Fix build on opensolaris with Sun Studio compiler
* src/lib/heap.c: Fix build on opensolaris with Sun Studio compiler

2008-07-14 Adrian Chadd <adrian@creative.net.au>

* Assorted .c and .h files: Use libevent for the communications backend


+ 8
- 4
httperf/src/lib/heap.c View File

@@ -135,8 +135,10 @@ percolate(struct Heap *h, u_long hole)
Any_Type
remove_min(struct Heap *h)
{
if (is_heap_empty(h))
return (Any_Type) 0;
if (is_heap_empty(h)) {
Any_Type temp = {0};
return temp;
}
else {
Any_Type min = h->storage[1];
h->storage[1] = h->storage[h->num_elements--];
@@ -149,8 +151,10 @@ remove_min(struct Heap *h)
Any_Type
poll_min(struct Heap * h)
{
if (is_heap_empty(h))
return (Any_Type) 0;
if (is_heap_empty(h)) {
Any_Type temp = {0};
return temp;
}
else
return h->storage[1];
}


+ 10
- 2
httperf/src/timer.c View File

@@ -241,9 +241,17 @@ timer_schedule(void (*timeout) (struct Timer * t, Any_Type arg),
t->timeout_delay = delay;

if (delay > 0)
list_push(active_timers, (Any_Type) (void *) t);
{
Any_Type temp;
temp.vp = (void *)t;
list_push(active_timers, temp);
}
else
list_push(persistent_timers, (Any_Type) (void *) t);
{
Any_Type temp;
temp.vp = (void *)t;
list_push(persistent_timers, temp);
}

if (DBG > 2)
fprintf(stderr,


Loading…
Cancel
Save