Initial full pass through code to fix issues with 64-bit/mismatch sign/mismatch size printf style formatters.

Still need to look more into how we are handling time and convert to apr_time_t (or time_t) where appropriate.
Still need to look into our use of 'long' as windows is LLP64 where 'long' is still 32-bit.
This commit is contained in:
brectanus
2007-11-15 19:09:14 +00:00
parent b9defc0adb
commit aff6900539
16 changed files with 73 additions and 71 deletions

View File

@@ -64,7 +64,7 @@ static char *create_hash(modsec_rec *msr,
*
*/
static char *create_token(modsec_rec *msr) {
unsigned int current_time;
apr_time_t current_time;
const char *time_string = NULL;
const char *hash = NULL;
int timeout = DEFAULT_TIMEOUT;
@@ -74,7 +74,7 @@ static char *create_token(modsec_rec *msr) {
}
current_time = apr_time_sec(apr_time_now());
time_string = apr_psprintf(msr->mp, "%d", current_time + timeout);
time_string = apr_psprintf(msr->mp, "%" APR_TIME_T_FMT, (apr_time_t)(current_time + timeout));
if (time_string == NULL) return NULL;
hash = create_hash(msr, time_string);