浏览代码

Fix build on opensolaris with Sun Studio compiler

ahc_fix_select
tedbullock 16 年前
父节点
当前提交
297492792b
共有 3 个文件被更改,包括 23 次插入6 次删除
  1. +5
    -0
      httperf/ChangeLog
  2. +8
    -4
      httperf/src/lib/heap.c
  3. +10
    -2
      httperf/src/timer.c

+ 5
- 0
httperf/ChangeLog 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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,


正在加载...
取消
保存