httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hill <>
Subject relative_times_report_t
Date Tue, 17 Dec 2002 20:29:48 GMT

Hi all,

Two problems, and a couple of minor issues encountered trying to build 
flood from CVS on tru64:

first: in flood_report_relative_times.c we have:

typedef void relative_times_report_t;

apr_status_t relative_times_report_init(report_t **report, config_t *config,
                              const char *profile_name, apr_pool_t *pool)
    *report = apr_palloc(pool, sizeof(relative_times_report_t));

Our compiler (I would think correctly) chokes on the sizeof(void) in the 
What confuses me is what this what "report" is used for. Looks to me as 
if it is a placeholder and is not really used. If that is indeed the 
case then switching to something like void* would make my compiler 
happy. On the other hand.... switching it to use:
    *report = apr_palloc(pool, sizeof(report_t *));
 seems just as logical to me, as that matches the return type better.

second: Tru64 does not have (nor need) a strtoll, our long is 64 bit 
anyway. Nor do we have strtoq (whatever that does). The following fixes 
it for me:

# ~/bin/diff -u config.h.orig config.h
--- config.h.orig       2002-12-17 13:36:33.000000000 -0500
+++ config.h    2002-12-17 13:51:25.000000000 -0500
@@ -80,6 +80,8 @@
 #define strtoll(p, e, b) strtoq(p, e, b)
+#define strtoll(p, e, b) strtol(p, e, b)
 #endif  /* __config_h */

It could be argued I suppose that this should be special cased for Tru64 

#if defined(__alpha) && defined(__osf__)

but I would think that in the absence of strtoll or strtoq, this is the 
best fallback.

A minor (probably issue): in flood_net.h and flood_net_ssl.h, for the 
function read_socket(),
buflen should really be a apr_size_t. On Tru64, this is a long and not 
an int and causes a warning or two. It is proably not a dangerous error 

    Dave Hill

View raw message